@@ -42,6 +42,14 @@ option (google.api.resource_definition) = {
4242 type : "compute.googleapis.com/Network"
4343 pattern : "projects/{project}/global/networks/{network}"
4444};
45+ option (google.api.resource_definition ) = {
46+ type : "cloudkms.googleapis.com/CryptoKey"
47+ pattern : "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
48+ };
49+ option (google.api.resource_definition ) = {
50+ type : "compute.googleapis.com/ServiceAttachment"
51+ pattern : "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}"
52+ };
4553
4654// View on Instance. Pass this enum to rpcs that returns an Instance message to
4755// control which subsets of fields to get.
@@ -92,6 +100,9 @@ enum DatabaseVersion {
92100
93101 // The database version is Postgres 16.
94102 POSTGRES_16 = 4 ;
103+
104+ // The database version is Postgres 17.
105+ POSTGRES_17 = 5 ;
95106}
96107
97108// Subscription_type added to distinguish between Standard and Trial
@@ -150,7 +161,9 @@ message EncryptionConfig {
150161 // The fully-qualified resource name of the KMS key.
151162 // Each Cloud KMS key is regionalized and has the following format:
152163 // projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]
153- string kms_key_name = 1 ;
164+ string kms_key_name = 1 [(google.api.resource_reference ) = {
165+ type : "cloudkms.googleapis.com/CryptoKey"
166+ }];
154167}
155168
156169// EncryptionInfo describes the encryption information of a cluster or a backup.
@@ -495,7 +508,9 @@ message Cluster {
495508 message SecondaryConfig {
496509 // The name of the primary cluster name with the format:
497510 // * projects/{project}/locations/{region}/clusters/{cluster_id}
498- string primary_cluster_name = 1 ;
511+ string primary_cluster_name = 1 [(google.api.resource_reference ) = {
512+ type : "alloydb.googleapis.com/Cluster"
513+ }];
499514 }
500515
501516 // Configuration for the primary cluster. It has the list of clusters that are
@@ -504,8 +519,12 @@ message Cluster {
504519 message PrimaryConfig {
505520 // Output only. Names of the clusters that are replicating from this
506521 // cluster.
507- repeated string secondary_cluster_names = 1
508- [(google.api.field_behavior ) = OUTPUT_ONLY ];
522+ repeated string secondary_cluster_names = 1 [
523+ (google.api.field_behavior ) = OUTPUT_ONLY ,
524+ (google.api.resource_reference ) = {
525+ type : "alloydb.googleapis.com/Cluster"
526+ }
527+ ];
509528 }
510529
511530 // PscConfig contains PSC related configuration at a cluster level.
@@ -543,11 +562,8 @@ message Cluster {
543562 // The cluster is active and running.
544563 READY = 1 ;
545564
546- // The cluster is stopped. All instances in the cluster are stopped.
547- // Customers can start a stopped cluster at any point and all their
548- // instances will come back to life with same names and IP resources. In
549- // this state, customer pays for storage.
550- // Associated backups could also be present in a stopped cluster.
565+ // This is unused. Even when all instances in the cluster are stopped, the
566+ // cluster remains in READY state.
551567 STOPPED = 2 ;
552568
553569 // The cluster is empty and has no associated resources.
@@ -942,8 +958,12 @@ message Instance {
942958 // Service Connect (PSC) is enabled for the instance.
943959 // The name of the resource will be in the format of
944960 // `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
945- string service_attachment_link = 1
946- [(google.api.field_behavior ) = OUTPUT_ONLY ];
961+ string service_attachment_link = 1 [
962+ (google.api.field_behavior ) = OUTPUT_ONLY ,
963+ (google.api.resource_reference ) = {
964+ type : "compute.googleapis.com/ServiceAttachment"
965+ }
966+ ];
947967
948968 // Optional. List of consumer projects that are allowed to create
949969 // PSC endpoints to service-attachments to this instance.
@@ -1008,6 +1028,18 @@ message Instance {
10081028 [(google.api.field_behavior ) = OPTIONAL ];
10091029 }
10101030
1031+ // Configuration for Managed Connection Pool (MCP).
1032+ message ConnectionPoolConfig {
1033+ // Optional. Whether to enable Managed Connection Pool (MCP).
1034+ bool enabled = 12 [(google.api.field_behavior ) = OPTIONAL ];
1035+
1036+ // Optional. Connection Pool flags, as a list of "key": "value" pairs.
1037+ map <string , string > flags = 13 [(google.api.field_behavior ) = OPTIONAL ];
1038+
1039+ // Output only. The number of running poolers per instance.
1040+ int32 pooler_count = 14 [(google.api.field_behavior ) = OUTPUT_ONLY ];
1041+ }
1042+
10111043 // Instance State
10121044 enum State {
10131045 // The state of the instance is unknown.
@@ -1246,6 +1278,10 @@ message Instance {
12461278 // etc.). Please refer to the API documentation for more details.
12471279 ActivationPolicy activation_policy = 35
12481280 [(google.api.field_behavior ) = OPTIONAL ];
1281+
1282+ // Optional. The configuration for Managed Connection Pool (MCP).
1283+ ConnectionPoolConfig connection_pool_config = 37
1284+ [(google.api.field_behavior ) = OPTIONAL ];
12491285}
12501286
12511287// ConnectionInfo singleton resource.
@@ -1634,13 +1670,38 @@ message Database {
16341670 // `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
16351671 string name = 1 [(google.api.field_behavior ) = IDENTIFIER ];
16361672
1637- // Optional. Charset for the database.
1673+ // Optional. Immutable. Charset for the database.
16381674 // This field can contain any PostgreSQL supported charset name.
16391675 // Example values include "UTF8", "SQL_ASCII", etc.
1640- string charset = 2 [(google.api.field_behavior ) = OPTIONAL ];
1676+ string charset = 2 [
1677+ (google.api.field_behavior ) = OPTIONAL ,
1678+ (google.api.field_behavior ) = IMMUTABLE
1679+ ];
16411680
1642- // Optional. Collation for the database.
1643- // Name of the custom or native collation for postgres.
1644- // Example values include "C", "POSIX", etc
1645- string collation = 3 [(google.api.field_behavior ) = OPTIONAL ];
1681+ // Optional. Immutable. lc_collate for the database.
1682+ // String sort order.
1683+ // Example values include "C", "POSIX", etc.
1684+ string collation = 3 [
1685+ (google.api.field_behavior ) = OPTIONAL ,
1686+ (google.api.field_behavior ) = IMMUTABLE
1687+ ];
1688+
1689+ // Optional. Immutable. lc_ctype for the database.
1690+ // Character classification (What is a letter? The upper-case equivalent?).
1691+ // Example values include "C", "POSIX", etc.
1692+ string character_type = 4 [
1693+ (google.api.field_behavior ) = OPTIONAL ,
1694+ (google.api.field_behavior ) = IMMUTABLE
1695+ ];
1696+
1697+ // Input only. Immutable. Template of the database to be used for creating a
1698+ // new database.
1699+ string database_template = 6 [
1700+ (google.api.field_behavior ) = INPUT_ONLY ,
1701+ (google.api.field_behavior ) = IMMUTABLE
1702+ ];
1703+
1704+ // Optional. Whether the database is a template database.
1705+ optional bool is_template_database = 7
1706+ [(google.api.field_behavior ) = OPTIONAL ];
16461707}
0 commit comments