Skip to content

Commit 1a096dc

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: 772688974
1 parent 530bb62 commit 1a096dc

3 files changed

Lines changed: 117 additions & 5 deletions

File tree

google/cloud/alloydb/v1/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ proto_library(
3838
"//google/api:resource_proto",
3939
"//google/longrunning:operations_proto",
4040
"//google/rpc:status_proto",
41+
"//google/type:date_proto",
4142
"//google/type:dayofweek_proto",
4243
"//google/type:timeofday_proto",
4344
"@com_google_protobuf//:duration_proto",
@@ -146,6 +147,7 @@ go_grpc_library(
146147
"//google/api:annotations_go_proto",
147148
"//google/longrunning:longrunning_go_proto",
148149
"//google/rpc:status_go_proto",
150+
"//google/type:date_go_proto",
149151
"//google/type:dayofweek_go_proto",
150152
"//google/type:timeofday_go_proto",
151153
],

google/cloud/alloydb/v1/resources.proto

Lines changed: 113 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import "google/cloud/alloydb/v1/csql_resources.proto";
2323
import "google/protobuf/duration.proto";
2424
import "google/protobuf/timestamp.proto";
2525
import "google/protobuf/wrappers.proto";
26+
import "google/type/date.proto";
2627
import "google/type/dayofweek.proto";
2728
import "google/type/timeofday.proto";
2829

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

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

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

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

411445
// MaintenanceSchedule stores the maintenance schedule generated from
@@ -870,9 +904,33 @@ message Instance {
870904
];
871905

872906
// Output only. The status of the PSC service automation connection.
907+
// Possible values:
908+
// "STATE_UNSPECIFIED" - An invalid state as the default case.
909+
// "ACTIVE" - The connection has been created successfully.
910+
// "FAILED" - The connection is not functional since some resources on the
911+
// connection fail to be created.
912+
// "CREATING" - The connection is being created.
913+
// "DELETING" - The connection is being deleted.
914+
// "CREATE_REPAIRING" - The connection is being repaired to complete
915+
// creation.
916+
// "DELETE_REPAIRING" - The connection is being repaired to complete
917+
// deletion.
873918
string status = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
874919

875920
// Output only. The status of the service connection policy.
921+
// Possible values:
922+
// "STATE_UNSPECIFIED" - Default state, when Connection Map is created
923+
// initially.
924+
// "VALID" - Set when policy and map configuration is valid, and their
925+
// matching can lead to allowing creation of PSC Connections subject to
926+
// other constraints like connections limit.
927+
// "CONNECTION_POLICY_MISSING" - No Service Connection Policy found for
928+
// this network and Service Class
929+
// "POLICY_LIMIT_REACHED" - Service Connection Policy limit reached for
930+
// this network and Service Class
931+
// "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" - The consumer instance
932+
// project is not in AllowedGoogleProducersResourceHierarchyLevels of the
933+
// matching ServiceConnectionPolicy.
876934
string consumer_network_status = 5
877935
[(google.api.field_behavior) = OUTPUT_ONLY];
878936
}
@@ -926,6 +984,28 @@ message Instance {
926984
// Optional. Enabling an outbound public IP address to support a database
927985
// server sending requests out into the internet.
928986
bool enable_outbound_public_ip = 3 [(google.api.field_behavior) = OPTIONAL];
987+
988+
// Output only. The resource link for the VPC network in which instance
989+
// resources are created and from which they are accessible via Private IP.
990+
// This will be the same value as the parent cluster's network. It is
991+
// specified in the form: //
992+
// `projects/{project_number}/global/networks/{network_id}`.
993+
string network = 4 [
994+
(google.api.field_behavior) = OUTPUT_ONLY,
995+
(google.api.resource_reference) = {
996+
type: "compute.googleapis.com/Network"
997+
}
998+
];
999+
1000+
// Optional. Name of the allocated IP range for the private IP AlloyDB
1001+
// instance, for example: "google-managed-services-default". If set, the
1002+
// instance IPs will be created from this allocated range and will override
1003+
// the IP range used by the parent cluster. The range name must comply with
1004+
// [RFC 1035](http://datatracker.ietf.org/doc/html/rfc1035). Specifically,
1005+
// the name must be 1-63 characters long and match the regular expression
1006+
// [a-z]([-a-z0-9]*[a-z0-9])?.
1007+
string allocated_ip_range_override = 5
1008+
[(google.api.field_behavior) = OPTIONAL];
9291009
}
9301010

9311011
// Instance State
@@ -1001,6 +1081,18 @@ message Instance {
10011081
REGIONAL = 2;
10021082
}
10031083

1084+
// Specifies whether an instance needs to spin up.
1085+
enum ActivationPolicy {
1086+
// The policy is not specified.
1087+
ACTIVATION_POLICY_UNSPECIFIED = 0;
1088+
1089+
// The instance is running.
1090+
ALWAYS = 1;
1091+
1092+
// The instance is not running.
1093+
NEVER = 2;
1094+
}
1095+
10041096
// Output only. The name of the instance resource with the format:
10051097
// * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
10061098
// where the cluster and instance ID segments should satisfy the regex
@@ -1144,6 +1236,16 @@ message Instance {
11441236
(google.api.field_info).format = IPV4,
11451237
(google.api.field_behavior) = OUTPUT_ONLY
11461238
];
1239+
1240+
// Optional. Specifies whether an instance needs to spin up. Once the instance
1241+
// is active, the activation policy can be updated to the `NEVER` to stop the
1242+
// instance. Likewise, the activation policy can be updated to `ALWAYS` to
1243+
// start the instance.
1244+
// There are restrictions around when an instance can/cannot be activated (for
1245+
// example, a read pool instance should be stopped before stopping primary
1246+
// etc.). Please refer to the API documentation for more details.
1247+
ActivationPolicy activation_policy = 35
1248+
[(google.api.field_behavior) = OPTIONAL];
11471249
}
11481250

11491251
// ConnectionInfo singleton resource.
@@ -1270,13 +1372,20 @@ message Backup {
12701372
[(google.api.field_behavior) = OUTPUT_ONLY];
12711373

12721374
// Output only. Update time stamp
1375+
//
1376+
// Users should not infer any meaning from this field. Its value is generally
1377+
// unrelated to the timing of the backup creation operation.
12731378
google.protobuf.Timestamp update_time = 5
12741379
[(google.api.field_behavior) = OUTPUT_ONLY];
12751380

12761381
// Output only. Delete time stamp
12771382
google.protobuf.Timestamp delete_time = 15
12781383
[(google.api.field_behavior) = OUTPUT_ONLY];
12791384

1385+
// Output only. Timestamp when the resource finished being created.
1386+
google.protobuf.Timestamp create_completion_time = 26
1387+
[(google.api.field_behavior) = OUTPUT_ONLY];
1388+
12801389
// Labels as key value pairs
12811390
map<string, string> labels = 6;
12821391

google/cloud/alloydb/v1/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)