Skip to content

Commit 530bb62

Browse files
Google APIscopybara-github
authored andcommitted
feat: Instance.ActivationPolicy field
feat: Cluster.DenyMaintenancePeriod field feat: InstanceNetworkConfig.network output field feat: InstanceNetworkConfig.allocated_ip_range_override field feat: Backup.create_completion_time output field docs: A comment for field `earliest_restorable_time` docs: A comment for field `status` in message `PscAutoConnectionConfig` PiperOrigin-RevId: 772665820
1 parent ab2a125 commit 530bb62

4 files changed

Lines changed: 167 additions & 25 deletions

File tree

google/cloud/alloydb/v1beta/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ proto_library(
3939
"//google/api:resource_proto",
4040
"//google/longrunning:operations_proto",
4141
"//google/rpc:status_proto",
42+
"//google/type:date_proto",
4243
"//google/type:dayofweek_proto",
4344
"//google/type:timeofday_proto",
4445
"@com_google_protobuf//:duration_proto",
@@ -147,6 +148,7 @@ go_grpc_library(
147148
"//google/api:annotations_go_proto",
148149
"//google/longrunning:longrunning_go_proto",
149150
"//google/rpc:status_go_proto",
151+
"//google/type:date_go_proto",
150152
"//google/type:dayofweek_go_proto",
151153
"//google/type:timeofday_go_proto",
152154
],

google/cloud/alloydb/v1beta/gemini.proto

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,20 @@ enum GCAEntitlementType {
3535
GCA_STANDARD = 1;
3636
}
3737

38-
// Cluster level configuration parameters related to the Gemini in Databases
39-
// add-on.
38+
// Deprecated and unused. This message will be removed in the near future.
4039
message GeminiClusterConfig {
41-
// Output only. Whether the Gemini in Databases add-on is enabled for the
42-
// cluster. It will be true only if the add-on has been enabled for the
43-
// billing account corresponding to the cluster. Its status is toggled from
44-
// the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs.
45-
bool entitled = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
40+
// Output only. Deprecated and unused. This field will be removed in the near
41+
// future.
42+
bool entitled = 1
43+
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
4644
}
4745

48-
// Instance level configuration parameters related to the Gemini in Databases
49-
// add-on.
46+
// Deprecated and unused. This message will be removed in the near future.
5047
message GeminiInstanceConfig {
51-
// Output only. Whether the Gemini in Databases add-on is enabled for the
52-
// instance. It will be true only if the add-on has been enabled for the
53-
// billing account corresponding to the instance. Its status is toggled from
54-
// the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs.
55-
bool entitled = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
48+
// Output only. Deprecated and unused. This field will be removed in the near
49+
// future.
50+
bool entitled = 1
51+
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
5652
}
5753

5854
// Instance level configuration parameters related to the Gemini Cloud Assist

google/cloud/alloydb/v1beta/resources.proto

Lines changed: 153 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import "google/cloud/alloydb/v1beta/gemini.proto";
2424
import "google/protobuf/duration.proto";
2525
import "google/protobuf/timestamp.proto";
2626
import "google/protobuf/wrappers.proto";
27+
import "google/type/date.proto";
2728
import "google/type/dayofweek.proto";
2829
import "google/type/timeofday.proto";
2930

@@ -355,13 +356,20 @@ message ContinuousBackupInfo {
355356
google.protobuf.Timestamp enabled_time = 2
356357
[(google.api.field_behavior) = OUTPUT_ONLY];
357358

358-
// Output only. Days of the week on which a continuous backup is taken. Output
359-
// only field. Ignored if passed into the request.
359+
// Output only. Days of the week on which a continuous backup is taken.
360360
repeated google.type.DayOfWeek schedule = 3
361361
[(google.api.field_behavior) = OUTPUT_ONLY];
362362

363-
// Output only. The earliest restorable time that can be restored to. Output
364-
// only field.
363+
// Output only. The earliest restorable time that can be restored to. If
364+
// continuous backups and recovery was recently enabled, the earliest
365+
// restorable time is the creation time of the earliest eligible backup within
366+
// this cluster's continuous backup recovery window. After a cluster has had
367+
// continuous backups enabled for the duration of its recovery window, the
368+
// earliest restorable time becomes "now minus the recovery window". For
369+
// example, assuming a point in time recovery is attempted at 04/16/2025
370+
// 3:23:00PM with a 14d recovery window, the earliest restorable time would be
371+
// 04/02/2025 3:23:00PM. This field is only visible if the
372+
// CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided.
365373
google.protobuf.Timestamp earliest_restorable_time = 4
366374
[(google.api.field_behavior) = OUTPUT_ONLY];
367375
}
@@ -405,8 +413,34 @@ message MaintenanceUpdatePolicy {
405413
google.type.TimeOfDay start_time = 2;
406414
}
407415

416+
// DenyMaintenancePeriod definition. Excepting emergencies, maintenance
417+
// will not be scheduled to start within this deny period. The start_date must
418+
// be less than the end_date.
419+
message DenyMaintenancePeriod {
420+
// Deny period start date.
421+
// This can be:
422+
// * A full date, with non-zero year, month and day values OR
423+
// * A month and day value, with a zero year for recurring
424+
google.type.Date start_date = 1;
425+
426+
// Deny period end date.
427+
// This can be:
428+
// * A full date, with non-zero year, month and day values OR
429+
// * A month and day value, with a zero year for recurring
430+
google.type.Date end_date = 2;
431+
432+
// Time in UTC when the deny period starts on start_date and ends on
433+
// end_date. This can be:
434+
// * Full time OR
435+
// * All zeros for 00:00:00 UTC
436+
google.type.TimeOfDay time = 3;
437+
}
438+
408439
// Preferred windows to perform maintenance. Currently limited to 1.
409440
repeated MaintenanceWindow maintenance_windows = 1;
441+
442+
// Periods to deny maintenance. Currently limited to 1.
443+
repeated DenyMaintenancePeriod deny_maintenance_periods = 2;
410444
}
411445

412446
// MaintenanceSchedule stores the maintenance schedule generated from
@@ -703,10 +737,10 @@ message Cluster {
703737
MaintenanceSchedule maintenance_schedule = 37
704738
[(google.api.field_behavior) = OUTPUT_ONLY];
705739

706-
// Optional. Configuration parameters related to the Gemini in Databases
707-
// add-on.
740+
// Optional. Deprecated and unused. This field will be removed in the near
741+
// future.
708742
GeminiClusterConfig gemini_config = 36
709-
[(google.api.field_behavior) = OPTIONAL];
743+
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
710744

711745
// Optional. Subscription type of the cluster.
712746
SubscriptionType subscription_type = 38
@@ -726,6 +760,12 @@ message Cluster {
726760
(google.api.field_behavior) = IMMUTABLE,
727761
(google.api.field_behavior) = OPTIONAL
728762
];
763+
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.
768+
string service_account_email = 46 [(google.api.field_behavior) = OUTPUT_ONLY];
729769
}
730770

731771
// An Instance is a computing unit that an end customer can connect to.
@@ -832,6 +872,9 @@ message Instance {
832872
// Track client address for an instance.
833873
// If not set, default value is "off".
834874
optional bool track_client_address = 9;
875+
876+
// Whether assistive experiences are enabled for this AlloyDB instance.
877+
optional bool assistive_experiences_enabled = 10;
835878
}
836879

837880
// Configuration for a read pool instance.
@@ -899,9 +942,33 @@ message Instance {
899942
];
900943

901944
// Output only. The status of the PSC service automation connection.
945+
// Possible values:
946+
// "STATE_UNSPECIFIED" - An invalid state as the default case.
947+
// "ACTIVE" - The connection has been created successfully.
948+
// "FAILED" - The connection is not functional since some resources on the
949+
// connection fail to be created.
950+
// "CREATING" - The connection is being created.
951+
// "DELETING" - The connection is being deleted.
952+
// "CREATE_REPAIRING" - The connection is being repaired to complete
953+
// creation.
954+
// "DELETE_REPAIRING" - The connection is being repaired to complete
955+
// deletion.
902956
string status = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
903957

904958
// Output only. The status of the service connection policy.
959+
// Possible values:
960+
// "STATE_UNSPECIFIED" - Default state, when Connection Map is created
961+
// initially.
962+
// "VALID" - Set when policy and map configuration is valid, and their
963+
// matching can lead to allowing creation of PSC Connections subject to
964+
// other constraints like connections limit.
965+
// "CONNECTION_POLICY_MISSING" - No Service Connection Policy found for
966+
// this network and Service Class
967+
// "POLICY_LIMIT_REACHED" - Service Connection Policy limit reached for
968+
// this network and Service Class
969+
// "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" - The consumer instance
970+
// project is not in AllowedGoogleProducersResourceHierarchyLevels of the
971+
// matching ServiceConnectionPolicy.
905972
string consumer_network_status = 5
906973
[(google.api.field_behavior) = OUTPUT_ONLY];
907974
}
@@ -955,6 +1022,49 @@ message Instance {
9551022
// Optional. Enabling an outbound public IP address to support a database
9561023
// server sending requests out into the internet.
9571024
bool enable_outbound_public_ip = 3 [(google.api.field_behavior) = OPTIONAL];
1025+
1026+
// Output only. The resource link for the VPC network in which instance
1027+
// resources are created and from which they are accessible via Private IP.
1028+
// This will be the same value as the parent cluster's network. It is
1029+
// specified in the form: //
1030+
// `projects/{project_number}/global/networks/{network_id}`.
1031+
string network = 4 [
1032+
(google.api.field_behavior) = OUTPUT_ONLY,
1033+
(google.api.resource_reference) = {
1034+
type: "compute.googleapis.com/Network"
1035+
}
1036+
];
1037+
1038+
// Optional. Name of the allocated IP range for the private IP AlloyDB
1039+
// instance, for example: "google-managed-services-default". If set, the
1040+
// instance IPs will be created from this allocated range and will override
1041+
// the IP range used by the parent cluster. The range name must comply with
1042+
// [RFC 1035](http://datatracker.ietf.org/doc/html/rfc1035). Specifically,
1043+
// the name must be 1-63 characters long and match the regular expression
1044+
// [a-z]([-a-z0-9]*[a-z0-9])?.
1045+
string allocated_ip_range_override = 5
1046+
[(google.api.field_behavior) = OPTIONAL];
1047+
}
1048+
1049+
// Configuration for Managed Connection Pool (MCP).
1050+
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+
1063+
// Optional. Whether to enable Managed Connection Pool (MCP).
1064+
bool enabled = 12 [(google.api.field_behavior) = OPTIONAL];
1065+
1066+
// Optional. Connection Pool flags, as a list of "key": "value" pairs.
1067+
map<string, string> flags = 13 [(google.api.field_behavior) = OPTIONAL];
9581068
}
9591069

9601070
// Instance State
@@ -1030,6 +1140,18 @@ message Instance {
10301140
REGIONAL = 2;
10311141
}
10321142

1143+
// Specifies whether an instance needs to spin up.
1144+
enum ActivationPolicy {
1145+
// The policy is not specified.
1146+
ACTIVATION_POLICY_UNSPECIFIED = 0;
1147+
1148+
// The instance is running.
1149+
ALWAYS = 1;
1150+
1151+
// The instance is not running.
1152+
NEVER = 2;
1153+
}
1154+
10331155
// Output only. The name of the instance resource with the format:
10341156
// * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
10351157
// where the cluster and instance ID segments should satisfy the regex
@@ -1174,17 +1296,31 @@ message Instance {
11741296
InstanceNetworkConfig network_config = 29
11751297
[(google.api.field_behavior) = OPTIONAL];
11761298

1177-
// Optional. Configuration parameters related to the Gemini in Databases
1178-
// add-on.
1299+
// Optional. Deprecated and unused. This field will be removed in the near
1300+
// future.
11791301
GeminiInstanceConfig gemini_config = 33
1180-
[(google.api.field_behavior) = OPTIONAL];
1302+
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
11811303

11821304
// Output only. All outbound public IP addresses configured for the instance.
11831305
repeated string outbound_public_ip_addresses = 34 [
11841306
(google.api.field_info).format = IPV4,
11851307
(google.api.field_behavior) = OUTPUT_ONLY
11861308
];
11871309

1310+
// Optional. Specifies whether an instance needs to spin up. Once the instance
1311+
// is active, the activation policy can be updated to the `NEVER` to stop the
1312+
// instance. Likewise, the activation policy can be updated to `ALWAYS` to
1313+
// start the instance.
1314+
// There are restrictions around when an instance can/cannot be activated (for
1315+
// example, a read pool instance should be stopped before stopping primary
1316+
// etc.). Please refer to the API documentation for more details.
1317+
ActivationPolicy activation_policy = 35
1318+
[(google.api.field_behavior) = OPTIONAL];
1319+
1320+
// Optional. The configuration for Managed Connection Pool (MCP).
1321+
ConnectionPoolConfig connection_pool_config = 37
1322+
[(google.api.field_behavior) = OPTIONAL];
1323+
11881324
// Output only. Configuration parameters related to Gemini Cloud Assist.
11891325
GCAInstanceConfig gca_config = 38 [(google.api.field_behavior) = OUTPUT_ONLY];
11901326
}
@@ -1321,13 +1457,20 @@ message Backup {
13211457
[(google.api.field_behavior) = OUTPUT_ONLY];
13221458

13231459
// Output only. Update time stamp
1460+
//
1461+
// Users should not infer any meaning from this field. Its value is generally
1462+
// unrelated to the timing of the backup creation operation.
13241463
google.protobuf.Timestamp update_time = 5
13251464
[(google.api.field_behavior) = OUTPUT_ONLY];
13261465

13271466
// Output only. Delete time stamp
13281467
google.protobuf.Timestamp delete_time = 15
13291468
[(google.api.field_behavior) = OUTPUT_ONLY];
13301469

1470+
// Output only. Timestamp when the resource finished being created.
1471+
google.protobuf.Timestamp create_completion_time = 26
1472+
[(google.api.field_behavior) = OUTPUT_ONLY];
1473+
13311474
// Labels as key value pairs
13321475
map<string, string> labels = 6;
13331476

google/cloud/alloydb/v1beta/service.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ message UpgradeClusterResponse {
874874
string logs_url = 3;
875875
}
876876

877-
// Details regarding the upgrade of instaces associated with a cluster.
877+
// Details regarding the upgrade of instances associated with a cluster.
878878
message InstanceUpgradeDetails {
879879
// Normalized name of the instance.
880880
string name = 1;
@@ -1080,6 +1080,7 @@ message PromoteClusterRequest {
10801080

10811081
// Message for restoring a Cluster from a backup or another cluster at a given
10821082
// point in time.
1083+
// NEXT_ID: 11
10831084
message RestoreClusterRequest {
10841085
// Required.
10851086
// The source to import from.

0 commit comments

Comments
 (0)