@google-cloud/spanner 5.15.0 → 5.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +55 -53
- package/build/protos/protos.d.ts +2 -1
- package/build/protos/protos.js +7 -0
- package/build/protos/protos.json +14 -1
- package/build/src/backup.d.ts +214 -0
- package/build/src/backup.js +4 -196
- package/build/src/batch-transaction.d.ts +6 -0
- package/build/src/batch-transaction.js +6 -0
- package/build/src/codec.d.ts +4 -0
- package/build/src/codec.js +4 -0
- package/build/src/database.d.ts +1244 -22
- package/build/src/database.js +36 -1184
- package/build/src/index.d.ts +366 -17
- package/build/src/index.js +39 -312
- package/build/src/instance.d.ts +526 -0
- package/build/src/instance.js +18 -498
- package/build/src/session-pool.d.ts +5 -5
- package/build/src/session-pool.js +13 -8
- package/build/src/session.d.ts +98 -0
- package/build/src/session.js +16 -82
- package/build/src/table.d.ts +645 -0
- package/build/src/table.js +4 -623
- package/build/src/transaction.d.ts +509 -19
- package/build/src/transaction.js +60 -443
- package/build/src/v1/database_admin_client.d.ts +666 -40
- package/build/src/v1/database_admin_client.js +32 -706
- package/build/src/v1/gapic_metadata.json +1 -1
- package/build/src/v1/instance_admin_client.d.ts +357 -20
- package/build/src/v1/instance_admin_client.js +16 -377
- package/build/src/v1/spanner_client.d.ts +586 -13
- package/build/src/v1/spanner_client.js +10 -596
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
|
|
4
4
|
"language": "typescript",
|
|
5
5
|
"protoPackage": "google.spanner.admin.instance.v1",
|
|
6
|
-
"libraryPackage": "
|
|
6
|
+
"libraryPackage": "@google-cloud/spanner",
|
|
7
7
|
"services": {
|
|
8
8
|
"InstanceAdmin": {
|
|
9
9
|
"clients": {
|
|
@@ -122,24 +122,232 @@ export declare class InstanceAdminClient {
|
|
|
122
122
|
static get scopes(): string[];
|
|
123
123
|
getProjectId(): Promise<string>;
|
|
124
124
|
getProjectId(callback: Callback<string, undefined, undefined>): void;
|
|
125
|
+
/**
|
|
126
|
+
* Gets information about a particular instance configuration.
|
|
127
|
+
*
|
|
128
|
+
* @param {Object} request
|
|
129
|
+
* The request object that will be sent.
|
|
130
|
+
* @param {string} request.name
|
|
131
|
+
* Required. The name of the requested instance configuration. Values are of
|
|
132
|
+
* the form `projects/<project>/instanceConfigs/<config>`.
|
|
133
|
+
* @param {object} [options]
|
|
134
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
135
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
136
|
+
* The first element of the array is an object representing [InstanceConfig]{@link google.spanner.admin.instance.v1.InstanceConfig}.
|
|
137
|
+
* Please see the
|
|
138
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
139
|
+
* for more details and examples.
|
|
140
|
+
* @example <caption>include:samples/generated/v1/instance_admin.get_instance_config.js</caption>
|
|
141
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_GetInstanceConfig_async
|
|
142
|
+
*/
|
|
125
143
|
getInstanceConfig(request?: protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest, options?: CallOptions): Promise<[protos.google.spanner.admin.instance.v1.IInstanceConfig, (protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest | undefined), {} | undefined]>;
|
|
126
144
|
getInstanceConfig(request: protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest, options: CallOptions, callback: Callback<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest | null | undefined, {} | null | undefined>): void;
|
|
127
145
|
getInstanceConfig(request: protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest, callback: Callback<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest | null | undefined, {} | null | undefined>): void;
|
|
146
|
+
/**
|
|
147
|
+
* Gets information about a particular instance.
|
|
148
|
+
*
|
|
149
|
+
* @param {Object} request
|
|
150
|
+
* The request object that will be sent.
|
|
151
|
+
* @param {string} request.name
|
|
152
|
+
* Required. The name of the requested instance. Values are of the form
|
|
153
|
+
* `projects/<project>/instances/<instance>`.
|
|
154
|
+
* @param {google.protobuf.FieldMask} request.fieldMask
|
|
155
|
+
* If field_mask is present, specifies the subset of {@link google.spanner.admin.instance.v1.Instance|Instance} fields that
|
|
156
|
+
* should be returned.
|
|
157
|
+
* If absent, all {@link google.spanner.admin.instance.v1.Instance|Instance} fields are returned.
|
|
158
|
+
* @param {object} [options]
|
|
159
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
160
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
161
|
+
* The first element of the array is an object representing [Instance]{@link google.spanner.admin.instance.v1.Instance}.
|
|
162
|
+
* Please see the
|
|
163
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
164
|
+
* for more details and examples.
|
|
165
|
+
* @example <caption>include:samples/generated/v1/instance_admin.get_instance.js</caption>
|
|
166
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_GetInstance_async
|
|
167
|
+
*/
|
|
128
168
|
getInstance(request?: protos.google.spanner.admin.instance.v1.IGetInstanceRequest, options?: CallOptions): Promise<[protos.google.spanner.admin.instance.v1.IInstance, protos.google.spanner.admin.instance.v1.IGetInstanceRequest | undefined, {} | undefined]>;
|
|
129
169
|
getInstance(request: protos.google.spanner.admin.instance.v1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.spanner.admin.instance.v1.IInstance, protos.google.spanner.admin.instance.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
|
|
130
170
|
getInstance(request: protos.google.spanner.admin.instance.v1.IGetInstanceRequest, callback: Callback<protos.google.spanner.admin.instance.v1.IInstance, protos.google.spanner.admin.instance.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
|
|
171
|
+
/**
|
|
172
|
+
* Deletes an instance.
|
|
173
|
+
*
|
|
174
|
+
* Immediately upon completion of the request:
|
|
175
|
+
*
|
|
176
|
+
* * Billing ceases for all of the instance's reserved resources.
|
|
177
|
+
*
|
|
178
|
+
* Soon afterward:
|
|
179
|
+
*
|
|
180
|
+
* * The instance and *all of its databases* immediately and
|
|
181
|
+
* irrevocably disappear from the API. All data in the databases
|
|
182
|
+
* is permanently deleted.
|
|
183
|
+
*
|
|
184
|
+
* @param {Object} request
|
|
185
|
+
* The request object that will be sent.
|
|
186
|
+
* @param {string} request.name
|
|
187
|
+
* Required. The name of the instance to be deleted. Values are of the form
|
|
188
|
+
* `projects/<project>/instances/<instance>`
|
|
189
|
+
* @param {object} [options]
|
|
190
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
191
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
192
|
+
* The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
|
|
193
|
+
* Please see the
|
|
194
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
195
|
+
* for more details and examples.
|
|
196
|
+
* @example <caption>include:samples/generated/v1/instance_admin.delete_instance.js</caption>
|
|
197
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_DeleteInstance_async
|
|
198
|
+
*/
|
|
131
199
|
deleteInstance(request?: protos.google.spanner.admin.instance.v1.IDeleteInstanceRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, (protos.google.spanner.admin.instance.v1.IDeleteInstanceRequest | undefined), {} | undefined]>;
|
|
132
200
|
deleteInstance(request: protos.google.spanner.admin.instance.v1.IDeleteInstanceRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.instance.v1.IDeleteInstanceRequest | null | undefined, {} | null | undefined>): void;
|
|
133
201
|
deleteInstance(request: protos.google.spanner.admin.instance.v1.IDeleteInstanceRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.instance.v1.IDeleteInstanceRequest | null | undefined, {} | null | undefined>): void;
|
|
202
|
+
/**
|
|
203
|
+
* Sets the access control policy on an instance resource. Replaces any
|
|
204
|
+
* existing policy.
|
|
205
|
+
*
|
|
206
|
+
* Authorization requires `spanner.instances.setIamPolicy` on
|
|
207
|
+
* {@link google.iam.v1.SetIamPolicyRequest.resource|resource}.
|
|
208
|
+
*
|
|
209
|
+
* @param {Object} request
|
|
210
|
+
* The request object that will be sent.
|
|
211
|
+
* @param {string} request.resource
|
|
212
|
+
* REQUIRED: The resource for which the policy is being specified.
|
|
213
|
+
* See the operation documentation for the appropriate value for this field.
|
|
214
|
+
* @param {google.iam.v1.Policy} request.policy
|
|
215
|
+
* REQUIRED: The complete policy to be applied to the `resource`. The size of
|
|
216
|
+
* the policy is limited to a few 10s of KB. An empty policy is a
|
|
217
|
+
* valid policy but certain Cloud Platform services (such as Projects)
|
|
218
|
+
* might reject them.
|
|
219
|
+
* @param {object} [options]
|
|
220
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
221
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
222
|
+
* The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}.
|
|
223
|
+
* Please see the
|
|
224
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
225
|
+
* for more details and examples.
|
|
226
|
+
* @example <caption>include:samples/generated/v1/instance_admin.set_iam_policy.js</caption>
|
|
227
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_SetIamPolicy_async
|
|
228
|
+
*/
|
|
134
229
|
setIamPolicy(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]>;
|
|
135
230
|
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
|
|
136
231
|
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
|
|
232
|
+
/**
|
|
233
|
+
* Gets the access control policy for an instance resource. Returns an empty
|
|
234
|
+
* policy if an instance exists but does not have a policy set.
|
|
235
|
+
*
|
|
236
|
+
* Authorization requires `spanner.instances.getIamPolicy` on
|
|
237
|
+
* {@link google.iam.v1.GetIamPolicyRequest.resource|resource}.
|
|
238
|
+
*
|
|
239
|
+
* @param {Object} request
|
|
240
|
+
* The request object that will be sent.
|
|
241
|
+
* @param {string} request.resource
|
|
242
|
+
* REQUIRED: The resource for which the policy is being requested.
|
|
243
|
+
* See the operation documentation for the appropriate value for this field.
|
|
244
|
+
* @param {google.iam.v1.GetPolicyOptions} request.options
|
|
245
|
+
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
|
246
|
+
* `GetIamPolicy`. This field is only used by Cloud IAM.
|
|
247
|
+
* @param {object} [options]
|
|
248
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
249
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
250
|
+
* The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}.
|
|
251
|
+
* Please see the
|
|
252
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
253
|
+
* for more details and examples.
|
|
254
|
+
* @example <caption>include:samples/generated/v1/instance_admin.get_iam_policy.js</caption>
|
|
255
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_GetIamPolicy_async
|
|
256
|
+
*/
|
|
137
257
|
getIamPolicy(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]>;
|
|
138
258
|
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
|
|
139
259
|
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
|
|
260
|
+
/**
|
|
261
|
+
* Returns permissions that the caller has on the specified instance resource.
|
|
262
|
+
*
|
|
263
|
+
* Attempting this RPC on a non-existent Cloud Spanner instance resource will
|
|
264
|
+
* result in a NOT_FOUND error if the user has `spanner.instances.list`
|
|
265
|
+
* permission on the containing Google Cloud Project. Otherwise returns an
|
|
266
|
+
* empty set of permissions.
|
|
267
|
+
*
|
|
268
|
+
* @param {Object} request
|
|
269
|
+
* The request object that will be sent.
|
|
270
|
+
* @param {string} request.resource
|
|
271
|
+
* REQUIRED: The resource for which the policy detail is being requested.
|
|
272
|
+
* See the operation documentation for the appropriate value for this field.
|
|
273
|
+
* @param {string[]} request.permissions
|
|
274
|
+
* The set of permissions to check for the `resource`. Permissions with
|
|
275
|
+
* wildcards (such as '*' or 'storage.*') are not allowed. For more
|
|
276
|
+
* information see
|
|
277
|
+
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
|
278
|
+
* @param {object} [options]
|
|
279
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
280
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
281
|
+
* The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}.
|
|
282
|
+
* Please see the
|
|
283
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
284
|
+
* for more details and examples.
|
|
285
|
+
* @example <caption>include:samples/generated/v1/instance_admin.test_iam_permissions.js</caption>
|
|
286
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_TestIamPermissions_async
|
|
287
|
+
*/
|
|
140
288
|
testIamPermissions(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]>;
|
|
141
289
|
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
|
|
142
290
|
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
|
|
291
|
+
/**
|
|
292
|
+
* Creates an instance and begins preparing it to begin serving. The
|
|
293
|
+
* returned {@link google.longrunning.Operation|long-running operation}
|
|
294
|
+
* can be used to track the progress of preparing the new
|
|
295
|
+
* instance. The instance name is assigned by the caller. If the
|
|
296
|
+
* named instance already exists, `CreateInstance` returns
|
|
297
|
+
* `ALREADY_EXISTS`.
|
|
298
|
+
*
|
|
299
|
+
* Immediately upon completion of this request:
|
|
300
|
+
*
|
|
301
|
+
* * The instance is readable via the API, with all requested attributes
|
|
302
|
+
* but no allocated resources. Its state is `CREATING`.
|
|
303
|
+
*
|
|
304
|
+
* Until completion of the returned operation:
|
|
305
|
+
*
|
|
306
|
+
* * Cancelling the operation renders the instance immediately unreadable
|
|
307
|
+
* via the API.
|
|
308
|
+
* * The instance can be deleted.
|
|
309
|
+
* * All other attempts to modify the instance are rejected.
|
|
310
|
+
*
|
|
311
|
+
* Upon completion of the returned operation:
|
|
312
|
+
*
|
|
313
|
+
* * Billing for all successfully-allocated resources begins (some types
|
|
314
|
+
* may have lower than the requested levels).
|
|
315
|
+
* * Databases can be created in the instance.
|
|
316
|
+
* * The instance's allocated resource levels are readable via the API.
|
|
317
|
+
* * The instance's state becomes `READY`.
|
|
318
|
+
*
|
|
319
|
+
* The returned {@link google.longrunning.Operation|long-running operation} will
|
|
320
|
+
* have a name of the format `<instance_name>/operations/<operation_id>` and
|
|
321
|
+
* can be used to track creation of the instance. The
|
|
322
|
+
* {@link google.longrunning.Operation.metadata|metadata} field type is
|
|
323
|
+
* {@link google.spanner.admin.instance.v1.CreateInstanceMetadata|CreateInstanceMetadata}.
|
|
324
|
+
* The {@link google.longrunning.Operation.response|response} field type is
|
|
325
|
+
* {@link google.spanner.admin.instance.v1.Instance|Instance}, if successful.
|
|
326
|
+
*
|
|
327
|
+
* @param {Object} request
|
|
328
|
+
* The request object that will be sent.
|
|
329
|
+
* @param {string} request.parent
|
|
330
|
+
* Required. The name of the project in which to create the instance. Values
|
|
331
|
+
* are of the form `projects/<project>`.
|
|
332
|
+
* @param {string} request.instanceId
|
|
333
|
+
* Required. The ID of the instance to create. Valid identifiers are of the
|
|
334
|
+
* form `{@link -a-z0-9|a-z}*[a-z0-9]` and must be between 2 and 64 characters in
|
|
335
|
+
* length.
|
|
336
|
+
* @param {google.spanner.admin.instance.v1.Instance} request.instance
|
|
337
|
+
* Required. The instance to create. The name may be omitted, but if
|
|
338
|
+
* specified must be `<parent>/instances/<instance_id>`.
|
|
339
|
+
* @param {object} [options]
|
|
340
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
341
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
342
|
+
* The first element of the array is an object representing
|
|
343
|
+
* a long running operation. Its `promise()` method returns a promise
|
|
344
|
+
* you can `await` for.
|
|
345
|
+
* Please see the
|
|
346
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
347
|
+
* for more details and examples.
|
|
348
|
+
* @example <caption>include:samples/generated/v1/instance_admin.create_instance.js</caption>
|
|
349
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_CreateInstance_async
|
|
350
|
+
*/
|
|
143
351
|
createInstance(request?: protos.google.spanner.admin.instance.v1.ICreateInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.spanner.admin.instance.v1.IInstance, protos.google.spanner.admin.instance.v1.ICreateInstanceMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
|
|
144
352
|
createInstance(request: protos.google.spanner.admin.instance.v1.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IInstance, protos.google.spanner.admin.instance.v1.ICreateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
145
353
|
createInstance(request: protos.google.spanner.admin.instance.v1.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IInstance, protos.google.spanner.admin.instance.v1.ICreateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
@@ -152,13 +360,74 @@ export declare class InstanceAdminClient {
|
|
|
152
360
|
* Please see the
|
|
153
361
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
154
362
|
* for more details and examples.
|
|
155
|
-
* @example
|
|
156
|
-
*
|
|
157
|
-
* console.log(decodedOperation.result);
|
|
158
|
-
* console.log(decodedOperation.done);
|
|
159
|
-
* console.log(decodedOperation.metadata);
|
|
363
|
+
* @example <caption>include:samples/generated/v1/instance_admin.create_instance.js</caption>
|
|
364
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_CreateInstance_async
|
|
160
365
|
*/
|
|
161
366
|
checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.spanner.admin.instance.v1.Instance, protos.google.spanner.admin.instance.v1.CreateInstanceMetadata>>;
|
|
367
|
+
/**
|
|
368
|
+
* Updates an instance, and begins allocating or releasing resources
|
|
369
|
+
* as requested. The returned [long-running
|
|
370
|
+
* operation][google.longrunning.Operation] can be used to track the
|
|
371
|
+
* progress of updating the instance. If the named instance does not
|
|
372
|
+
* exist, returns `NOT_FOUND`.
|
|
373
|
+
*
|
|
374
|
+
* Immediately upon completion of this request:
|
|
375
|
+
*
|
|
376
|
+
* * For resource types for which a decrease in the instance's allocation
|
|
377
|
+
* has been requested, billing is based on the newly-requested level.
|
|
378
|
+
*
|
|
379
|
+
* Until completion of the returned operation:
|
|
380
|
+
*
|
|
381
|
+
* * Cancelling the operation sets its metadata's
|
|
382
|
+
* {@link google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time|cancel_time}, and begins
|
|
383
|
+
* restoring resources to their pre-request values. The operation
|
|
384
|
+
* is guaranteed to succeed at undoing all resource changes,
|
|
385
|
+
* after which point it terminates with a `CANCELLED` status.
|
|
386
|
+
* * All other attempts to modify the instance are rejected.
|
|
387
|
+
* * Reading the instance via the API continues to give the pre-request
|
|
388
|
+
* resource levels.
|
|
389
|
+
*
|
|
390
|
+
* Upon completion of the returned operation:
|
|
391
|
+
*
|
|
392
|
+
* * Billing begins for all successfully-allocated resources (some types
|
|
393
|
+
* may have lower than the requested levels).
|
|
394
|
+
* * All newly-reserved resources are available for serving the instance's
|
|
395
|
+
* tables.
|
|
396
|
+
* * The instance's new resource levels are readable via the API.
|
|
397
|
+
*
|
|
398
|
+
* The returned {@link google.longrunning.Operation|long-running operation} will
|
|
399
|
+
* have a name of the format `<instance_name>/operations/<operation_id>` and
|
|
400
|
+
* can be used to track the instance modification. The
|
|
401
|
+
* {@link google.longrunning.Operation.metadata|metadata} field type is
|
|
402
|
+
* {@link google.spanner.admin.instance.v1.UpdateInstanceMetadata|UpdateInstanceMetadata}.
|
|
403
|
+
* The {@link google.longrunning.Operation.response|response} field type is
|
|
404
|
+
* {@link google.spanner.admin.instance.v1.Instance|Instance}, if successful.
|
|
405
|
+
*
|
|
406
|
+
* Authorization requires `spanner.instances.update` permission on
|
|
407
|
+
* resource {@link google.spanner.admin.instance.v1.Instance.name|name}.
|
|
408
|
+
*
|
|
409
|
+
* @param {Object} request
|
|
410
|
+
* The request object that will be sent.
|
|
411
|
+
* @param {google.spanner.admin.instance.v1.Instance} request.instance
|
|
412
|
+
* Required. The instance to update, which must always include the instance
|
|
413
|
+
* name. Otherwise, only fields mentioned in {@link google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask|field_mask} need be included.
|
|
414
|
+
* @param {google.protobuf.FieldMask} request.fieldMask
|
|
415
|
+
* Required. A mask specifying which fields in {@link google.spanner.admin.instance.v1.Instance|Instance} should be updated.
|
|
416
|
+
* The field mask must always be specified; this prevents any future fields in
|
|
417
|
+
* {@link google.spanner.admin.instance.v1.Instance|Instance} from being erased accidentally by clients that do not know
|
|
418
|
+
* about them.
|
|
419
|
+
* @param {object} [options]
|
|
420
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
421
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
422
|
+
* The first element of the array is an object representing
|
|
423
|
+
* a long running operation. Its `promise()` method returns a promise
|
|
424
|
+
* you can `await` for.
|
|
425
|
+
* Please see the
|
|
426
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
427
|
+
* for more details and examples.
|
|
428
|
+
* @example <caption>include:samples/generated/v1/instance_admin.update_instance.js</caption>
|
|
429
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_UpdateInstance_async
|
|
430
|
+
*/
|
|
162
431
|
updateInstance(request?: protos.google.spanner.admin.instance.v1.IUpdateInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.spanner.admin.instance.v1.IInstance, protos.google.spanner.admin.instance.v1.IUpdateInstanceMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
|
|
163
432
|
updateInstance(request: protos.google.spanner.admin.instance.v1.IUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IInstance, protos.google.spanner.admin.instance.v1.IUpdateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
164
433
|
updateInstance(request: protos.google.spanner.admin.instance.v1.IUpdateInstanceRequest, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IInstance, protos.google.spanner.admin.instance.v1.IUpdateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
@@ -171,13 +440,39 @@ export declare class InstanceAdminClient {
|
|
|
171
440
|
* Please see the
|
|
172
441
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
173
442
|
* for more details and examples.
|
|
174
|
-
* @example
|
|
175
|
-
*
|
|
176
|
-
* console.log(decodedOperation.result);
|
|
177
|
-
* console.log(decodedOperation.done);
|
|
178
|
-
* console.log(decodedOperation.metadata);
|
|
443
|
+
* @example <caption>include:samples/generated/v1/instance_admin.update_instance.js</caption>
|
|
444
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_UpdateInstance_async
|
|
179
445
|
*/
|
|
180
446
|
checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.spanner.admin.instance.v1.Instance, protos.google.spanner.admin.instance.v1.UpdateInstanceMetadata>>;
|
|
447
|
+
/**
|
|
448
|
+
* Lists the supported instance configurations for a given project.
|
|
449
|
+
*
|
|
450
|
+
* @param {Object} request
|
|
451
|
+
* The request object that will be sent.
|
|
452
|
+
* @param {string} request.parent
|
|
453
|
+
* Required. The name of the project for which a list of supported instance
|
|
454
|
+
* configurations is requested. Values are of the form
|
|
455
|
+
* `projects/<project>`.
|
|
456
|
+
* @param {number} request.pageSize
|
|
457
|
+
* Number of instance configurations to be returned in the response. If 0 or
|
|
458
|
+
* less, defaults to the server's maximum allowed page size.
|
|
459
|
+
* @param {string} request.pageToken
|
|
460
|
+
* If non-empty, `page_token` should contain a
|
|
461
|
+
* {@link google.spanner.admin.instance.v1.ListInstanceConfigsResponse.next_page_token|next_page_token}
|
|
462
|
+
* from a previous {@link google.spanner.admin.instance.v1.ListInstanceConfigsResponse|ListInstanceConfigsResponse}.
|
|
463
|
+
* @param {object} [options]
|
|
464
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
465
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
466
|
+
* The first element of the array is Array of [InstanceConfig]{@link google.spanner.admin.instance.v1.InstanceConfig}.
|
|
467
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
468
|
+
* times as needed and will merge results from all the pages into this array.
|
|
469
|
+
* Note that it can affect your quota.
|
|
470
|
+
* We recommend using `listInstanceConfigsAsync()`
|
|
471
|
+
* method described below for async iteration which you can stop as needed.
|
|
472
|
+
* Please see the
|
|
473
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
474
|
+
* for more details and examples.
|
|
475
|
+
*/
|
|
181
476
|
listInstanceConfigs(request?: protos.google.spanner.admin.instance.v1.IListInstanceConfigsRequest, options?: CallOptions): Promise<[protos.google.spanner.admin.instance.v1.IInstanceConfig[], protos.google.spanner.admin.instance.v1.IListInstanceConfigsRequest | null, protos.google.spanner.admin.instance.v1.IListInstanceConfigsResponse]>;
|
|
182
477
|
listInstanceConfigs(request: protos.google.spanner.admin.instance.v1.IListInstanceConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.spanner.admin.instance.v1.IListInstanceConfigsRequest, protos.google.spanner.admin.instance.v1.IListInstanceConfigsResponse | null | undefined, protos.google.spanner.admin.instance.v1.IInstanceConfig>): void;
|
|
183
478
|
listInstanceConfigs(request: protos.google.spanner.admin.instance.v1.IListInstanceConfigsRequest, callback: PaginationCallback<protos.google.spanner.admin.instance.v1.IListInstanceConfigsRequest, protos.google.spanner.admin.instance.v1.IListInstanceConfigsResponse | null | undefined, protos.google.spanner.admin.instance.v1.IInstanceConfig>): void;
|
|
@@ -236,13 +531,58 @@ export declare class InstanceAdminClient {
|
|
|
236
531
|
* Please see the
|
|
237
532
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
238
533
|
* for more details and examples.
|
|
239
|
-
* @example
|
|
240
|
-
*
|
|
241
|
-
* for await (const response of iterable) {
|
|
242
|
-
* // process response
|
|
243
|
-
* }
|
|
534
|
+
* @example <caption>include:samples/generated/v1/instance_admin.list_instance_configs.js</caption>
|
|
535
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_async
|
|
244
536
|
*/
|
|
245
537
|
listInstanceConfigsAsync(request?: protos.google.spanner.admin.instance.v1.IListInstanceConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.spanner.admin.instance.v1.IInstanceConfig>;
|
|
538
|
+
/**
|
|
539
|
+
* Lists all instances in the given project.
|
|
540
|
+
*
|
|
541
|
+
* @param {Object} request
|
|
542
|
+
* The request object that will be sent.
|
|
543
|
+
* @param {string} request.parent
|
|
544
|
+
* Required. The name of the project for which a list of instances is
|
|
545
|
+
* requested. Values are of the form `projects/<project>`.
|
|
546
|
+
* @param {number} request.pageSize
|
|
547
|
+
* Number of instances to be returned in the response. If 0 or less, defaults
|
|
548
|
+
* to the server's maximum allowed page size.
|
|
549
|
+
* @param {string} request.pageToken
|
|
550
|
+
* If non-empty, `page_token` should contain a
|
|
551
|
+
* {@link google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token|next_page_token} from a
|
|
552
|
+
* previous {@link google.spanner.admin.instance.v1.ListInstancesResponse|ListInstancesResponse}.
|
|
553
|
+
* @param {string} request.filter
|
|
554
|
+
* An expression for filtering the results of the request. Filter rules are
|
|
555
|
+
* case insensitive. The fields eligible for filtering are:
|
|
556
|
+
*
|
|
557
|
+
* * `name`
|
|
558
|
+
* * `display_name`
|
|
559
|
+
* * `labels.key` where key is the name of a label
|
|
560
|
+
*
|
|
561
|
+
* Some examples of using filters are:
|
|
562
|
+
*
|
|
563
|
+
* * `name:*` --> The instance has a name.
|
|
564
|
+
* * `name:Howl` --> The instance's name contains the string "howl".
|
|
565
|
+
* * `name:HOWL` --> Equivalent to above.
|
|
566
|
+
* * `NAME:howl` --> Equivalent to above.
|
|
567
|
+
* * `labels.env:*` --> The instance has the label "env".
|
|
568
|
+
* * `labels.env:dev` --> The instance has the label "env" and the value of
|
|
569
|
+
* the label contains the string "dev".
|
|
570
|
+
* * `name:howl labels.env:dev` --> The instance's name contains "howl" and
|
|
571
|
+
* it has the label "env" with its value
|
|
572
|
+
* containing "dev".
|
|
573
|
+
* @param {object} [options]
|
|
574
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
575
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
576
|
+
* The first element of the array is Array of [Instance]{@link google.spanner.admin.instance.v1.Instance}.
|
|
577
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
578
|
+
* times as needed and will merge results from all the pages into this array.
|
|
579
|
+
* Note that it can affect your quota.
|
|
580
|
+
* We recommend using `listInstancesAsync()`
|
|
581
|
+
* method described below for async iteration which you can stop as needed.
|
|
582
|
+
* Please see the
|
|
583
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
584
|
+
* for more details and examples.
|
|
585
|
+
*/
|
|
246
586
|
listInstances(request?: protos.google.spanner.admin.instance.v1.IListInstancesRequest, options?: CallOptions): Promise<[protos.google.spanner.admin.instance.v1.IInstance[], protos.google.spanner.admin.instance.v1.IListInstancesRequest | null, protos.google.spanner.admin.instance.v1.IListInstancesResponse]>;
|
|
247
587
|
listInstances(request: protos.google.spanner.admin.instance.v1.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.spanner.admin.instance.v1.IListInstancesRequest, protos.google.spanner.admin.instance.v1.IListInstancesResponse | null | undefined, protos.google.spanner.admin.instance.v1.IInstance>): void;
|
|
248
588
|
listInstances(request: protos.google.spanner.admin.instance.v1.IListInstancesRequest, callback: PaginationCallback<protos.google.spanner.admin.instance.v1.IListInstancesRequest, protos.google.spanner.admin.instance.v1.IListInstancesResponse | null | undefined, protos.google.spanner.admin.instance.v1.IInstance>): void;
|
|
@@ -339,11 +679,8 @@ export declare class InstanceAdminClient {
|
|
|
339
679
|
* Please see the
|
|
340
680
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
341
681
|
* for more details and examples.
|
|
342
|
-
* @example
|
|
343
|
-
*
|
|
344
|
-
* for await (const response of iterable) {
|
|
345
|
-
* // process response
|
|
346
|
-
* }
|
|
682
|
+
* @example <caption>include:samples/generated/v1/instance_admin.list_instances.js</caption>
|
|
683
|
+
* region_tag:spanner_v1_generated_InstanceAdmin_ListInstances_async
|
|
347
684
|
*/
|
|
348
685
|
listInstancesAsync(request?: protos.google.spanner.admin.instance.v1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.spanner.admin.instance.v1.IInstance>;
|
|
349
686
|
/**
|