@googleapis/spanner 7.1.0 → 7.4.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.
- package/CHANGELOG.md +25 -0
- package/build/v1.d.ts +489 -43
- package/build/v1.js +305 -0
- package/build/v1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +1187 -43
package/v1.ts
CHANGED
|
@@ -127,7 +127,7 @@ export namespace spanner_v1 {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* Autoscaling
|
|
130
|
+
* Autoscaling configuration for an instance.
|
|
131
131
|
*/
|
|
132
132
|
export interface Schema$AutoscalingConfig {
|
|
133
133
|
/**
|
|
@@ -177,6 +177,10 @@ export namespace spanner_v1 {
|
|
|
177
177
|
* A backup of a Cloud Spanner database.
|
|
178
178
|
*/
|
|
179
179
|
export interface Schema$Backup {
|
|
180
|
+
/**
|
|
181
|
+
* Output only. List of backup schedule URIs that are associated with creating this backup. This is only applicable for scheduled backups, and is empty for on-demand backups. To optimize for storage, whenever possible, multiple schedules are collapsed together to create one backup. In such cases, this field captures the list of all backup schedule URIs that are associated with creating this backup. If collapsing is not done, then this field captures the single backup schedule URI associated with creating this backup.
|
|
182
|
+
*/
|
|
183
|
+
backupSchedules?: string[] | null;
|
|
180
184
|
/**
|
|
181
185
|
* Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`.
|
|
182
186
|
*/
|
|
@@ -197,10 +201,22 @@ export namespace spanner_v1 {
|
|
|
197
201
|
* Output only. The encryption information for the backup, whether it is protected by one or more KMS keys. The information includes all Cloud KMS key versions used to encrypt the backup. The `encryption_status' field inside of each `EncryptionInfo` is not populated. At least one of the key versions must be available for the backup to be restored. If a key version is revoked in the middle of a restore, the restore behavior is undefined.
|
|
198
202
|
*/
|
|
199
203
|
encryptionInformation?: Schema$EncryptionInfo[];
|
|
204
|
+
/**
|
|
205
|
+
* Output only. For a backup in an incremental backup chain, this is the storage space needed to keep the data that has changed since the previous backup. For all other backups, this is always the size of the backup. This value may change if backups on the same chain get deleted or expired. This field can be used to calculate the total storage space used by a set of backups. For example, the total space used by all backups of a database can be computed by summing up this field.
|
|
206
|
+
*/
|
|
207
|
+
exclusiveSizeBytes?: string | null;
|
|
200
208
|
/**
|
|
201
209
|
* Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
|
|
202
210
|
*/
|
|
203
211
|
expireTime?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* Output only. The number of bytes that will be freed by deleting this backup. This value will be zero if, for example, this backup is part of an incremental backup chain and younger backups in the chain require that we keep its data. For backups not in an incremental backup chain, this is always the size of the backup. This value may change if backups on the same chain get created, deleted or expired.
|
|
214
|
+
*/
|
|
215
|
+
freeableSizeBytes?: string | null;
|
|
216
|
+
/**
|
|
217
|
+
* Output only. Populated only for backups in an incremental backup chain. Backups share the same chain id if and only if they belong to the same incremental backup chain. Use this field to determine which backups are part of the same incremental backup chain. The ordering of backups in the chain can be determined by ordering the backup `version_time`.
|
|
218
|
+
*/
|
|
219
|
+
incrementalBackupChainId?: string | null;
|
|
204
220
|
/**
|
|
205
221
|
* Output only. The max allowed expiration time of the backup, with microseconds granularity. A backup's expiration time can be configured in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing backup, the expiration time specified must be less than `Backup.max_expire_time`.
|
|
206
222
|
*/
|
|
@@ -209,6 +225,10 @@ export namespace spanner_v1 {
|
|
|
209
225
|
* Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.
|
|
210
226
|
*/
|
|
211
227
|
name?: string | null;
|
|
228
|
+
/**
|
|
229
|
+
* Output only. Data deleted at a time older than this is guaranteed not to be retained in order to support this backup. For a backup in an incremental backup chain, this is the version time of the oldest backup that exists or ever existed in the chain. For all other backups, this is the version time of the backup. This field can be used to understand what data is being retained by the backup system.
|
|
230
|
+
*/
|
|
231
|
+
oldestVersionTime?: string | null;
|
|
212
232
|
/**
|
|
213
233
|
* Output only. The names of the destination backups being created by copying this source backup. The backup names are of the form `projects//instances//backups/`. Referencing backups may exist in different instances. The existence of any referencing backup prevents the backup from being deleted. When the copy operation is done (either successfully completed or cancelled or the destination backup is deleted), the reference to the backup is removed.
|
|
214
234
|
*/
|
|
@@ -218,7 +238,7 @@ export namespace spanner_v1 {
|
|
|
218
238
|
*/
|
|
219
239
|
referencingDatabases?: string[] | null;
|
|
220
240
|
/**
|
|
221
|
-
* Output only. Size of the backup in bytes.
|
|
241
|
+
* Output only. Size of the backup in bytes. For a backup in an incremental backup chain, this is the sum of the `exclusive_size_bytes` of itself and all older backups in the chain.
|
|
222
242
|
*/
|
|
223
243
|
sizeBytes?: string | null;
|
|
224
244
|
/**
|
|
@@ -251,6 +271,48 @@ export namespace spanner_v1 {
|
|
|
251
271
|
*/
|
|
252
272
|
versionTime?: string | null;
|
|
253
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* BackupSchedule expresses the automated backup creation specification for a Spanner database. Next ID: 10
|
|
276
|
+
*/
|
|
277
|
+
export interface Schema$BackupSchedule {
|
|
278
|
+
/**
|
|
279
|
+
* Optional. The encryption configuration that will be used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the database.
|
|
280
|
+
*/
|
|
281
|
+
encryptionConfig?: Schema$CreateBackupEncryptionConfig;
|
|
282
|
+
/**
|
|
283
|
+
* The schedule creates only full backups.
|
|
284
|
+
*/
|
|
285
|
+
fullBackupSpec?: Schema$FullBackupSpec;
|
|
286
|
+
/**
|
|
287
|
+
* The schedule creates incremental backup chains.
|
|
288
|
+
*/
|
|
289
|
+
incrementalBackupSpec?: Schema$IncrementalBackupSpec;
|
|
290
|
+
/**
|
|
291
|
+
* Identifier. Output only for the CreateBackupSchedule operation. Required for the UpdateBackupSchedule operation. A globally unique identifier for the backup schedule which cannot be changed. Values are of the form `projects//instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length.
|
|
292
|
+
*/
|
|
293
|
+
name?: string | null;
|
|
294
|
+
/**
|
|
295
|
+
* Optional. The retention duration of a backup that must be at least 6 hours and at most 366 days. The backup is eligible to be automatically deleted once the retention period has elapsed.
|
|
296
|
+
*/
|
|
297
|
+
retentionDuration?: string | null;
|
|
298
|
+
/**
|
|
299
|
+
* Optional. The schedule specification based on which the backup creations are triggered.
|
|
300
|
+
*/
|
|
301
|
+
spec?: Schema$BackupScheduleSpec;
|
|
302
|
+
/**
|
|
303
|
+
* Output only. The timestamp at which the schedule was last updated. If the schedule has never been updated, this field contains the timestamp when the schedule was first created.
|
|
304
|
+
*/
|
|
305
|
+
updateTime?: string | null;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Defines specifications of the backup schedule.
|
|
309
|
+
*/
|
|
310
|
+
export interface Schema$BackupScheduleSpec {
|
|
311
|
+
/**
|
|
312
|
+
* Cron style schedule specification.
|
|
313
|
+
*/
|
|
314
|
+
cronSpec?: Schema$CrontabSpec;
|
|
315
|
+
}
|
|
254
316
|
/**
|
|
255
317
|
* The request for BatchCreateSessions.
|
|
256
318
|
*/
|
|
@@ -337,6 +399,40 @@ export namespace spanner_v1 {
|
|
|
337
399
|
*/
|
|
338
400
|
role?: string | null;
|
|
339
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* Metadata type for the long-running operation returned by ChangeQuorum.
|
|
404
|
+
*/
|
|
405
|
+
export interface Schema$ChangeQuorumMetadata {
|
|
406
|
+
/**
|
|
407
|
+
* If set, the time at which this operation failed or was completed successfully.
|
|
408
|
+
*/
|
|
409
|
+
endTime?: string | null;
|
|
410
|
+
/**
|
|
411
|
+
* The request for ChangeQuorum.
|
|
412
|
+
*/
|
|
413
|
+
request?: Schema$ChangeQuorumRequest;
|
|
414
|
+
/**
|
|
415
|
+
* Time the request was received.
|
|
416
|
+
*/
|
|
417
|
+
startTime?: string | null;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* The request for ChangeQuorum.
|
|
421
|
+
*/
|
|
422
|
+
export interface Schema$ChangeQuorumRequest {
|
|
423
|
+
/**
|
|
424
|
+
* Optional. The etag is the hash of the `QuorumInfo`. The `ChangeQuorum` operation is only performed if the etag matches that of the `QuorumInfo` in the current database resource. Otherwise the API returns an `ABORTED` error. The etag is used for optimistic concurrency control as a way to help prevent simultaneous change quorum requests that could create a race condition.
|
|
425
|
+
*/
|
|
426
|
+
etag?: string | null;
|
|
427
|
+
/**
|
|
428
|
+
* Required. Name of the database in which to apply `ChangeQuorum`. Values are of the form `projects//instances//databases/`.
|
|
429
|
+
*/
|
|
430
|
+
name?: string | null;
|
|
431
|
+
/**
|
|
432
|
+
* Required. The type of this quorum.
|
|
433
|
+
*/
|
|
434
|
+
quorumType?: Schema$QuorumType;
|
|
435
|
+
}
|
|
340
436
|
/**
|
|
341
437
|
* Metadata associated with a parent-child relationship appearing in a PlanNode.
|
|
342
438
|
*/
|
|
@@ -485,6 +581,23 @@ export namespace spanner_v1 {
|
|
|
485
581
|
*/
|
|
486
582
|
sourceBackup?: string | null;
|
|
487
583
|
}
|
|
584
|
+
/**
|
|
585
|
+
* Encryption configuration for the backup to create.
|
|
586
|
+
*/
|
|
587
|
+
export interface Schema$CreateBackupEncryptionConfig {
|
|
588
|
+
/**
|
|
589
|
+
* Required. The encryption type of the backup.
|
|
590
|
+
*/
|
|
591
|
+
encryptionType?: string | null;
|
|
592
|
+
/**
|
|
593
|
+
* Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
|
|
594
|
+
*/
|
|
595
|
+
kmsKeyName?: string | null;
|
|
596
|
+
/**
|
|
597
|
+
* Optional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by kms_key_names must fully cover all regions of the backup's instance configuration. Some examples: * For single region instance configs, specify a single regional location KMS key. * For multi-regional instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config. * For an instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.
|
|
598
|
+
*/
|
|
599
|
+
kmsKeyNames?: string[] | null;
|
|
600
|
+
}
|
|
488
601
|
/**
|
|
489
602
|
* Metadata type for the operation returned by CreateBackup.
|
|
490
603
|
*/
|
|
@@ -536,7 +649,7 @@ export namespace spanner_v1 {
|
|
|
536
649
|
*/
|
|
537
650
|
extraStatements?: string[] | null;
|
|
538
651
|
/**
|
|
539
|
-
* Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in 'extra_statements'
|
|
652
|
+
* Optional. Proto descriptors used by `CREATE/ALTER PROTO BUNDLE` statements in 'extra_statements'. Contains a protobuf-serialized [`google.protobuf.FileDescriptorSet`](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto) descriptor set. To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ --include_imports \ --descriptor_set_out=descriptors.data \ moon/shot/app.proto ``` For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
|
|
540
653
|
*/
|
|
541
654
|
protoDescriptors?: string | null;
|
|
542
655
|
}
|
|
@@ -549,7 +662,7 @@ export namespace spanner_v1 {
|
|
|
549
662
|
*/
|
|
550
663
|
cancelTime?: string | null;
|
|
551
664
|
/**
|
|
552
|
-
* The target instance
|
|
665
|
+
* The target instance configuration end state.
|
|
553
666
|
*/
|
|
554
667
|
instanceConfig?: Schema$InstanceConfig;
|
|
555
668
|
/**
|
|
@@ -562,11 +675,11 @@ export namespace spanner_v1 {
|
|
|
562
675
|
*/
|
|
563
676
|
export interface Schema$CreateInstanceConfigRequest {
|
|
564
677
|
/**
|
|
565
|
-
* Required. The InstanceConfig proto of the configuration to create. instance_config.name must be `/instanceConfigs/`. instance_config.base_config must be a Google
|
|
678
|
+
* Required. The `InstanceConfig` proto of the configuration to create. `instance_config.name` must be `/instanceConfigs/`. `instance_config.base_config` must be a Google-managed configuration name, e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3.
|
|
566
679
|
*/
|
|
567
680
|
instanceConfig?: Schema$InstanceConfig;
|
|
568
681
|
/**
|
|
569
|
-
* Required. The ID of the instance
|
|
682
|
+
* Required. The ID of the instance configuration to create. Valid identifiers are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in length. The `custom-` prefix is required to avoid name conflicts with Google-managed configurations.
|
|
570
683
|
*/
|
|
571
684
|
instanceConfigId?: string | null;
|
|
572
685
|
/**
|
|
@@ -655,6 +768,23 @@ export namespace spanner_v1 {
|
|
|
655
768
|
*/
|
|
656
769
|
session?: Schema$Session;
|
|
657
770
|
}
|
|
771
|
+
/**
|
|
772
|
+
* CrontabSpec can be used to specify the version time and frequency at which the backup should be created.
|
|
773
|
+
*/
|
|
774
|
+
export interface Schema$CrontabSpec {
|
|
775
|
+
/**
|
|
776
|
+
* Output only. Schedule backups will contain an externally consistent copy of the database at the version time specified in `schedule_spec.cron_spec`. However, Spanner may not initiate the creation of the scheduled backups at that version time. Spanner will initiate the creation of scheduled backups within the time window bounded by the version_time specified in `schedule_spec.cron_spec` and version_time + `creation_window`.
|
|
777
|
+
*/
|
|
778
|
+
creationWindow?: string | null;
|
|
779
|
+
/**
|
|
780
|
+
* Required. Textual representation of the crontab. User can customize the backup frequency and the backup version time using the cron expression. The version time must be in UTC timzeone. The backup will contain an externally consistent copy of the database at the version time. Allowed frequencies are 12 hour, 1 day, 1 week and 1 month. Examples of valid cron specifications: * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. * `0 2 * * * ` : once a day at 2 past midnight in UTC. * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC.
|
|
781
|
+
*/
|
|
782
|
+
text?: string | null;
|
|
783
|
+
/**
|
|
784
|
+
* Output only. The time zone of the times in `CrontabSpec.text`. Currently only UTC is supported.
|
|
785
|
+
*/
|
|
786
|
+
timeZone?: string | null;
|
|
787
|
+
}
|
|
658
788
|
/**
|
|
659
789
|
* A Cloud Spanner database.
|
|
660
790
|
*/
|
|
@@ -676,7 +806,7 @@ export namespace spanner_v1 {
|
|
|
676
806
|
*/
|
|
677
807
|
earliestVersionTime?: string | null;
|
|
678
808
|
/**
|
|
679
|
-
* Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).
|
|
809
|
+
* Optional. Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).
|
|
680
810
|
*/
|
|
681
811
|
enableDropProtection?: boolean | null;
|
|
682
812
|
/**
|
|
@@ -691,6 +821,10 @@ export namespace spanner_v1 {
|
|
|
691
821
|
* Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.
|
|
692
822
|
*/
|
|
693
823
|
name?: string | null;
|
|
824
|
+
/**
|
|
825
|
+
* Output only. Applicable only for databases that use dual-region instance configurations. Contains information about the quorum.
|
|
826
|
+
*/
|
|
827
|
+
quorumInfo?: Schema$QuorumInfo;
|
|
694
828
|
/**
|
|
695
829
|
* Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.
|
|
696
830
|
*/
|
|
@@ -798,6 +932,10 @@ export namespace spanner_v1 {
|
|
|
798
932
|
*/
|
|
799
933
|
includeReplicas?: Schema$IncludeReplicas;
|
|
800
934
|
}
|
|
935
|
+
/**
|
|
936
|
+
* Message type for a dual-region quorum. Currently this type has no options.
|
|
937
|
+
*/
|
|
938
|
+
export interface Schema$DualRegionQuorum {}
|
|
801
939
|
/**
|
|
802
940
|
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
|
|
803
941
|
*/
|
|
@@ -979,6 +1117,10 @@ export namespace spanner_v1 {
|
|
|
979
1117
|
*/
|
|
980
1118
|
upgradeTime?: string | null;
|
|
981
1119
|
}
|
|
1120
|
+
/**
|
|
1121
|
+
* The specification for full backups. A full backup stores the entire contents of the database at a given version time.
|
|
1122
|
+
*/
|
|
1123
|
+
export interface Schema$FullBackupSpec {}
|
|
982
1124
|
/**
|
|
983
1125
|
* The response for GetDatabaseDdl.
|
|
984
1126
|
*/
|
|
@@ -1023,6 +1165,10 @@ export namespace spanner_v1 {
|
|
|
1023
1165
|
*/
|
|
1024
1166
|
replicaSelections?: Schema$ReplicaSelection[];
|
|
1025
1167
|
}
|
|
1168
|
+
/**
|
|
1169
|
+
* The specification for incremental backup chains. An incremental backup stores the delta of changes between a previous backup and the database contents at a given version time. An incremental backup chain consists of a full backup and zero or more successive incremental backups. The first backup created for an incremental backup chain is always a full backup.
|
|
1170
|
+
*/
|
|
1171
|
+
export interface Schema$IncrementalBackupSpec {}
|
|
1026
1172
|
/**
|
|
1027
1173
|
* Recommendation to add new indexes to run queries more efficiently.
|
|
1028
1174
|
*/
|
|
@@ -1074,6 +1220,10 @@ export namespace spanner_v1 {
|
|
|
1074
1220
|
* Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
|
|
1075
1221
|
*/
|
|
1076
1222
|
displayName?: string | null;
|
|
1223
|
+
/**
|
|
1224
|
+
* Optional. The `Edition` of the current instance.
|
|
1225
|
+
*/
|
|
1226
|
+
edition?: string | null;
|
|
1077
1227
|
/**
|
|
1078
1228
|
* Deprecated. This field is not populated.
|
|
1079
1229
|
*/
|
|
@@ -1095,11 +1245,11 @@ export namespace spanner_v1 {
|
|
|
1095
1245
|
*/
|
|
1096
1246
|
name?: string | null;
|
|
1097
1247
|
/**
|
|
1098
|
-
* The number of nodes allocated to this instance. At most one of either node_count or processing_units should be present in the message. Users can set the node_count field to specify the target number of nodes allocated to the instance. This
|
|
1248
|
+
* The number of nodes allocated to this instance. At most, one of either `node_count` or `processing_units` should be present in the message. Users can set the `node_count` field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` field and reflects the current number of nodes allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. For more information, see [Compute capacity, nodes, and processing units](https://cloud.google.com/spanner/docs/compute-capacity).
|
|
1099
1249
|
*/
|
|
1100
1250
|
nodeCount?: number | null;
|
|
1101
1251
|
/**
|
|
1102
|
-
* The number of processing units allocated to this instance. At most one of processing_units or node_count should be present in the message. Users can set the processing_units field to specify the target number of processing units allocated to the instance. This
|
|
1252
|
+
* The number of processing units allocated to this instance. At most, one of either `processing_units` or `node_count` should be present in the message. Users can set the `processing_units` field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and reflects the current number of processing units allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. For more information, see [Compute capacity, nodes and processing units](https://cloud.google.com/spanner/docs/compute-capacity).
|
|
1103
1253
|
*/
|
|
1104
1254
|
processingUnits?: number | null;
|
|
1105
1255
|
/**
|
|
@@ -1116,11 +1266,11 @@ export namespace spanner_v1 {
|
|
|
1116
1266
|
*/
|
|
1117
1267
|
export interface Schema$InstanceConfig {
|
|
1118
1268
|
/**
|
|
1119
|
-
* Base configuration name, e.g. projects//instanceConfigs/nam3, based on which this configuration is created. Only set for user
|
|
1269
|
+
* Base configuration name, e.g. projects//instanceConfigs/nam3, based on which this configuration is created. Only set for user-managed configurations. `base_config` must refer to a configuration of type `GOOGLE_MANAGED` in the same project as this configuration.
|
|
1120
1270
|
*/
|
|
1121
1271
|
baseConfig?: string | null;
|
|
1122
1272
|
/**
|
|
1123
|
-
* Output only. Whether this instance
|
|
1273
|
+
* Output only. Whether this instance configuration is a Google-managed or user-managed configuration.
|
|
1124
1274
|
*/
|
|
1125
1275
|
configType?: string | null;
|
|
1126
1276
|
/**
|
|
@@ -1128,11 +1278,11 @@ export namespace spanner_v1 {
|
|
|
1128
1278
|
*/
|
|
1129
1279
|
displayName?: string | null;
|
|
1130
1280
|
/**
|
|
1131
|
-
* etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance
|
|
1281
|
+
* etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance configuration from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform instance configuration updates in order to avoid race conditions: An etag is returned in the response which contains instance configurations, and systems are expected to put that etag in the request to update instance configuration to ensure that their change is applied to the same version of the instance configuration. If no etag is provided in the call to update the instance configuration, then the existing instance configuration is overwritten blindly.
|
|
1132
1282
|
*/
|
|
1133
1283
|
etag?: string | null;
|
|
1134
1284
|
/**
|
|
1135
|
-
* Output only. Describes whether free instances are available to be created in this instance
|
|
1285
|
+
* Output only. Describes whether free instances are available to be created in this instance configuration.
|
|
1136
1286
|
*/
|
|
1137
1287
|
freeInstanceAvailability?: string | null;
|
|
1138
1288
|
/**
|
|
@@ -1144,23 +1294,27 @@ export namespace spanner_v1 {
|
|
|
1144
1294
|
*/
|
|
1145
1295
|
leaderOptions?: string[] | null;
|
|
1146
1296
|
/**
|
|
1147
|
-
* A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`.
|
|
1297
|
+
* A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`. User instance configuration must start with `custom-`.
|
|
1148
1298
|
*/
|
|
1149
1299
|
name?: string | null;
|
|
1150
1300
|
/**
|
|
1151
|
-
* Output only. The available optional replicas to choose from for user
|
|
1301
|
+
* Output only. The available optional replicas to choose from for user-managed configurations. Populated for Google-managed configurations.
|
|
1152
1302
|
*/
|
|
1153
1303
|
optionalReplicas?: Schema$ReplicaInfo[];
|
|
1154
1304
|
/**
|
|
1155
|
-
* Output only.
|
|
1305
|
+
* Output only. The `QuorumType` of the instance configuration.
|
|
1306
|
+
*/
|
|
1307
|
+
quorumType?: string | null;
|
|
1308
|
+
/**
|
|
1309
|
+
* Output only. If true, the instance configuration is being created or updated. If false, there are no ongoing operations for the instance configuration.
|
|
1156
1310
|
*/
|
|
1157
1311
|
reconciling?: boolean | null;
|
|
1158
1312
|
/**
|
|
1159
|
-
* The geographic placement of nodes in this instance configuration and their replication properties.
|
|
1313
|
+
* The geographic placement of nodes in this instance configuration and their replication properties. To create user-managed configurations, input `replicas` must include all replicas in `replicas` of the `base_config` and include one or more replicas in the `optional_replicas` of the `base_config`.
|
|
1160
1314
|
*/
|
|
1161
1315
|
replicas?: Schema$ReplicaInfo[];
|
|
1162
1316
|
/**
|
|
1163
|
-
* Output only. The current instance
|
|
1317
|
+
* Output only. The current instance configuration state. Applicable only for `USER_MANAGED` configurations.
|
|
1164
1318
|
*/
|
|
1165
1319
|
state?: string | null;
|
|
1166
1320
|
/**
|
|
@@ -1210,15 +1364,15 @@ export namespace spanner_v1 {
|
|
|
1210
1364
|
*/
|
|
1211
1365
|
name?: string | null;
|
|
1212
1366
|
/**
|
|
1213
|
-
* The number of nodes allocated to this instance partition. Users can set the node_count field to specify the target number of nodes allocated to the instance partition. This may be zero in API responses for instance partitions that are not yet in state `READY`.
|
|
1367
|
+
* The number of nodes allocated to this instance partition. Users can set the `node_count` field to specify the target number of nodes allocated to the instance partition. This may be zero in API responses for instance partitions that are not yet in state `READY`.
|
|
1214
1368
|
*/
|
|
1215
1369
|
nodeCount?: number | null;
|
|
1216
1370
|
/**
|
|
1217
|
-
* The number of processing units allocated to this instance partition. Users can set the processing_units field to specify the target number of processing units allocated to the instance partition. This
|
|
1371
|
+
* The number of processing units allocated to this instance partition. Users can set the `processing_units` field to specify the target number of processing units allocated to the instance partition. This might be zero in API responses for instance partitions that are not yet in the `READY` state.
|
|
1218
1372
|
*/
|
|
1219
1373
|
processingUnits?: number | null;
|
|
1220
1374
|
/**
|
|
1221
|
-
* Output only. The names of the backups that reference this instance partition. Referencing backups should share the parent instance. The existence of any referencing backup prevents the instance partition from being deleted.
|
|
1375
|
+
* Output only. Deprecated: This field is not populated. Output only. The names of the backups that reference this instance partition. Referencing backups should share the parent instance. The existence of any referencing backup prevents the instance partition from being deleted.
|
|
1222
1376
|
*/
|
|
1223
1377
|
referencingBackups?: string[] | null;
|
|
1224
1378
|
/**
|
|
@@ -1339,6 +1493,19 @@ export namespace spanner_v1 {
|
|
|
1339
1493
|
*/
|
|
1340
1494
|
operations?: Schema$Operation[];
|
|
1341
1495
|
}
|
|
1496
|
+
/**
|
|
1497
|
+
* The response for ListBackupSchedules.
|
|
1498
|
+
*/
|
|
1499
|
+
export interface Schema$ListBackupSchedulesResponse {
|
|
1500
|
+
/**
|
|
1501
|
+
* The list of backup schedules for a database.
|
|
1502
|
+
*/
|
|
1503
|
+
backupSchedules?: Schema$BackupSchedule[];
|
|
1504
|
+
/**
|
|
1505
|
+
* `next_page_token` can be sent in a subsequent ListBackupSchedules call to fetch more of the schedules.
|
|
1506
|
+
*/
|
|
1507
|
+
nextPageToken?: string | null;
|
|
1508
|
+
}
|
|
1342
1509
|
/**
|
|
1343
1510
|
* The response for ListBackups.
|
|
1344
1511
|
*/
|
|
@@ -1400,7 +1567,7 @@ export namespace spanner_v1 {
|
|
|
1400
1567
|
*/
|
|
1401
1568
|
nextPageToken?: string | null;
|
|
1402
1569
|
/**
|
|
1403
|
-
* The list of matching instance
|
|
1570
|
+
* The list of matching instance configuration long-running operations. Each operation's name will be prefixed by the name of the instance configuration. The operation's metadata field type `metadata.type_url` describes the type of the metadata.
|
|
1404
1571
|
*/
|
|
1405
1572
|
operations?: Schema$Operation[];
|
|
1406
1573
|
}
|
|
@@ -1447,7 +1614,7 @@ export namespace spanner_v1 {
|
|
|
1447
1614
|
*/
|
|
1448
1615
|
nextPageToken?: string | null;
|
|
1449
1616
|
/**
|
|
1450
|
-
* The list of unreachable instance partitions. It includes the names of instance partitions whose metadata could not be retrieved within instance_partition_deadline.
|
|
1617
|
+
* The list of unreachable instances or instance partitions. It includes the names of instances or instance partitions whose metadata could not be retrieved within instance_partition_deadline.
|
|
1451
1618
|
*/
|
|
1452
1619
|
unreachable?: string[] | null;
|
|
1453
1620
|
}
|
|
@@ -1600,7 +1767,7 @@ export namespace spanner_v1 {
|
|
|
1600
1767
|
*/
|
|
1601
1768
|
export interface Schema$MoveInstanceRequest {
|
|
1602
1769
|
/**
|
|
1603
|
-
* Required. The target instance
|
|
1770
|
+
* Required. The target instance configuration where to move the instance. Values are of the form `projects//instanceConfigs/`.
|
|
1604
1771
|
*/
|
|
1605
1772
|
targetConfig?: string | null;
|
|
1606
1773
|
}
|
|
@@ -1761,7 +1928,7 @@ export namespace spanner_v1 {
|
|
|
1761
1928
|
*/
|
|
1762
1929
|
partitionOptions?: Schema$PartitionOptions;
|
|
1763
1930
|
/**
|
|
1764
|
-
* Required. The query request to generate partitions for. The request
|
|
1931
|
+
* Required. The query request to generate partitions for. The request fails if the query is not root partitionable. For a query to be root partitionable, it needs to satisfy a few conditions. For example, if the query execution plan contains a distributed union operator, then it must be the first operator in the plan. For more information about other conditions, see [Read data in parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). The query request must not contain DML commands, such as `INSERT`, `UPDATE`, or `DELETE`. Use `ExecuteStreamingSql` with a PartitionedDml transaction for large, partition-friendly DML operations.
|
|
1765
1932
|
*/
|
|
1766
1933
|
sql?: string | null;
|
|
1767
1934
|
/**
|
|
@@ -1921,6 +2088,40 @@ export namespace spanner_v1 {
|
|
|
1921
2088
|
*/
|
|
1922
2089
|
queryAdvice?: Schema$QueryAdvisorResult;
|
|
1923
2090
|
}
|
|
2091
|
+
/**
|
|
2092
|
+
* Information about the dual-region quorum.
|
|
2093
|
+
*/
|
|
2094
|
+
export interface Schema$QuorumInfo {
|
|
2095
|
+
/**
|
|
2096
|
+
* Output only. The etag is used for optimistic concurrency control as a way to help prevent simultaneous `ChangeQuorum` requests that might create a race condition.
|
|
2097
|
+
*/
|
|
2098
|
+
etag?: string | null;
|
|
2099
|
+
/**
|
|
2100
|
+
* Output only. Whether this `ChangeQuorum` is Google or User initiated.
|
|
2101
|
+
*/
|
|
2102
|
+
initiator?: string | null;
|
|
2103
|
+
/**
|
|
2104
|
+
* Output only. The type of this quorum. See QuorumType for more information about quorum type specifications.
|
|
2105
|
+
*/
|
|
2106
|
+
quorumType?: Schema$QuorumType;
|
|
2107
|
+
/**
|
|
2108
|
+
* Output only. The timestamp when the request was triggered.
|
|
2109
|
+
*/
|
|
2110
|
+
startTime?: string | null;
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* Information about the database quorum type. This only applies to dual-region instance configs.
|
|
2114
|
+
*/
|
|
2115
|
+
export interface Schema$QuorumType {
|
|
2116
|
+
/**
|
|
2117
|
+
* Dual-region quorum type.
|
|
2118
|
+
*/
|
|
2119
|
+
dualRegion?: Schema$DualRegionQuorum;
|
|
2120
|
+
/**
|
|
2121
|
+
* Single-region quorum type.
|
|
2122
|
+
*/
|
|
2123
|
+
singleRegion?: Schema$SingleRegionQuorum;
|
|
2124
|
+
}
|
|
1924
2125
|
/**
|
|
1925
2126
|
* Message type to initiate a read-only transaction.
|
|
1926
2127
|
*/
|
|
@@ -1978,6 +2179,14 @@ export namespace spanner_v1 {
|
|
|
1978
2179
|
* If greater than zero, only the first `limit` rows are yielded. If `limit` is zero, the default is no limit. A limit cannot be specified if `partition_token` is set.
|
|
1979
2180
|
*/
|
|
1980
2181
|
limit?: string | null;
|
|
2182
|
+
/**
|
|
2183
|
+
* Optional. Lock Hint for the request, it can only be used with read-write transactions.
|
|
2184
|
+
*/
|
|
2185
|
+
lockHint?: string | null;
|
|
2186
|
+
/**
|
|
2187
|
+
* Optional. Order for the returned rows. By default, Spanner will return result rows in primary key order except for PartitionRead requests. For applications that do not require rows to be returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, resulting in lower latencies in certain cases (e.g. bulk point lookups).
|
|
2188
|
+
*/
|
|
2189
|
+
orderBy?: string | null;
|
|
1981
2190
|
/**
|
|
1982
2191
|
* If present, results will be restricted to the specified partition previously created using PartitionRead(). There must be an exact match for the values of fields common to this message and the PartitionReadRequest message used to create this partition_token.
|
|
1983
2192
|
*/
|
|
@@ -2065,7 +2274,7 @@ export namespace spanner_v1 {
|
|
|
2065
2274
|
*/
|
|
2066
2275
|
kmsKeyName?: string | null;
|
|
2067
2276
|
/**
|
|
2068
|
-
* Optional. Specifies the KMS configuration for the one or more keys used to encrypt the database. Values
|
|
2277
|
+
* Optional. Specifies the KMS configuration for the one or more keys used to encrypt the database. Values have the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples: * For single region database instance configurations, specify a single regional location KMS key. * For multi-regional database instance configurations of type `GOOGLE_MANAGED`, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For a database instance configuration of type `USER_MANAGED`, please specify only regional location KMS keys to cover each region in the instance configuration. Multi-regional location KMS keys are not supported for USER_MANAGED instance configurations.
|
|
2069
2278
|
*/
|
|
2070
2279
|
kmsKeyNames?: string[] | null;
|
|
2071
2280
|
}
|
|
@@ -2255,7 +2464,7 @@ export namespace spanner_v1 {
|
|
|
2255
2464
|
*/
|
|
2256
2465
|
labels?: {[key: string]: string} | null;
|
|
2257
2466
|
/**
|
|
2258
|
-
* Optional. If true, specifies a multiplexed session.
|
|
2467
|
+
* Optional. If true, specifies a multiplexed session. Use a multiplexed session for multiple, concurrent read-only operations. Don't use them for read-write transactions, partitioned reads, or partitioned queries. Use CreateSession to create multiplexed sessions. Don't use BatchCreateSessions to create a multiplexed session. You can't delete or list multiplexed sessions.
|
|
2259
2468
|
*/
|
|
2260
2469
|
multiplexed?: boolean | null;
|
|
2261
2470
|
/**
|
|
@@ -2285,6 +2494,15 @@ export namespace spanner_v1 {
|
|
|
2285
2494
|
*/
|
|
2286
2495
|
subqueries?: {[key: string]: number} | null;
|
|
2287
2496
|
}
|
|
2497
|
+
/**
|
|
2498
|
+
* Message type for a single-region quorum.
|
|
2499
|
+
*/
|
|
2500
|
+
export interface Schema$SingleRegionQuorum {
|
|
2501
|
+
/**
|
|
2502
|
+
* Required. The location of the serving region, e.g. "us-central1". The location must be one of the regions within the dual-region instance configuration of your database. The list of valid locations is available using the GetInstanceConfig API. This should only be used if you plan to change quorum to the single-region quorum type.
|
|
2503
|
+
*/
|
|
2504
|
+
servingLocation?: string | null;
|
|
2505
|
+
}
|
|
2288
2506
|
/**
|
|
2289
2507
|
* A single DML statement.
|
|
2290
2508
|
*/
|
|
@@ -2360,7 +2578,7 @@ export namespace spanner_v1 {
|
|
|
2360
2578
|
readTimestamp?: string | null;
|
|
2361
2579
|
}
|
|
2362
2580
|
/**
|
|
2363
|
-
* Transactions: Each session can have at most one active transaction at a time (note that standalone reads and queries use a transaction internally and do count towards the one transaction limit). After the active transaction is completed, the session can immediately be re-used for the next transaction. It is not necessary to create a new session for each transaction. Transaction modes: Cloud Spanner supports three transaction modes: 1. Locking read-write. This type of transaction is the only way to write data into Cloud Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry. 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed consistency across several reads, but do not allow writes. Snapshot read-only transactions can be configured to read at timestamps in the past, or configured to perform a strong read (where Spanner will select a timestamp such that the read is guaranteed to see the effects of all transactions that have committed before the start of the read). Snapshot read-only transactions do not need to be committed. Queries on change streams must be performed with the snapshot read-only transaction mode, specifying a strong read. Please see TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This type of transaction is used to execute a single Partitioned DML statement. Partitioned DML partitions the key space and runs the DML statement over each partition in parallel using separate, internal transactions that commit independently. Partitioned DML transactions do not need to be committed. For transactions that only read, snapshot read-only transactions provide simpler semantics and are almost always faster. In particular, read-only transactions do not take locks, so they do not conflict with read-write transactions. As a consequence of not taking locks, they also do not abort, so retry loops are not needed. Transactions may only read-write data in a single database. They may, however, read-write data in different tables within that database. Locking read-write transactions: Locking transactions may be used to atomically read-modify-write data anywhere in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as long as the transaction continues to do reads, and the transaction has not been terminated by Commit or Rollback. Long periods of inactivity at the client may cause Cloud Spanner to release a transaction's locks and abort it. Conceptually, a read-write transaction consists of zero or more reads or SQL statements followed by Commit. At any time before Commit, the client can send a Rollback request to abort the transaction. Semantics: Cloud Spanner can commit the transaction if all read locks it acquired are still valid at commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the transaction for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees that the transaction has not modified any user data in Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no guarantees about how long the transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of mutual exclusion other than between Cloud Spanner transactions themselves. Retrying aborted transactions: When a transaction aborts, the application can choose to retry the whole transaction again. To maximize the chances of successfully committing the retry, the client should execute the retry in the same session as the original attempt. The original session's lock priority increases with each consecutive abort, meaning that each attempt has a slightly better chance of success than the previous. Note that the lock priority is preserved per session (not per transaction). Lock priority is set by the first read or write in the first attempt of a read-write transaction. If the application starts a new session to retry the whole transaction, the transaction loses its original lock priority. Moreover, the lock priority is only preserved if the transaction fails with an `ABORTED` error. Under some circumstances (for example, many transactions attempting to modify the same row(s)), a transaction can abort many times in a short period before successfully committing. Thus, it is not a good idea to cap the number of retries a transaction can attempt; instead, it is better to limit the total amount of time spent retrying. Idle transactions: A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don't hold on to locks indefinitely. If an idle transaction is aborted, the commit will fail with error `ABORTED`. If this behavior is undesirable, periodically executing a simple SQL query in the transaction (for example, `SELECT 1`) prevents the transaction from becoming idle. Snapshot read-only transactions: Snapshot read-only transactions provides a simpler method than locking read-write transactions for doing several consistent reads. However, this type of transaction does not support writes. Snapshot transactions do not take locks. Instead, they work by choosing a Cloud Spanner timestamp, then executing all reads at that timestamp. Since they do not acquire locks, they do not block concurrent read-write transactions. Unlike locking read-write transactions, snapshot read-only transactions never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in practice. Snapshot read-only transactions do not need to call Commit or Rollback (and in fact are not permitted to do so). To execute a snapshot transaction, the client specifies a timestamp bound, which tells Cloud Spanner how to choose a read timestamp. The types of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read is geographically distributed, stale read-only transactions can execute more quickly than strong or read-write transactions, because they are able to execute far from the leader replica. Each type of timestamp bound is discussed in detail below. Strong: Strong reads are guaranteed to see the effects of all transactions that have committed before the start of the read. Furthermore, all rows yielded by a single read are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Strong reads are not repeatable: two consecutive strong read-only transactions might return inconsistent results if there are concurrent writes. If consistency across reads is required, the reads should be executed within a transaction or at an exact read timestamp. Queries on change streams (see below for more details) must also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of the global transaction history: they observe modifications done by all transactions with a commit timestamp less than or equal to the read timestamp, and observe none of the modifications done by transactions with a larger commit timestamp. They will block until all conflicting transactions that may be assigned commit timestamps <= the read timestamp have finished. The timestamp can either be expressed as an absolute Cloud Spanner commit timestamp or a staleness relative to the current time. These modes do not require a "negotiation phase" to pick a timestamp. As a result, they execute slightly faster than the equivalent boundedly stale concurrency modes. On the other hand, boundedly stale reads usually return fresher results. See TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness bound that allows execution of the reads at the closest available replica without blocking. All rows yielded are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Boundedly stale reads are not repeatable: two stale reads, even if they use the same staleness bound, can execute at different timestamps and thus return inconsistent results. Boundedly stale reads execute in two phases: the first phase negotiates a timestamp among all replicas needed to serve the read. In the second phase, reads are executed at the negotiated timestamp. As a result of the two phase execution, bounded staleness reads are usually a little slower than comparable exact staleness reads. However, they are typically able to return fresher results, and are more likely to execute at the closest replica. Because the timestamp negotiation requires up-front knowledge of which rows will be read, it can only be used with single-use read-only transactions. See TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and garbage collection: Cloud Spanner continuously garbage collects deleted and overwritten data in the background to reclaim storage space. This process is known as "version GC". By default, version GC reclaims versions after they are one hour old. Because of this, Cloud Spanner cannot perform reads at read timestamps more than one hour in the past. This restriction also applies to in-progress reads and/or SQL queries whose timestamp become too old while executing. Reads and SQL queries with too-old read timestamps fail with the error `FAILED_PRECONDITION`. You can configure and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long as one week, which allows Cloud Spanner to perform reads up to one week in the past. Querying change Streams: A Change Stream is a schema object that can be configured to watch data changes on the entire database, a set of tables, or a set of columns in a database. When a change stream is created, Spanner automatically defines a corresponding SQL Table-Valued Function (TVF) that can be used to query the change records in the associated change stream using the ExecuteStreamingSql API. The name of the TVF for a change stream is generated from the name of the change stream: READ_. All queries on change stream TVFs must be executed using the ExecuteStreamingSql API with a single-use read-only transaction with a strong read-only timestamp_bound. The change stream TVF allows users to specify the start_timestamp and end_timestamp for the time range of interest. All change records within the retention period is accessible using the strong read-only timestamp_bound. All other TransactionOptions are invalid for change stream queries. In addition, if TransactionOptions.read_only.return_read_timestamp is set to true, a special value of 2^63 - 2 will be returned in the Transaction message that describes the transaction, instead of a valid read timestamp. This special value should be discarded and not used for any subsequent queries. Please see https://cloud.google.com/spanner/docs/change-streams for more details on how to query the change stream TVFs. Partitioned DML transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement is applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.
|
|
2581
|
+
* Transactions: Each session can have at most one active transaction at a time (note that standalone reads and queries use a transaction internally and do count towards the one transaction limit). After the active transaction is completed, the session can immediately be re-used for the next transaction. It is not necessary to create a new session for each transaction. Transaction modes: Cloud Spanner supports three transaction modes: 1. Locking read-write. This type of transaction is the only way to write data into Cloud Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry. 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed consistency across several reads, but do not allow writes. Snapshot read-only transactions can be configured to read at timestamps in the past, or configured to perform a strong read (where Spanner will select a timestamp such that the read is guaranteed to see the effects of all transactions that have committed before the start of the read). Snapshot read-only transactions do not need to be committed. Queries on change streams must be performed with the snapshot read-only transaction mode, specifying a strong read. See TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This type of transaction is used to execute a single Partitioned DML statement. Partitioned DML partitions the key space and runs the DML statement over each partition in parallel using separate, internal transactions that commit independently. Partitioned DML transactions do not need to be committed. For transactions that only read, snapshot read-only transactions provide simpler semantics and are almost always faster. In particular, read-only transactions do not take locks, so they do not conflict with read-write transactions. As a consequence of not taking locks, they also do not abort, so retry loops are not needed. Transactions may only read-write data in a single database. They may, however, read-write data in different tables within that database. Locking read-write transactions: Locking transactions may be used to atomically read-modify-write data anywhere in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as long as the transaction continues to do reads, and the transaction has not been terminated by Commit or Rollback. Long periods of inactivity at the client may cause Cloud Spanner to release a transaction's locks and abort it. Conceptually, a read-write transaction consists of zero or more reads or SQL statements followed by Commit. At any time before Commit, the client can send a Rollback request to abort the transaction. Semantics: Cloud Spanner can commit the transaction if all read locks it acquired are still valid at commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the transaction for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees that the transaction has not modified any user data in Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no guarantees about how long the transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of mutual exclusion other than between Cloud Spanner transactions themselves. Retrying aborted transactions: When a transaction aborts, the application can choose to retry the whole transaction again. To maximize the chances of successfully committing the retry, the client should execute the retry in the same session as the original attempt. The original session's lock priority increases with each consecutive abort, meaning that each attempt has a slightly better chance of success than the previous. Note that the lock priority is preserved per session (not per transaction). Lock priority is set by the first read or write in the first attempt of a read-write transaction. If the application starts a new session to retry the whole transaction, the transaction loses its original lock priority. Moreover, the lock priority is only preserved if the transaction fails with an `ABORTED` error. Under some circumstances (for example, many transactions attempting to modify the same row(s)), a transaction can abort many times in a short period before successfully committing. Thus, it is not a good idea to cap the number of retries a transaction can attempt; instead, it is better to limit the total amount of time spent retrying. Idle transactions: A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don't hold on to locks indefinitely. If an idle transaction is aborted, the commit will fail with error `ABORTED`. If this behavior is undesirable, periodically executing a simple SQL query in the transaction (for example, `SELECT 1`) prevents the transaction from becoming idle. Snapshot read-only transactions: Snapshot read-only transactions provides a simpler method than locking read-write transactions for doing several consistent reads. However, this type of transaction does not support writes. Snapshot transactions do not take locks. Instead, they work by choosing a Cloud Spanner timestamp, then executing all reads at that timestamp. Since they do not acquire locks, they do not block concurrent read-write transactions. Unlike locking read-write transactions, snapshot read-only transactions never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in practice. Snapshot read-only transactions do not need to call Commit or Rollback (and in fact are not permitted to do so). To execute a snapshot transaction, the client specifies a timestamp bound, which tells Cloud Spanner how to choose a read timestamp. The types of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read is geographically distributed, stale read-only transactions can execute more quickly than strong or read-write transactions, because they are able to execute far from the leader replica. Each type of timestamp bound is discussed in detail below. Strong: Strong reads are guaranteed to see the effects of all transactions that have committed before the start of the read. Furthermore, all rows yielded by a single read are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Strong reads are not repeatable: two consecutive strong read-only transactions might return inconsistent results if there are concurrent writes. If consistency across reads is required, the reads should be executed within a transaction or at an exact read timestamp. Queries on change streams (see below for more details) must also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of the global transaction history: they observe modifications done by all transactions with a commit timestamp less than or equal to the read timestamp, and observe none of the modifications done by transactions with a larger commit timestamp. They will block until all conflicting transactions that may be assigned commit timestamps <= the read timestamp have finished. The timestamp can either be expressed as an absolute Cloud Spanner commit timestamp or a staleness relative to the current time. These modes do not require a "negotiation phase" to pick a timestamp. As a result, they execute slightly faster than the equivalent boundedly stale concurrency modes. On the other hand, boundedly stale reads usually return fresher results. See TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness bound that allows execution of the reads at the closest available replica without blocking. All rows yielded are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Boundedly stale reads are not repeatable: two stale reads, even if they use the same staleness bound, can execute at different timestamps and thus return inconsistent results. Boundedly stale reads execute in two phases: the first phase negotiates a timestamp among all replicas needed to serve the read. In the second phase, reads are executed at the negotiated timestamp. As a result of the two phase execution, bounded staleness reads are usually a little slower than comparable exact staleness reads. However, they are typically able to return fresher results, and are more likely to execute at the closest replica. Because the timestamp negotiation requires up-front knowledge of which rows will be read, it can only be used with single-use read-only transactions. See TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and garbage collection: Cloud Spanner continuously garbage collects deleted and overwritten data in the background to reclaim storage space. This process is known as "version GC". By default, version GC reclaims versions after they are one hour old. Because of this, Cloud Spanner cannot perform reads at read timestamps more than one hour in the past. This restriction also applies to in-progress reads and/or SQL queries whose timestamp become too old while executing. Reads and SQL queries with too-old read timestamps fail with the error `FAILED_PRECONDITION`. You can configure and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long as one week, which allows Cloud Spanner to perform reads up to one week in the past. Querying change Streams: A Change Stream is a schema object that can be configured to watch data changes on the entire database, a set of tables, or a set of columns in a database. When a change stream is created, Spanner automatically defines a corresponding SQL Table-Valued Function (TVF) that can be used to query the change records in the associated change stream using the ExecuteStreamingSql API. The name of the TVF for a change stream is generated from the name of the change stream: READ_. All queries on change stream TVFs must be executed using the ExecuteStreamingSql API with a single-use read-only transaction with a strong read-only timestamp_bound. The change stream TVF allows users to specify the start_timestamp and end_timestamp for the time range of interest. All change records within the retention period is accessible using the strong read-only timestamp_bound. All other TransactionOptions are invalid for change stream queries. In addition, if TransactionOptions.read_only.return_read_timestamp is set to true, a special value of 2^63 - 2 will be returned in the Transaction message that describes the transaction, instead of a valid read timestamp. This special value should be discarded and not used for any subsequent queries. Please see https://cloud.google.com/spanner/docs/change-streams for more details on how to query the change stream TVFs. Partitioned DML transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement is applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.
|
|
2364
2582
|
*/
|
|
2365
2583
|
export interface Schema$TransactionOptions {
|
|
2366
2584
|
/**
|
|
@@ -2507,7 +2725,7 @@ export namespace spanner_v1 {
|
|
|
2507
2725
|
*/
|
|
2508
2726
|
cancelTime?: string | null;
|
|
2509
2727
|
/**
|
|
2510
|
-
* The desired instance
|
|
2728
|
+
* The desired instance configuration after updating.
|
|
2511
2729
|
*/
|
|
2512
2730
|
instanceConfig?: Schema$InstanceConfig;
|
|
2513
2731
|
/**
|
|
@@ -2520,7 +2738,7 @@ export namespace spanner_v1 {
|
|
|
2520
2738
|
*/
|
|
2521
2739
|
export interface Schema$UpdateInstanceConfigRequest {
|
|
2522
2740
|
/**
|
|
2523
|
-
* Required. The user instance
|
|
2741
|
+
* Required. The user instance configuration to update, which must always include the instance configuration name. Otherwise, only fields mentioned in update_mask need be included. To prevent conflicts of concurrent updates, etag can be used.
|
|
2524
2742
|
*/
|
|
2525
2743
|
instanceConfig?: Schema$InstanceConfig;
|
|
2526
2744
|
/**
|
|
@@ -2687,7 +2905,7 @@ export namespace spanner_v1 {
|
|
|
2687
2905
|
}
|
|
2688
2906
|
|
|
2689
2907
|
/**
|
|
2690
|
-
* Lists the user-managed instance
|
|
2908
|
+
* Lists the user-managed instance configuration long-running operations in the given project. An instance configuration operation has a name of the form `projects//instanceConfigs//operations/`. The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.start_time` in descending order starting from the most recently started operation.
|
|
2691
2909
|
*
|
|
2692
2910
|
* @param params - Parameters for request
|
|
2693
2911
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2787,7 +3005,7 @@ export namespace spanner_v1 {
|
|
|
2787
3005
|
export interface Params$Resource$Projects$Instanceconfigoperations$List
|
|
2788
3006
|
extends StandardParameters {
|
|
2789
3007
|
/**
|
|
2790
|
-
* An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `\>`, `<=`, `\>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateInstanceConfigMetadata is `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=` \ `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) AND` \ `(metadata.instance_config.name:custom-config) AND` \ `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ `(error:*)` - Return operations where: * The operation's metadata type is CreateInstanceConfigMetadata. * The instance
|
|
3008
|
+
* An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `\>`, `<=`, `\>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateInstanceConfigMetadata is `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=` \ `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) AND` \ `(metadata.instance_config.name:custom-config) AND` \ `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ `(error:*)` - Return operations where: * The operation's metadata type is CreateInstanceConfigMetadata. * The instance configuration name contains "custom-config". * The operation started before 2021-03-28T14:50:00Z. * The operation resulted in an error.
|
|
2791
3009
|
*/
|
|
2792
3010
|
filter?: string;
|
|
2793
3011
|
/**
|
|
@@ -2799,7 +3017,7 @@ export namespace spanner_v1 {
|
|
|
2799
3017
|
*/
|
|
2800
3018
|
pageToken?: string;
|
|
2801
3019
|
/**
|
|
2802
|
-
* Required. The project of the instance
|
|
3020
|
+
* Required. The project of the instance configuration operations. Values are of the form `projects/`.
|
|
2803
3021
|
*/
|
|
2804
3022
|
parent?: string;
|
|
2805
3023
|
}
|
|
@@ -2819,7 +3037,7 @@ export namespace spanner_v1 {
|
|
|
2819
3037
|
}
|
|
2820
3038
|
|
|
2821
3039
|
/**
|
|
2822
|
-
* Creates an instance
|
|
3040
|
+
* Creates an instance configuration and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the request returns: * The instance configuration is readable via the API, with all requested attributes. The instance configuration's reconciling field is set to true. Its state is `CREATING`. While the operation is pending: * Cancelling the operation renders the instance configuration immediately unreadable via the API. * Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected. Upon completion of the returned operation: * Instances can be created using the instance configuration. * The instance configuration's reconciling field becomes false. Its state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance configuration. The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.create` permission on the resource parent.
|
|
2823
3041
|
*
|
|
2824
3042
|
* @param params - Parameters for request
|
|
2825
3043
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2907,7 +3125,7 @@ export namespace spanner_v1 {
|
|
|
2907
3125
|
}
|
|
2908
3126
|
|
|
2909
3127
|
/**
|
|
2910
|
-
* Deletes the instance
|
|
3128
|
+
* Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns `FAILED_PRECONDITION`. Only user-managed configurations can be deleted. Authorization requires `spanner.instanceConfigs.delete` permission on the resource name.
|
|
2911
3129
|
*
|
|
2912
3130
|
* @param params - Parameters for request
|
|
2913
3131
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3077,7 +3295,7 @@ export namespace spanner_v1 {
|
|
|
3077
3295
|
}
|
|
3078
3296
|
|
|
3079
3297
|
/**
|
|
3080
|
-
* Lists the supported instance configurations for a given project.
|
|
3298
|
+
* Lists the supported instance configurations for a given project. Returns both Google-managed configurations and user-managed configurations.
|
|
3081
3299
|
*
|
|
3082
3300
|
* @param params - Parameters for request
|
|
3083
3301
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3172,7 +3390,7 @@ export namespace spanner_v1 {
|
|
|
3172
3390
|
}
|
|
3173
3391
|
|
|
3174
3392
|
/**
|
|
3175
|
-
* Updates an instance
|
|
3393
|
+
* Updates an instance configuration. The returned long-running operation can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns `NOT_FOUND`. Only user-managed configurations can be updated. Immediately after the request returns: * The instance configuration's reconciling field is set to true. While the operation is pending: * Cancelling the operation sets its metadata's cancel_time. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance configuration are rejected. * Reading the instance configuration via the API continues to give the pre-request values. Upon completion of the returned operation: * Creating instances using the instance configuration uses the new values. * The new values of the instance configuration are readable via the API. * The instance configuration's reconciling field becomes false. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance configuration modification. The metadata field type is UpdateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.update` permission on the resource name.
|
|
3176
3394
|
*
|
|
3177
3395
|
* @param params - Parameters for request
|
|
3178
3396
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3260,7 +3478,7 @@ export namespace spanner_v1 {
|
|
|
3260
3478
|
export interface Params$Resource$Projects$Instanceconfigs$Create
|
|
3261
3479
|
extends StandardParameters {
|
|
3262
3480
|
/**
|
|
3263
|
-
* Required. The name of the project in which to create the instance
|
|
3481
|
+
* Required. The name of the project in which to create the instance configuration. Values are of the form `projects/`.
|
|
3264
3482
|
*/
|
|
3265
3483
|
parent?: string;
|
|
3266
3484
|
|
|
@@ -3272,7 +3490,7 @@ export namespace spanner_v1 {
|
|
|
3272
3490
|
export interface Params$Resource$Projects$Instanceconfigs$Delete
|
|
3273
3491
|
extends StandardParameters {
|
|
3274
3492
|
/**
|
|
3275
|
-
* Used for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance
|
|
3493
|
+
* Used for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance configuration from overwriting each other. If not empty, the API only deletes the instance configuration when the etag provided matches the current status of the requested instance configuration. Otherwise, deletes the instance configuration without checking the current status of the requested instance configuration.
|
|
3276
3494
|
*/
|
|
3277
3495
|
etag?: string;
|
|
3278
3496
|
/**
|
|
@@ -3309,7 +3527,7 @@ export namespace spanner_v1 {
|
|
|
3309
3527
|
export interface Params$Resource$Projects$Instanceconfigs$Patch
|
|
3310
3528
|
extends StandardParameters {
|
|
3311
3529
|
/**
|
|
3312
|
-
* A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`.
|
|
3530
|
+
* A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`. User instance configuration must start with `custom-`.
|
|
3313
3531
|
*/
|
|
3314
3532
|
name?: string;
|
|
3315
3533
|
|
|
@@ -4592,7 +4810,7 @@ export namespace spanner_v1 {
|
|
|
4592
4810
|
}
|
|
4593
4811
|
|
|
4594
4812
|
/**
|
|
4595
|
-
* Moves
|
|
4813
|
+
* Moves an instance to the target instance configuration. You can use the returned long-running operation to track the progress of moving the instance. `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following criteria: * Is undergoing a move to a different instance configuration * Has backups * Has an ongoing update * Contains any CMEK-enabled databases * Is a free trial instance While the operation is pending: * All other attempts to modify the instance, including changes to its compute capacity, are rejected. * The following database and backup admin operations are rejected: * `DatabaseAdmin.CreateDatabase` * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is specified in the request.) * `DatabaseAdmin.RestoreDatabase` * `DatabaseAdmin.CreateBackup` * `DatabaseAdmin.CopyBackup` * Both the source and target instance configurations are subject to hourly compute and storage charges. * The instance might experience higher read-write latencies and a higher transaction abort rate. However, moving an instance doesn't cause any downtime. The returned long-running operation has a name of the format `/operations/` and can be used to track the move instance operation. The metadata field type is MoveInstanceMetadata. The response field type is Instance, if successful. Cancelling the operation sets its metadata's cancel_time. Cancellation is not immediate because it involves moving any data previously moved to the target instance configuration back to the original instance configuration. You can use this operation to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with `CANCELLED` status. If not cancelled, upon completion of the returned operation: * The instance successfully moves to the target instance configuration. * You are billed for compute and storage in target instance configuration. Authorization requires the `spanner.instances.update` permission on the resource instance. For more details, see [Move an instance](https://cloud.google.com/spanner/docs/move-instance).
|
|
4596
4814
|
*
|
|
4597
4815
|
* @param params - Parameters for request
|
|
4598
4816
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6638,11 +6856,14 @@ export namespace spanner_v1 {
|
|
|
6638
6856
|
|
|
6639
6857
|
export class Resource$Projects$Instances$Databases {
|
|
6640
6858
|
context: APIRequestContext;
|
|
6859
|
+
backupSchedules: Resource$Projects$Instances$Databases$Backupschedules;
|
|
6641
6860
|
databaseRoles: Resource$Projects$Instances$Databases$Databaseroles;
|
|
6642
6861
|
operations: Resource$Projects$Instances$Databases$Operations;
|
|
6643
6862
|
sessions: Resource$Projects$Instances$Databases$Sessions;
|
|
6644
6863
|
constructor(context: APIRequestContext) {
|
|
6645
6864
|
this.context = context;
|
|
6865
|
+
this.backupSchedules =
|
|
6866
|
+
new Resource$Projects$Instances$Databases$Backupschedules(this.context);
|
|
6646
6867
|
this.databaseRoles =
|
|
6647
6868
|
new Resource$Projects$Instances$Databases$Databaseroles(this.context);
|
|
6648
6869
|
this.operations = new Resource$Projects$Instances$Databases$Operations(
|
|
@@ -6654,7 +6875,96 @@ export namespace spanner_v1 {
|
|
|
6654
6875
|
}
|
|
6655
6876
|
|
|
6656
6877
|
/**
|
|
6657
|
-
*
|
|
6878
|
+
* `ChangeQuorum` is strictly restricted to databases that use dual-region instance configurations. Initiates a background operation to change the quorum of a database from dual-region mode to single-region mode or vice versa. The returned long-running operation has a name of the format `projects//instances//databases//operations/` and can be used to track execution of the `ChangeQuorum`. The metadata field type is ChangeQuorumMetadata. Authorization requires `spanner.databases.changequorum` permission on the resource database.
|
|
6879
|
+
*
|
|
6880
|
+
* @param params - Parameters for request
|
|
6881
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6882
|
+
* @param callback - Optional callback that handles the response.
|
|
6883
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6884
|
+
*/
|
|
6885
|
+
changequorum(
|
|
6886
|
+
params: Params$Resource$Projects$Instances$Databases$Changequorum,
|
|
6887
|
+
options: StreamMethodOptions
|
|
6888
|
+
): GaxiosPromise<Readable>;
|
|
6889
|
+
changequorum(
|
|
6890
|
+
params?: Params$Resource$Projects$Instances$Databases$Changequorum,
|
|
6891
|
+
options?: MethodOptions
|
|
6892
|
+
): GaxiosPromise<Schema$Operation>;
|
|
6893
|
+
changequorum(
|
|
6894
|
+
params: Params$Resource$Projects$Instances$Databases$Changequorum,
|
|
6895
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6896
|
+
callback: BodyResponseCallback<Readable>
|
|
6897
|
+
): void;
|
|
6898
|
+
changequorum(
|
|
6899
|
+
params: Params$Resource$Projects$Instances$Databases$Changequorum,
|
|
6900
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
6901
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
6902
|
+
): void;
|
|
6903
|
+
changequorum(
|
|
6904
|
+
params: Params$Resource$Projects$Instances$Databases$Changequorum,
|
|
6905
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
6906
|
+
): void;
|
|
6907
|
+
changequorum(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
6908
|
+
changequorum(
|
|
6909
|
+
paramsOrCallback?:
|
|
6910
|
+
| Params$Resource$Projects$Instances$Databases$Changequorum
|
|
6911
|
+
| BodyResponseCallback<Schema$Operation>
|
|
6912
|
+
| BodyResponseCallback<Readable>,
|
|
6913
|
+
optionsOrCallback?:
|
|
6914
|
+
| MethodOptions
|
|
6915
|
+
| StreamMethodOptions
|
|
6916
|
+
| BodyResponseCallback<Schema$Operation>
|
|
6917
|
+
| BodyResponseCallback<Readable>,
|
|
6918
|
+
callback?:
|
|
6919
|
+
| BodyResponseCallback<Schema$Operation>
|
|
6920
|
+
| BodyResponseCallback<Readable>
|
|
6921
|
+
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
|
|
6922
|
+
let params = (paramsOrCallback ||
|
|
6923
|
+
{}) as Params$Resource$Projects$Instances$Databases$Changequorum;
|
|
6924
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6925
|
+
|
|
6926
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6927
|
+
callback = paramsOrCallback;
|
|
6928
|
+
params =
|
|
6929
|
+
{} as Params$Resource$Projects$Instances$Databases$Changequorum;
|
|
6930
|
+
options = {};
|
|
6931
|
+
}
|
|
6932
|
+
|
|
6933
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6934
|
+
callback = optionsOrCallback;
|
|
6935
|
+
options = {};
|
|
6936
|
+
}
|
|
6937
|
+
|
|
6938
|
+
const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
|
|
6939
|
+
const parameters = {
|
|
6940
|
+
options: Object.assign(
|
|
6941
|
+
{
|
|
6942
|
+
url: (rootUrl + '/v1/{+name}:changequorum').replace(
|
|
6943
|
+
/([^:]\/)\/+/g,
|
|
6944
|
+
'$1'
|
|
6945
|
+
),
|
|
6946
|
+
method: 'POST',
|
|
6947
|
+
apiVersion: '',
|
|
6948
|
+
},
|
|
6949
|
+
options
|
|
6950
|
+
),
|
|
6951
|
+
params,
|
|
6952
|
+
requiredParams: ['name'],
|
|
6953
|
+
pathParams: ['name'],
|
|
6954
|
+
context: this.context,
|
|
6955
|
+
};
|
|
6956
|
+
if (callback) {
|
|
6957
|
+
createAPIRequest<Schema$Operation>(
|
|
6958
|
+
parameters,
|
|
6959
|
+
callback as BodyResponseCallback<unknown>
|
|
6960
|
+
);
|
|
6961
|
+
} else {
|
|
6962
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
6963
|
+
}
|
|
6964
|
+
}
|
|
6965
|
+
|
|
6966
|
+
/**
|
|
6967
|
+
* Creates a new Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful.
|
|
6658
6968
|
*
|
|
6659
6969
|
* @param params - Parameters for request
|
|
6660
6970
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -7719,6 +8029,18 @@ export namespace spanner_v1 {
|
|
|
7719
8029
|
}
|
|
7720
8030
|
}
|
|
7721
8031
|
|
|
8032
|
+
export interface Params$Resource$Projects$Instances$Databases$Changequorum
|
|
8033
|
+
extends StandardParameters {
|
|
8034
|
+
/**
|
|
8035
|
+
* Required. Name of the database in which to apply `ChangeQuorum`. Values are of the form `projects//instances//databases/`.
|
|
8036
|
+
*/
|
|
8037
|
+
name?: string;
|
|
8038
|
+
|
|
8039
|
+
/**
|
|
8040
|
+
* Request body metadata
|
|
8041
|
+
*/
|
|
8042
|
+
requestBody?: Schema$ChangeQuorumRequest;
|
|
8043
|
+
}
|
|
7722
8044
|
export interface Params$Resource$Projects$Instances$Databases$Create
|
|
7723
8045
|
extends StandardParameters {
|
|
7724
8046
|
/**
|
|
@@ -7863,6 +8185,828 @@ export namespace spanner_v1 {
|
|
|
7863
8185
|
requestBody?: Schema$UpdateDatabaseDdlRequest;
|
|
7864
8186
|
}
|
|
7865
8187
|
|
|
8188
|
+
export class Resource$Projects$Instances$Databases$Backupschedules {
|
|
8189
|
+
context: APIRequestContext;
|
|
8190
|
+
constructor(context: APIRequestContext) {
|
|
8191
|
+
this.context = context;
|
|
8192
|
+
}
|
|
8193
|
+
|
|
8194
|
+
/**
|
|
8195
|
+
* Creates a new backup schedule.
|
|
8196
|
+
*
|
|
8197
|
+
* @param params - Parameters for request
|
|
8198
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8199
|
+
* @param callback - Optional callback that handles the response.
|
|
8200
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8201
|
+
*/
|
|
8202
|
+
create(
|
|
8203
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Create,
|
|
8204
|
+
options: StreamMethodOptions
|
|
8205
|
+
): GaxiosPromise<Readable>;
|
|
8206
|
+
create(
|
|
8207
|
+
params?: Params$Resource$Projects$Instances$Databases$Backupschedules$Create,
|
|
8208
|
+
options?: MethodOptions
|
|
8209
|
+
): GaxiosPromise<Schema$BackupSchedule>;
|
|
8210
|
+
create(
|
|
8211
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Create,
|
|
8212
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8213
|
+
callback: BodyResponseCallback<Readable>
|
|
8214
|
+
): void;
|
|
8215
|
+
create(
|
|
8216
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Create,
|
|
8217
|
+
options: MethodOptions | BodyResponseCallback<Schema$BackupSchedule>,
|
|
8218
|
+
callback: BodyResponseCallback<Schema$BackupSchedule>
|
|
8219
|
+
): void;
|
|
8220
|
+
create(
|
|
8221
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Create,
|
|
8222
|
+
callback: BodyResponseCallback<Schema$BackupSchedule>
|
|
8223
|
+
): void;
|
|
8224
|
+
create(callback: BodyResponseCallback<Schema$BackupSchedule>): void;
|
|
8225
|
+
create(
|
|
8226
|
+
paramsOrCallback?:
|
|
8227
|
+
| Params$Resource$Projects$Instances$Databases$Backupschedules$Create
|
|
8228
|
+
| BodyResponseCallback<Schema$BackupSchedule>
|
|
8229
|
+
| BodyResponseCallback<Readable>,
|
|
8230
|
+
optionsOrCallback?:
|
|
8231
|
+
| MethodOptions
|
|
8232
|
+
| StreamMethodOptions
|
|
8233
|
+
| BodyResponseCallback<Schema$BackupSchedule>
|
|
8234
|
+
| BodyResponseCallback<Readable>,
|
|
8235
|
+
callback?:
|
|
8236
|
+
| BodyResponseCallback<Schema$BackupSchedule>
|
|
8237
|
+
| BodyResponseCallback<Readable>
|
|
8238
|
+
): void | GaxiosPromise<Schema$BackupSchedule> | GaxiosPromise<Readable> {
|
|
8239
|
+
let params = (paramsOrCallback ||
|
|
8240
|
+
{}) as Params$Resource$Projects$Instances$Databases$Backupschedules$Create;
|
|
8241
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8242
|
+
|
|
8243
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8244
|
+
callback = paramsOrCallback;
|
|
8245
|
+
params =
|
|
8246
|
+
{} as Params$Resource$Projects$Instances$Databases$Backupschedules$Create;
|
|
8247
|
+
options = {};
|
|
8248
|
+
}
|
|
8249
|
+
|
|
8250
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8251
|
+
callback = optionsOrCallback;
|
|
8252
|
+
options = {};
|
|
8253
|
+
}
|
|
8254
|
+
|
|
8255
|
+
const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
|
|
8256
|
+
const parameters = {
|
|
8257
|
+
options: Object.assign(
|
|
8258
|
+
{
|
|
8259
|
+
url: (rootUrl + '/v1/{+parent}/backupSchedules').replace(
|
|
8260
|
+
/([^:]\/)\/+/g,
|
|
8261
|
+
'$1'
|
|
8262
|
+
),
|
|
8263
|
+
method: 'POST',
|
|
8264
|
+
apiVersion: '',
|
|
8265
|
+
},
|
|
8266
|
+
options
|
|
8267
|
+
),
|
|
8268
|
+
params,
|
|
8269
|
+
requiredParams: ['parent'],
|
|
8270
|
+
pathParams: ['parent'],
|
|
8271
|
+
context: this.context,
|
|
8272
|
+
};
|
|
8273
|
+
if (callback) {
|
|
8274
|
+
createAPIRequest<Schema$BackupSchedule>(
|
|
8275
|
+
parameters,
|
|
8276
|
+
callback as BodyResponseCallback<unknown>
|
|
8277
|
+
);
|
|
8278
|
+
} else {
|
|
8279
|
+
return createAPIRequest<Schema$BackupSchedule>(parameters);
|
|
8280
|
+
}
|
|
8281
|
+
}
|
|
8282
|
+
|
|
8283
|
+
/**
|
|
8284
|
+
* Deletes a backup schedule.
|
|
8285
|
+
*
|
|
8286
|
+
* @param params - Parameters for request
|
|
8287
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8288
|
+
* @param callback - Optional callback that handles the response.
|
|
8289
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8290
|
+
*/
|
|
8291
|
+
delete(
|
|
8292
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Delete,
|
|
8293
|
+
options: StreamMethodOptions
|
|
8294
|
+
): GaxiosPromise<Readable>;
|
|
8295
|
+
delete(
|
|
8296
|
+
params?: Params$Resource$Projects$Instances$Databases$Backupschedules$Delete,
|
|
8297
|
+
options?: MethodOptions
|
|
8298
|
+
): GaxiosPromise<Schema$Empty>;
|
|
8299
|
+
delete(
|
|
8300
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Delete,
|
|
8301
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8302
|
+
callback: BodyResponseCallback<Readable>
|
|
8303
|
+
): void;
|
|
8304
|
+
delete(
|
|
8305
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Delete,
|
|
8306
|
+
options: MethodOptions | BodyResponseCallback<Schema$Empty>,
|
|
8307
|
+
callback: BodyResponseCallback<Schema$Empty>
|
|
8308
|
+
): void;
|
|
8309
|
+
delete(
|
|
8310
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Delete,
|
|
8311
|
+
callback: BodyResponseCallback<Schema$Empty>
|
|
8312
|
+
): void;
|
|
8313
|
+
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
8314
|
+
delete(
|
|
8315
|
+
paramsOrCallback?:
|
|
8316
|
+
| Params$Resource$Projects$Instances$Databases$Backupschedules$Delete
|
|
8317
|
+
| BodyResponseCallback<Schema$Empty>
|
|
8318
|
+
| BodyResponseCallback<Readable>,
|
|
8319
|
+
optionsOrCallback?:
|
|
8320
|
+
| MethodOptions
|
|
8321
|
+
| StreamMethodOptions
|
|
8322
|
+
| BodyResponseCallback<Schema$Empty>
|
|
8323
|
+
| BodyResponseCallback<Readable>,
|
|
8324
|
+
callback?:
|
|
8325
|
+
| BodyResponseCallback<Schema$Empty>
|
|
8326
|
+
| BodyResponseCallback<Readable>
|
|
8327
|
+
): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
|
|
8328
|
+
let params = (paramsOrCallback ||
|
|
8329
|
+
{}) as Params$Resource$Projects$Instances$Databases$Backupschedules$Delete;
|
|
8330
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8331
|
+
|
|
8332
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8333
|
+
callback = paramsOrCallback;
|
|
8334
|
+
params =
|
|
8335
|
+
{} as Params$Resource$Projects$Instances$Databases$Backupschedules$Delete;
|
|
8336
|
+
options = {};
|
|
8337
|
+
}
|
|
8338
|
+
|
|
8339
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8340
|
+
callback = optionsOrCallback;
|
|
8341
|
+
options = {};
|
|
8342
|
+
}
|
|
8343
|
+
|
|
8344
|
+
const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
|
|
8345
|
+
const parameters = {
|
|
8346
|
+
options: Object.assign(
|
|
8347
|
+
{
|
|
8348
|
+
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
8349
|
+
method: 'DELETE',
|
|
8350
|
+
apiVersion: '',
|
|
8351
|
+
},
|
|
8352
|
+
options
|
|
8353
|
+
),
|
|
8354
|
+
params,
|
|
8355
|
+
requiredParams: ['name'],
|
|
8356
|
+
pathParams: ['name'],
|
|
8357
|
+
context: this.context,
|
|
8358
|
+
};
|
|
8359
|
+
if (callback) {
|
|
8360
|
+
createAPIRequest<Schema$Empty>(
|
|
8361
|
+
parameters,
|
|
8362
|
+
callback as BodyResponseCallback<unknown>
|
|
8363
|
+
);
|
|
8364
|
+
} else {
|
|
8365
|
+
return createAPIRequest<Schema$Empty>(parameters);
|
|
8366
|
+
}
|
|
8367
|
+
}
|
|
8368
|
+
|
|
8369
|
+
/**
|
|
8370
|
+
* Gets backup schedule for the input schedule name.
|
|
8371
|
+
*
|
|
8372
|
+
* @param params - Parameters for request
|
|
8373
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8374
|
+
* @param callback - Optional callback that handles the response.
|
|
8375
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8376
|
+
*/
|
|
8377
|
+
get(
|
|
8378
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Get,
|
|
8379
|
+
options: StreamMethodOptions
|
|
8380
|
+
): GaxiosPromise<Readable>;
|
|
8381
|
+
get(
|
|
8382
|
+
params?: Params$Resource$Projects$Instances$Databases$Backupschedules$Get,
|
|
8383
|
+
options?: MethodOptions
|
|
8384
|
+
): GaxiosPromise<Schema$BackupSchedule>;
|
|
8385
|
+
get(
|
|
8386
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Get,
|
|
8387
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8388
|
+
callback: BodyResponseCallback<Readable>
|
|
8389
|
+
): void;
|
|
8390
|
+
get(
|
|
8391
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Get,
|
|
8392
|
+
options: MethodOptions | BodyResponseCallback<Schema$BackupSchedule>,
|
|
8393
|
+
callback: BodyResponseCallback<Schema$BackupSchedule>
|
|
8394
|
+
): void;
|
|
8395
|
+
get(
|
|
8396
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Get,
|
|
8397
|
+
callback: BodyResponseCallback<Schema$BackupSchedule>
|
|
8398
|
+
): void;
|
|
8399
|
+
get(callback: BodyResponseCallback<Schema$BackupSchedule>): void;
|
|
8400
|
+
get(
|
|
8401
|
+
paramsOrCallback?:
|
|
8402
|
+
| Params$Resource$Projects$Instances$Databases$Backupschedules$Get
|
|
8403
|
+
| BodyResponseCallback<Schema$BackupSchedule>
|
|
8404
|
+
| BodyResponseCallback<Readable>,
|
|
8405
|
+
optionsOrCallback?:
|
|
8406
|
+
| MethodOptions
|
|
8407
|
+
| StreamMethodOptions
|
|
8408
|
+
| BodyResponseCallback<Schema$BackupSchedule>
|
|
8409
|
+
| BodyResponseCallback<Readable>,
|
|
8410
|
+
callback?:
|
|
8411
|
+
| BodyResponseCallback<Schema$BackupSchedule>
|
|
8412
|
+
| BodyResponseCallback<Readable>
|
|
8413
|
+
): void | GaxiosPromise<Schema$BackupSchedule> | GaxiosPromise<Readable> {
|
|
8414
|
+
let params = (paramsOrCallback ||
|
|
8415
|
+
{}) as Params$Resource$Projects$Instances$Databases$Backupschedules$Get;
|
|
8416
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8417
|
+
|
|
8418
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8419
|
+
callback = paramsOrCallback;
|
|
8420
|
+
params =
|
|
8421
|
+
{} as Params$Resource$Projects$Instances$Databases$Backupschedules$Get;
|
|
8422
|
+
options = {};
|
|
8423
|
+
}
|
|
8424
|
+
|
|
8425
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8426
|
+
callback = optionsOrCallback;
|
|
8427
|
+
options = {};
|
|
8428
|
+
}
|
|
8429
|
+
|
|
8430
|
+
const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
|
|
8431
|
+
const parameters = {
|
|
8432
|
+
options: Object.assign(
|
|
8433
|
+
{
|
|
8434
|
+
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
8435
|
+
method: 'GET',
|
|
8436
|
+
apiVersion: '',
|
|
8437
|
+
},
|
|
8438
|
+
options
|
|
8439
|
+
),
|
|
8440
|
+
params,
|
|
8441
|
+
requiredParams: ['name'],
|
|
8442
|
+
pathParams: ['name'],
|
|
8443
|
+
context: this.context,
|
|
8444
|
+
};
|
|
8445
|
+
if (callback) {
|
|
8446
|
+
createAPIRequest<Schema$BackupSchedule>(
|
|
8447
|
+
parameters,
|
|
8448
|
+
callback as BodyResponseCallback<unknown>
|
|
8449
|
+
);
|
|
8450
|
+
} else {
|
|
8451
|
+
return createAPIRequest<Schema$BackupSchedule>(parameters);
|
|
8452
|
+
}
|
|
8453
|
+
}
|
|
8454
|
+
|
|
8455
|
+
/**
|
|
8456
|
+
* Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource.
|
|
8457
|
+
*
|
|
8458
|
+
* @param params - Parameters for request
|
|
8459
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8460
|
+
* @param callback - Optional callback that handles the response.
|
|
8461
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8462
|
+
*/
|
|
8463
|
+
getIamPolicy(
|
|
8464
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Getiampolicy,
|
|
8465
|
+
options: StreamMethodOptions
|
|
8466
|
+
): GaxiosPromise<Readable>;
|
|
8467
|
+
getIamPolicy(
|
|
8468
|
+
params?: Params$Resource$Projects$Instances$Databases$Backupschedules$Getiampolicy,
|
|
8469
|
+
options?: MethodOptions
|
|
8470
|
+
): GaxiosPromise<Schema$Policy>;
|
|
8471
|
+
getIamPolicy(
|
|
8472
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Getiampolicy,
|
|
8473
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8474
|
+
callback: BodyResponseCallback<Readable>
|
|
8475
|
+
): void;
|
|
8476
|
+
getIamPolicy(
|
|
8477
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Getiampolicy,
|
|
8478
|
+
options: MethodOptions | BodyResponseCallback<Schema$Policy>,
|
|
8479
|
+
callback: BodyResponseCallback<Schema$Policy>
|
|
8480
|
+
): void;
|
|
8481
|
+
getIamPolicy(
|
|
8482
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Getiampolicy,
|
|
8483
|
+
callback: BodyResponseCallback<Schema$Policy>
|
|
8484
|
+
): void;
|
|
8485
|
+
getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
|
|
8486
|
+
getIamPolicy(
|
|
8487
|
+
paramsOrCallback?:
|
|
8488
|
+
| Params$Resource$Projects$Instances$Databases$Backupschedules$Getiampolicy
|
|
8489
|
+
| BodyResponseCallback<Schema$Policy>
|
|
8490
|
+
| BodyResponseCallback<Readable>,
|
|
8491
|
+
optionsOrCallback?:
|
|
8492
|
+
| MethodOptions
|
|
8493
|
+
| StreamMethodOptions
|
|
8494
|
+
| BodyResponseCallback<Schema$Policy>
|
|
8495
|
+
| BodyResponseCallback<Readable>,
|
|
8496
|
+
callback?:
|
|
8497
|
+
| BodyResponseCallback<Schema$Policy>
|
|
8498
|
+
| BodyResponseCallback<Readable>
|
|
8499
|
+
): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
|
|
8500
|
+
let params = (paramsOrCallback ||
|
|
8501
|
+
{}) as Params$Resource$Projects$Instances$Databases$Backupschedules$Getiampolicy;
|
|
8502
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8503
|
+
|
|
8504
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8505
|
+
callback = paramsOrCallback;
|
|
8506
|
+
params =
|
|
8507
|
+
{} as Params$Resource$Projects$Instances$Databases$Backupschedules$Getiampolicy;
|
|
8508
|
+
options = {};
|
|
8509
|
+
}
|
|
8510
|
+
|
|
8511
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8512
|
+
callback = optionsOrCallback;
|
|
8513
|
+
options = {};
|
|
8514
|
+
}
|
|
8515
|
+
|
|
8516
|
+
const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
|
|
8517
|
+
const parameters = {
|
|
8518
|
+
options: Object.assign(
|
|
8519
|
+
{
|
|
8520
|
+
url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace(
|
|
8521
|
+
/([^:]\/)\/+/g,
|
|
8522
|
+
'$1'
|
|
8523
|
+
),
|
|
8524
|
+
method: 'POST',
|
|
8525
|
+
apiVersion: '',
|
|
8526
|
+
},
|
|
8527
|
+
options
|
|
8528
|
+
),
|
|
8529
|
+
params,
|
|
8530
|
+
requiredParams: ['resource'],
|
|
8531
|
+
pathParams: ['resource'],
|
|
8532
|
+
context: this.context,
|
|
8533
|
+
};
|
|
8534
|
+
if (callback) {
|
|
8535
|
+
createAPIRequest<Schema$Policy>(
|
|
8536
|
+
parameters,
|
|
8537
|
+
callback as BodyResponseCallback<unknown>
|
|
8538
|
+
);
|
|
8539
|
+
} else {
|
|
8540
|
+
return createAPIRequest<Schema$Policy>(parameters);
|
|
8541
|
+
}
|
|
8542
|
+
}
|
|
8543
|
+
|
|
8544
|
+
/**
|
|
8545
|
+
* Lists all the backup schedules for the database.
|
|
8546
|
+
*
|
|
8547
|
+
* @param params - Parameters for request
|
|
8548
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8549
|
+
* @param callback - Optional callback that handles the response.
|
|
8550
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8551
|
+
*/
|
|
8552
|
+
list(
|
|
8553
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$List,
|
|
8554
|
+
options: StreamMethodOptions
|
|
8555
|
+
): GaxiosPromise<Readable>;
|
|
8556
|
+
list(
|
|
8557
|
+
params?: Params$Resource$Projects$Instances$Databases$Backupschedules$List,
|
|
8558
|
+
options?: MethodOptions
|
|
8559
|
+
): GaxiosPromise<Schema$ListBackupSchedulesResponse>;
|
|
8560
|
+
list(
|
|
8561
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$List,
|
|
8562
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8563
|
+
callback: BodyResponseCallback<Readable>
|
|
8564
|
+
): void;
|
|
8565
|
+
list(
|
|
8566
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$List,
|
|
8567
|
+
options:
|
|
8568
|
+
| MethodOptions
|
|
8569
|
+
| BodyResponseCallback<Schema$ListBackupSchedulesResponse>,
|
|
8570
|
+
callback: BodyResponseCallback<Schema$ListBackupSchedulesResponse>
|
|
8571
|
+
): void;
|
|
8572
|
+
list(
|
|
8573
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$List,
|
|
8574
|
+
callback: BodyResponseCallback<Schema$ListBackupSchedulesResponse>
|
|
8575
|
+
): void;
|
|
8576
|
+
list(
|
|
8577
|
+
callback: BodyResponseCallback<Schema$ListBackupSchedulesResponse>
|
|
8578
|
+
): void;
|
|
8579
|
+
list(
|
|
8580
|
+
paramsOrCallback?:
|
|
8581
|
+
| Params$Resource$Projects$Instances$Databases$Backupschedules$List
|
|
8582
|
+
| BodyResponseCallback<Schema$ListBackupSchedulesResponse>
|
|
8583
|
+
| BodyResponseCallback<Readable>,
|
|
8584
|
+
optionsOrCallback?:
|
|
8585
|
+
| MethodOptions
|
|
8586
|
+
| StreamMethodOptions
|
|
8587
|
+
| BodyResponseCallback<Schema$ListBackupSchedulesResponse>
|
|
8588
|
+
| BodyResponseCallback<Readable>,
|
|
8589
|
+
callback?:
|
|
8590
|
+
| BodyResponseCallback<Schema$ListBackupSchedulesResponse>
|
|
8591
|
+
| BodyResponseCallback<Readable>
|
|
8592
|
+
):
|
|
8593
|
+
| void
|
|
8594
|
+
| GaxiosPromise<Schema$ListBackupSchedulesResponse>
|
|
8595
|
+
| GaxiosPromise<Readable> {
|
|
8596
|
+
let params = (paramsOrCallback ||
|
|
8597
|
+
{}) as Params$Resource$Projects$Instances$Databases$Backupschedules$List;
|
|
8598
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8599
|
+
|
|
8600
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8601
|
+
callback = paramsOrCallback;
|
|
8602
|
+
params =
|
|
8603
|
+
{} as Params$Resource$Projects$Instances$Databases$Backupschedules$List;
|
|
8604
|
+
options = {};
|
|
8605
|
+
}
|
|
8606
|
+
|
|
8607
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8608
|
+
callback = optionsOrCallback;
|
|
8609
|
+
options = {};
|
|
8610
|
+
}
|
|
8611
|
+
|
|
8612
|
+
const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
|
|
8613
|
+
const parameters = {
|
|
8614
|
+
options: Object.assign(
|
|
8615
|
+
{
|
|
8616
|
+
url: (rootUrl + '/v1/{+parent}/backupSchedules').replace(
|
|
8617
|
+
/([^:]\/)\/+/g,
|
|
8618
|
+
'$1'
|
|
8619
|
+
),
|
|
8620
|
+
method: 'GET',
|
|
8621
|
+
apiVersion: '',
|
|
8622
|
+
},
|
|
8623
|
+
options
|
|
8624
|
+
),
|
|
8625
|
+
params,
|
|
8626
|
+
requiredParams: ['parent'],
|
|
8627
|
+
pathParams: ['parent'],
|
|
8628
|
+
context: this.context,
|
|
8629
|
+
};
|
|
8630
|
+
if (callback) {
|
|
8631
|
+
createAPIRequest<Schema$ListBackupSchedulesResponse>(
|
|
8632
|
+
parameters,
|
|
8633
|
+
callback as BodyResponseCallback<unknown>
|
|
8634
|
+
);
|
|
8635
|
+
} else {
|
|
8636
|
+
return createAPIRequest<Schema$ListBackupSchedulesResponse>(parameters);
|
|
8637
|
+
}
|
|
8638
|
+
}
|
|
8639
|
+
|
|
8640
|
+
/**
|
|
8641
|
+
* Updates a backup schedule.
|
|
8642
|
+
*
|
|
8643
|
+
* @param params - Parameters for request
|
|
8644
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8645
|
+
* @param callback - Optional callback that handles the response.
|
|
8646
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8647
|
+
*/
|
|
8648
|
+
patch(
|
|
8649
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Patch,
|
|
8650
|
+
options: StreamMethodOptions
|
|
8651
|
+
): GaxiosPromise<Readable>;
|
|
8652
|
+
patch(
|
|
8653
|
+
params?: Params$Resource$Projects$Instances$Databases$Backupschedules$Patch,
|
|
8654
|
+
options?: MethodOptions
|
|
8655
|
+
): GaxiosPromise<Schema$BackupSchedule>;
|
|
8656
|
+
patch(
|
|
8657
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Patch,
|
|
8658
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8659
|
+
callback: BodyResponseCallback<Readable>
|
|
8660
|
+
): void;
|
|
8661
|
+
patch(
|
|
8662
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Patch,
|
|
8663
|
+
options: MethodOptions | BodyResponseCallback<Schema$BackupSchedule>,
|
|
8664
|
+
callback: BodyResponseCallback<Schema$BackupSchedule>
|
|
8665
|
+
): void;
|
|
8666
|
+
patch(
|
|
8667
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Patch,
|
|
8668
|
+
callback: BodyResponseCallback<Schema$BackupSchedule>
|
|
8669
|
+
): void;
|
|
8670
|
+
patch(callback: BodyResponseCallback<Schema$BackupSchedule>): void;
|
|
8671
|
+
patch(
|
|
8672
|
+
paramsOrCallback?:
|
|
8673
|
+
| Params$Resource$Projects$Instances$Databases$Backupschedules$Patch
|
|
8674
|
+
| BodyResponseCallback<Schema$BackupSchedule>
|
|
8675
|
+
| BodyResponseCallback<Readable>,
|
|
8676
|
+
optionsOrCallback?:
|
|
8677
|
+
| MethodOptions
|
|
8678
|
+
| StreamMethodOptions
|
|
8679
|
+
| BodyResponseCallback<Schema$BackupSchedule>
|
|
8680
|
+
| BodyResponseCallback<Readable>,
|
|
8681
|
+
callback?:
|
|
8682
|
+
| BodyResponseCallback<Schema$BackupSchedule>
|
|
8683
|
+
| BodyResponseCallback<Readable>
|
|
8684
|
+
): void | GaxiosPromise<Schema$BackupSchedule> | GaxiosPromise<Readable> {
|
|
8685
|
+
let params = (paramsOrCallback ||
|
|
8686
|
+
{}) as Params$Resource$Projects$Instances$Databases$Backupschedules$Patch;
|
|
8687
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8688
|
+
|
|
8689
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8690
|
+
callback = paramsOrCallback;
|
|
8691
|
+
params =
|
|
8692
|
+
{} as Params$Resource$Projects$Instances$Databases$Backupschedules$Patch;
|
|
8693
|
+
options = {};
|
|
8694
|
+
}
|
|
8695
|
+
|
|
8696
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8697
|
+
callback = optionsOrCallback;
|
|
8698
|
+
options = {};
|
|
8699
|
+
}
|
|
8700
|
+
|
|
8701
|
+
const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
|
|
8702
|
+
const parameters = {
|
|
8703
|
+
options: Object.assign(
|
|
8704
|
+
{
|
|
8705
|
+
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
8706
|
+
method: 'PATCH',
|
|
8707
|
+
apiVersion: '',
|
|
8708
|
+
},
|
|
8709
|
+
options
|
|
8710
|
+
),
|
|
8711
|
+
params,
|
|
8712
|
+
requiredParams: ['name'],
|
|
8713
|
+
pathParams: ['name'],
|
|
8714
|
+
context: this.context,
|
|
8715
|
+
};
|
|
8716
|
+
if (callback) {
|
|
8717
|
+
createAPIRequest<Schema$BackupSchedule>(
|
|
8718
|
+
parameters,
|
|
8719
|
+
callback as BodyResponseCallback<unknown>
|
|
8720
|
+
);
|
|
8721
|
+
} else {
|
|
8722
|
+
return createAPIRequest<Schema$BackupSchedule>(parameters);
|
|
8723
|
+
}
|
|
8724
|
+
}
|
|
8725
|
+
|
|
8726
|
+
/**
|
|
8727
|
+
* Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource.
|
|
8728
|
+
*
|
|
8729
|
+
* @param params - Parameters for request
|
|
8730
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8731
|
+
* @param callback - Optional callback that handles the response.
|
|
8732
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8733
|
+
*/
|
|
8734
|
+
setIamPolicy(
|
|
8735
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Setiampolicy,
|
|
8736
|
+
options: StreamMethodOptions
|
|
8737
|
+
): GaxiosPromise<Readable>;
|
|
8738
|
+
setIamPolicy(
|
|
8739
|
+
params?: Params$Resource$Projects$Instances$Databases$Backupschedules$Setiampolicy,
|
|
8740
|
+
options?: MethodOptions
|
|
8741
|
+
): GaxiosPromise<Schema$Policy>;
|
|
8742
|
+
setIamPolicy(
|
|
8743
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Setiampolicy,
|
|
8744
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8745
|
+
callback: BodyResponseCallback<Readable>
|
|
8746
|
+
): void;
|
|
8747
|
+
setIamPolicy(
|
|
8748
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Setiampolicy,
|
|
8749
|
+
options: MethodOptions | BodyResponseCallback<Schema$Policy>,
|
|
8750
|
+
callback: BodyResponseCallback<Schema$Policy>
|
|
8751
|
+
): void;
|
|
8752
|
+
setIamPolicy(
|
|
8753
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Setiampolicy,
|
|
8754
|
+
callback: BodyResponseCallback<Schema$Policy>
|
|
8755
|
+
): void;
|
|
8756
|
+
setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
|
|
8757
|
+
setIamPolicy(
|
|
8758
|
+
paramsOrCallback?:
|
|
8759
|
+
| Params$Resource$Projects$Instances$Databases$Backupschedules$Setiampolicy
|
|
8760
|
+
| BodyResponseCallback<Schema$Policy>
|
|
8761
|
+
| BodyResponseCallback<Readable>,
|
|
8762
|
+
optionsOrCallback?:
|
|
8763
|
+
| MethodOptions
|
|
8764
|
+
| StreamMethodOptions
|
|
8765
|
+
| BodyResponseCallback<Schema$Policy>
|
|
8766
|
+
| BodyResponseCallback<Readable>,
|
|
8767
|
+
callback?:
|
|
8768
|
+
| BodyResponseCallback<Schema$Policy>
|
|
8769
|
+
| BodyResponseCallback<Readable>
|
|
8770
|
+
): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
|
|
8771
|
+
let params = (paramsOrCallback ||
|
|
8772
|
+
{}) as Params$Resource$Projects$Instances$Databases$Backupschedules$Setiampolicy;
|
|
8773
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8774
|
+
|
|
8775
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8776
|
+
callback = paramsOrCallback;
|
|
8777
|
+
params =
|
|
8778
|
+
{} as Params$Resource$Projects$Instances$Databases$Backupschedules$Setiampolicy;
|
|
8779
|
+
options = {};
|
|
8780
|
+
}
|
|
8781
|
+
|
|
8782
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8783
|
+
callback = optionsOrCallback;
|
|
8784
|
+
options = {};
|
|
8785
|
+
}
|
|
8786
|
+
|
|
8787
|
+
const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
|
|
8788
|
+
const parameters = {
|
|
8789
|
+
options: Object.assign(
|
|
8790
|
+
{
|
|
8791
|
+
url: (rootUrl + '/v1/{+resource}:setIamPolicy').replace(
|
|
8792
|
+
/([^:]\/)\/+/g,
|
|
8793
|
+
'$1'
|
|
8794
|
+
),
|
|
8795
|
+
method: 'POST',
|
|
8796
|
+
apiVersion: '',
|
|
8797
|
+
},
|
|
8798
|
+
options
|
|
8799
|
+
),
|
|
8800
|
+
params,
|
|
8801
|
+
requiredParams: ['resource'],
|
|
8802
|
+
pathParams: ['resource'],
|
|
8803
|
+
context: this.context,
|
|
8804
|
+
};
|
|
8805
|
+
if (callback) {
|
|
8806
|
+
createAPIRequest<Schema$Policy>(
|
|
8807
|
+
parameters,
|
|
8808
|
+
callback as BodyResponseCallback<unknown>
|
|
8809
|
+
);
|
|
8810
|
+
} else {
|
|
8811
|
+
return createAPIRequest<Schema$Policy>(parameters);
|
|
8812
|
+
}
|
|
8813
|
+
}
|
|
8814
|
+
|
|
8815
|
+
/**
|
|
8816
|
+
* Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.
|
|
8817
|
+
*
|
|
8818
|
+
* @param params - Parameters for request
|
|
8819
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
8820
|
+
* @param callback - Optional callback that handles the response.
|
|
8821
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
8822
|
+
*/
|
|
8823
|
+
testIamPermissions(
|
|
8824
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Testiampermissions,
|
|
8825
|
+
options: StreamMethodOptions
|
|
8826
|
+
): GaxiosPromise<Readable>;
|
|
8827
|
+
testIamPermissions(
|
|
8828
|
+
params?: Params$Resource$Projects$Instances$Databases$Backupschedules$Testiampermissions,
|
|
8829
|
+
options?: MethodOptions
|
|
8830
|
+
): GaxiosPromise<Schema$TestIamPermissionsResponse>;
|
|
8831
|
+
testIamPermissions(
|
|
8832
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Testiampermissions,
|
|
8833
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
8834
|
+
callback: BodyResponseCallback<Readable>
|
|
8835
|
+
): void;
|
|
8836
|
+
testIamPermissions(
|
|
8837
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Testiampermissions,
|
|
8838
|
+
options:
|
|
8839
|
+
| MethodOptions
|
|
8840
|
+
| BodyResponseCallback<Schema$TestIamPermissionsResponse>,
|
|
8841
|
+
callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
|
|
8842
|
+
): void;
|
|
8843
|
+
testIamPermissions(
|
|
8844
|
+
params: Params$Resource$Projects$Instances$Databases$Backupschedules$Testiampermissions,
|
|
8845
|
+
callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
|
|
8846
|
+
): void;
|
|
8847
|
+
testIamPermissions(
|
|
8848
|
+
callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
|
|
8849
|
+
): void;
|
|
8850
|
+
testIamPermissions(
|
|
8851
|
+
paramsOrCallback?:
|
|
8852
|
+
| Params$Resource$Projects$Instances$Databases$Backupschedules$Testiampermissions
|
|
8853
|
+
| BodyResponseCallback<Schema$TestIamPermissionsResponse>
|
|
8854
|
+
| BodyResponseCallback<Readable>,
|
|
8855
|
+
optionsOrCallback?:
|
|
8856
|
+
| MethodOptions
|
|
8857
|
+
| StreamMethodOptions
|
|
8858
|
+
| BodyResponseCallback<Schema$TestIamPermissionsResponse>
|
|
8859
|
+
| BodyResponseCallback<Readable>,
|
|
8860
|
+
callback?:
|
|
8861
|
+
| BodyResponseCallback<Schema$TestIamPermissionsResponse>
|
|
8862
|
+
| BodyResponseCallback<Readable>
|
|
8863
|
+
):
|
|
8864
|
+
| void
|
|
8865
|
+
| GaxiosPromise<Schema$TestIamPermissionsResponse>
|
|
8866
|
+
| GaxiosPromise<Readable> {
|
|
8867
|
+
let params = (paramsOrCallback ||
|
|
8868
|
+
{}) as Params$Resource$Projects$Instances$Databases$Backupschedules$Testiampermissions;
|
|
8869
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
8870
|
+
|
|
8871
|
+
if (typeof paramsOrCallback === 'function') {
|
|
8872
|
+
callback = paramsOrCallback;
|
|
8873
|
+
params =
|
|
8874
|
+
{} as Params$Resource$Projects$Instances$Databases$Backupschedules$Testiampermissions;
|
|
8875
|
+
options = {};
|
|
8876
|
+
}
|
|
8877
|
+
|
|
8878
|
+
if (typeof optionsOrCallback === 'function') {
|
|
8879
|
+
callback = optionsOrCallback;
|
|
8880
|
+
options = {};
|
|
8881
|
+
}
|
|
8882
|
+
|
|
8883
|
+
const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
|
|
8884
|
+
const parameters = {
|
|
8885
|
+
options: Object.assign(
|
|
8886
|
+
{
|
|
8887
|
+
url: (rootUrl + '/v1/{+resource}:testIamPermissions').replace(
|
|
8888
|
+
/([^:]\/)\/+/g,
|
|
8889
|
+
'$1'
|
|
8890
|
+
),
|
|
8891
|
+
method: 'POST',
|
|
8892
|
+
apiVersion: '',
|
|
8893
|
+
},
|
|
8894
|
+
options
|
|
8895
|
+
),
|
|
8896
|
+
params,
|
|
8897
|
+
requiredParams: ['resource'],
|
|
8898
|
+
pathParams: ['resource'],
|
|
8899
|
+
context: this.context,
|
|
8900
|
+
};
|
|
8901
|
+
if (callback) {
|
|
8902
|
+
createAPIRequest<Schema$TestIamPermissionsResponse>(
|
|
8903
|
+
parameters,
|
|
8904
|
+
callback as BodyResponseCallback<unknown>
|
|
8905
|
+
);
|
|
8906
|
+
} else {
|
|
8907
|
+
return createAPIRequest<Schema$TestIamPermissionsResponse>(parameters);
|
|
8908
|
+
}
|
|
8909
|
+
}
|
|
8910
|
+
}
|
|
8911
|
+
|
|
8912
|
+
export interface Params$Resource$Projects$Instances$Databases$Backupschedules$Create
|
|
8913
|
+
extends StandardParameters {
|
|
8914
|
+
/**
|
|
8915
|
+
* Required. The Id to use for the backup schedule. The `backup_schedule_id` appended to `parent` forms the full backup schedule name of the form `projects//instances//databases//backupSchedules/`.
|
|
8916
|
+
*/
|
|
8917
|
+
backupScheduleId?: string;
|
|
8918
|
+
/**
|
|
8919
|
+
* Required. The name of the database that this backup schedule applies to.
|
|
8920
|
+
*/
|
|
8921
|
+
parent?: string;
|
|
8922
|
+
|
|
8923
|
+
/**
|
|
8924
|
+
* Request body metadata
|
|
8925
|
+
*/
|
|
8926
|
+
requestBody?: Schema$BackupSchedule;
|
|
8927
|
+
}
|
|
8928
|
+
export interface Params$Resource$Projects$Instances$Databases$Backupschedules$Delete
|
|
8929
|
+
extends StandardParameters {
|
|
8930
|
+
/**
|
|
8931
|
+
* Required. The name of the schedule to delete. Values are of the form `projects//instances//databases//backupSchedules/`.
|
|
8932
|
+
*/
|
|
8933
|
+
name?: string;
|
|
8934
|
+
}
|
|
8935
|
+
export interface Params$Resource$Projects$Instances$Databases$Backupschedules$Get
|
|
8936
|
+
extends StandardParameters {
|
|
8937
|
+
/**
|
|
8938
|
+
* Required. The name of the schedule to retrieve. Values are of the form `projects//instances//databases//backupSchedules/`.
|
|
8939
|
+
*/
|
|
8940
|
+
name?: string;
|
|
8941
|
+
}
|
|
8942
|
+
export interface Params$Resource$Projects$Instances$Databases$Backupschedules$Getiampolicy
|
|
8943
|
+
extends StandardParameters {
|
|
8944
|
+
/**
|
|
8945
|
+
* REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.
|
|
8946
|
+
*/
|
|
8947
|
+
resource?: string;
|
|
8948
|
+
|
|
8949
|
+
/**
|
|
8950
|
+
* Request body metadata
|
|
8951
|
+
*/
|
|
8952
|
+
requestBody?: Schema$GetIamPolicyRequest;
|
|
8953
|
+
}
|
|
8954
|
+
export interface Params$Resource$Projects$Instances$Databases$Backupschedules$List
|
|
8955
|
+
extends StandardParameters {
|
|
8956
|
+
/**
|
|
8957
|
+
* Optional. Number of backup schedules to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.
|
|
8958
|
+
*/
|
|
8959
|
+
pageSize?: number;
|
|
8960
|
+
/**
|
|
8961
|
+
* Optional. If non-empty, `page_token` should contain a next_page_token from a previous ListBackupSchedulesResponse to the same `parent`.
|
|
8962
|
+
*/
|
|
8963
|
+
pageToken?: string;
|
|
8964
|
+
/**
|
|
8965
|
+
* Required. Database is the parent resource whose backup schedules should be listed. Values are of the form projects//instances//databases/
|
|
8966
|
+
*/
|
|
8967
|
+
parent?: string;
|
|
8968
|
+
}
|
|
8969
|
+
export interface Params$Resource$Projects$Instances$Databases$Backupschedules$Patch
|
|
8970
|
+
extends StandardParameters {
|
|
8971
|
+
/**
|
|
8972
|
+
* Identifier. Output only for the CreateBackupSchedule operation. Required for the UpdateBackupSchedule operation. A globally unique identifier for the backup schedule which cannot be changed. Values are of the form `projects//instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length.
|
|
8973
|
+
*/
|
|
8974
|
+
name?: string;
|
|
8975
|
+
/**
|
|
8976
|
+
* Required. A mask specifying which fields in the BackupSchedule resource should be updated. This mask is relative to the BackupSchedule resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally.
|
|
8977
|
+
*/
|
|
8978
|
+
updateMask?: string;
|
|
8979
|
+
|
|
8980
|
+
/**
|
|
8981
|
+
* Request body metadata
|
|
8982
|
+
*/
|
|
8983
|
+
requestBody?: Schema$BackupSchedule;
|
|
8984
|
+
}
|
|
8985
|
+
export interface Params$Resource$Projects$Instances$Databases$Backupschedules$Setiampolicy
|
|
8986
|
+
extends StandardParameters {
|
|
8987
|
+
/**
|
|
8988
|
+
* REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for databases resources.
|
|
8989
|
+
*/
|
|
8990
|
+
resource?: string;
|
|
8991
|
+
|
|
8992
|
+
/**
|
|
8993
|
+
* Request body metadata
|
|
8994
|
+
*/
|
|
8995
|
+
requestBody?: Schema$SetIamPolicyRequest;
|
|
8996
|
+
}
|
|
8997
|
+
export interface Params$Resource$Projects$Instances$Databases$Backupschedules$Testiampermissions
|
|
8998
|
+
extends StandardParameters {
|
|
8999
|
+
/**
|
|
9000
|
+
* REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.
|
|
9001
|
+
*/
|
|
9002
|
+
resource?: string;
|
|
9003
|
+
|
|
9004
|
+
/**
|
|
9005
|
+
* Request body metadata
|
|
9006
|
+
*/
|
|
9007
|
+
requestBody?: Schema$TestIamPermissionsRequest;
|
|
9008
|
+
}
|
|
9009
|
+
|
|
7866
9010
|
export class Resource$Projects$Instances$Databases$Databaseroles {
|
|
7867
9011
|
context: APIRequestContext;
|
|
7868
9012
|
constructor(context: APIRequestContext) {
|
|
@@ -10771,7 +11915,7 @@ export namespace spanner_v1 {
|
|
|
10771
11915
|
*/
|
|
10772
11916
|
pageToken?: string;
|
|
10773
11917
|
/**
|
|
10774
|
-
* Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`.
|
|
11918
|
+
* Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`. Use `{instance\} = '-'` to list instance partitions for all Instances in a project, e.g., `projects/myproject/instances/-`.
|
|
10775
11919
|
*/
|
|
10776
11920
|
parent?: string;
|
|
10777
11921
|
}
|