@google-cloud/spanner 7.13.0 → 7.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,38 +80,38 @@ service InstanceAdmin {
80
80
  option (google.api.method_signature) = "name";
81
81
  }
82
82
 
83
- // Creates an instance config and begins preparing it to be used. The
83
+ // Creates an instance configuration and begins preparing it to be used. The
84
84
  // returned [long-running operation][google.longrunning.Operation]
85
85
  // can be used to track the progress of preparing the new
86
- // instance config. The instance config name is assigned by the caller. If the
87
- // named instance config already exists, `CreateInstanceConfig` returns
88
- // `ALREADY_EXISTS`.
86
+ // instance configuration. The instance configuration name is assigned by the
87
+ // caller. If the named instance configuration already exists,
88
+ // `CreateInstanceConfig` returns `ALREADY_EXISTS`.
89
89
  //
90
90
  // Immediately after the request returns:
91
91
  //
92
- // * The instance config is readable via the API, with all requested
93
- // attributes. The instance config's
92
+ // * The instance configuration is readable via the API, with all requested
93
+ // attributes. The instance configuration's
94
94
  // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
95
95
  // field is set to true. Its state is `CREATING`.
96
96
  //
97
97
  // While the operation is pending:
98
98
  //
99
- // * Cancelling the operation renders the instance config immediately
99
+ // * Cancelling the operation renders the instance configuration immediately
100
100
  // unreadable via the API.
101
101
  // * Except for deleting the creating resource, all other attempts to modify
102
- // the instance config are rejected.
102
+ // the instance configuration are rejected.
103
103
  //
104
104
  // Upon completion of the returned operation:
105
105
  //
106
106
  // * Instances can be created using the instance configuration.
107
- // * The instance config's
107
+ // * The instance configuration's
108
108
  // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
109
109
  // field becomes false. Its state becomes `READY`.
110
110
  //
111
111
  // The returned [long-running operation][google.longrunning.Operation] will
112
112
  // have a name of the format
113
113
  // `<instance_config_name>/operations/<operation_id>` and can be used to track
114
- // creation of the instance config. The
114
+ // creation of the instance configuration. The
115
115
  // [metadata][google.longrunning.Operation.metadata] field type is
116
116
  // [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
117
117
  // The [response][google.longrunning.Operation.response] field type is
@@ -135,16 +135,16 @@ service InstanceAdmin {
135
135
  };
136
136
  }
137
137
 
138
- // Updates an instance config. The returned
138
+ // Updates an instance configuration. The returned
139
139
  // [long-running operation][google.longrunning.Operation] can be used to track
140
- // the progress of updating the instance. If the named instance config does
141
- // not exist, returns `NOT_FOUND`.
140
+ // the progress of updating the instance. If the named instance configuration
141
+ // does not exist, returns `NOT_FOUND`.
142
142
  //
143
- // Only user managed configurations can be updated.
143
+ // Only user-managed configurations can be updated.
144
144
  //
145
145
  // Immediately after the request returns:
146
146
  //
147
- // * The instance config's
147
+ // * The instance configuration's
148
148
  // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
149
149
  // field is set to true.
150
150
  //
@@ -154,23 +154,23 @@ service InstanceAdmin {
154
154
  // [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time].
155
155
  // The operation is guaranteed to succeed at undoing all changes, after
156
156
  // which point it terminates with a `CANCELLED` status.
157
- // * All other attempts to modify the instance config are rejected.
158
- // * Reading the instance config via the API continues to give the
157
+ // * All other attempts to modify the instance configuration are rejected.
158
+ // * Reading the instance configuration via the API continues to give the
159
159
  // pre-request values.
160
160
  //
161
161
  // Upon completion of the returned operation:
162
162
  //
163
163
  // * Creating instances using the instance configuration uses the new
164
164
  // values.
165
- // * The instance config's new values are readable via the API.
166
- // * The instance config's
165
+ // * The new values of the instance configuration are readable via the API.
166
+ // * The instance configuration's
167
167
  // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
168
168
  // field becomes false.
169
169
  //
170
170
  // The returned [long-running operation][google.longrunning.Operation] will
171
171
  // have a name of the format
172
172
  // `<instance_config_name>/operations/<operation_id>` and can be used to track
173
- // the instance config modification. The
173
+ // the instance configuration modification. The
174
174
  // [metadata][google.longrunning.Operation.metadata] field type is
175
175
  // [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].
176
176
  // The [response][google.longrunning.Operation.response] field type is
@@ -192,11 +192,11 @@ service InstanceAdmin {
192
192
  };
193
193
  }
194
194
 
195
- // Deletes the instance config. Deletion is only allowed when no
195
+ // Deletes the instance configuration. Deletion is only allowed when no
196
196
  // instances are using the configuration. If any instances are using
197
- // the config, returns `FAILED_PRECONDITION`.
197
+ // the configuration, returns `FAILED_PRECONDITION`.
198
198
  //
199
- // Only user managed configurations can be deleted.
199
+ // Only user-managed configurations can be deleted.
200
200
  //
201
201
  // Authorization requires `spanner.instanceConfigs.delete` permission on
202
202
  // the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].
@@ -208,9 +208,9 @@ service InstanceAdmin {
208
208
  option (google.api.method_signature) = "name";
209
209
  }
210
210
 
211
- // Lists the user-managed instance config [long-running
211
+ // Lists the user-managed instance configuration [long-running
212
212
  // operations][google.longrunning.Operation] in the given project. An instance
213
- // config operation has a name of the form
213
+ // configuration operation has a name of the form
214
214
  // `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
215
215
  // The long-running operation
216
216
  // [metadata][google.longrunning.Operation.metadata] field type
@@ -567,6 +567,78 @@ service InstanceAdmin {
567
567
  };
568
568
  option (google.api.method_signature) = "parent";
569
569
  }
570
+
571
+ // Moves an instance to the target instance configuration. You can use the
572
+ // returned [long-running operation][google.longrunning.Operation] to track
573
+ // the progress of moving the instance.
574
+ //
575
+ // `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of
576
+ // the following criteria:
577
+ //
578
+ // * Is undergoing a move to a different instance configuration
579
+ // * Has backups
580
+ // * Has an ongoing update
581
+ // * Contains any CMEK-enabled databases
582
+ // * Is a free trial instance
583
+ //
584
+ // While the operation is pending:
585
+ //
586
+ // * All other attempts to modify the instance, including changes to its
587
+ // compute capacity, are rejected.
588
+ // * The following database and backup admin operations are rejected:
589
+ //
590
+ // * `DatabaseAdmin.CreateDatabase`
591
+ // * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is
592
+ // specified in the request.)
593
+ // * `DatabaseAdmin.RestoreDatabase`
594
+ // * `DatabaseAdmin.CreateBackup`
595
+ // * `DatabaseAdmin.CopyBackup`
596
+ //
597
+ // * Both the source and target instance configurations are subject to
598
+ // hourly compute and storage charges.
599
+ // * The instance might experience higher read-write latencies and a higher
600
+ // transaction abort rate. However, moving an instance doesn't cause any
601
+ // downtime.
602
+ //
603
+ // The returned [long-running operation][google.longrunning.Operation] has
604
+ // a name of the format
605
+ // `<instance_name>/operations/<operation_id>` and can be used to track
606
+ // the move instance operation. The
607
+ // [metadata][google.longrunning.Operation.metadata] field type is
608
+ // [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata].
609
+ // The [response][google.longrunning.Operation.response] field type is
610
+ // [Instance][google.spanner.admin.instance.v1.Instance],
611
+ // if successful.
612
+ // Cancelling the operation sets its metadata's
613
+ // [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time].
614
+ // Cancellation is not immediate because it involves moving any data
615
+ // previously moved to the target instance configuration back to the original
616
+ // instance configuration. You can use this operation to track the progress of
617
+ // the cancellation. Upon successful completion of the cancellation, the
618
+ // operation terminates with `CANCELLED` status.
619
+ //
620
+ // If not cancelled, upon completion of the returned operation:
621
+ //
622
+ // * The instance successfully moves to the target instance
623
+ // configuration.
624
+ // * You are billed for compute and storage in target instance
625
+ // configuration.
626
+ //
627
+ // Authorization requires the `spanner.instances.update` permission on
628
+ // the resource [instance][google.spanner.admin.instance.v1.Instance].
629
+ //
630
+ // For more details, see
631
+ // [Move an instance](https://cloud.google.com/spanner/docs/move-instance).
632
+ rpc MoveInstance(MoveInstanceRequest) returns (google.longrunning.Operation) {
633
+ option (google.api.http) = {
634
+ post: "/v1/{name=projects/*/instances/*}:move"
635
+ body: "*"
636
+ };
637
+ option (google.longrunning.operation_info) = {
638
+ response_type: "google.spanner.admin.instance.v1.MoveInstanceResponse"
639
+ metadata_type: "google.spanner.admin.instance.v1.MoveInstanceMetadata"
640
+ };
641
+ }
570
642
  }
571
643
 
572
644
  message ReplicaInfo {
@@ -637,29 +709,31 @@ message InstanceConfig {
637
709
  USER_MANAGED = 2;
638
710
  }
639
711
 
640
- // Indicates the current state of the instance config.
712
+ // Indicates the current state of the instance configuration.
641
713
  enum State {
642
714
  // Not specified.
643
715
  STATE_UNSPECIFIED = 0;
644
716
 
645
- // The instance config is still being created.
717
+ // The instance configuration is still being created.
646
718
  CREATING = 1;
647
719
 
648
- // The instance config is fully created and ready to be used to create
649
- // instances.
720
+ // The instance configuration is fully created and ready to be used to
721
+ // create instances.
650
722
  READY = 2;
651
723
  }
652
724
 
653
725
  // A unique identifier for the instance configuration. Values
654
726
  // are of the form
655
727
  // `projects/<project>/instanceConfigs/[a-z][-a-z0-9]*`.
728
+ //
729
+ // User instance configuration must start with `custom-`.
656
730
  string name = 1;
657
731
 
658
732
  // The name of this instance configuration as it appears in UIs.
659
733
  string display_name = 2;
660
734
 
661
- // Output only. Whether this instance config is a Google or User Managed
662
- // Configuration.
735
+ // Output only. Whether this instance configuration is a Google-managed or
736
+ // user-managed configuration.
663
737
  Type config_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
664
738
 
665
739
  // The geographic placement of nodes in this instance configuration and their
@@ -703,30 +777,33 @@ message InstanceConfig {
703
777
  map<string, string> labels = 8;
704
778
 
705
779
  // etag is used for optimistic concurrency control as a way
706
- // to help prevent simultaneous updates of a instance config from overwriting
707
- // each other. It is strongly suggested that systems make use of the etag in
708
- // the read-modify-write cycle to perform instance config updates in order to
709
- // avoid race conditions: An etag is returned in the response which contains
710
- // instance configs, and systems are expected to put that etag in the request
711
- // to update instance config to ensure that their change will be applied to
712
- // the same version of the instance config.
713
- // If no etag is provided in the call to update instance config, then the
714
- // existing instance config is overwritten blindly.
780
+ // to help prevent simultaneous updates of a instance configuration from
781
+ // overwriting each other. It is strongly suggested that systems make use of
782
+ // the etag in the read-modify-write cycle to perform instance configuration
783
+ // updates in order to avoid race conditions: An etag is returned in the
784
+ // response which contains instance configurations, and systems are expected
785
+ // to put that etag in the request to update instance configuration to ensure
786
+ // that their change is applied to the same version of the instance
787
+ // configuration. If no etag is provided in the call to update the instance
788
+ // configuration, then the existing instance configuration is overwritten
789
+ // blindly.
715
790
  string etag = 9;
716
791
 
717
792
  // Allowed values of the "default_leader" schema option for databases in
718
793
  // instances that use this instance configuration.
719
794
  repeated string leader_options = 4;
720
795
 
721
- // Output only. If true, the instance config is being created or updated. If
722
- // false, there are no ongoing operations for the instance config.
796
+ // Output only. If true, the instance configuration is being created or
797
+ // updated. If false, there are no ongoing operations for the instance
798
+ // configuration.
723
799
  bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
724
800
 
725
- // Output only. The current instance config state.
801
+ // Output only. The current instance configuration state. Applicable only for
802
+ // `USER_MANAGED` configurations.
726
803
  State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
727
804
  }
728
805
 
729
- // Autoscaling config for an instance.
806
+ // Autoscaling configuration for an instance.
730
807
  message AutoscalingConfig {
731
808
  // The autoscaling limits for the instance. Users can define the minimum and
732
809
  // maximum compute capacity allocated to the instance, and the autoscaler will
@@ -808,6 +885,22 @@ message Instance {
808
885
  READY = 2;
809
886
  }
810
887
 
888
+ // The edition selected for this instance. Different editions provide
889
+ // different capabilities at different price points.
890
+ enum Edition {
891
+ // Edition not specified.
892
+ EDITION_UNSPECIFIED = 0;
893
+
894
+ // Standard edition.
895
+ STANDARD = 1;
896
+
897
+ // Enterprise edition.
898
+ ENTERPRISE = 2;
899
+
900
+ // Enterprise Plus edition.
901
+ ENTERPRISE_PLUS = 3;
902
+ }
903
+
811
904
  // Required. A unique identifier for the instance, which cannot be changed
812
905
  // after the instance is created. Values are of the form
813
906
  // `projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]`. The final
@@ -904,6 +997,9 @@ message Instance {
904
997
  // Output only. The time at which the instance was most recently updated.
905
998
  google.protobuf.Timestamp update_time = 12
906
999
  [(google.api.field_behavior) = OUTPUT_ONLY];
1000
+
1001
+ // Optional. The `Edition` of the current instance.
1002
+ Edition edition = 20 [(google.api.field_behavior) = OPTIONAL];
907
1003
  }
908
1004
 
909
1005
  // The request for
@@ -958,8 +1054,8 @@ message GetInstanceConfigRequest {
958
1054
  // The request for
959
1055
  // [CreateInstanceConfigRequest][InstanceAdmin.CreateInstanceConfigRequest].
960
1056
  message CreateInstanceConfigRequest {
961
- // Required. The name of the project in which to create the instance config.
962
- // Values are of the form `projects/<project>`.
1057
+ // Required. The name of the project in which to create the instance
1058
+ // configuration. Values are of the form `projects/<project>`.
963
1059
  string parent = 1 [
964
1060
  (google.api.field_behavior) = REQUIRED,
965
1061
  (google.api.resource_reference) = {
@@ -967,10 +1063,10 @@ message CreateInstanceConfigRequest {
967
1063
  }
968
1064
  ];
969
1065
 
970
- // Required. The ID of the instance config to create. Valid identifiers are
971
- // of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64
1066
+ // Required. The ID of the instance configuration to create. Valid identifiers
1067
+ // are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64
972
1068
  // characters in length. The `custom-` prefix is required to avoid name
973
- // conflicts with Google managed configurations.
1069
+ // conflicts with Google-managed configurations.
974
1070
  string instance_config_id = 2 [(google.api.field_behavior) = REQUIRED];
975
1071
 
976
1072
  // Required. The InstanceConfig proto of the configuration to create.
@@ -988,8 +1084,9 @@ message CreateInstanceConfigRequest {
988
1084
  // The request for
989
1085
  // [UpdateInstanceConfigRequest][InstanceAdmin.UpdateInstanceConfigRequest].
990
1086
  message UpdateInstanceConfigRequest {
991
- // Required. The user instance config to update, which must always include the
992
- // instance config name. Otherwise, only fields mentioned in
1087
+ // Required. The user instance configuration to update, which must always
1088
+ // include the instance configuration name. Otherwise, only fields mentioned
1089
+ // in
993
1090
  // [update_mask][google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask]
994
1091
  // need be included. To prevent conflicts of concurrent updates,
995
1092
  // [etag][google.spanner.admin.instance.v1.InstanceConfig.reconciling] can
@@ -1024,12 +1121,12 @@ message DeleteInstanceConfigRequest {
1024
1121
  ];
1025
1122
 
1026
1123
  // Used for optimistic concurrency control as a way to help prevent
1027
- // simultaneous deletes of an instance config from overwriting each
1124
+ // simultaneous deletes of an instance configuration from overwriting each
1028
1125
  // other. If not empty, the API
1029
- // only deletes the instance config when the etag provided matches the current
1030
- // status of the requested instance config. Otherwise, deletes the instance
1031
- // config without checking the current status of the requested instance
1032
- // config.
1126
+ // only deletes the instance configuration when the etag provided matches the
1127
+ // current status of the requested instance configuration. Otherwise, deletes
1128
+ // the instance configuration without checking the current status of the
1129
+ // requested instance configuration.
1033
1130
  string etag = 2;
1034
1131
 
1035
1132
  // An option to validate, but not actually execute, a request,
@@ -1040,7 +1137,7 @@ message DeleteInstanceConfigRequest {
1040
1137
  // The request for
1041
1138
  // [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
1042
1139
  message ListInstanceConfigOperationsRequest {
1043
- // Required. The project of the instance config operations.
1140
+ // Required. The project of the instance configuration operations.
1044
1141
  // Values are of the form `projects/<project>`.
1045
1142
  string parent = 1 [
1046
1143
  (google.api.field_behavior) = REQUIRED,
@@ -1089,7 +1186,7 @@ message ListInstanceConfigOperationsRequest {
1089
1186
  // `(error:*)` - Return operations where:
1090
1187
  // * The operation's metadata type is
1091
1188
  // [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
1092
- // * The instance config name contains "custom-config".
1189
+ // * The instance configuration name contains "custom-config".
1093
1190
  // * The operation started before 2021-03-28T14:50:00Z.
1094
1191
  // * The operation resulted in an error.
1095
1192
  string filter = 2;
@@ -1109,9 +1206,9 @@ message ListInstanceConfigOperationsRequest {
1109
1206
  // The response for
1110
1207
  // [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
1111
1208
  message ListInstanceConfigOperationsResponse {
1112
- // The list of matching instance config [long-running
1209
+ // The list of matching instance configuration [long-running
1113
1210
  // operations][google.longrunning.Operation]. Each operation's name will be
1114
- // prefixed by the instance config's name. The operation's
1211
+ // prefixed by the name of the instance configuration. The operation's
1115
1212
  // [metadata][google.longrunning.Operation.metadata] field type
1116
1213
  // `metadata.type_url` describes the type of the metadata.
1117
1214
  repeated google.longrunning.Operation operations = 1;
@@ -1313,7 +1410,7 @@ message UpdateInstanceMetadata {
1313
1410
  // Metadata type for the operation returned by
1314
1411
  // [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig].
1315
1412
  message CreateInstanceConfigMetadata {
1316
- // The target instance config end state.
1413
+ // The target instance configuration end state.
1317
1414
  InstanceConfig instance_config = 1;
1318
1415
 
1319
1416
  // The progress of the
@@ -1328,7 +1425,7 @@ message CreateInstanceConfigMetadata {
1328
1425
  // Metadata type for the operation returned by
1329
1426
  // [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig].
1330
1427
  message UpdateInstanceConfigMetadata {
1331
- // The desired instance config after updating.
1428
+ // The desired instance configuration after updating.
1332
1429
  InstanceConfig instance_config = 1;
1333
1430
 
1334
1431
  // The progress of the
@@ -1717,3 +1814,47 @@ message ListInstancePartitionOperationsResponse {
1717
1814
  // [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
1718
1815
  repeated string unreachable_instance_partitions = 3;
1719
1816
  }
1817
+
1818
+ // The request for
1819
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
1820
+ message MoveInstanceRequest {
1821
+ // Required. The instance to move.
1822
+ // Values are of the form `projects/<project>/instances/<instance>`.
1823
+ string name = 1 [
1824
+ (google.api.field_behavior) = REQUIRED,
1825
+ (google.api.resource_reference) = {
1826
+ type: "spanner.googleapis.com/Instance"
1827
+ }
1828
+ ];
1829
+
1830
+ // Required. The target instance configuration where to move the instance.
1831
+ // Values are of the form `projects/<project>/instanceConfigs/<config>`.
1832
+ string target_config = 2 [
1833
+ (google.api.field_behavior) = REQUIRED,
1834
+ (google.api.resource_reference) = {
1835
+ type: "spanner.googleapis.com/InstanceConfig"
1836
+ }
1837
+ ];
1838
+ }
1839
+
1840
+ // The response for
1841
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
1842
+ message MoveInstanceResponse {}
1843
+
1844
+ // Metadata type for the operation returned by
1845
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
1846
+ message MoveInstanceMetadata {
1847
+ // The target instance configuration where to move the instance.
1848
+ // Values are of the form `projects/<project>/instanceConfigs/<config>`.
1849
+ string target_config = 1;
1850
+
1851
+ // The progress of the
1852
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance]
1853
+ // operation.
1854
+ // [progress_percent][google.spanner.admin.instance.v1.OperationProgress.progress_percent]
1855
+ // is reset when cancellation is requested.
1856
+ OperationProgress progress = 2;
1857
+
1858
+ // The time at which this operation was cancelled.
1859
+ google.protobuf.Timestamp cancel_time = 3;
1860
+ }