@@ -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.
@@ -764,10 +780,10 @@ message Cluster {
764780 (google.api.field_behavior ) = OPTIONAL
765781 ];
766782
767- // Output only. AlloyDB per-cluster service agent email . This service account
768- // is created per-cluster per-project, and is different from that of the
769- // primary service agent which is created per-project. The service account
770- // naming format is subject to change.
783+ // Output only. AlloyDB per-cluster service account . This service account is
784+ // created per-cluster per-project, and is different from the per-project
785+ // service account. The per-cluster service account naming format is subject
786+ // to change.
771787 string service_account_email = 46 [(google.api.field_behavior ) = OUTPUT_ONLY ];
772788}
773789
@@ -983,8 +999,12 @@ message Instance {
983999 // Service Connect (PSC) is enabled for the instance.
9841000 // The name of the resource will be in the format of
9851001 // `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
986- string service_attachment_link = 1
987- [(google.api.field_behavior ) = OUTPUT_ONLY ];
1002+ string service_attachment_link = 1 [
1003+ (google.api.field_behavior ) = OUTPUT_ONLY ,
1004+ (google.api.resource_reference ) = {
1005+ type : "compute.googleapis.com/ServiceAttachment"
1006+ }
1007+ ];
9881008
9891009 // Optional. List of consumer projects that are allowed to create
9901010 // PSC endpoints to service-attachments to this instance.
@@ -1051,20 +1071,14 @@ message Instance {
10511071
10521072 // Configuration for Managed Connection Pool (MCP).
10531073 message ConnectionPoolConfig {
1054- // The pool mode. Defaults to `POOL_MODE_TRANSACTION`.
1055- enum PoolMode {
1056- // The pool mode is not specified. Defaults to `POOL_MODE_TRANSACTION`.
1057- POOL_MODE_UNSPECIFIED = 0 ;
1058-
1059- // Server is released back to pool after a client disconnects.
1060- POOL_MODE_SESSION = 1 ;
1061-
1062- // Server is released back to pool after a transaction finishes.
1063- POOL_MODE_TRANSACTION = 2 ;
1064- }
1065-
10661074 // Optional. Whether to enable Managed Connection Pool (MCP).
10671075 bool enabled = 12 [(google.api.field_behavior ) = OPTIONAL ];
1076+
1077+ // Optional. Connection Pool flags, as a list of "key": "value" pairs.
1078+ map <string , string > flags = 13 [(google.api.field_behavior ) = OPTIONAL ];
1079+
1080+ // Output only. The number of running poolers per instance.
1081+ int32 pooler_count = 14 [(google.api.field_behavior ) = OUTPUT_ONLY ];
10681082 }
10691083
10701084 // Instance State
@@ -1725,13 +1739,43 @@ message Database {
17251739 // `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
17261740 string name = 1 [(google.api.field_behavior ) = IDENTIFIER ];
17271741
1728- // Optional. Charset for the database.
1742+ // Optional. Immutable. Charset for the database.
17291743 // This field can contain any PostgreSQL supported charset name.
17301744 // Example values include "UTF8", "SQL_ASCII", etc.
1731- string charset = 2 [(google.api.field_behavior ) = OPTIONAL ];
1745+ string charset = 2 [
1746+ (google.api.field_behavior ) = OPTIONAL ,
1747+ (google.api.field_behavior ) = IMMUTABLE
1748+ ];
1749+
1750+ // Optional. Immutable. lc_collate for the database.
1751+ // String sort order.
1752+ // Example values include "C", "POSIX", etc.
1753+ string collation = 3 [
1754+ (google.api.field_behavior ) = OPTIONAL ,
1755+ (google.api.field_behavior ) = IMMUTABLE
1756+ ];
17321757
1733- // Optional. Collation for the database.
1734- // Name of the custom or native collation for postgres.
1735- // Example values include "C", "POSIX", etc
1736- string collation = 3 [(google.api.field_behavior ) = OPTIONAL ];
1758+ // Optional. Immutable. lc_ctype for the database.
1759+ // Character classification (What is a letter? The upper-case equivalent?).
1760+ // Example values include "C", "POSIX", etc.
1761+ string character_type = 4 [
1762+ (google.api.field_behavior ) = OPTIONAL ,
1763+ (google.api.field_behavior ) = IMMUTABLE
1764+ ];
1765+
1766+ // Optional. Whether the database is a template database.
1767+ // Deprecated in favor of is_template_database.
1768+ bool is_template = 5
1769+ [deprecated = true , (google.api.field_behavior ) = OPTIONAL ];
1770+
1771+ // Input only. Immutable. Template of the database to be used for creating a
1772+ // new database.
1773+ string database_template = 6 [
1774+ (google.api.field_behavior ) = INPUT_ONLY ,
1775+ (google.api.field_behavior ) = IMMUTABLE
1776+ ];
1777+
1778+ // Optional. Whether the database is a template database.
1779+ optional bool is_template_database = 7
1780+ [(google.api.field_behavior ) = OPTIONAL ];
17371781}
0 commit comments