From 207bf593dc2eed95581bb38bdf95b9e0648acd24 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Mon, 4 Jul 2022 03:43:30 -0700 Subject: [PATCH] feat: Adding two new fields for Instance create_time and update_time PiperOrigin-RevId: 458877561 --- .../instance/v1/spanner_instance_admin.proto | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/google/spanner/admin/instance/v1/spanner_instance_admin.proto b/google/spanner/admin/instance/v1/spanner_instance_admin.proto index 0e6bf63fe..3bde51d99 100644 --- a/google/spanner/admin/instance/v1/spanner_instance_admin.proto +++ b/google/spanner/admin/instance/v1/spanner_instance_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -179,7 +179,7 @@ service InstanceAdmin { // [Instance][google.spanner.admin.instance.v1.Instance], if successful. // // Authorization requires `spanner.instances.update` permission on - // resource [name][google.spanner.admin.instance.v1.Instance.name]. + // the resource [name][google.spanner.admin.instance.v1.Instance.name]. rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{instance.name=projects/*/instances/*}" @@ -309,7 +309,7 @@ message InstanceConfig { // A unique identifier for the instance configuration. Values // are of the form - // `projects//instanceConfigs/[a-z][-a-z0-9]*` + // `projects//instanceConfigs/[a-z][-a-z0-9]*`. string name = 1; // The name of this instance configuration as it appears in UIs. @@ -319,7 +319,7 @@ message InstanceConfig { // replication properties. repeated ReplicaInfo replicas = 3; - // Allowed values of the “default_leader” schema option for databases in + // Allowed values of the "default_leader" schema option for databases in // instances that use this instance configuration. repeated string leader_options = 4; } @@ -367,17 +367,23 @@ message Instance { // Must be unique per project and between 4 and 30 characters in length. string display_name = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The number of nodes allocated to this instance. This may be zero - // in API responses for instances that are not yet in state `READY`. + // The number of nodes allocated to this instance. At most one of either + // node_count or processing_units should be present in the message. This + // may be zero in API responses for instances that are not yet in state + // `READY`. // // See [the - // documentation](https://cloud.google.com/spanner/docs/instances#node_count) - // for more information about nodes. + // documentation](https://cloud.google.com/spanner/docs/compute-capacity) + // for more information about nodes and processing units. int32 node_count = 5; // The number of processing units allocated to this instance. At most one of // processing_units or node_count should be present in the message. This may // be zero in API responses for instances that are not yet in state `READY`. + // + // See [the + // documentation](https://cloud.google.com/spanner/docs/compute-capacity) + // for more information about nodes and processing units. int32 processing_units = 9; // Output only. The current instance state. For @@ -395,9 +401,9 @@ message Instance { // firewall, load balancing, etc.). // // * Label keys must be between 1 and 63 characters long and must conform to - // the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // the following regular expression: `[a-z][a-z0-9_-]{0,62}`. // * Label values must be between 0 and 63 characters long and must conform - // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // to the regular expression `[a-z0-9_-]{0,63}`. // * No more than 64 labels can be associated with a given resource. // // See https://goo.gl/xmQnxf for more information on and examples of labels. @@ -412,6 +418,12 @@ message Instance { // Deprecated. This field is not populated. repeated string endpoint_uris = 8; + + // Output only. The time at which the instance was created. + google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the instance was most recently updated. + google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request for [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].