@@ -43,6 +43,14 @@ option (google.api.resource_definition) = {
4343 type : "compute.googleapis.com/Network"
4444 pattern : "projects/{project}/global/networks/{network}"
4545};
46+ option (google.api.resource_definition ) = {
47+ type : "cloudkms.googleapis.com/CryptoKey"
48+ pattern : "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
49+ };
50+ option (google.api.resource_definition ) = {
51+ type : "compute.googleapis.com/ServiceAttachment"
52+ pattern : "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}"
53+ };
4654
4755// View on Instance. Pass this enum to rpcs that returns an Instance message to
4856// control which subsets of fields to get.
@@ -93,6 +101,9 @@ enum DatabaseVersion {
93101
94102 // The database version is Postgres 16.
95103 POSTGRES_16 = 4 ;
104+
105+ // The database version is Postgres 17.
106+ POSTGRES_17 = 5 ;
96107}
97108
98109// Subscription_type added to distinguish between Standard and Trial
@@ -151,7 +162,9 @@ message EncryptionConfig {
151162 // The fully-qualified resource name of the KMS key.
152163 // Each Cloud KMS key is regionalized and has the following format:
153164 // projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]
154- string kms_key_name = 1 ;
165+ string kms_key_name = 1 [(google.api.resource_reference ) = {
166+ type : "cloudkms.googleapis.com/CryptoKey"
167+ }];
155168}
156169
157170// EncryptionInfo describes the encryption information of a cluster or a backup.
@@ -496,7 +509,9 @@ message Cluster {
496509 message SecondaryConfig {
497510 // The name of the primary cluster name with the format:
498511 // * projects/{project}/locations/{region}/clusters/{cluster_id}
499- string primary_cluster_name = 1 ;
512+ string primary_cluster_name = 1 [(google.api.resource_reference ) = {
513+ type : "alloydb.googleapis.com/Cluster"
514+ }];
500515 }
501516
502517 // Configuration for the primary cluster. It has the list of clusters that are
@@ -505,8 +520,12 @@ message Cluster {
505520 message PrimaryConfig {
506521 // Output only. Names of the clusters that are replicating from this
507522 // cluster.
508- repeated string secondary_cluster_names = 1
509- [(google.api.field_behavior ) = OUTPUT_ONLY ];
523+ repeated string secondary_cluster_names = 1 [
524+ (google.api.field_behavior ) = OUTPUT_ONLY ,
525+ (google.api.resource_reference ) = {
526+ type : "alloydb.googleapis.com/Cluster"
527+ }
528+ ];
510529 }
511530
512531 // PscConfig contains PSC related configuration at a cluster level.
@@ -544,11 +563,8 @@ message Cluster {
544563 // The cluster is active and running.
545564 READY = 1 ;
546565
547- // The cluster is stopped. All instances in the cluster are stopped.
548- // Customers can start a stopped cluster at any point and all their
549- // instances will come back to life with same names and IP resources. In
550- // this state, customer pays for storage.
551- // Associated backups could also be present in a stopped cluster.
566+ // This is unused. Even when all instances in the cluster are stopped, the
567+ // cluster remains in READY state.
552568 STOPPED = 2 ;
553569
554570 // The cluster is empty and has no associated resources.
@@ -761,10 +777,10 @@ message Cluster {
761777 (google.api.field_behavior ) = OPTIONAL
762778 ];
763779
764- // Output only. AlloyDB per-cluster service agent email . This service account
765- // is created per-cluster per-project, and is different from that of the
766- // primary service agent which is created per-project. The service account
767- // naming format is subject to change.
780+ // Output only. AlloyDB per-cluster service account . This service account is
781+ // created per-cluster per-project, and is different from the per-project
782+ // service account. The per-cluster service account naming format is subject
783+ // to change.
768784 string service_account_email = 46 [(google.api.field_behavior ) = OUTPUT_ONLY ];
769785}
770786
@@ -980,8 +996,12 @@ message Instance {
980996 // Service Connect (PSC) is enabled for the instance.
981997 // The name of the resource will be in the format of
982998 // `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
983- string service_attachment_link = 1
984- [(google.api.field_behavior ) = OUTPUT_ONLY ];
999+ string service_attachment_link = 1 [
1000+ (google.api.field_behavior ) = OUTPUT_ONLY ,
1001+ (google.api.resource_reference ) = {
1002+ type : "compute.googleapis.com/ServiceAttachment"
1003+ }
1004+ ];
9851005
9861006 // Optional. List of consumer projects that are allowed to create
9871007 // PSC endpoints to service-attachments to this instance.
@@ -1048,23 +1068,14 @@ message Instance {
10481068
10491069 // Configuration for Managed Connection Pool (MCP).
10501070 message ConnectionPoolConfig {
1051- // The pool mode. Defaults to `POOL_MODE_TRANSACTION`.
1052- enum PoolMode {
1053- // The pool mode is not specified. Defaults to `POOL_MODE_TRANSACTION`.
1054- POOL_MODE_UNSPECIFIED = 0 ;
1055-
1056- // Server is released back to pool after a client disconnects.
1057- POOL_MODE_SESSION = 1 ;
1058-
1059- // Server is released back to pool after a transaction finishes.
1060- POOL_MODE_TRANSACTION = 2 ;
1061- }
1062-
10631071 // Optional. Whether to enable Managed Connection Pool (MCP).
10641072 bool enabled = 12 [(google.api.field_behavior ) = OPTIONAL ];
10651073
10661074 // Optional. Connection Pool flags, as a list of "key": "value" pairs.
10671075 map <string , string > flags = 13 [(google.api.field_behavior ) = OPTIONAL ];
1076+
1077+ // Output only. The number of running poolers per instance.
1078+ int32 pooler_count = 14 [(google.api.field_behavior ) = OUTPUT_ONLY ];
10681079 }
10691080
10701081 // Instance State
@@ -1719,13 +1730,43 @@ message Database {
17191730 // `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
17201731 string name = 1 [(google.api.field_behavior ) = IDENTIFIER ];
17211732
1722- // Optional. Charset for the database.
1733+ // Optional. Immutable. Charset for the database.
17231734 // This field can contain any PostgreSQL supported charset name.
17241735 // Example values include "UTF8", "SQL_ASCII", etc.
1725- string charset = 2 [(google.api.field_behavior ) = OPTIONAL ];
1736+ string charset = 2 [
1737+ (google.api.field_behavior ) = OPTIONAL ,
1738+ (google.api.field_behavior ) = IMMUTABLE
1739+ ];
1740+
1741+ // Optional. Immutable. lc_collate for the database.
1742+ // String sort order.
1743+ // Example values include "C", "POSIX", etc.
1744+ string collation = 3 [
1745+ (google.api.field_behavior ) = OPTIONAL ,
1746+ (google.api.field_behavior ) = IMMUTABLE
1747+ ];
17261748
1727- // Optional. Collation for the database.
1728- // Name of the custom or native collation for postgres.
1729- // Example values include "C", "POSIX", etc
1730- string collation = 3 [(google.api.field_behavior ) = OPTIONAL ];
1749+ // Optional. Immutable. lc_ctype for the database.
1750+ // Character classification (What is a letter? The upper-case equivalent?).
1751+ // Example values include "C", "POSIX", etc.
1752+ string character_type = 4 [
1753+ (google.api.field_behavior ) = OPTIONAL ,
1754+ (google.api.field_behavior ) = IMMUTABLE
1755+ ];
1756+
1757+ // Optional. Whether the database is a template database.
1758+ // Deprecated in favor of is_template_database.
1759+ bool is_template = 5
1760+ [deprecated = true , (google.api.field_behavior ) = OPTIONAL ];
1761+
1762+ // Input only. Immutable. Template of the database to be used for creating a
1763+ // new database.
1764+ string database_template = 6 [
1765+ (google.api.field_behavior ) = INPUT_ONLY ,
1766+ (google.api.field_behavior ) = IMMUTABLE
1767+ ];
1768+
1769+ // Optional. Whether the database is a template database.
1770+ optional bool is_template_database = 7
1771+ [(google.api.field_behavior ) = OPTIONAL ];
17311772}
0 commit comments