@googleapis/spanner 1.1.1 → 3.0.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
@@ -126,6 +126,53 @@ export namespace spanner_v1 {
126
126
  }
127
127
  }
128
128
 
129
+ /**
130
+ * Autoscaling config for an instance.
131
+ */
132
+ export interface Schema$AutoscalingConfig {
133
+ /**
134
+ * Required. Autoscaling limits for an instance.
135
+ */
136
+ autoscalingLimits?: Schema$AutoscalingLimits;
137
+ /**
138
+ * Required. The autoscaling targets for an instance.
139
+ */
140
+ autoscalingTargets?: Schema$AutoscalingTargets;
141
+ }
142
+ /**
143
+ * The autoscaling limits for the instance. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.
144
+ */
145
+ export interface Schema$AutoscalingLimits {
146
+ /**
147
+ * Maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
148
+ */
149
+ maxNodes?: number | null;
150
+ /**
151
+ * Maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
152
+ */
153
+ maxProcessingUnits?: number | null;
154
+ /**
155
+ * Minimum number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
156
+ */
157
+ minNodes?: number | null;
158
+ /**
159
+ * Minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
160
+ */
161
+ minProcessingUnits?: number | null;
162
+ }
163
+ /**
164
+ * The autoscaling targets for an instance.
165
+ */
166
+ export interface Schema$AutoscalingTargets {
167
+ /**
168
+ * Required. The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive.
169
+ */
170
+ highPriorityCpuUtilizationPercent?: number | null;
171
+ /**
172
+ * Required. The target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 100] inclusive.
173
+ */
174
+ storageUtilizationPercent?: number | null;
175
+ }
129
176
  /**
130
177
  * A backup of a Cloud Spanner database.
131
178
  */
@@ -222,6 +269,36 @@ export namespace spanner_v1 {
222
269
  */
223
270
  session?: Schema$Session[];
224
271
  }
272
+ /**
273
+ * The request for BatchWrite.
274
+ */
275
+ export interface Schema$BatchWriteRequest {
276
+ /**
277
+ * Required. The groups of mutations to be applied.
278
+ */
279
+ mutationGroups?: Schema$MutationGroup[];
280
+ /**
281
+ * Common options for this request.
282
+ */
283
+ requestOptions?: Schema$RequestOptions;
284
+ }
285
+ /**
286
+ * The result of applying a batch of mutations.
287
+ */
288
+ export interface Schema$BatchWriteResponse {
289
+ /**
290
+ * The commit timestamp of the transaction that applied this batch. Present if `status` is `OK`, absent otherwise.
291
+ */
292
+ commitTimestamp?: string | null;
293
+ /**
294
+ * The mutation groups applied in this batch. The values index into the `mutation_groups` field in the corresponding `BatchWriteRequest`.
295
+ */
296
+ indexes?: number[] | null;
297
+ /**
298
+ * An `OK` status indicates success. Any other status indicates a failure.
299
+ */
300
+ status?: Schema$Status;
301
+ }
225
302
  /**
226
303
  * The request for BeginTransaction.
227
304
  */
@@ -654,6 +731,19 @@ export namespace spanner_v1 {
654
731
  */
655
732
  shortMessage?: Schema$LocalizedString;
656
733
  }
734
+ /**
735
+ * The DirectedReadOptions can be used to indicate which replicas or regions should be used for non-transactional reads or queries. DirectedReadOptions may only be specified for a read-only transaction, otherwise the API will return an `INVALID_ARGUMENT` error.
736
+ */
737
+ export interface Schema$DirectedReadOptions {
738
+ /**
739
+ * Exclude_replicas indicates that should be excluded from serving requests. Spanner will not route requests to the replicas in this list.
740
+ */
741
+ excludeReplicas?: Schema$ExcludeReplicas;
742
+ /**
743
+ * Include_replicas indicates the order of replicas (as they appear in this list) to process the request. If auto_failover_disabled is set to true and all replicas are exhausted without finding a healthy replica, Spanner will wait for a replica in the list to become available, requests may fail due to `DEADLINE_EXCEEDED` errors.
744
+ */
745
+ includeReplicas?: Schema$IncludeReplicas;
746
+ }
657
747
  /**
658
748
  * 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); \}
659
749
  */
@@ -684,6 +774,15 @@ export namespace spanner_v1 {
684
774
  */
685
775
  kmsKeyVersion?: string | null;
686
776
  }
777
+ /**
778
+ * An ExcludeReplicas contains a repeated set of ReplicaSelection that should be excluded from serving requests.
779
+ */
780
+ export interface Schema$ExcludeReplicas {
781
+ /**
782
+ * The directed read replica selector.
783
+ */
784
+ replicaSelections?: Schema$ReplicaSelection[];
785
+ }
687
786
  /**
688
787
  * The request for ExecuteBatchDml.
689
788
  */
@@ -726,6 +825,10 @@ export namespace spanner_v1 {
726
825
  * If this is for a partitioned query and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.
727
826
  */
728
827
  dataBoostEnabled?: boolean | null;
828
+ /**
829
+ * Directed read options for this request.
830
+ */
831
+ directedReadOptions?: Schema$DirectedReadOptions;
729
832
  /**
730
833
  * Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `"WHERE id \> @msg_id AND id < @msg_id + 100"` It is an error to execute a SQL statement with unbound parameters.
731
834
  */
@@ -849,6 +952,32 @@ export namespace spanner_v1 {
849
952
  */
850
953
  requestedPolicyVersion?: number | null;
851
954
  }
955
+ /**
956
+ * An IncludeReplicas contains a repeated set of ReplicaSelection which indicates the order in which replicas should be considered.
957
+ */
958
+ export interface Schema$IncludeReplicas {
959
+ /**
960
+ * If true, Spanner will not route requests to a replica outside the include_replicas list when all of the specified replicas are unavailable or unhealthy. Default value is `false`.
961
+ */
962
+ autoFailoverDisabled?: boolean | null;
963
+ /**
964
+ * The directed read replica selector.
965
+ */
966
+ replicaSelections?: Schema$ReplicaSelection[];
967
+ }
968
+ /**
969
+ * Recommendation to add new indexes to run queries more efficiently.
970
+ */
971
+ export interface Schema$IndexAdvice {
972
+ /**
973
+ * Optional. DDL statements to add new indexes that will improve the query.
974
+ */
975
+ ddl?: string[] | null;
976
+ /**
977
+ * Optional. Estimated latency improvement factor. For example if the query currently takes 500 ms to run and the estimated latency with new indexes is 100 ms this field will be 5.
978
+ */
979
+ improvementFactor?: number | null;
980
+ }
852
981
  /**
853
982
  * A message representing a (sparse) collection of hot keys for specific key buckets.
854
983
  */
@@ -871,6 +1000,10 @@ export namespace spanner_v1 {
871
1000
  * An isolated set of Cloud Spanner resources on which databases can be hosted.
872
1001
  */
873
1002
  export interface Schema$Instance {
1003
+ /**
1004
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, node_count and processing_units are treated as OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance.
1005
+ */
1006
+ autoscalingConfig?: Schema$AutoscalingConfig;
874
1007
  /**
875
1008
  * Required. The name of the instance's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.
876
1009
  */
@@ -1342,6 +1475,15 @@ export namespace spanner_v1 {
1342
1475
  */
1343
1476
  update?: Schema$Write;
1344
1477
  }
1478
+ /**
1479
+ * A group of mutations to be committed together. Related mutations should be placed in a group. For example, two mutations inserting rows with the same primary key prefix in both parent and child tables are related.
1480
+ */
1481
+ export interface Schema$MutationGroup {
1482
+ /**
1483
+ * Required. The mutations in this group.
1484
+ */
1485
+ mutations?: Schema$Mutation[];
1486
+ }
1345
1487
  /**
1346
1488
  * This resource represents a long-running operation that is the result of a network API call.
1347
1489
  */
@@ -1363,7 +1505,7 @@ export namespace spanner_v1 {
1363
1505
  */
1364
1506
  name?: string | null;
1365
1507
  /**
1366
- * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
1508
+ * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
1367
1509
  */
1368
1510
  response?: {[key: string]: any} | null;
1369
1511
  }
@@ -1465,7 +1607,7 @@ export namespace spanner_v1 {
1465
1607
  */
1466
1608
  partitionOptions?: Schema$PartitionOptions;
1467
1609
  /**
1468
- * Required. The query request to generate partitions for. The request will fail if the query is not root partitionable. The query plan of a root partitionable query has a single distributed union operator. A distributed union operator conceptually divides one or more tables into multiple splits, remotely evaluates a subquery independently on each split, and then unions all results. This must not contain DML commands, such as INSERT, UPDATE, or DELETE. Use ExecuteStreamingSql with a PartitionedDml transaction for large, partition-friendly DML operations.
1610
+ * Required. The query request to generate partitions for. The request will fail if the query is not root partitionable. For a query to be root partitionable, it needs to satisfy a few conditions. For example, the first operator in the query execution plan must be a distributed union operator. 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.
1469
1611
  */
1470
1612
  sql?: string | null;
1471
1613
  /**
@@ -1549,7 +1691,7 @@ export namespace spanner_v1 {
1549
1691
  shortRepresentation?: Schema$ShortRepresentation;
1550
1692
  }
1551
1693
  /**
1552
- * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1694
+ * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1553
1695
  */
1554
1696
  export interface Schema$Policy {
1555
1697
  /**
@@ -1590,6 +1732,15 @@ export namespace spanner_v1 {
1590
1732
  */
1591
1733
  word?: string | null;
1592
1734
  }
1735
+ /**
1736
+ * Output of query advisor analysis.
1737
+ */
1738
+ export interface Schema$QueryAdvisorResult {
1739
+ /**
1740
+ * Optional. Index Recommendation for a query. This is an optional field and the recommendation will only be available when the recommendation guarantees significant improvement in query performance.
1741
+ */
1742
+ indexAdvice?: Schema$IndexAdvice[];
1743
+ }
1593
1744
  /**
1594
1745
  * Query optimizer configuration.
1595
1746
  */
@@ -1611,6 +1762,10 @@ export namespace spanner_v1 {
1611
1762
  * The nodes in the query plan. Plan nodes are returned in pre-order starting with the plan root. Each PlanNode's `id` corresponds to its index in `plan_nodes`.
1612
1763
  */
1613
1764
  planNodes?: Schema$PlanNode[];
1765
+ /**
1766
+ * Optional. The advices/recommendations for a query. Currently this field will be serving index recommendations for a query.
1767
+ */
1768
+ queryAdvice?: Schema$QueryAdvisorResult;
1614
1769
  }
1615
1770
  /**
1616
1771
  * Message type to initiate a read-only transaction.
@@ -1653,6 +1808,10 @@ export namespace spanner_v1 {
1653
1808
  * If this is for a partitioned read and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.
1654
1809
  */
1655
1810
  dataBoostEnabled?: boolean | null;
1811
+ /**
1812
+ * Directed read options for this request.
1813
+ */
1814
+ directedReadOptions?: Schema$DirectedReadOptions;
1656
1815
  /**
1657
1816
  * If non-empty, the name of an index on table. This index is used instead of the table primary key when interpreting key_set and sorting result rows. See key_set for further information.
1658
1817
  */
@@ -1709,6 +1868,19 @@ export namespace spanner_v1 {
1709
1868
  */
1710
1869
  type?: string | null;
1711
1870
  }
1871
+ /**
1872
+ * The directed read replica selector. Callers must provide one or more of the following fields for replica selection: * `location` - The location must be one of the regions within the multi-region configuration of your database. * `type` - The type of the replica. Some examples of using replica_selectors are: * `location:us-east1` --\> The "us-east1" replica(s) of any available type will be used to process the request. * `type:READ_ONLY` --\> The "READ_ONLY" type replica(s) in nearest . available location will be used to process the request. * `location:us-east1 type:READ_ONLY` --\> The "READ_ONLY" type replica(s) in location "us-east1" will be used to process the request.
1873
+ */
1874
+ export interface Schema$ReplicaSelection {
1875
+ /**
1876
+ * The location or region of the serving requests, e.g. "us-east1".
1877
+ */
1878
+ location?: string | null;
1879
+ /**
1880
+ * The type of replica.
1881
+ */
1882
+ type?: string | null;
1883
+ }
1712
1884
  /**
1713
1885
  * Common request options for various APIs.
1714
1886
  */
@@ -2430,11 +2602,15 @@ export namespace spanner_v1 {
2430
2602
  export class Resource$Projects$Instanceconfigs {
2431
2603
  context: APIRequestContext;
2432
2604
  operations: Resource$Projects$Instanceconfigs$Operations;
2605
+ ssdCaches: Resource$Projects$Instanceconfigs$Ssdcaches;
2433
2606
  constructor(context: APIRequestContext) {
2434
2607
  this.context = context;
2435
2608
  this.operations = new Resource$Projects$Instanceconfigs$Operations(
2436
2609
  this.context
2437
2610
  );
2611
+ this.ssdCaches = new Resource$Projects$Instanceconfigs$Ssdcaches(
2612
+ this.context
2613
+ );
2438
2614
  }
2439
2615
 
2440
2616
  /**
@@ -2738,19 +2914,429 @@ export namespace spanner_v1 {
2738
2914
  | BodyResponseCallback<Schema$ListInstanceConfigsResponse>
2739
2915
  | BodyResponseCallback<Readable>,
2740
2916
  callback?:
2741
- | BodyResponseCallback<Schema$ListInstanceConfigsResponse>
2917
+ | BodyResponseCallback<Schema$ListInstanceConfigsResponse>
2918
+ | BodyResponseCallback<Readable>
2919
+ ):
2920
+ | void
2921
+ | GaxiosPromise<Schema$ListInstanceConfigsResponse>
2922
+ | GaxiosPromise<Readable> {
2923
+ let params = (paramsOrCallback ||
2924
+ {}) as Params$Resource$Projects$Instanceconfigs$List;
2925
+ let options = (optionsOrCallback || {}) as MethodOptions;
2926
+
2927
+ if (typeof paramsOrCallback === 'function') {
2928
+ callback = paramsOrCallback;
2929
+ params = {} as Params$Resource$Projects$Instanceconfigs$List;
2930
+ options = {};
2931
+ }
2932
+
2933
+ if (typeof optionsOrCallback === 'function') {
2934
+ callback = optionsOrCallback;
2935
+ options = {};
2936
+ }
2937
+
2938
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
2939
+ const parameters = {
2940
+ options: Object.assign(
2941
+ {
2942
+ url: (rootUrl + '/v1/{+parent}/instanceConfigs').replace(
2943
+ /([^:]\/)\/+/g,
2944
+ '$1'
2945
+ ),
2946
+ method: 'GET',
2947
+ },
2948
+ options
2949
+ ),
2950
+ params,
2951
+ requiredParams: ['parent'],
2952
+ pathParams: ['parent'],
2953
+ context: this.context,
2954
+ };
2955
+ if (callback) {
2956
+ createAPIRequest<Schema$ListInstanceConfigsResponse>(
2957
+ parameters,
2958
+ callback as BodyResponseCallback<unknown>
2959
+ );
2960
+ } else {
2961
+ return createAPIRequest<Schema$ListInstanceConfigsResponse>(parameters);
2962
+ }
2963
+ }
2964
+
2965
+ /**
2966
+ * Updates an instance config. The returned long-running operation can be used to track the progress of updating the instance. If the named instance config does not exist, returns `NOT_FOUND`. Only user managed configurations can be updated. Immediately after the request returns: * The instance config'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 config are rejected. * Reading the instance config 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 instance config's new values are readable via the API. * The instance config'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 config 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.
2967
+ *
2968
+ * @param params - Parameters for request
2969
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2970
+ * @param callback - Optional callback that handles the response.
2971
+ * @returns A promise if used with async/await, or void if used with a callback.
2972
+ */
2973
+ patch(
2974
+ params: Params$Resource$Projects$Instanceconfigs$Patch,
2975
+ options: StreamMethodOptions
2976
+ ): GaxiosPromise<Readable>;
2977
+ patch(
2978
+ params?: Params$Resource$Projects$Instanceconfigs$Patch,
2979
+ options?: MethodOptions
2980
+ ): GaxiosPromise<Schema$Operation>;
2981
+ patch(
2982
+ params: Params$Resource$Projects$Instanceconfigs$Patch,
2983
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2984
+ callback: BodyResponseCallback<Readable>
2985
+ ): void;
2986
+ patch(
2987
+ params: Params$Resource$Projects$Instanceconfigs$Patch,
2988
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2989
+ callback: BodyResponseCallback<Schema$Operation>
2990
+ ): void;
2991
+ patch(
2992
+ params: Params$Resource$Projects$Instanceconfigs$Patch,
2993
+ callback: BodyResponseCallback<Schema$Operation>
2994
+ ): void;
2995
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
2996
+ patch(
2997
+ paramsOrCallback?:
2998
+ | Params$Resource$Projects$Instanceconfigs$Patch
2999
+ | BodyResponseCallback<Schema$Operation>
3000
+ | BodyResponseCallback<Readable>,
3001
+ optionsOrCallback?:
3002
+ | MethodOptions
3003
+ | StreamMethodOptions
3004
+ | BodyResponseCallback<Schema$Operation>
3005
+ | BodyResponseCallback<Readable>,
3006
+ callback?:
3007
+ | BodyResponseCallback<Schema$Operation>
3008
+ | BodyResponseCallback<Readable>
3009
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3010
+ let params = (paramsOrCallback ||
3011
+ {}) as Params$Resource$Projects$Instanceconfigs$Patch;
3012
+ let options = (optionsOrCallback || {}) as MethodOptions;
3013
+
3014
+ if (typeof paramsOrCallback === 'function') {
3015
+ callback = paramsOrCallback;
3016
+ params = {} as Params$Resource$Projects$Instanceconfigs$Patch;
3017
+ options = {};
3018
+ }
3019
+
3020
+ if (typeof optionsOrCallback === 'function') {
3021
+ callback = optionsOrCallback;
3022
+ options = {};
3023
+ }
3024
+
3025
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
3026
+ const parameters = {
3027
+ options: Object.assign(
3028
+ {
3029
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3030
+ method: 'PATCH',
3031
+ },
3032
+ options
3033
+ ),
3034
+ params,
3035
+ requiredParams: ['name'],
3036
+ pathParams: ['name'],
3037
+ context: this.context,
3038
+ };
3039
+ if (callback) {
3040
+ createAPIRequest<Schema$Operation>(
3041
+ parameters,
3042
+ callback as BodyResponseCallback<unknown>
3043
+ );
3044
+ } else {
3045
+ return createAPIRequest<Schema$Operation>(parameters);
3046
+ }
3047
+ }
3048
+ }
3049
+
3050
+ export interface Params$Resource$Projects$Instanceconfigs$Create
3051
+ extends StandardParameters {
3052
+ /**
3053
+ * Required. The name of the project in which to create the instance config. Values are of the form `projects/`.
3054
+ */
3055
+ parent?: string;
3056
+
3057
+ /**
3058
+ * Request body metadata
3059
+ */
3060
+ requestBody?: Schema$CreateInstanceConfigRequest;
3061
+ }
3062
+ export interface Params$Resource$Projects$Instanceconfigs$Delete
3063
+ extends StandardParameters {
3064
+ /**
3065
+ * Used for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance config from overwriting each other. If not empty, the API only deletes the instance config when the etag provided matches the current status of the requested instance config. Otherwise, deletes the instance config without checking the current status of the requested instance config.
3066
+ */
3067
+ etag?: string;
3068
+ /**
3069
+ * Required. The name of the instance configuration to be deleted. Values are of the form `projects//instanceConfigs/`
3070
+ */
3071
+ name?: string;
3072
+ /**
3073
+ * An option to validate, but not actually execute, a request, and provide the same response.
3074
+ */
3075
+ validateOnly?: boolean;
3076
+ }
3077
+ export interface Params$Resource$Projects$Instanceconfigs$Get
3078
+ extends StandardParameters {
3079
+ /**
3080
+ * Required. The name of the requested instance configuration. Values are of the form `projects//instanceConfigs/`.
3081
+ */
3082
+ name?: string;
3083
+ }
3084
+ export interface Params$Resource$Projects$Instanceconfigs$List
3085
+ extends StandardParameters {
3086
+ /**
3087
+ * Number of instance configurations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.
3088
+ */
3089
+ pageSize?: number;
3090
+ /**
3091
+ * If non-empty, `page_token` should contain a next_page_token from a previous ListInstanceConfigsResponse.
3092
+ */
3093
+ pageToken?: string;
3094
+ /**
3095
+ * Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form `projects/`.
3096
+ */
3097
+ parent?: string;
3098
+ }
3099
+ export interface Params$Resource$Projects$Instanceconfigs$Patch
3100
+ extends StandardParameters {
3101
+ /**
3102
+ * A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`.
3103
+ */
3104
+ name?: string;
3105
+
3106
+ /**
3107
+ * Request body metadata
3108
+ */
3109
+ requestBody?: Schema$UpdateInstanceConfigRequest;
3110
+ }
3111
+
3112
+ export class Resource$Projects$Instanceconfigs$Operations {
3113
+ context: APIRequestContext;
3114
+ constructor(context: APIRequestContext) {
3115
+ this.context = context;
3116
+ }
3117
+
3118
+ /**
3119
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
3120
+ *
3121
+ * @param params - Parameters for request
3122
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3123
+ * @param callback - Optional callback that handles the response.
3124
+ * @returns A promise if used with async/await, or void if used with a callback.
3125
+ */
3126
+ cancel(
3127
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3128
+ options: StreamMethodOptions
3129
+ ): GaxiosPromise<Readable>;
3130
+ cancel(
3131
+ params?: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3132
+ options?: MethodOptions
3133
+ ): GaxiosPromise<Schema$Empty>;
3134
+ cancel(
3135
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3136
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3137
+ callback: BodyResponseCallback<Readable>
3138
+ ): void;
3139
+ cancel(
3140
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3141
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
3142
+ callback: BodyResponseCallback<Schema$Empty>
3143
+ ): void;
3144
+ cancel(
3145
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3146
+ callback: BodyResponseCallback<Schema$Empty>
3147
+ ): void;
3148
+ cancel(callback: BodyResponseCallback<Schema$Empty>): void;
3149
+ cancel(
3150
+ paramsOrCallback?:
3151
+ | Params$Resource$Projects$Instanceconfigs$Operations$Cancel
3152
+ | BodyResponseCallback<Schema$Empty>
3153
+ | BodyResponseCallback<Readable>,
3154
+ optionsOrCallback?:
3155
+ | MethodOptions
3156
+ | StreamMethodOptions
3157
+ | BodyResponseCallback<Schema$Empty>
3158
+ | BodyResponseCallback<Readable>,
3159
+ callback?:
3160
+ | BodyResponseCallback<Schema$Empty>
3161
+ | BodyResponseCallback<Readable>
3162
+ ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3163
+ let params = (paramsOrCallback ||
3164
+ {}) as Params$Resource$Projects$Instanceconfigs$Operations$Cancel;
3165
+ let options = (optionsOrCallback || {}) as MethodOptions;
3166
+
3167
+ if (typeof paramsOrCallback === 'function') {
3168
+ callback = paramsOrCallback;
3169
+ params =
3170
+ {} as Params$Resource$Projects$Instanceconfigs$Operations$Cancel;
3171
+ options = {};
3172
+ }
3173
+
3174
+ if (typeof optionsOrCallback === 'function') {
3175
+ callback = optionsOrCallback;
3176
+ options = {};
3177
+ }
3178
+
3179
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
3180
+ const parameters = {
3181
+ options: Object.assign(
3182
+ {
3183
+ url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
3184
+ method: 'POST',
3185
+ },
3186
+ options
3187
+ ),
3188
+ params,
3189
+ requiredParams: ['name'],
3190
+ pathParams: ['name'],
3191
+ context: this.context,
3192
+ };
3193
+ if (callback) {
3194
+ createAPIRequest<Schema$Empty>(
3195
+ parameters,
3196
+ callback as BodyResponseCallback<unknown>
3197
+ );
3198
+ } else {
3199
+ return createAPIRequest<Schema$Empty>(parameters);
3200
+ }
3201
+ }
3202
+
3203
+ /**
3204
+ * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
3205
+ *
3206
+ * @param params - Parameters for request
3207
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3208
+ * @param callback - Optional callback that handles the response.
3209
+ * @returns A promise if used with async/await, or void if used with a callback.
3210
+ */
3211
+ delete(
3212
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3213
+ options: StreamMethodOptions
3214
+ ): GaxiosPromise<Readable>;
3215
+ delete(
3216
+ params?: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3217
+ options?: MethodOptions
3218
+ ): GaxiosPromise<Schema$Empty>;
3219
+ delete(
3220
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3221
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3222
+ callback: BodyResponseCallback<Readable>
3223
+ ): void;
3224
+ delete(
3225
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3226
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
3227
+ callback: BodyResponseCallback<Schema$Empty>
3228
+ ): void;
3229
+ delete(
3230
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3231
+ callback: BodyResponseCallback<Schema$Empty>
3232
+ ): void;
3233
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
3234
+ delete(
3235
+ paramsOrCallback?:
3236
+ | Params$Resource$Projects$Instanceconfigs$Operations$Delete
3237
+ | BodyResponseCallback<Schema$Empty>
3238
+ | BodyResponseCallback<Readable>,
3239
+ optionsOrCallback?:
3240
+ | MethodOptions
3241
+ | StreamMethodOptions
3242
+ | BodyResponseCallback<Schema$Empty>
3243
+ | BodyResponseCallback<Readable>,
3244
+ callback?:
3245
+ | BodyResponseCallback<Schema$Empty>
3246
+ | BodyResponseCallback<Readable>
3247
+ ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3248
+ let params = (paramsOrCallback ||
3249
+ {}) as Params$Resource$Projects$Instanceconfigs$Operations$Delete;
3250
+ let options = (optionsOrCallback || {}) as MethodOptions;
3251
+
3252
+ if (typeof paramsOrCallback === 'function') {
3253
+ callback = paramsOrCallback;
3254
+ params =
3255
+ {} as Params$Resource$Projects$Instanceconfigs$Operations$Delete;
3256
+ options = {};
3257
+ }
3258
+
3259
+ if (typeof optionsOrCallback === 'function') {
3260
+ callback = optionsOrCallback;
3261
+ options = {};
3262
+ }
3263
+
3264
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
3265
+ const parameters = {
3266
+ options: Object.assign(
3267
+ {
3268
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3269
+ method: 'DELETE',
3270
+ },
3271
+ options
3272
+ ),
3273
+ params,
3274
+ requiredParams: ['name'],
3275
+ pathParams: ['name'],
3276
+ context: this.context,
3277
+ };
3278
+ if (callback) {
3279
+ createAPIRequest<Schema$Empty>(
3280
+ parameters,
3281
+ callback as BodyResponseCallback<unknown>
3282
+ );
3283
+ } else {
3284
+ return createAPIRequest<Schema$Empty>(parameters);
3285
+ }
3286
+ }
3287
+
3288
+ /**
3289
+ * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
3290
+ *
3291
+ * @param params - Parameters for request
3292
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3293
+ * @param callback - Optional callback that handles the response.
3294
+ * @returns A promise if used with async/await, or void if used with a callback.
3295
+ */
3296
+ get(
3297
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3298
+ options: StreamMethodOptions
3299
+ ): GaxiosPromise<Readable>;
3300
+ get(
3301
+ params?: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3302
+ options?: MethodOptions
3303
+ ): GaxiosPromise<Schema$Operation>;
3304
+ get(
3305
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3306
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3307
+ callback: BodyResponseCallback<Readable>
3308
+ ): void;
3309
+ get(
3310
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3311
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3312
+ callback: BodyResponseCallback<Schema$Operation>
3313
+ ): void;
3314
+ get(
3315
+ params: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3316
+ callback: BodyResponseCallback<Schema$Operation>
3317
+ ): void;
3318
+ get(callback: BodyResponseCallback<Schema$Operation>): void;
3319
+ get(
3320
+ paramsOrCallback?:
3321
+ | Params$Resource$Projects$Instanceconfigs$Operations$Get
3322
+ | BodyResponseCallback<Schema$Operation>
3323
+ | BodyResponseCallback<Readable>,
3324
+ optionsOrCallback?:
3325
+ | MethodOptions
3326
+ | StreamMethodOptions
3327
+ | BodyResponseCallback<Schema$Operation>
3328
+ | BodyResponseCallback<Readable>,
3329
+ callback?:
3330
+ | BodyResponseCallback<Schema$Operation>
2742
3331
  | BodyResponseCallback<Readable>
2743
- ):
2744
- | void
2745
- | GaxiosPromise<Schema$ListInstanceConfigsResponse>
2746
- | GaxiosPromise<Readable> {
3332
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2747
3333
  let params = (paramsOrCallback ||
2748
- {}) as Params$Resource$Projects$Instanceconfigs$List;
3334
+ {}) as Params$Resource$Projects$Instanceconfigs$Operations$Get;
2749
3335
  let options = (optionsOrCallback || {}) as MethodOptions;
2750
3336
 
2751
3337
  if (typeof paramsOrCallback === 'function') {
2752
3338
  callback = paramsOrCallback;
2753
- params = {} as Params$Resource$Projects$Instanceconfigs$List;
3339
+ params = {} as Params$Resource$Projects$Instanceconfigs$Operations$Get;
2754
3340
  options = {};
2755
3341
  }
2756
3342
 
@@ -2763,81 +3349,83 @@ export namespace spanner_v1 {
2763
3349
  const parameters = {
2764
3350
  options: Object.assign(
2765
3351
  {
2766
- url: (rootUrl + '/v1/{+parent}/instanceConfigs').replace(
2767
- /([^:]\/)\/+/g,
2768
- '$1'
2769
- ),
3352
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2770
3353
  method: 'GET',
2771
3354
  },
2772
3355
  options
2773
3356
  ),
2774
3357
  params,
2775
- requiredParams: ['parent'],
2776
- pathParams: ['parent'],
3358
+ requiredParams: ['name'],
3359
+ pathParams: ['name'],
2777
3360
  context: this.context,
2778
3361
  };
2779
3362
  if (callback) {
2780
- createAPIRequest<Schema$ListInstanceConfigsResponse>(
3363
+ createAPIRequest<Schema$Operation>(
2781
3364
  parameters,
2782
3365
  callback as BodyResponseCallback<unknown>
2783
3366
  );
2784
3367
  } else {
2785
- return createAPIRequest<Schema$ListInstanceConfigsResponse>(parameters);
3368
+ return createAPIRequest<Schema$Operation>(parameters);
2786
3369
  }
2787
3370
  }
2788
3371
 
2789
3372
  /**
2790
- * Updates an instance config. The returned long-running operation can be used to track the progress of updating the instance. If the named instance config does not exist, returns `NOT_FOUND`. Only user managed configurations can be updated. Immediately after the request returns: * The instance config'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 config are rejected. * Reading the instance config 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 instance config's new values are readable via the API. * The instance config'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 config 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.
3373
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
2791
3374
  *
2792
3375
  * @param params - Parameters for request
2793
3376
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2794
3377
  * @param callback - Optional callback that handles the response.
2795
3378
  * @returns A promise if used with async/await, or void if used with a callback.
2796
3379
  */
2797
- patch(
2798
- params: Params$Resource$Projects$Instanceconfigs$Patch,
3380
+ list(
3381
+ params: Params$Resource$Projects$Instanceconfigs$Operations$List,
2799
3382
  options: StreamMethodOptions
2800
3383
  ): GaxiosPromise<Readable>;
2801
- patch(
2802
- params?: Params$Resource$Projects$Instanceconfigs$Patch,
3384
+ list(
3385
+ params?: Params$Resource$Projects$Instanceconfigs$Operations$List,
2803
3386
  options?: MethodOptions
2804
- ): GaxiosPromise<Schema$Operation>;
2805
- patch(
2806
- params: Params$Resource$Projects$Instanceconfigs$Patch,
3387
+ ): GaxiosPromise<Schema$ListOperationsResponse>;
3388
+ list(
3389
+ params: Params$Resource$Projects$Instanceconfigs$Operations$List,
2807
3390
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
2808
3391
  callback: BodyResponseCallback<Readable>
2809
3392
  ): void;
2810
- patch(
2811
- params: Params$Resource$Projects$Instanceconfigs$Patch,
2812
- options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2813
- callback: BodyResponseCallback<Schema$Operation>
3393
+ list(
3394
+ params: Params$Resource$Projects$Instanceconfigs$Operations$List,
3395
+ options:
3396
+ | MethodOptions
3397
+ | BodyResponseCallback<Schema$ListOperationsResponse>,
3398
+ callback: BodyResponseCallback<Schema$ListOperationsResponse>
2814
3399
  ): void;
2815
- patch(
2816
- params: Params$Resource$Projects$Instanceconfigs$Patch,
2817
- callback: BodyResponseCallback<Schema$Operation>
3400
+ list(
3401
+ params: Params$Resource$Projects$Instanceconfigs$Operations$List,
3402
+ callback: BodyResponseCallback<Schema$ListOperationsResponse>
2818
3403
  ): void;
2819
- patch(callback: BodyResponseCallback<Schema$Operation>): void;
2820
- patch(
3404
+ list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
3405
+ list(
2821
3406
  paramsOrCallback?:
2822
- | Params$Resource$Projects$Instanceconfigs$Patch
2823
- | BodyResponseCallback<Schema$Operation>
3407
+ | Params$Resource$Projects$Instanceconfigs$Operations$List
3408
+ | BodyResponseCallback<Schema$ListOperationsResponse>
2824
3409
  | BodyResponseCallback<Readable>,
2825
3410
  optionsOrCallback?:
2826
3411
  | MethodOptions
2827
3412
  | StreamMethodOptions
2828
- | BodyResponseCallback<Schema$Operation>
3413
+ | BodyResponseCallback<Schema$ListOperationsResponse>
2829
3414
  | BodyResponseCallback<Readable>,
2830
3415
  callback?:
2831
- | BodyResponseCallback<Schema$Operation>
3416
+ | BodyResponseCallback<Schema$ListOperationsResponse>
2832
3417
  | BodyResponseCallback<Readable>
2833
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3418
+ ):
3419
+ | void
3420
+ | GaxiosPromise<Schema$ListOperationsResponse>
3421
+ | GaxiosPromise<Readable> {
2834
3422
  let params = (paramsOrCallback ||
2835
- {}) as Params$Resource$Projects$Instanceconfigs$Patch;
3423
+ {}) as Params$Resource$Projects$Instanceconfigs$Operations$List;
2836
3424
  let options = (optionsOrCallback || {}) as MethodOptions;
2837
3425
 
2838
3426
  if (typeof paramsOrCallback === 'function') {
2839
3427
  callback = paramsOrCallback;
2840
- params = {} as Params$Resource$Projects$Instanceconfigs$Patch;
3428
+ params = {} as Params$Resource$Projects$Instanceconfigs$Operations$List;
2841
3429
  options = {};
2842
3430
  }
2843
3431
 
@@ -2851,7 +3439,7 @@ export namespace spanner_v1 {
2851
3439
  options: Object.assign(
2852
3440
  {
2853
3441
  url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2854
- method: 'PATCH',
3442
+ method: 'GET',
2855
3443
  },
2856
3444
  options
2857
3445
  ),
@@ -2861,79 +3449,70 @@ export namespace spanner_v1 {
2861
3449
  context: this.context,
2862
3450
  };
2863
3451
  if (callback) {
2864
- createAPIRequest<Schema$Operation>(
3452
+ createAPIRequest<Schema$ListOperationsResponse>(
2865
3453
  parameters,
2866
3454
  callback as BodyResponseCallback<unknown>
2867
3455
  );
2868
3456
  } else {
2869
- return createAPIRequest<Schema$Operation>(parameters);
3457
+ return createAPIRequest<Schema$ListOperationsResponse>(parameters);
2870
3458
  }
2871
3459
  }
2872
3460
  }
2873
3461
 
2874
- export interface Params$Resource$Projects$Instanceconfigs$Create
3462
+ export interface Params$Resource$Projects$Instanceconfigs$Operations$Cancel
2875
3463
  extends StandardParameters {
2876
3464
  /**
2877
- * Required. The name of the project in which to create the instance config. Values are of the form `projects/`.
2878
- */
2879
- parent?: string;
2880
-
2881
- /**
2882
- * Request body metadata
3465
+ * The name of the operation resource to be cancelled.
2883
3466
  */
2884
- requestBody?: Schema$CreateInstanceConfigRequest;
3467
+ name?: string;
2885
3468
  }
2886
- export interface Params$Resource$Projects$Instanceconfigs$Delete
3469
+ export interface Params$Resource$Projects$Instanceconfigs$Operations$Delete
2887
3470
  extends StandardParameters {
2888
3471
  /**
2889
- * Used for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance config from overwriting each other. If not empty, the API only deletes the instance config when the etag provided matches the current status of the requested instance config. Otherwise, deletes the instance config without checking the current status of the requested instance config.
2890
- */
2891
- etag?: string;
2892
- /**
2893
- * Required. The name of the instance configuration to be deleted. Values are of the form `projects//instanceConfigs/`
3472
+ * The name of the operation resource to be deleted.
2894
3473
  */
2895
3474
  name?: string;
2896
- /**
2897
- * An option to validate, but not actually execute, a request, and provide the same response.
2898
- */
2899
- validateOnly?: boolean;
2900
3475
  }
2901
- export interface Params$Resource$Projects$Instanceconfigs$Get
3476
+ export interface Params$Resource$Projects$Instanceconfigs$Operations$Get
2902
3477
  extends StandardParameters {
2903
3478
  /**
2904
- * Required. The name of the requested instance configuration. Values are of the form `projects//instanceConfigs/`.
3479
+ * The name of the operation resource.
2905
3480
  */
2906
3481
  name?: string;
2907
3482
  }
2908
- export interface Params$Resource$Projects$Instanceconfigs$List
3483
+ export interface Params$Resource$Projects$Instanceconfigs$Operations$List
2909
3484
  extends StandardParameters {
2910
3485
  /**
2911
- * Number of instance configurations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.
3486
+ * The standard list filter.
2912
3487
  */
2913
- pageSize?: number;
3488
+ filter?: string;
2914
3489
  /**
2915
- * If non-empty, `page_token` should contain a next_page_token from a previous ListInstanceConfigsResponse.
3490
+ * The name of the operation's parent resource.
2916
3491
  */
2917
- pageToken?: string;
3492
+ name?: string;
2918
3493
  /**
2919
- * Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form `projects/`.
3494
+ * The standard list page size.
2920
3495
  */
2921
- parent?: string;
2922
- }
2923
- export interface Params$Resource$Projects$Instanceconfigs$Patch
2924
- extends StandardParameters {
3496
+ pageSize?: number;
2925
3497
  /**
2926
- * A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`.
3498
+ * The standard list page token.
2927
3499
  */
2928
- name?: string;
3500
+ pageToken?: string;
3501
+ }
2929
3502
 
2930
- /**
2931
- * Request body metadata
2932
- */
2933
- requestBody?: Schema$UpdateInstanceConfigRequest;
3503
+ export class Resource$Projects$Instanceconfigs$Ssdcaches {
3504
+ context: APIRequestContext;
3505
+ operations: Resource$Projects$Instanceconfigs$Ssdcaches$Operations;
3506
+ constructor(context: APIRequestContext) {
3507
+ this.context = context;
3508
+ this.operations =
3509
+ new Resource$Projects$Instanceconfigs$Ssdcaches$Operations(
3510
+ this.context
3511
+ );
3512
+ }
2934
3513
  }
2935
3514
 
2936
- export class Resource$Projects$Instanceconfigs$Operations {
3515
+ export class Resource$Projects$Instanceconfigs$Ssdcaches$Operations {
2937
3516
  context: APIRequestContext;
2938
3517
  constructor(context: APIRequestContext) {
2939
3518
  this.context = context;
@@ -2948,31 +3527,31 @@ export namespace spanner_v1 {
2948
3527
  * @returns A promise if used with async/await, or void if used with a callback.
2949
3528
  */
2950
3529
  cancel(
2951
- params: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3530
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel,
2952
3531
  options: StreamMethodOptions
2953
3532
  ): GaxiosPromise<Readable>;
2954
3533
  cancel(
2955
- params?: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3534
+ params?: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel,
2956
3535
  options?: MethodOptions
2957
3536
  ): GaxiosPromise<Schema$Empty>;
2958
3537
  cancel(
2959
- params: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3538
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel,
2960
3539
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
2961
3540
  callback: BodyResponseCallback<Readable>
2962
3541
  ): void;
2963
3542
  cancel(
2964
- params: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3543
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel,
2965
3544
  options: MethodOptions | BodyResponseCallback<Schema$Empty>,
2966
3545
  callback: BodyResponseCallback<Schema$Empty>
2967
3546
  ): void;
2968
3547
  cancel(
2969
- params: Params$Resource$Projects$Instanceconfigs$Operations$Cancel,
3548
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel,
2970
3549
  callback: BodyResponseCallback<Schema$Empty>
2971
3550
  ): void;
2972
3551
  cancel(callback: BodyResponseCallback<Schema$Empty>): void;
2973
3552
  cancel(
2974
3553
  paramsOrCallback?:
2975
- | Params$Resource$Projects$Instanceconfigs$Operations$Cancel
3554
+ | Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel
2976
3555
  | BodyResponseCallback<Schema$Empty>
2977
3556
  | BodyResponseCallback<Readable>,
2978
3557
  optionsOrCallback?:
@@ -2985,13 +3564,13 @@ export namespace spanner_v1 {
2985
3564
  | BodyResponseCallback<Readable>
2986
3565
  ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
2987
3566
  let params = (paramsOrCallback ||
2988
- {}) as Params$Resource$Projects$Instanceconfigs$Operations$Cancel;
3567
+ {}) as Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel;
2989
3568
  let options = (optionsOrCallback || {}) as MethodOptions;
2990
3569
 
2991
3570
  if (typeof paramsOrCallback === 'function') {
2992
3571
  callback = paramsOrCallback;
2993
3572
  params =
2994
- {} as Params$Resource$Projects$Instanceconfigs$Operations$Cancel;
3573
+ {} as Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel;
2995
3574
  options = {};
2996
3575
  }
2997
3576
 
@@ -3033,31 +3612,31 @@ export namespace spanner_v1 {
3033
3612
  * @returns A promise if used with async/await, or void if used with a callback.
3034
3613
  */
3035
3614
  delete(
3036
- params: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3615
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete,
3037
3616
  options: StreamMethodOptions
3038
3617
  ): GaxiosPromise<Readable>;
3039
3618
  delete(
3040
- params?: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3619
+ params?: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete,
3041
3620
  options?: MethodOptions
3042
3621
  ): GaxiosPromise<Schema$Empty>;
3043
3622
  delete(
3044
- params: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3623
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete,
3045
3624
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
3046
3625
  callback: BodyResponseCallback<Readable>
3047
3626
  ): void;
3048
3627
  delete(
3049
- params: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3628
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete,
3050
3629
  options: MethodOptions | BodyResponseCallback<Schema$Empty>,
3051
3630
  callback: BodyResponseCallback<Schema$Empty>
3052
3631
  ): void;
3053
3632
  delete(
3054
- params: Params$Resource$Projects$Instanceconfigs$Operations$Delete,
3633
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete,
3055
3634
  callback: BodyResponseCallback<Schema$Empty>
3056
3635
  ): void;
3057
3636
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
3058
3637
  delete(
3059
3638
  paramsOrCallback?:
3060
- | Params$Resource$Projects$Instanceconfigs$Operations$Delete
3639
+ | Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete
3061
3640
  | BodyResponseCallback<Schema$Empty>
3062
3641
  | BodyResponseCallback<Readable>,
3063
3642
  optionsOrCallback?:
@@ -3070,13 +3649,13 @@ export namespace spanner_v1 {
3070
3649
  | BodyResponseCallback<Readable>
3071
3650
  ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3072
3651
  let params = (paramsOrCallback ||
3073
- {}) as Params$Resource$Projects$Instanceconfigs$Operations$Delete;
3652
+ {}) as Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete;
3074
3653
  let options = (optionsOrCallback || {}) as MethodOptions;
3075
3654
 
3076
3655
  if (typeof paramsOrCallback === 'function') {
3077
3656
  callback = paramsOrCallback;
3078
3657
  params =
3079
- {} as Params$Resource$Projects$Instanceconfigs$Operations$Delete;
3658
+ {} as Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete;
3080
3659
  options = {};
3081
3660
  }
3082
3661
 
@@ -3118,31 +3697,31 @@ export namespace spanner_v1 {
3118
3697
  * @returns A promise if used with async/await, or void if used with a callback.
3119
3698
  */
3120
3699
  get(
3121
- params: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3700
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get,
3122
3701
  options: StreamMethodOptions
3123
3702
  ): GaxiosPromise<Readable>;
3124
3703
  get(
3125
- params?: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3704
+ params?: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get,
3126
3705
  options?: MethodOptions
3127
3706
  ): GaxiosPromise<Schema$Operation>;
3128
3707
  get(
3129
- params: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3708
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get,
3130
3709
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
3131
3710
  callback: BodyResponseCallback<Readable>
3132
3711
  ): void;
3133
3712
  get(
3134
- params: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3713
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get,
3135
3714
  options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3136
3715
  callback: BodyResponseCallback<Schema$Operation>
3137
3716
  ): void;
3138
3717
  get(
3139
- params: Params$Resource$Projects$Instanceconfigs$Operations$Get,
3718
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get,
3140
3719
  callback: BodyResponseCallback<Schema$Operation>
3141
3720
  ): void;
3142
3721
  get(callback: BodyResponseCallback<Schema$Operation>): void;
3143
3722
  get(
3144
3723
  paramsOrCallback?:
3145
- | Params$Resource$Projects$Instanceconfigs$Operations$Get
3724
+ | Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get
3146
3725
  | BodyResponseCallback<Schema$Operation>
3147
3726
  | BodyResponseCallback<Readable>,
3148
3727
  optionsOrCallback?:
@@ -3155,12 +3734,13 @@ export namespace spanner_v1 {
3155
3734
  | BodyResponseCallback<Readable>
3156
3735
  ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3157
3736
  let params = (paramsOrCallback ||
3158
- {}) as Params$Resource$Projects$Instanceconfigs$Operations$Get;
3737
+ {}) as Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get;
3159
3738
  let options = (optionsOrCallback || {}) as MethodOptions;
3160
3739
 
3161
3740
  if (typeof paramsOrCallback === 'function') {
3162
3741
  callback = paramsOrCallback;
3163
- params = {} as Params$Resource$Projects$Instanceconfigs$Operations$Get;
3742
+ params =
3743
+ {} as Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get;
3164
3744
  options = {};
3165
3745
  }
3166
3746
 
@@ -3202,33 +3782,33 @@ export namespace spanner_v1 {
3202
3782
  * @returns A promise if used with async/await, or void if used with a callback.
3203
3783
  */
3204
3784
  list(
3205
- params: Params$Resource$Projects$Instanceconfigs$Operations$List,
3785
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List,
3206
3786
  options: StreamMethodOptions
3207
3787
  ): GaxiosPromise<Readable>;
3208
3788
  list(
3209
- params?: Params$Resource$Projects$Instanceconfigs$Operations$List,
3789
+ params?: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List,
3210
3790
  options?: MethodOptions
3211
3791
  ): GaxiosPromise<Schema$ListOperationsResponse>;
3212
3792
  list(
3213
- params: Params$Resource$Projects$Instanceconfigs$Operations$List,
3793
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List,
3214
3794
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
3215
3795
  callback: BodyResponseCallback<Readable>
3216
3796
  ): void;
3217
3797
  list(
3218
- params: Params$Resource$Projects$Instanceconfigs$Operations$List,
3798
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List,
3219
3799
  options:
3220
3800
  | MethodOptions
3221
3801
  | BodyResponseCallback<Schema$ListOperationsResponse>,
3222
3802
  callback: BodyResponseCallback<Schema$ListOperationsResponse>
3223
3803
  ): void;
3224
3804
  list(
3225
- params: Params$Resource$Projects$Instanceconfigs$Operations$List,
3805
+ params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List,
3226
3806
  callback: BodyResponseCallback<Schema$ListOperationsResponse>
3227
3807
  ): void;
3228
3808
  list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
3229
3809
  list(
3230
3810
  paramsOrCallback?:
3231
- | Params$Resource$Projects$Instanceconfigs$Operations$List
3811
+ | Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List
3232
3812
  | BodyResponseCallback<Schema$ListOperationsResponse>
3233
3813
  | BodyResponseCallback<Readable>,
3234
3814
  optionsOrCallback?:
@@ -3244,12 +3824,13 @@ export namespace spanner_v1 {
3244
3824
  | GaxiosPromise<Schema$ListOperationsResponse>
3245
3825
  | GaxiosPromise<Readable> {
3246
3826
  let params = (paramsOrCallback ||
3247
- {}) as Params$Resource$Projects$Instanceconfigs$Operations$List;
3827
+ {}) as Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List;
3248
3828
  let options = (optionsOrCallback || {}) as MethodOptions;
3249
3829
 
3250
3830
  if (typeof paramsOrCallback === 'function') {
3251
3831
  callback = paramsOrCallback;
3252
- params = {} as Params$Resource$Projects$Instanceconfigs$Operations$List;
3832
+ params =
3833
+ {} as Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List;
3253
3834
  options = {};
3254
3835
  }
3255
3836
 
@@ -3283,28 +3864,28 @@ export namespace spanner_v1 {
3283
3864
  }
3284
3865
  }
3285
3866
 
3286
- export interface Params$Resource$Projects$Instanceconfigs$Operations$Cancel
3867
+ export interface Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel
3287
3868
  extends StandardParameters {
3288
3869
  /**
3289
3870
  * The name of the operation resource to be cancelled.
3290
3871
  */
3291
3872
  name?: string;
3292
3873
  }
3293
- export interface Params$Resource$Projects$Instanceconfigs$Operations$Delete
3874
+ export interface Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete
3294
3875
  extends StandardParameters {
3295
3876
  /**
3296
3877
  * The name of the operation resource to be deleted.
3297
3878
  */
3298
3879
  name?: string;
3299
3880
  }
3300
- export interface Params$Resource$Projects$Instanceconfigs$Operations$Get
3881
+ export interface Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get
3301
3882
  extends StandardParameters {
3302
3883
  /**
3303
3884
  * The name of the operation resource.
3304
3885
  */
3305
3886
  name?: string;
3306
3887
  }
3307
- export interface Params$Resource$Projects$Instanceconfigs$Operations$List
3888
+ export interface Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List
3308
3889
  extends StandardParameters {
3309
3890
  /**
3310
3891
  * The standard list filter.
@@ -7642,6 +8223,97 @@ export namespace spanner_v1 {
7642
8223
  }
7643
8224
  }
7644
8225
 
8226
+ /**
8227
+ * Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or if you use generated or commit timestamp-based keys, it may result in additional rows being added to the mutation's table. We recommend structuring your mutation groups to be idempotent to avoid this issue.
8228
+ *
8229
+ * @param params - Parameters for request
8230
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
8231
+ * @param callback - Optional callback that handles the response.
8232
+ * @returns A promise if used with async/await, or void if used with a callback.
8233
+ */
8234
+ batchWrite(
8235
+ params: Params$Resource$Projects$Instances$Databases$Sessions$Batchwrite,
8236
+ options: StreamMethodOptions
8237
+ ): GaxiosPromise<Readable>;
8238
+ batchWrite(
8239
+ params?: Params$Resource$Projects$Instances$Databases$Sessions$Batchwrite,
8240
+ options?: MethodOptions
8241
+ ): GaxiosPromise<Schema$BatchWriteResponse>;
8242
+ batchWrite(
8243
+ params: Params$Resource$Projects$Instances$Databases$Sessions$Batchwrite,
8244
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
8245
+ callback: BodyResponseCallback<Readable>
8246
+ ): void;
8247
+ batchWrite(
8248
+ params: Params$Resource$Projects$Instances$Databases$Sessions$Batchwrite,
8249
+ options: MethodOptions | BodyResponseCallback<Schema$BatchWriteResponse>,
8250
+ callback: BodyResponseCallback<Schema$BatchWriteResponse>
8251
+ ): void;
8252
+ batchWrite(
8253
+ params: Params$Resource$Projects$Instances$Databases$Sessions$Batchwrite,
8254
+ callback: BodyResponseCallback<Schema$BatchWriteResponse>
8255
+ ): void;
8256
+ batchWrite(callback: BodyResponseCallback<Schema$BatchWriteResponse>): void;
8257
+ batchWrite(
8258
+ paramsOrCallback?:
8259
+ | Params$Resource$Projects$Instances$Databases$Sessions$Batchwrite
8260
+ | BodyResponseCallback<Schema$BatchWriteResponse>
8261
+ | BodyResponseCallback<Readable>,
8262
+ optionsOrCallback?:
8263
+ | MethodOptions
8264
+ | StreamMethodOptions
8265
+ | BodyResponseCallback<Schema$BatchWriteResponse>
8266
+ | BodyResponseCallback<Readable>,
8267
+ callback?:
8268
+ | BodyResponseCallback<Schema$BatchWriteResponse>
8269
+ | BodyResponseCallback<Readable>
8270
+ ):
8271
+ | void
8272
+ | GaxiosPromise<Schema$BatchWriteResponse>
8273
+ | GaxiosPromise<Readable> {
8274
+ let params = (paramsOrCallback ||
8275
+ {}) as Params$Resource$Projects$Instances$Databases$Sessions$Batchwrite;
8276
+ let options = (optionsOrCallback || {}) as MethodOptions;
8277
+
8278
+ if (typeof paramsOrCallback === 'function') {
8279
+ callback = paramsOrCallback;
8280
+ params =
8281
+ {} as Params$Resource$Projects$Instances$Databases$Sessions$Batchwrite;
8282
+ options = {};
8283
+ }
8284
+
8285
+ if (typeof optionsOrCallback === 'function') {
8286
+ callback = optionsOrCallback;
8287
+ options = {};
8288
+ }
8289
+
8290
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
8291
+ const parameters = {
8292
+ options: Object.assign(
8293
+ {
8294
+ url: (rootUrl + '/v1/{+session}:batchWrite').replace(
8295
+ /([^:]\/)\/+/g,
8296
+ '$1'
8297
+ ),
8298
+ method: 'POST',
8299
+ },
8300
+ options
8301
+ ),
8302
+ params,
8303
+ requiredParams: ['session'],
8304
+ pathParams: ['session'],
8305
+ context: this.context,
8306
+ };
8307
+ if (callback) {
8308
+ createAPIRequest<Schema$BatchWriteResponse>(
8309
+ parameters,
8310
+ callback as BodyResponseCallback<unknown>
8311
+ );
8312
+ } else {
8313
+ return createAPIRequest<Schema$BatchWriteResponse>(parameters);
8314
+ }
8315
+ }
8316
+
7645
8317
  /**
7646
8318
  * Begins a new transaction. This step can often be skipped: Read, ExecuteSql and Commit can begin a new transaction as a side-effect.
7647
8319
  *
@@ -8907,6 +9579,18 @@ export namespace spanner_v1 {
8907
9579
  */
8908
9580
  requestBody?: Schema$BatchCreateSessionsRequest;
8909
9581
  }
9582
+ export interface Params$Resource$Projects$Instances$Databases$Sessions$Batchwrite
9583
+ extends StandardParameters {
9584
+ /**
9585
+ * Required. The session in which the batch request is to be run.
9586
+ */
9587
+ session?: string;
9588
+
9589
+ /**
9590
+ * Request body metadata
9591
+ */
9592
+ requestBody?: Schema$BatchWriteRequest;
9593
+ }
8910
9594
  export interface Params$Resource$Projects$Instances$Databases$Sessions$Begintransaction
8911
9595
  extends StandardParameters {
8912
9596
  /**