@googleapis/spanner 5.0.0 → 6.1.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/v1.ts CHANGED
@@ -273,6 +273,10 @@ export namespace spanner_v1 {
273
273
  * The request for BatchWrite.
274
274
  */
275
275
  export interface Schema$BatchWriteRequest {
276
+ /**
277
+ * Optional. When `exclude_txn_from_change_streams` is set to `true`: * Modifications from all transactions in this batch write operation will not be recorded in change streams with DDL option `allow_txn_exclusion=true` that are tracking columns modified by these transactions. * Modifications from all transactions in this batch write operation will be recorded in change streams with DDL option `allow_txn_exclusion=false or not set` that are tracking columns modified by these transactions. When `exclude_txn_from_change_streams` is set to `false` or not set, Modifications from all transactions in this batch write operation will be recorded in all change streams that are tracking columns modified by these transactions.
278
+ */
279
+ excludeTxnFromChangeStreams?: boolean | null;
276
280
  /**
277
281
  * Required. The groups of mutations to be applied.
278
282
  */
@@ -351,7 +355,7 @@ export namespace spanner_v1 {
351
355
  */
352
356
  export interface Schema$CommitRequest {
353
357
  /**
354
- * Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.
358
+ * Optional. The amount of latency this request is configured to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a commit delay value between 0 and 500 ms.
355
359
  */
356
360
  maxCommitDelay?: string | null;
357
361
  /**
@@ -587,6 +591,40 @@ export namespace spanner_v1 {
587
591
  */
588
592
  startTime?: string | null;
589
593
  }
594
+ /**
595
+ * Metadata type for the operation returned by CreateInstancePartition.
596
+ */
597
+ export interface Schema$CreateInstancePartitionMetadata {
598
+ /**
599
+ * The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.
600
+ */
601
+ cancelTime?: string | null;
602
+ /**
603
+ * The time at which this operation failed or was completed successfully.
604
+ */
605
+ endTime?: string | null;
606
+ /**
607
+ * The instance partition being created.
608
+ */
609
+ instancePartition?: Schema$InstancePartition;
610
+ /**
611
+ * The time at which the CreateInstancePartition request was received.
612
+ */
613
+ startTime?: string | null;
614
+ }
615
+ /**
616
+ * The request for CreateInstancePartition.
617
+ */
618
+ export interface Schema$CreateInstancePartitionRequest {
619
+ /**
620
+ * Required. The instance partition to create. The instance_partition.name may be omitted, but if specified must be `/instancePartitions/`.
621
+ */
622
+ instancePartition?: Schema$InstancePartition;
623
+ /**
624
+ * Required. The ID of the instance partition to create. Valid identifiers are of the form `a-z*[a-z0-9]` and must be between 2 and 64 characters in length.
625
+ */
626
+ instancePartitionId?: string | null;
627
+ }
590
628
  /**
591
629
  * The request for CreateInstance.
592
630
  */
@@ -1135,6 +1173,55 @@ export namespace spanner_v1 {
1135
1173
  */
1136
1174
  startTime?: string | null;
1137
1175
  }
1176
+ /**
1177
+ * An isolated set of Cloud Spanner resources that databases can define placements on.
1178
+ */
1179
+ export interface Schema$InstancePartition {
1180
+ /**
1181
+ * Required. The name of the instance partition's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.
1182
+ */
1183
+ config?: string | null;
1184
+ /**
1185
+ * Output only. The time at which the instance partition was created.
1186
+ */
1187
+ createTime?: string | null;
1188
+ /**
1189
+ * Required. The descriptive name for this instance partition as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
1190
+ */
1191
+ displayName?: string | null;
1192
+ /**
1193
+ * Used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance partition from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform instance partition updates in order to avoid race conditions: An etag is returned in the response which contains instance partitions, and systems are expected to put that etag in the request to update instance partitions to ensure that their change will be applied to the same version of the instance partition. If no etag is provided in the call to update instance partition, then the existing instance partition is overwritten blindly.
1194
+ */
1195
+ etag?: string | null;
1196
+ /**
1197
+ * Required. A unique identifier for the instance partition. Values are of the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created.
1198
+ */
1199
+ name?: string | null;
1200
+ /**
1201
+ * 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`.
1202
+ */
1203
+ nodeCount?: number | null;
1204
+ /**
1205
+ * 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 may be zero in API responses for instance partitions that are not yet in state `READY`.
1206
+ */
1207
+ processingUnits?: number | null;
1208
+ /**
1209
+ * 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.
1210
+ */
1211
+ referencingBackups?: string[] | null;
1212
+ /**
1213
+ * Output only. The names of the databases that reference this instance partition. Referencing databases should share the parent instance. The existence of any referencing database prevents the instance partition from being deleted.
1214
+ */
1215
+ referencingDatabases?: string[] | null;
1216
+ /**
1217
+ * Output only. The current instance partition state.
1218
+ */
1219
+ state?: string | null;
1220
+ /**
1221
+ * Output only. The time at which the instance partition was most recently updated.
1222
+ */
1223
+ updateTime?: string | null;
1224
+ }
1138
1225
  /**
1139
1226
  * KeyRange represents a range of rows in a table or index. A range has a start key and an end key. These keys can be open or closed, indicating if the range includes rows with that key. Keys are represented by lists, where the ith value in the list corresponds to the ith component of the table or index primary key. Individual values are encoded as described here. For example, consider the following table definition: CREATE TABLE UserEvents ( UserName STRING(MAX), EventDate STRING(10) ) PRIMARY KEY(UserName, EventDate); The following keys name rows in this table: "Bob", "2014-09-23" Since the `UserEvents` table's `PRIMARY KEY` clause names two columns, each `UserEvents` key has two elements; the first is the `UserName`, and the second is the `EventDate`. Key ranges with multiple components are interpreted lexicographically by component using the table or index key's declared sort order. For example, the following range returns all events for user `"Bob"` that occurred in the year 2015: "start_closed": ["Bob", "2015-01-01"] "end_closed": ["Bob", "2015-12-31"] Start and end keys can omit trailing key components. This affects the inclusion and exclusion of rows that exactly match the provided key components: if the key is closed, then rows that exactly match the provided components are included; if the key is open, then rows that exactly match are not included. For example, the following range includes all events for `"Bob"` that occurred during and after the year 2000: "start_closed": ["Bob", "2000-01-01"] "end_closed": ["Bob"] The next example retrieves all events for `"Bob"`: "start_closed": ["Bob"] "end_closed": ["Bob"] To retrieve events before the year 2000: "start_closed": ["Bob"] "end_open": ["Bob", "2000-01-01"] The following range includes all rows in the table: "start_closed": [] "end_closed": [] This range returns all users whose `UserName` begins with any character from A to C: "start_closed": ["A"] "end_open": ["D"] This range returns all users whose `UserName` begins with B: "start_closed": ["B"] "end_open": ["C"] Key ranges honor column sort order. For example, suppose a table is defined as follows: CREATE TABLE DescendingSortedTable { Key INT64, ... ) PRIMARY KEY(Key DESC); The following range retrieves all rows with key values between 1 and 100 inclusive: "start_closed": ["100"] "end_closed": ["1"] Note that 100 is passed as the start, and 1 is passed as the end, because `Key` is a descending column in the schema.
1140
1227
  */
@@ -1318,6 +1405,40 @@ export namespace spanner_v1 {
1318
1405
  */
1319
1406
  nextPageToken?: string | null;
1320
1407
  }
1408
+ /**
1409
+ * The response for ListInstancePartitionOperations.
1410
+ */
1411
+ export interface Schema$ListInstancePartitionOperationsResponse {
1412
+ /**
1413
+ * `next_page_token` can be sent in a subsequent ListInstancePartitionOperations call to fetch more of the matching metadata.
1414
+ */
1415
+ nextPageToken?: string | null;
1416
+ /**
1417
+ * The list of matching instance partition long-running operations. Each operation's name will be prefixed by the instance partition's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata.
1418
+ */
1419
+ operations?: Schema$Operation[];
1420
+ /**
1421
+ * The list of unreachable instance partitions. It includes the names of instance partitions whose operation metadata could not be retrieved within instance_partition_deadline.
1422
+ */
1423
+ unreachableInstancePartitions?: string[] | null;
1424
+ }
1425
+ /**
1426
+ * The response for ListInstancePartitions.
1427
+ */
1428
+ export interface Schema$ListInstancePartitionsResponse {
1429
+ /**
1430
+ * The list of requested instancePartitions.
1431
+ */
1432
+ instancePartitions?: Schema$InstancePartition[];
1433
+ /**
1434
+ * `next_page_token` can be sent in a subsequent ListInstancePartitions call to fetch more of the matching instance partitions.
1435
+ */
1436
+ nextPageToken?: string | null;
1437
+ /**
1438
+ * The list of unreachable instance partitions. It includes the names of instance partitions whose metadata could not be retrieved within instance_partition_deadline.
1439
+ */
1440
+ unreachable?: string[] | null;
1441
+ }
1321
1442
  /**
1322
1443
  * The response for ListInstances.
1323
1444
  */
@@ -1462,6 +1583,15 @@ export namespace spanner_v1 {
1462
1583
  */
1463
1584
  cols?: number[] | null;
1464
1585
  }
1586
+ /**
1587
+ * The request for MoveInstance.
1588
+ */
1589
+ export interface Schema$MoveInstanceRequest {
1590
+ /**
1591
+ * Required. The target instance config for the instance to move. Values are of the form `projects//instanceConfigs/`.
1592
+ */
1593
+ targetConfig?: string | null;
1594
+ }
1465
1595
  /**
1466
1596
  * A modification to one or more Cloud Spanner rows. Mutations can be applied to a Cloud Spanner database by sending them in a Commit call.
1467
1597
  */
@@ -2108,6 +2238,10 @@ export namespace spanner_v1 {
2108
2238
  * The labels for the session. * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. * No more than 64 labels can be associated with a given session. See https://goo.gl/xmQnxf for more information on and examples of labels.
2109
2239
  */
2110
2240
  labels?: {[key: string]: string} | null;
2241
+ /**
2242
+ * Optional. If true, specifies a multiplexed session. A multiplexed session may be used for multiple, concurrent read-only operations but can not be used for read-write transactions, partitioned reads, or partitioned queries. Multiplexed sessions can be created via CreateSession but not via BatchCreateSessions. Multiplexed sessions may not be deleted nor listed.
2243
+ */
2244
+ multiplexed?: boolean | null;
2111
2245
  /**
2112
2246
  * Output only. The name of the session. This is always system-assigned.
2113
2247
  */
@@ -2213,6 +2347,10 @@ export namespace spanner_v1 {
2213
2347
  * 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. 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 will be 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.
2214
2348
  */
2215
2349
  export interface Schema$TransactionOptions {
2350
+ /**
2351
+ * When `exclude_txn_from_change_streams` is set to `true`: * Modifications from this transaction will not be recorded in change streams with DDL option `allow_txn_exclusion=true` that are tracking columns modified by these transactions. * Modifications from this transaction will be recorded in change streams with DDL option `allow_txn_exclusion=false or not set` that are tracking columns modified by these transactions. When `exclude_txn_from_change_streams` is set to `false` or not set, Modifications from this transaction will be recorded in all change streams that are tracking columns modified by these transactions. `exclude_txn_from_change_streams` may only be specified for read-write or partitioned-dml transactions, otherwise the API will return an `INVALID_ARGUMENT` error.
2352
+ */
2353
+ excludeTxnFromChangeStreams?: boolean | null;
2216
2354
  /**
2217
2355
  * Partitioned DML transaction. Authorization to begin a Partitioned DML transaction requires `spanner.databases.beginPartitionedDmlTransaction` permission on the `session` resource.
2218
2356
  */
@@ -2403,6 +2541,40 @@ export namespace spanner_v1 {
2403
2541
  */
2404
2542
  startTime?: string | null;
2405
2543
  }
2544
+ /**
2545
+ * Metadata type for the operation returned by UpdateInstancePartition.
2546
+ */
2547
+ export interface Schema$UpdateInstancePartitionMetadata {
2548
+ /**
2549
+ * The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.
2550
+ */
2551
+ cancelTime?: string | null;
2552
+ /**
2553
+ * The time at which this operation failed or was completed successfully.
2554
+ */
2555
+ endTime?: string | null;
2556
+ /**
2557
+ * The desired end state of the update.
2558
+ */
2559
+ instancePartition?: Schema$InstancePartition;
2560
+ /**
2561
+ * The time at which UpdateInstancePartition request was received.
2562
+ */
2563
+ startTime?: string | null;
2564
+ }
2565
+ /**
2566
+ * The request for UpdateInstancePartition.
2567
+ */
2568
+ export interface Schema$UpdateInstancePartitionRequest {
2569
+ /**
2570
+ * Required. A mask specifying which fields in InstancePartition should be updated. The field mask must always be specified; this prevents any future fields in InstancePartition from being erased accidentally by clients that do not know about them.
2571
+ */
2572
+ fieldMask?: string | null;
2573
+ /**
2574
+ * Required. The instance partition to update, which must always include the instance partition name. Otherwise, only fields mentioned in field_mask need be included.
2575
+ */
2576
+ instancePartition?: Schema$InstancePartition;
2577
+ }
2406
2578
  /**
2407
2579
  * The request for UpdateInstance.
2408
2580
  */
@@ -2574,6 +2746,7 @@ export namespace spanner_v1 {
2574
2746
  '$1'
2575
2747
  ),
2576
2748
  method: 'GET',
2749
+ apiVersion: '',
2577
2750
  },
2578
2751
  options
2579
2752
  ),
@@ -2698,6 +2871,7 @@ export namespace spanner_v1 {
2698
2871
  '$1'
2699
2872
  ),
2700
2873
  method: 'POST',
2874
+ apiVersion: '',
2701
2875
  },
2702
2876
  options
2703
2877
  ),
@@ -2782,6 +2956,7 @@ export namespace spanner_v1 {
2782
2956
  {
2783
2957
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2784
2958
  method: 'DELETE',
2959
+ apiVersion: '',
2785
2960
  },
2786
2961
  options
2787
2962
  ),
@@ -2866,6 +3041,7 @@ export namespace spanner_v1 {
2866
3041
  {
2867
3042
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2868
3043
  method: 'GET',
3044
+ apiVersion: '',
2869
3045
  },
2870
3046
  options
2871
3047
  ),
@@ -2960,6 +3136,7 @@ export namespace spanner_v1 {
2960
3136
  '$1'
2961
3137
  ),
2962
3138
  method: 'GET',
3139
+ apiVersion: '',
2963
3140
  },
2964
3141
  options
2965
3142
  ),
@@ -3044,6 +3221,7 @@ export namespace spanner_v1 {
3044
3221
  {
3045
3222
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3046
3223
  method: 'PATCH',
3224
+ apiVersion: '',
3047
3225
  },
3048
3226
  options
3049
3227
  ),
@@ -3198,6 +3376,7 @@ export namespace spanner_v1 {
3198
3376
  {
3199
3377
  url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
3200
3378
  method: 'POST',
3379
+ apiVersion: '',
3201
3380
  },
3202
3381
  options
3203
3382
  ),
@@ -3283,6 +3462,7 @@ export namespace spanner_v1 {
3283
3462
  {
3284
3463
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3285
3464
  method: 'DELETE',
3465
+ apiVersion: '',
3286
3466
  },
3287
3467
  options
3288
3468
  ),
@@ -3367,6 +3547,7 @@ export namespace spanner_v1 {
3367
3547
  {
3368
3548
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3369
3549
  method: 'GET',
3550
+ apiVersion: '',
3370
3551
  },
3371
3552
  options
3372
3553
  ),
@@ -3456,6 +3637,7 @@ export namespace spanner_v1 {
3456
3637
  {
3457
3638
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3458
3639
  method: 'GET',
3640
+ apiVersion: '',
3459
3641
  },
3460
3642
  options
3461
3643
  ),
@@ -3601,6 +3783,7 @@ export namespace spanner_v1 {
3601
3783
  {
3602
3784
  url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
3603
3785
  method: 'POST',
3786
+ apiVersion: '',
3604
3787
  },
3605
3788
  options
3606
3789
  ),
@@ -3686,6 +3869,7 @@ export namespace spanner_v1 {
3686
3869
  {
3687
3870
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3688
3871
  method: 'DELETE',
3872
+ apiVersion: '',
3689
3873
  },
3690
3874
  options
3691
3875
  ),
@@ -3771,6 +3955,7 @@ export namespace spanner_v1 {
3771
3955
  {
3772
3956
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3773
3957
  method: 'GET',
3958
+ apiVersion: '',
3774
3959
  },
3775
3960
  options
3776
3961
  ),
@@ -3861,6 +4046,7 @@ export namespace spanner_v1 {
3861
4046
  {
3862
4047
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3863
4048
  method: 'GET',
4049
+ apiVersion: '',
3864
4050
  },
3865
4051
  options
3866
4052
  ),
@@ -3927,6 +4113,7 @@ export namespace spanner_v1 {
3927
4113
  backups: Resource$Projects$Instances$Backups;
3928
4114
  databaseOperations: Resource$Projects$Instances$Databaseoperations;
3929
4115
  databases: Resource$Projects$Instances$Databases;
4116
+ instancePartitionOperations: Resource$Projects$Instances$Instancepartitionoperations;
3930
4117
  instancePartitions: Resource$Projects$Instances$Instancepartitions;
3931
4118
  operations: Resource$Projects$Instances$Operations;
3932
4119
  constructor(context: APIRequestContext) {
@@ -3938,6 +4125,10 @@ export namespace spanner_v1 {
3938
4125
  this.databaseOperations =
3939
4126
  new Resource$Projects$Instances$Databaseoperations(this.context);
3940
4127
  this.databases = new Resource$Projects$Instances$Databases(this.context);
4128
+ this.instancePartitionOperations =
4129
+ new Resource$Projects$Instances$Instancepartitionoperations(
4130
+ this.context
4131
+ );
3941
4132
  this.instancePartitions =
3942
4133
  new Resource$Projects$Instances$Instancepartitions(this.context);
3943
4134
  this.operations = new Resource$Projects$Instances$Operations(
@@ -4014,6 +4205,7 @@ export namespace spanner_v1 {
4014
4205
  '$1'
4015
4206
  ),
4016
4207
  method: 'POST',
4208
+ apiVersion: '',
4017
4209
  },
4018
4210
  options
4019
4211
  ),
@@ -4098,6 +4290,7 @@ export namespace spanner_v1 {
4098
4290
  {
4099
4291
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
4100
4292
  method: 'DELETE',
4293
+ apiVersion: '',
4101
4294
  },
4102
4295
  options
4103
4296
  ),
@@ -4182,6 +4375,7 @@ export namespace spanner_v1 {
4182
4375
  {
4183
4376
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
4184
4377
  method: 'GET',
4378
+ apiVersion: '',
4185
4379
  },
4186
4380
  options
4187
4381
  ),
@@ -4269,6 +4463,7 @@ export namespace spanner_v1 {
4269
4463
  '$1'
4270
4464
  ),
4271
4465
  method: 'POST',
4466
+ apiVersion: '',
4272
4467
  },
4273
4468
  options
4274
4469
  ),
@@ -4361,6 +4556,7 @@ export namespace spanner_v1 {
4361
4556
  '$1'
4362
4557
  ),
4363
4558
  method: 'GET',
4559
+ apiVersion: '',
4364
4560
  },
4365
4561
  options
4366
4562
  ),
@@ -4379,6 +4575,91 @@ export namespace spanner_v1 {
4379
4575
  }
4380
4576
  }
4381
4577
 
4578
+ /**
4579
+ * Moves the instance to the target instance config. The returned long-running operation can be used to track the progress of moving the instance. `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following criteria: * Has an ongoing move to a different instance config * Has backups * Has an ongoing update * Is under free trial * Contains any CMEK-enabled databases 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 configs are subject to hourly compute and storage charges. * The instance may experience higher read-write latencies and a higher transaction abort rate. However, moving an instance does not cause any downtime. The returned long-running operation will have 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 since it involves moving any data previously moved to target instance config back to the original instance config. The same operation can be used to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with CANCELLED status. Upon completion(if not cancelled) of the returned operation: * Instance would be successfully moved to the target instance config. * You are billed for compute and storage in target instance config. Authorization requires `spanner.instances.update` permission on the resource instance. For more details, please see [documentation](https://cloud.google.com/spanner/docs/move-instance).
4580
+ *
4581
+ * @param params - Parameters for request
4582
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4583
+ * @param callback - Optional callback that handles the response.
4584
+ * @returns A promise if used with async/await, or void if used with a callback.
4585
+ */
4586
+ move(
4587
+ params: Params$Resource$Projects$Instances$Move,
4588
+ options: StreamMethodOptions
4589
+ ): GaxiosPromise<Readable>;
4590
+ move(
4591
+ params?: Params$Resource$Projects$Instances$Move,
4592
+ options?: MethodOptions
4593
+ ): GaxiosPromise<Schema$Operation>;
4594
+ move(
4595
+ params: Params$Resource$Projects$Instances$Move,
4596
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4597
+ callback: BodyResponseCallback<Readable>
4598
+ ): void;
4599
+ move(
4600
+ params: Params$Resource$Projects$Instances$Move,
4601
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
4602
+ callback: BodyResponseCallback<Schema$Operation>
4603
+ ): void;
4604
+ move(
4605
+ params: Params$Resource$Projects$Instances$Move,
4606
+ callback: BodyResponseCallback<Schema$Operation>
4607
+ ): void;
4608
+ move(callback: BodyResponseCallback<Schema$Operation>): void;
4609
+ move(
4610
+ paramsOrCallback?:
4611
+ | Params$Resource$Projects$Instances$Move
4612
+ | BodyResponseCallback<Schema$Operation>
4613
+ | BodyResponseCallback<Readable>,
4614
+ optionsOrCallback?:
4615
+ | MethodOptions
4616
+ | StreamMethodOptions
4617
+ | BodyResponseCallback<Schema$Operation>
4618
+ | BodyResponseCallback<Readable>,
4619
+ callback?:
4620
+ | BodyResponseCallback<Schema$Operation>
4621
+ | BodyResponseCallback<Readable>
4622
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
4623
+ let params = (paramsOrCallback ||
4624
+ {}) as Params$Resource$Projects$Instances$Move;
4625
+ let options = (optionsOrCallback || {}) as MethodOptions;
4626
+
4627
+ if (typeof paramsOrCallback === 'function') {
4628
+ callback = paramsOrCallback;
4629
+ params = {} as Params$Resource$Projects$Instances$Move;
4630
+ options = {};
4631
+ }
4632
+
4633
+ if (typeof optionsOrCallback === 'function') {
4634
+ callback = optionsOrCallback;
4635
+ options = {};
4636
+ }
4637
+
4638
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
4639
+ const parameters = {
4640
+ options: Object.assign(
4641
+ {
4642
+ url: (rootUrl + '/v1/{+name}:move').replace(/([^:]\/)\/+/g, '$1'),
4643
+ method: 'POST',
4644
+ apiVersion: '',
4645
+ },
4646
+ options
4647
+ ),
4648
+ params,
4649
+ requiredParams: ['name'],
4650
+ pathParams: ['name'],
4651
+ context: this.context,
4652
+ };
4653
+ if (callback) {
4654
+ createAPIRequest<Schema$Operation>(
4655
+ parameters,
4656
+ callback as BodyResponseCallback<unknown>
4657
+ );
4658
+ } else {
4659
+ return createAPIRequest<Schema$Operation>(parameters);
4660
+ }
4661
+ }
4662
+
4382
4663
  /**
4383
4664
  * Updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the named instance does not exist, returns `NOT_FOUND`. Immediately upon completion of this request: * For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: * Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance are rejected. * Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: * Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance's tables. * The instance's new resource levels are readable via the API. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful. Authorization requires `spanner.instances.update` permission on the resource name.
4384
4665
  *
@@ -4445,6 +4726,7 @@ export namespace spanner_v1 {
4445
4726
  {
4446
4727
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
4447
4728
  method: 'PATCH',
4729
+ apiVersion: '',
4448
4730
  },
4449
4731
  options
4450
4732
  ),
@@ -4532,6 +4814,7 @@ export namespace spanner_v1 {
4532
4814
  '$1'
4533
4815
  ),
4534
4816
  method: 'POST',
4817
+ apiVersion: '',
4535
4818
  },
4536
4819
  options
4537
4820
  ),
@@ -4626,6 +4909,7 @@ export namespace spanner_v1 {
4626
4909
  '$1'
4627
4910
  ),
4628
4911
  method: 'POST',
4912
+ apiVersion: '',
4629
4913
  },
4630
4914
  options
4631
4915
  ),
@@ -4710,6 +4994,18 @@ export namespace spanner_v1 {
4710
4994
  */
4711
4995
  parent?: string;
4712
4996
  }
4997
+ export interface Params$Resource$Projects$Instances$Move
4998
+ extends StandardParameters {
4999
+ /**
5000
+ * Required. The instance to move. Values are of the form `projects//instances/`.
5001
+ */
5002
+ name?: string;
5003
+
5004
+ /**
5005
+ * Request body metadata
5006
+ */
5007
+ requestBody?: Schema$MoveInstanceRequest;
5008
+ }
4713
5009
  export interface Params$Resource$Projects$Instances$Patch
4714
5010
  extends StandardParameters {
4715
5011
  /**
@@ -4829,6 +5125,7 @@ export namespace spanner_v1 {
4829
5125
  '$1'
4830
5126
  ),
4831
5127
  method: 'GET',
5128
+ apiVersion: '',
4832
5129
  },
4833
5130
  options
4834
5131
  ),
@@ -4949,6 +5246,7 @@ export namespace spanner_v1 {
4949
5246
  '$1'
4950
5247
  ),
4951
5248
  method: 'POST',
5249
+ apiVersion: '',
4952
5250
  },
4953
5251
  options
4954
5252
  ),
@@ -5036,6 +5334,7 @@ export namespace spanner_v1 {
5036
5334
  '$1'
5037
5335
  ),
5038
5336
  method: 'POST',
5337
+ apiVersion: '',
5039
5338
  },
5040
5339
  options
5041
5340
  ),
@@ -5120,6 +5419,7 @@ export namespace spanner_v1 {
5120
5419
  {
5121
5420
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
5122
5421
  method: 'DELETE',
5422
+ apiVersion: '',
5123
5423
  },
5124
5424
  options
5125
5425
  ),
@@ -5204,6 +5504,7 @@ export namespace spanner_v1 {
5204
5504
  {
5205
5505
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
5206
5506
  method: 'GET',
5507
+ apiVersion: '',
5207
5508
  },
5208
5509
  options
5209
5510
  ),
@@ -5291,6 +5592,7 @@ export namespace spanner_v1 {
5291
5592
  '$1'
5292
5593
  ),
5293
5594
  method: 'POST',
5595
+ apiVersion: '',
5294
5596
  },
5295
5597
  options
5296
5598
  ),
@@ -5381,6 +5683,7 @@ export namespace spanner_v1 {
5381
5683
  '$1'
5382
5684
  ),
5383
5685
  method: 'GET',
5686
+ apiVersion: '',
5384
5687
  },
5385
5688
  options
5386
5689
  ),
@@ -5465,6 +5768,7 @@ export namespace spanner_v1 {
5465
5768
  {
5466
5769
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
5467
5770
  method: 'PATCH',
5771
+ apiVersion: '',
5468
5772
  },
5469
5773
  options
5470
5774
  ),
@@ -5552,6 +5856,7 @@ export namespace spanner_v1 {
5552
5856
  '$1'
5553
5857
  ),
5554
5858
  method: 'POST',
5859
+ apiVersion: '',
5555
5860
  },
5556
5861
  options
5557
5862
  ),
@@ -5647,6 +5952,7 @@ export namespace spanner_v1 {
5647
5952
  '$1'
5648
5953
  ),
5649
5954
  method: 'POST',
5955
+ apiVersion: '',
5650
5956
  },
5651
5957
  options
5652
5958
  ),
@@ -5861,6 +6167,7 @@ export namespace spanner_v1 {
5861
6167
  {
5862
6168
  url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
5863
6169
  method: 'POST',
6170
+ apiVersion: '',
5864
6171
  },
5865
6172
  options
5866
6173
  ),
@@ -5946,6 +6253,7 @@ export namespace spanner_v1 {
5946
6253
  {
5947
6254
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
5948
6255
  method: 'DELETE',
6256
+ apiVersion: '',
5949
6257
  },
5950
6258
  options
5951
6259
  ),
@@ -6031,6 +6339,7 @@ export namespace spanner_v1 {
6031
6339
  {
6032
6340
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
6033
6341
  method: 'GET',
6342
+ apiVersion: '',
6034
6343
  },
6035
6344
  options
6036
6345
  ),
@@ -6121,6 +6430,7 @@ export namespace spanner_v1 {
6121
6430
  {
6122
6431
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
6123
6432
  method: 'GET',
6433
+ apiVersion: '',
6124
6434
  },
6125
6435
  options
6126
6436
  ),
@@ -6264,6 +6574,7 @@ export namespace spanner_v1 {
6264
6574
  '$1'
6265
6575
  ),
6266
6576
  method: 'GET',
6577
+ apiVersion: '',
6267
6578
  },
6268
6579
  options
6269
6580
  ),
@@ -6391,6 +6702,7 @@ export namespace spanner_v1 {
6391
6702
  '$1'
6392
6703
  ),
6393
6704
  method: 'POST',
6705
+ apiVersion: '',
6394
6706
  },
6395
6707
  options
6396
6708
  ),
@@ -6476,6 +6788,7 @@ export namespace spanner_v1 {
6476
6788
  {
6477
6789
  url: (rootUrl + '/v1/{+database}').replace(/([^:]\/)\/+/g, '$1'),
6478
6790
  method: 'DELETE',
6791
+ apiVersion: '',
6479
6792
  },
6480
6793
  options
6481
6794
  ),
@@ -6560,6 +6873,7 @@ export namespace spanner_v1 {
6560
6873
  {
6561
6874
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
6562
6875
  method: 'GET',
6876
+ apiVersion: '',
6563
6877
  },
6564
6878
  options
6565
6879
  ),
@@ -6652,6 +6966,7 @@ export namespace spanner_v1 {
6652
6966
  '$1'
6653
6967
  ),
6654
6968
  method: 'GET',
6969
+ apiVersion: '',
6655
6970
  },
6656
6971
  options
6657
6972
  ),
@@ -6740,6 +7055,7 @@ export namespace spanner_v1 {
6740
7055
  '$1'
6741
7056
  ),
6742
7057
  method: 'POST',
7058
+ apiVersion: '',
6743
7059
  },
6744
7060
  options
6745
7061
  ),
@@ -6824,6 +7140,7 @@ export namespace spanner_v1 {
6824
7140
  {
6825
7141
  url: (rootUrl + '/v1/{+name}/scans').replace(/([^:]\/)\/+/g, '$1'),
6826
7142
  method: 'GET',
7143
+ apiVersion: '',
6827
7144
  },
6828
7145
  options
6829
7146
  ),
@@ -6916,6 +7233,7 @@ export namespace spanner_v1 {
6916
7233
  '$1'
6917
7234
  ),
6918
7235
  method: 'GET',
7236
+ apiVersion: '',
6919
7237
  },
6920
7238
  options
6921
7239
  ),
@@ -7000,6 +7318,7 @@ export namespace spanner_v1 {
7000
7318
  {
7001
7319
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
7002
7320
  method: 'PATCH',
7321
+ apiVersion: '',
7003
7322
  },
7004
7323
  options
7005
7324
  ),
@@ -7087,6 +7406,7 @@ export namespace spanner_v1 {
7087
7406
  '$1'
7088
7407
  ),
7089
7408
  method: 'POST',
7409
+ apiVersion: '',
7090
7410
  },
7091
7411
  options
7092
7412
  ),
@@ -7175,6 +7495,7 @@ export namespace spanner_v1 {
7175
7495
  '$1'
7176
7496
  ),
7177
7497
  method: 'POST',
7498
+ apiVersion: '',
7178
7499
  },
7179
7500
  options
7180
7501
  ),
@@ -7270,6 +7591,7 @@ export namespace spanner_v1 {
7270
7591
  '$1'
7271
7592
  ),
7272
7593
  method: 'POST',
7594
+ apiVersion: '',
7273
7595
  },
7274
7596
  options
7275
7597
  ),
@@ -7357,6 +7679,7 @@ export namespace spanner_v1 {
7357
7679
  '$1'
7358
7680
  ),
7359
7681
  method: 'PATCH',
7682
+ apiVersion: '',
7360
7683
  },
7361
7684
  options
7362
7685
  ),
@@ -7603,6 +7926,7 @@ export namespace spanner_v1 {
7603
7926
  '$1'
7604
7927
  ),
7605
7928
  method: 'GET',
7929
+ apiVersion: '',
7606
7930
  },
7607
7931
  options
7608
7932
  ),
@@ -7698,6 +8022,7 @@ export namespace spanner_v1 {
7698
8022
  '$1'
7699
8023
  ),
7700
8024
  method: 'POST',
8025
+ apiVersion: '',
7701
8026
  },
7702
8027
  options
7703
8028
  ),
@@ -7818,6 +8143,7 @@ export namespace spanner_v1 {
7818
8143
  {
7819
8144
  url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
7820
8145
  method: 'POST',
8146
+ apiVersion: '',
7821
8147
  },
7822
8148
  options
7823
8149
  ),
@@ -7903,6 +8229,7 @@ export namespace spanner_v1 {
7903
8229
  {
7904
8230
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
7905
8231
  method: 'DELETE',
8232
+ apiVersion: '',
7906
8233
  },
7907
8234
  options
7908
8235
  ),
@@ -7988,6 +8315,7 @@ export namespace spanner_v1 {
7988
8315
  {
7989
8316
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
7990
8317
  method: 'GET',
8318
+ apiVersion: '',
7991
8319
  },
7992
8320
  options
7993
8321
  ),
@@ -8078,6 +8406,7 @@ export namespace spanner_v1 {
8078
8406
  {
8079
8407
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
8080
8408
  method: 'GET',
8409
+ apiVersion: '',
8081
8410
  },
8082
8411
  options
8083
8412
  ),
@@ -8221,6 +8550,7 @@ export namespace spanner_v1 {
8221
8550
  '$1'
8222
8551
  ),
8223
8552
  method: 'POST',
8553
+ apiVersion: '',
8224
8554
  },
8225
8555
  options
8226
8556
  ),
@@ -8312,6 +8642,7 @@ export namespace spanner_v1 {
8312
8642
  '$1'
8313
8643
  ),
8314
8644
  method: 'POST',
8645
+ apiVersion: '',
8315
8646
  },
8316
8647
  options
8317
8648
  ),
@@ -8400,6 +8731,7 @@ export namespace spanner_v1 {
8400
8731
  '$1'
8401
8732
  ),
8402
8733
  method: 'POST',
8734
+ apiVersion: '',
8403
8735
  },
8404
8736
  options
8405
8737
  ),
@@ -8488,6 +8820,7 @@ export namespace spanner_v1 {
8488
8820
  '$1'
8489
8821
  ),
8490
8822
  method: 'POST',
8823
+ apiVersion: '',
8491
8824
  },
8492
8825
  options
8493
8826
  ),
@@ -8576,6 +8909,7 @@ export namespace spanner_v1 {
8576
8909
  '$1'
8577
8910
  ),
8578
8911
  method: 'POST',
8912
+ apiVersion: '',
8579
8913
  },
8580
8914
  options
8581
8915
  ),
@@ -8661,6 +8995,7 @@ export namespace spanner_v1 {
8661
8995
  {
8662
8996
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
8663
8997
  method: 'DELETE',
8998
+ apiVersion: '',
8664
8999
  },
8665
9000
  options
8666
9001
  ),
@@ -8756,6 +9091,7 @@ export namespace spanner_v1 {
8756
9091
  '$1'
8757
9092
  ),
8758
9093
  method: 'POST',
9094
+ apiVersion: '',
8759
9095
  },
8760
9096
  options
8761
9097
  ),
@@ -8844,6 +9180,7 @@ export namespace spanner_v1 {
8844
9180
  '$1'
8845
9181
  ),
8846
9182
  method: 'POST',
9183
+ apiVersion: '',
8847
9184
  },
8848
9185
  options
8849
9186
  ),
@@ -8934,6 +9271,7 @@ export namespace spanner_v1 {
8934
9271
  '$1'
8935
9272
  ),
8936
9273
  method: 'POST',
9274
+ apiVersion: '',
8937
9275
  },
8938
9276
  options
8939
9277
  ),
@@ -9019,6 +9357,7 @@ export namespace spanner_v1 {
9019
9357
  {
9020
9358
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
9021
9359
  method: 'GET',
9360
+ apiVersion: '',
9022
9361
  },
9023
9362
  options
9024
9363
  ),
@@ -9112,6 +9451,7 @@ export namespace spanner_v1 {
9112
9451
  '$1'
9113
9452
  ),
9114
9453
  method: 'GET',
9454
+ apiVersion: '',
9115
9455
  },
9116
9456
  options
9117
9457
  ),
@@ -9205,6 +9545,7 @@ export namespace spanner_v1 {
9205
9545
  '$1'
9206
9546
  ),
9207
9547
  method: 'POST',
9548
+ apiVersion: '',
9208
9549
  },
9209
9550
  options
9210
9551
  ),
@@ -9298,6 +9639,7 @@ export namespace spanner_v1 {
9298
9639
  '$1'
9299
9640
  ),
9300
9641
  method: 'POST',
9642
+ apiVersion: '',
9301
9643
  },
9302
9644
  options
9303
9645
  ),
@@ -9386,6 +9728,7 @@ export namespace spanner_v1 {
9386
9728
  '$1'
9387
9729
  ),
9388
9730
  method: 'POST',
9731
+ apiVersion: '',
9389
9732
  },
9390
9733
  options
9391
9734
  ),
@@ -9474,6 +9817,7 @@ export namespace spanner_v1 {
9474
9817
  '$1'
9475
9818
  ),
9476
9819
  method: 'POST',
9820
+ apiVersion: '',
9477
9821
  },
9478
9822
  options
9479
9823
  ),
@@ -9564,6 +9908,7 @@ export namespace spanner_v1 {
9564
9908
  '$1'
9565
9909
  ),
9566
9910
  method: 'POST',
9911
+ apiVersion: '',
9567
9912
  },
9568
9913
  options
9569
9914
  ),
@@ -9773,16 +10118,654 @@ export namespace spanner_v1 {
9773
10118
  requestBody?: Schema$ReadRequest;
9774
10119
  }
9775
10120
 
9776
- export class Resource$Projects$Instances$Instancepartitions {
10121
+ export class Resource$Projects$Instances$Instancepartitionoperations {
9777
10122
  context: APIRequestContext;
9778
- operations: Resource$Projects$Instances$Instancepartitions$Operations;
9779
10123
  constructor(context: APIRequestContext) {
9780
10124
  this.context = context;
9781
- this.operations =
9782
- new Resource$Projects$Instances$Instancepartitions$Operations(
9783
- this.context
9784
- );
9785
10125
  }
10126
+
10127
+ /**
10128
+ * Lists instance partition long-running operations in the given instance. An instance partition operation has a name of the form `projects//instances//instancePartitions//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. Authorization requires `spanner.instancePartitionOperations.list` permission on the resource parent.
10129
+ *
10130
+ * @param params - Parameters for request
10131
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
10132
+ * @param callback - Optional callback that handles the response.
10133
+ * @returns A promise if used with async/await, or void if used with a callback.
10134
+ */
10135
+ list(
10136
+ params: Params$Resource$Projects$Instances$Instancepartitionoperations$List,
10137
+ options: StreamMethodOptions
10138
+ ): GaxiosPromise<Readable>;
10139
+ list(
10140
+ params?: Params$Resource$Projects$Instances$Instancepartitionoperations$List,
10141
+ options?: MethodOptions
10142
+ ): GaxiosPromise<Schema$ListInstancePartitionOperationsResponse>;
10143
+ list(
10144
+ params: Params$Resource$Projects$Instances$Instancepartitionoperations$List,
10145
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
10146
+ callback: BodyResponseCallback<Readable>
10147
+ ): void;
10148
+ list(
10149
+ params: Params$Resource$Projects$Instances$Instancepartitionoperations$List,
10150
+ options:
10151
+ | MethodOptions
10152
+ | BodyResponseCallback<Schema$ListInstancePartitionOperationsResponse>,
10153
+ callback: BodyResponseCallback<Schema$ListInstancePartitionOperationsResponse>
10154
+ ): void;
10155
+ list(
10156
+ params: Params$Resource$Projects$Instances$Instancepartitionoperations$List,
10157
+ callback: BodyResponseCallback<Schema$ListInstancePartitionOperationsResponse>
10158
+ ): void;
10159
+ list(
10160
+ callback: BodyResponseCallback<Schema$ListInstancePartitionOperationsResponse>
10161
+ ): void;
10162
+ list(
10163
+ paramsOrCallback?:
10164
+ | Params$Resource$Projects$Instances$Instancepartitionoperations$List
10165
+ | BodyResponseCallback<Schema$ListInstancePartitionOperationsResponse>
10166
+ | BodyResponseCallback<Readable>,
10167
+ optionsOrCallback?:
10168
+ | MethodOptions
10169
+ | StreamMethodOptions
10170
+ | BodyResponseCallback<Schema$ListInstancePartitionOperationsResponse>
10171
+ | BodyResponseCallback<Readable>,
10172
+ callback?:
10173
+ | BodyResponseCallback<Schema$ListInstancePartitionOperationsResponse>
10174
+ | BodyResponseCallback<Readable>
10175
+ ):
10176
+ | void
10177
+ | GaxiosPromise<Schema$ListInstancePartitionOperationsResponse>
10178
+ | GaxiosPromise<Readable> {
10179
+ let params = (paramsOrCallback ||
10180
+ {}) as Params$Resource$Projects$Instances$Instancepartitionoperations$List;
10181
+ let options = (optionsOrCallback || {}) as MethodOptions;
10182
+
10183
+ if (typeof paramsOrCallback === 'function') {
10184
+ callback = paramsOrCallback;
10185
+ params =
10186
+ {} as Params$Resource$Projects$Instances$Instancepartitionoperations$List;
10187
+ options = {};
10188
+ }
10189
+
10190
+ if (typeof optionsOrCallback === 'function') {
10191
+ callback = optionsOrCallback;
10192
+ options = {};
10193
+ }
10194
+
10195
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
10196
+ const parameters = {
10197
+ options: Object.assign(
10198
+ {
10199
+ url: (
10200
+ rootUrl + '/v1/{+parent}/instancePartitionOperations'
10201
+ ).replace(/([^:]\/)\/+/g, '$1'),
10202
+ method: 'GET',
10203
+ apiVersion: '',
10204
+ },
10205
+ options
10206
+ ),
10207
+ params,
10208
+ requiredParams: ['parent'],
10209
+ pathParams: ['parent'],
10210
+ context: this.context,
10211
+ };
10212
+ if (callback) {
10213
+ createAPIRequest<Schema$ListInstancePartitionOperationsResponse>(
10214
+ parameters,
10215
+ callback as BodyResponseCallback<unknown>
10216
+ );
10217
+ } else {
10218
+ return createAPIRequest<Schema$ListInstancePartitionOperationsResponse>(
10219
+ parameters
10220
+ );
10221
+ }
10222
+ }
10223
+ }
10224
+
10225
+ export interface Params$Resource$Projects$Instances$Instancepartitionoperations$List
10226
+ extends StandardParameters {
10227
+ /**
10228
+ * Optional. 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 CreateInstancePartitionMetadata is `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. * `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.CreateInstancePartitionMetadata) AND` \ `(metadata.instance_partition.name:custom-instance-partition) AND` \ `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ `(error:*)` - Return operations where: * The operation's metadata type is CreateInstancePartitionMetadata. * The instance partition name contains "custom-instance-partition". * The operation started before 2021-03-28T14:50:00Z. * The operation resulted in an error.
10229
+ */
10230
+ filter?: string;
10231
+ /**
10232
+ * Optional. Deadline used while retrieving metadata for instance partition operations. Instance partitions whose operation metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionOperationsResponse.
10233
+ */
10234
+ instancePartitionDeadline?: string;
10235
+ /**
10236
+ * Optional. Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.
10237
+ */
10238
+ pageSize?: number;
10239
+ /**
10240
+ * Optional. If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionOperationsResponse to the same `parent` and with the same `filter`.
10241
+ */
10242
+ pageToken?: string;
10243
+ /**
10244
+ * Required. The parent instance of the instance partition operations. Values are of the form `projects//instances/`.
10245
+ */
10246
+ parent?: string;
10247
+ }
10248
+
10249
+ export class Resource$Projects$Instances$Instancepartitions {
10250
+ context: APIRequestContext;
10251
+ operations: Resource$Projects$Instances$Instancepartitions$Operations;
10252
+ constructor(context: APIRequestContext) {
10253
+ this.context = context;
10254
+ this.operations =
10255
+ new Resource$Projects$Instances$Instancepartitions$Operations(
10256
+ this.context
10257
+ );
10258
+ }
10259
+
10260
+ /**
10261
+ * Creates an instance partition and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. Immediately upon completion of this request: * The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is `CREATING`. Until completion of the returned operation: * Cancelling the operation renders the instance partition immediately unreadable via the API. * The instance partition can be deleted. * All other attempts to modify the instance partition are rejected. Upon completion of the returned operation: * Billing for all successfully-allocated resources begins (some types may have lower than the requested levels). * Databases can start using this instance partition. * The instance partition's allocated resource levels are readable via the API. * The instance partition's 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 partition. The metadata field type is CreateInstancePartitionMetadata. The response field type is InstancePartition, if successful.
10262
+ *
10263
+ * @param params - Parameters for request
10264
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
10265
+ * @param callback - Optional callback that handles the response.
10266
+ * @returns A promise if used with async/await, or void if used with a callback.
10267
+ */
10268
+ create(
10269
+ params: Params$Resource$Projects$Instances$Instancepartitions$Create,
10270
+ options: StreamMethodOptions
10271
+ ): GaxiosPromise<Readable>;
10272
+ create(
10273
+ params?: Params$Resource$Projects$Instances$Instancepartitions$Create,
10274
+ options?: MethodOptions
10275
+ ): GaxiosPromise<Schema$Operation>;
10276
+ create(
10277
+ params: Params$Resource$Projects$Instances$Instancepartitions$Create,
10278
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
10279
+ callback: BodyResponseCallback<Readable>
10280
+ ): void;
10281
+ create(
10282
+ params: Params$Resource$Projects$Instances$Instancepartitions$Create,
10283
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
10284
+ callback: BodyResponseCallback<Schema$Operation>
10285
+ ): void;
10286
+ create(
10287
+ params: Params$Resource$Projects$Instances$Instancepartitions$Create,
10288
+ callback: BodyResponseCallback<Schema$Operation>
10289
+ ): void;
10290
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
10291
+ create(
10292
+ paramsOrCallback?:
10293
+ | Params$Resource$Projects$Instances$Instancepartitions$Create
10294
+ | BodyResponseCallback<Schema$Operation>
10295
+ | BodyResponseCallback<Readable>,
10296
+ optionsOrCallback?:
10297
+ | MethodOptions
10298
+ | StreamMethodOptions
10299
+ | BodyResponseCallback<Schema$Operation>
10300
+ | BodyResponseCallback<Readable>,
10301
+ callback?:
10302
+ | BodyResponseCallback<Schema$Operation>
10303
+ | BodyResponseCallback<Readable>
10304
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
10305
+ let params = (paramsOrCallback ||
10306
+ {}) as Params$Resource$Projects$Instances$Instancepartitions$Create;
10307
+ let options = (optionsOrCallback || {}) as MethodOptions;
10308
+
10309
+ if (typeof paramsOrCallback === 'function') {
10310
+ callback = paramsOrCallback;
10311
+ params =
10312
+ {} as Params$Resource$Projects$Instances$Instancepartitions$Create;
10313
+ options = {};
10314
+ }
10315
+
10316
+ if (typeof optionsOrCallback === 'function') {
10317
+ callback = optionsOrCallback;
10318
+ options = {};
10319
+ }
10320
+
10321
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
10322
+ const parameters = {
10323
+ options: Object.assign(
10324
+ {
10325
+ url: (rootUrl + '/v1/{+parent}/instancePartitions').replace(
10326
+ /([^:]\/)\/+/g,
10327
+ '$1'
10328
+ ),
10329
+ method: 'POST',
10330
+ apiVersion: '',
10331
+ },
10332
+ options
10333
+ ),
10334
+ params,
10335
+ requiredParams: ['parent'],
10336
+ pathParams: ['parent'],
10337
+ context: this.context,
10338
+ };
10339
+ if (callback) {
10340
+ createAPIRequest<Schema$Operation>(
10341
+ parameters,
10342
+ callback as BodyResponseCallback<unknown>
10343
+ );
10344
+ } else {
10345
+ return createAPIRequest<Schema$Operation>(parameters);
10346
+ }
10347
+ }
10348
+
10349
+ /**
10350
+ * Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance. Authorization requires `spanner.instancePartitions.delete` permission on the resource name.
10351
+ *
10352
+ * @param params - Parameters for request
10353
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
10354
+ * @param callback - Optional callback that handles the response.
10355
+ * @returns A promise if used with async/await, or void if used with a callback.
10356
+ */
10357
+ delete(
10358
+ params: Params$Resource$Projects$Instances$Instancepartitions$Delete,
10359
+ options: StreamMethodOptions
10360
+ ): GaxiosPromise<Readable>;
10361
+ delete(
10362
+ params?: Params$Resource$Projects$Instances$Instancepartitions$Delete,
10363
+ options?: MethodOptions
10364
+ ): GaxiosPromise<Schema$Empty>;
10365
+ delete(
10366
+ params: Params$Resource$Projects$Instances$Instancepartitions$Delete,
10367
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
10368
+ callback: BodyResponseCallback<Readable>
10369
+ ): void;
10370
+ delete(
10371
+ params: Params$Resource$Projects$Instances$Instancepartitions$Delete,
10372
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
10373
+ callback: BodyResponseCallback<Schema$Empty>
10374
+ ): void;
10375
+ delete(
10376
+ params: Params$Resource$Projects$Instances$Instancepartitions$Delete,
10377
+ callback: BodyResponseCallback<Schema$Empty>
10378
+ ): void;
10379
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
10380
+ delete(
10381
+ paramsOrCallback?:
10382
+ | Params$Resource$Projects$Instances$Instancepartitions$Delete
10383
+ | BodyResponseCallback<Schema$Empty>
10384
+ | BodyResponseCallback<Readable>,
10385
+ optionsOrCallback?:
10386
+ | MethodOptions
10387
+ | StreamMethodOptions
10388
+ | BodyResponseCallback<Schema$Empty>
10389
+ | BodyResponseCallback<Readable>,
10390
+ callback?:
10391
+ | BodyResponseCallback<Schema$Empty>
10392
+ | BodyResponseCallback<Readable>
10393
+ ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
10394
+ let params = (paramsOrCallback ||
10395
+ {}) as Params$Resource$Projects$Instances$Instancepartitions$Delete;
10396
+ let options = (optionsOrCallback || {}) as MethodOptions;
10397
+
10398
+ if (typeof paramsOrCallback === 'function') {
10399
+ callback = paramsOrCallback;
10400
+ params =
10401
+ {} as Params$Resource$Projects$Instances$Instancepartitions$Delete;
10402
+ options = {};
10403
+ }
10404
+
10405
+ if (typeof optionsOrCallback === 'function') {
10406
+ callback = optionsOrCallback;
10407
+ options = {};
10408
+ }
10409
+
10410
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
10411
+ const parameters = {
10412
+ options: Object.assign(
10413
+ {
10414
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
10415
+ method: 'DELETE',
10416
+ apiVersion: '',
10417
+ },
10418
+ options
10419
+ ),
10420
+ params,
10421
+ requiredParams: ['name'],
10422
+ pathParams: ['name'],
10423
+ context: this.context,
10424
+ };
10425
+ if (callback) {
10426
+ createAPIRequest<Schema$Empty>(
10427
+ parameters,
10428
+ callback as BodyResponseCallback<unknown>
10429
+ );
10430
+ } else {
10431
+ return createAPIRequest<Schema$Empty>(parameters);
10432
+ }
10433
+ }
10434
+
10435
+ /**
10436
+ * Gets information about a particular instance partition.
10437
+ *
10438
+ * @param params - Parameters for request
10439
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
10440
+ * @param callback - Optional callback that handles the response.
10441
+ * @returns A promise if used with async/await, or void if used with a callback.
10442
+ */
10443
+ get(
10444
+ params: Params$Resource$Projects$Instances$Instancepartitions$Get,
10445
+ options: StreamMethodOptions
10446
+ ): GaxiosPromise<Readable>;
10447
+ get(
10448
+ params?: Params$Resource$Projects$Instances$Instancepartitions$Get,
10449
+ options?: MethodOptions
10450
+ ): GaxiosPromise<Schema$InstancePartition>;
10451
+ get(
10452
+ params: Params$Resource$Projects$Instances$Instancepartitions$Get,
10453
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
10454
+ callback: BodyResponseCallback<Readable>
10455
+ ): void;
10456
+ get(
10457
+ params: Params$Resource$Projects$Instances$Instancepartitions$Get,
10458
+ options: MethodOptions | BodyResponseCallback<Schema$InstancePartition>,
10459
+ callback: BodyResponseCallback<Schema$InstancePartition>
10460
+ ): void;
10461
+ get(
10462
+ params: Params$Resource$Projects$Instances$Instancepartitions$Get,
10463
+ callback: BodyResponseCallback<Schema$InstancePartition>
10464
+ ): void;
10465
+ get(callback: BodyResponseCallback<Schema$InstancePartition>): void;
10466
+ get(
10467
+ paramsOrCallback?:
10468
+ | Params$Resource$Projects$Instances$Instancepartitions$Get
10469
+ | BodyResponseCallback<Schema$InstancePartition>
10470
+ | BodyResponseCallback<Readable>,
10471
+ optionsOrCallback?:
10472
+ | MethodOptions
10473
+ | StreamMethodOptions
10474
+ | BodyResponseCallback<Schema$InstancePartition>
10475
+ | BodyResponseCallback<Readable>,
10476
+ callback?:
10477
+ | BodyResponseCallback<Schema$InstancePartition>
10478
+ | BodyResponseCallback<Readable>
10479
+ ):
10480
+ | void
10481
+ | GaxiosPromise<Schema$InstancePartition>
10482
+ | GaxiosPromise<Readable> {
10483
+ let params = (paramsOrCallback ||
10484
+ {}) as Params$Resource$Projects$Instances$Instancepartitions$Get;
10485
+ let options = (optionsOrCallback || {}) as MethodOptions;
10486
+
10487
+ if (typeof paramsOrCallback === 'function') {
10488
+ callback = paramsOrCallback;
10489
+ params =
10490
+ {} as Params$Resource$Projects$Instances$Instancepartitions$Get;
10491
+ options = {};
10492
+ }
10493
+
10494
+ if (typeof optionsOrCallback === 'function') {
10495
+ callback = optionsOrCallback;
10496
+ options = {};
10497
+ }
10498
+
10499
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
10500
+ const parameters = {
10501
+ options: Object.assign(
10502
+ {
10503
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
10504
+ method: 'GET',
10505
+ apiVersion: '',
10506
+ },
10507
+ options
10508
+ ),
10509
+ params,
10510
+ requiredParams: ['name'],
10511
+ pathParams: ['name'],
10512
+ context: this.context,
10513
+ };
10514
+ if (callback) {
10515
+ createAPIRequest<Schema$InstancePartition>(
10516
+ parameters,
10517
+ callback as BodyResponseCallback<unknown>
10518
+ );
10519
+ } else {
10520
+ return createAPIRequest<Schema$InstancePartition>(parameters);
10521
+ }
10522
+ }
10523
+
10524
+ /**
10525
+ * Lists all instance partitions for the given instance.
10526
+ *
10527
+ * @param params - Parameters for request
10528
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
10529
+ * @param callback - Optional callback that handles the response.
10530
+ * @returns A promise if used with async/await, or void if used with a callback.
10531
+ */
10532
+ list(
10533
+ params: Params$Resource$Projects$Instances$Instancepartitions$List,
10534
+ options: StreamMethodOptions
10535
+ ): GaxiosPromise<Readable>;
10536
+ list(
10537
+ params?: Params$Resource$Projects$Instances$Instancepartitions$List,
10538
+ options?: MethodOptions
10539
+ ): GaxiosPromise<Schema$ListInstancePartitionsResponse>;
10540
+ list(
10541
+ params: Params$Resource$Projects$Instances$Instancepartitions$List,
10542
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
10543
+ callback: BodyResponseCallback<Readable>
10544
+ ): void;
10545
+ list(
10546
+ params: Params$Resource$Projects$Instances$Instancepartitions$List,
10547
+ options:
10548
+ | MethodOptions
10549
+ | BodyResponseCallback<Schema$ListInstancePartitionsResponse>,
10550
+ callback: BodyResponseCallback<Schema$ListInstancePartitionsResponse>
10551
+ ): void;
10552
+ list(
10553
+ params: Params$Resource$Projects$Instances$Instancepartitions$List,
10554
+ callback: BodyResponseCallback<Schema$ListInstancePartitionsResponse>
10555
+ ): void;
10556
+ list(
10557
+ callback: BodyResponseCallback<Schema$ListInstancePartitionsResponse>
10558
+ ): void;
10559
+ list(
10560
+ paramsOrCallback?:
10561
+ | Params$Resource$Projects$Instances$Instancepartitions$List
10562
+ | BodyResponseCallback<Schema$ListInstancePartitionsResponse>
10563
+ | BodyResponseCallback<Readable>,
10564
+ optionsOrCallback?:
10565
+ | MethodOptions
10566
+ | StreamMethodOptions
10567
+ | BodyResponseCallback<Schema$ListInstancePartitionsResponse>
10568
+ | BodyResponseCallback<Readable>,
10569
+ callback?:
10570
+ | BodyResponseCallback<Schema$ListInstancePartitionsResponse>
10571
+ | BodyResponseCallback<Readable>
10572
+ ):
10573
+ | void
10574
+ | GaxiosPromise<Schema$ListInstancePartitionsResponse>
10575
+ | GaxiosPromise<Readable> {
10576
+ let params = (paramsOrCallback ||
10577
+ {}) as Params$Resource$Projects$Instances$Instancepartitions$List;
10578
+ let options = (optionsOrCallback || {}) as MethodOptions;
10579
+
10580
+ if (typeof paramsOrCallback === 'function') {
10581
+ callback = paramsOrCallback;
10582
+ params =
10583
+ {} as Params$Resource$Projects$Instances$Instancepartitions$List;
10584
+ options = {};
10585
+ }
10586
+
10587
+ if (typeof optionsOrCallback === 'function') {
10588
+ callback = optionsOrCallback;
10589
+ options = {};
10590
+ }
10591
+
10592
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
10593
+ const parameters = {
10594
+ options: Object.assign(
10595
+ {
10596
+ url: (rootUrl + '/v1/{+parent}/instancePartitions').replace(
10597
+ /([^:]\/)\/+/g,
10598
+ '$1'
10599
+ ),
10600
+ method: 'GET',
10601
+ apiVersion: '',
10602
+ },
10603
+ options
10604
+ ),
10605
+ params,
10606
+ requiredParams: ['parent'],
10607
+ pathParams: ['parent'],
10608
+ context: this.context,
10609
+ };
10610
+ if (callback) {
10611
+ createAPIRequest<Schema$ListInstancePartitionsResponse>(
10612
+ parameters,
10613
+ callback as BodyResponseCallback<unknown>
10614
+ );
10615
+ } else {
10616
+ return createAPIRequest<Schema$ListInstancePartitionsResponse>(
10617
+ parameters
10618
+ );
10619
+ }
10620
+ }
10621
+
10622
+ /**
10623
+ * Updates an instance partition, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns `NOT_FOUND`. Immediately upon completion of this request: * For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: * Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance partition are rejected. * Reading the instance partition via the API continues to give the pre-request resource levels. Upon completion of the returned operation: * Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance partition's tables. * The instance partition's new resource levels are readable via the API. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance partition modification. The metadata field type is UpdateInstancePartitionMetadata. The response field type is InstancePartition, if successful. Authorization requires `spanner.instancePartitions.update` permission on the resource name.
10624
+ *
10625
+ * @param params - Parameters for request
10626
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
10627
+ * @param callback - Optional callback that handles the response.
10628
+ * @returns A promise if used with async/await, or void if used with a callback.
10629
+ */
10630
+ patch(
10631
+ params: Params$Resource$Projects$Instances$Instancepartitions$Patch,
10632
+ options: StreamMethodOptions
10633
+ ): GaxiosPromise<Readable>;
10634
+ patch(
10635
+ params?: Params$Resource$Projects$Instances$Instancepartitions$Patch,
10636
+ options?: MethodOptions
10637
+ ): GaxiosPromise<Schema$Operation>;
10638
+ patch(
10639
+ params: Params$Resource$Projects$Instances$Instancepartitions$Patch,
10640
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
10641
+ callback: BodyResponseCallback<Readable>
10642
+ ): void;
10643
+ patch(
10644
+ params: Params$Resource$Projects$Instances$Instancepartitions$Patch,
10645
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
10646
+ callback: BodyResponseCallback<Schema$Operation>
10647
+ ): void;
10648
+ patch(
10649
+ params: Params$Resource$Projects$Instances$Instancepartitions$Patch,
10650
+ callback: BodyResponseCallback<Schema$Operation>
10651
+ ): void;
10652
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
10653
+ patch(
10654
+ paramsOrCallback?:
10655
+ | Params$Resource$Projects$Instances$Instancepartitions$Patch
10656
+ | BodyResponseCallback<Schema$Operation>
10657
+ | BodyResponseCallback<Readable>,
10658
+ optionsOrCallback?:
10659
+ | MethodOptions
10660
+ | StreamMethodOptions
10661
+ | BodyResponseCallback<Schema$Operation>
10662
+ | BodyResponseCallback<Readable>,
10663
+ callback?:
10664
+ | BodyResponseCallback<Schema$Operation>
10665
+ | BodyResponseCallback<Readable>
10666
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
10667
+ let params = (paramsOrCallback ||
10668
+ {}) as Params$Resource$Projects$Instances$Instancepartitions$Patch;
10669
+ let options = (optionsOrCallback || {}) as MethodOptions;
10670
+
10671
+ if (typeof paramsOrCallback === 'function') {
10672
+ callback = paramsOrCallback;
10673
+ params =
10674
+ {} as Params$Resource$Projects$Instances$Instancepartitions$Patch;
10675
+ options = {};
10676
+ }
10677
+
10678
+ if (typeof optionsOrCallback === 'function') {
10679
+ callback = optionsOrCallback;
10680
+ options = {};
10681
+ }
10682
+
10683
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
10684
+ const parameters = {
10685
+ options: Object.assign(
10686
+ {
10687
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
10688
+ method: 'PATCH',
10689
+ apiVersion: '',
10690
+ },
10691
+ options
10692
+ ),
10693
+ params,
10694
+ requiredParams: ['name'],
10695
+ pathParams: ['name'],
10696
+ context: this.context,
10697
+ };
10698
+ if (callback) {
10699
+ createAPIRequest<Schema$Operation>(
10700
+ parameters,
10701
+ callback as BodyResponseCallback<unknown>
10702
+ );
10703
+ } else {
10704
+ return createAPIRequest<Schema$Operation>(parameters);
10705
+ }
10706
+ }
10707
+ }
10708
+
10709
+ export interface Params$Resource$Projects$Instances$Instancepartitions$Create
10710
+ extends StandardParameters {
10711
+ /**
10712
+ * Required. The name of the instance in which to create the instance partition. Values are of the form `projects//instances/`.
10713
+ */
10714
+ parent?: string;
10715
+
10716
+ /**
10717
+ * Request body metadata
10718
+ */
10719
+ requestBody?: Schema$CreateInstancePartitionRequest;
10720
+ }
10721
+ export interface Params$Resource$Projects$Instances$Instancepartitions$Delete
10722
+ extends StandardParameters {
10723
+ /**
10724
+ * Optional. If not empty, the API only deletes the instance partition when the etag provided matches the current status of the requested instance partition. Otherwise, deletes the instance partition without checking the current status of the requested instance partition.
10725
+ */
10726
+ etag?: string;
10727
+ /**
10728
+ * Required. The name of the instance partition to be deleted. Values are of the form `projects/{project\}/instances/{instance\}/instancePartitions/{instance_partition\}`
10729
+ */
10730
+ name?: string;
10731
+ }
10732
+ export interface Params$Resource$Projects$Instances$Instancepartitions$Get
10733
+ extends StandardParameters {
10734
+ /**
10735
+ * Required. The name of the requested instance partition. Values are of the form `projects/{project\}/instances/{instance\}/instancePartitions/{instance_partition\}`.
10736
+ */
10737
+ name?: string;
10738
+ }
10739
+ export interface Params$Resource$Projects$Instances$Instancepartitions$List
10740
+ extends StandardParameters {
10741
+ /**
10742
+ * Optional. Deadline used while retrieving metadata for instance partitions. Instance partitions whose metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionsResponse.
10743
+ */
10744
+ instancePartitionDeadline?: string;
10745
+ /**
10746
+ * Number of instance partitions to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.
10747
+ */
10748
+ pageSize?: number;
10749
+ /**
10750
+ * If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionsResponse.
10751
+ */
10752
+ pageToken?: string;
10753
+ /**
10754
+ * Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`.
10755
+ */
10756
+ parent?: string;
10757
+ }
10758
+ export interface Params$Resource$Projects$Instances$Instancepartitions$Patch
10759
+ extends StandardParameters {
10760
+ /**
10761
+ * Required. A unique identifier for the instance partition. Values are of the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created.
10762
+ */
10763
+ name?: string;
10764
+
10765
+ /**
10766
+ * Request body metadata
10767
+ */
10768
+ requestBody?: Schema$UpdateInstancePartitionRequest;
9786
10769
  }
9787
10770
 
9788
10771
  export class Resource$Projects$Instances$Instancepartitions$Operations {
@@ -9858,6 +10841,7 @@ export namespace spanner_v1 {
9858
10841
  {
9859
10842
  url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
9860
10843
  method: 'POST',
10844
+ apiVersion: '',
9861
10845
  },
9862
10846
  options
9863
10847
  ),
@@ -9943,6 +10927,7 @@ export namespace spanner_v1 {
9943
10927
  {
9944
10928
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
9945
10929
  method: 'DELETE',
10930
+ apiVersion: '',
9946
10931
  },
9947
10932
  options
9948
10933
  ),
@@ -10028,6 +11013,7 @@ export namespace spanner_v1 {
10028
11013
  {
10029
11014
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
10030
11015
  method: 'GET',
11016
+ apiVersion: '',
10031
11017
  },
10032
11018
  options
10033
11019
  ),
@@ -10118,6 +11104,7 @@ export namespace spanner_v1 {
10118
11104
  {
10119
11105
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
10120
11106
  method: 'GET',
11107
+ apiVersion: '',
10121
11108
  },
10122
11109
  options
10123
11110
  ),
@@ -10250,6 +11237,7 @@ export namespace spanner_v1 {
10250
11237
  {
10251
11238
  url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
10252
11239
  method: 'POST',
11240
+ apiVersion: '',
10253
11241
  },
10254
11242
  options
10255
11243
  ),
@@ -10334,6 +11322,7 @@ export namespace spanner_v1 {
10334
11322
  {
10335
11323
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
10336
11324
  method: 'DELETE',
11325
+ apiVersion: '',
10337
11326
  },
10338
11327
  options
10339
11328
  ),
@@ -10418,6 +11407,7 @@ export namespace spanner_v1 {
10418
11407
  {
10419
11408
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
10420
11409
  method: 'GET',
11410
+ apiVersion: '',
10421
11411
  },
10422
11412
  options
10423
11413
  ),
@@ -10507,6 +11497,7 @@ export namespace spanner_v1 {
10507
11497
  {
10508
11498
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
10509
11499
  method: 'GET',
11500
+ apiVersion: '',
10510
11501
  },
10511
11502
  options
10512
11503
  ),
@@ -10641,6 +11632,7 @@ export namespace spanner_v1 {
10641
11632
  {
10642
11633
  url: (rootUrl + '/v1/{+parent}').replace(/([^:]\/)\/+/g, '$1'),
10643
11634
  method: 'GET',
11635
+ apiVersion: '',
10644
11636
  },
10645
11637
  options
10646
11638
  ),