UNPKG

@google-cloud/spanner

Version:
792 lines 128 kB
import type * as gax from 'google-gax'; import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax'; import { Transform } from 'stream'; import * as protos from '../../protos/protos'; /** * Cloud Spanner Instance Admin API * * The Cloud Spanner Instance Admin API can be used to create, delete, * modify and list instances. Instances are dedicated Cloud Spanner serving * and storage resources to be used by Cloud Spanner databases. * * Each instance has a "configuration", which dictates where the * serving resources for the Cloud Spanner instance are located (e.g., * US-central, Europe). Configurations are created by Google based on * resource availability. * * Cloud Spanner billing is based on the instances that exist and their * sizes. After an instance exists, there are no additional * per-database or per-operation charges for use of the instance * (though there may be additional network bandwidth charges). * Instances offer isolation: problems with databases in one instance * will not affect other instances. However, within an instance * databases can affect each other. For example, if one database in an * instance receives a lot of requests and consumes most of the * instance resources, fewer resources are available for other * databases in that instance, and their performance may suffer. * @class * @memberof v1 */ export declare class InstanceAdminClient { private _terminated; private _opts; private _providedCustomServicePath; private _gaxModule; private _gaxGrpc; private _protos; private _defaults; private _universeDomain; private _servicePath; private _log; auth: gax.GoogleAuth; descriptors: Descriptors; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: { [name: string]: Function; }; pathTemplates: { [name: string]: gax.PathTemplate; }; operationsClient: gax.OperationsClient; instanceAdminStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of InstanceAdminClient. * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] * @param {string} [options.email] - Account email address. Required when * using a .pem or .p12 keyFilename. * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number} [options.port] - The port on which to connect to * the remote host. * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you * need to avoid loading the default gRPC version and want to use the fallback * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC * const client = new InstanceAdminClient({fallback: true}, gax); * ``` */ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback); /** * Initialize the client. * Performs asynchronous operations (such as authentication) and prepares the client. * This function will be called automatically when any class method is called for the * first time, but if you need to initialize it before calling an actual method, * feel free to call initialize() directly. * * You can await on this method if you want to make sure the client is initialized. * * @returns {Promise} A promise that resolves to an authenticated service stub. */ initialize(): Promise<{ [name: string]: Function; }>; /** * The DNS address for this API service. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath(): string; /** * The DNS address for this API service - same as servicePath. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint(): string; /** * The DNS address for this API service. * @returns {string} The DNS address for this service. */ get apiEndpoint(): string; get universeDomain(): string; /** * The port for this API service. * @returns {number} The default port for this service. */ static get port(): number; /** * The scopes needed to make gRPC calls for every method defined * in this service. * @returns {string[]} List of default scopes. */ static get scopes(): string[]; getProjectId(): Promise<string>; getProjectId(callback: Callback<string, undefined, undefined>): void; /** * Gets information about a particular instance configuration. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the requested instance configuration. Values are of * the form `projects/<project>/instanceConfigs/<config>`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.spanner.admin.instance.v1.InstanceConfig|InstanceConfig}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. */ 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 ]>; 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; 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; /** * Deletes the instance configuration. Deletion is only allowed when no * instances are using the configuration. If any instances are using * the configuration, returns `FAILED_PRECONDITION`. * * Only user-managed configurations can be deleted. * * Authorization requires `spanner.instanceConfigs.delete` permission on * the resource {@link protos.google.spanner.admin.instance.v1.InstanceConfig.name|name}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the instance configuration to be deleted. * Values are of the form * `projects/<project>/instanceConfigs/<instance_config>` * @param {string} request.etag * Used for optimistic concurrency control as a way to help prevent * simultaneous deletes of an instance configuration from overwriting each * other. If not empty, the API * only deletes the instance configuration when the etag provided matches the * current status of the requested instance configuration. Otherwise, deletes * the instance configuration without checking the current status of the * requested instance configuration. * @param {boolean} request.validateOnly * An option to validate, but not actually execute, a request, * and provide the same response. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. */ deleteInstanceConfig(request?: protos.google.spanner.admin.instance.v1.IDeleteInstanceConfigRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, (protos.google.spanner.admin.instance.v1.IDeleteInstanceConfigRequest | undefined), {} | undefined ]>; deleteInstanceConfig(request: protos.google.spanner.admin.instance.v1.IDeleteInstanceConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.instance.v1.IDeleteInstanceConfigRequest | null | undefined, {} | null | undefined>): void; deleteInstanceConfig(request: protos.google.spanner.admin.instance.v1.IDeleteInstanceConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.instance.v1.IDeleteInstanceConfigRequest | null | undefined, {} | null | undefined>): void; /** * Gets information about a particular instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the requested instance. Values are of the form * `projects/<project>/instances/<instance>`. * @param {google.protobuf.FieldMask} request.fieldMask * If field_mask is present, specifies the subset of * {@link protos.google.spanner.admin.instance.v1.Instance|Instance} fields that should be * returned. If absent, all * {@link protos.google.spanner.admin.instance.v1.Instance|Instance} fields are returned. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.spanner.admin.instance.v1.Instance|Instance}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. */ 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 ]>; 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; 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; /** * Deletes an instance. * * Immediately upon completion of the request: * * * Billing ceases for all of the instance's reserved resources. * * Soon afterward: * * * The instance and *all of its databases* immediately and * irrevocably disappear from the API. All data in the databases * is permanently deleted. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the instance to be deleted. Values are of the form * `projects/<project>/instances/<instance>` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. */ 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 ]>; 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; 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; /** * Sets the access control policy on an instance resource. Replaces any * existing policy. * * Authorization requires `spanner.instances.setIamPolicy` on * {@link protos.google.iam.v1.SetIamPolicyRequest.resource|resource}. * * @param {Object} request * The request object that will be sent. * @param {string} request.resource * REQUIRED: The resource for which the policy is being specified. * See the operation documentation for the appropriate value for this field. * @param {google.iam.v1.Policy} request.policy * REQUIRED: The complete policy to be applied to the `resource`. The size of * the policy is limited to a few 10s of KB. An empty policy is a * valid policy but certain Cloud Platform services (such as Projects) * might reject them. * @param {google.protobuf.FieldMask} request.updateMask * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only * the fields in the mask will be modified. If no mask is provided, the * following default mask is used: * * `paths: "bindings, etag"` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. */ setIamPolicy(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined ]>; 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; setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void; /** * Gets the access control policy for an instance resource. Returns an empty * policy if an instance exists but does not have a policy set. * * Authorization requires `spanner.instances.getIamPolicy` on * {@link protos.google.iam.v1.GetIamPolicyRequest.resource|resource}. * * @param {Object} request * The request object that will be sent. * @param {string} request.resource * REQUIRED: The resource for which the policy is being requested. * See the operation documentation for the appropriate value for this field. * @param {google.iam.v1.GetPolicyOptions} request.options * OPTIONAL: A `GetPolicyOptions` object for specifying options to * `GetIamPolicy`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. */ getIamPolicy(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined ]>; 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; getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void; /** * Returns permissions that the caller has on the specified instance resource. * * Attempting this RPC on a non-existent Cloud Spanner instance resource will * result in a NOT_FOUND error if the user has `spanner.instances.list` * permission on the containing Google Cloud Project. Otherwise returns an * empty set of permissions. * * @param {Object} request * The request object that will be sent. * @param {string} request.resource * REQUIRED: The resource for which the policy detail is being requested. * See the operation documentation for the appropriate value for this field. * @param {string[]} request.permissions * The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more * information see * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. */ testIamPermissions(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined ]>; 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; testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void; /** * Gets information about a particular instance partition. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the requested instance partition. Values are of * the form * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.spanner.admin.instance.v1.InstancePartition|InstancePartition}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. */ getInstancePartition(request?: protos.google.spanner.admin.instance.v1.IGetInstancePartitionRequest, options?: CallOptions): Promise<[ protos.google.spanner.admin.instance.v1.IInstancePartition, (protos.google.spanner.admin.instance.v1.IGetInstancePartitionRequest | undefined), {} | undefined ]>; getInstancePartition(request: protos.google.spanner.admin.instance.v1.IGetInstancePartitionRequest, options: CallOptions, callback: Callback<protos.google.spanner.admin.instance.v1.IInstancePartition, protos.google.spanner.admin.instance.v1.IGetInstancePartitionRequest | null | undefined, {} | null | undefined>): void; getInstancePartition(request: protos.google.spanner.admin.instance.v1.IGetInstancePartitionRequest, callback: Callback<protos.google.spanner.admin.instance.v1.IInstancePartition, protos.google.spanner.admin.instance.v1.IGetInstancePartitionRequest | null | undefined, {} | null | undefined>): void; /** * Deletes an existing instance partition. Requires that the * instance partition is not used by any database or backup and is not the * default instance partition of an instance. * * Authorization requires `spanner.instancePartitions.delete` permission on * the resource * {@link protos.google.spanner.admin.instance.v1.InstancePartition.name|name}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the instance partition to be deleted. * Values are of the form * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` * @param {string} request.etag * Optional. If not empty, the API only deletes the instance partition when * the etag provided matches the current status of the requested instance * partition. Otherwise, deletes the instance partition without checking the * current status of the requested instance partition. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. */ deleteInstancePartition(request?: protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, (protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest | undefined), {} | undefined ]>; deleteInstancePartition(request: protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest | null | undefined, {} | null | undefined>): void; deleteInstancePartition(request: protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest | null | undefined, {} | null | undefined>): void; /** * Creates an instance configuration and begins preparing it to be used. The * returned long-running operation * can be used to track the progress of preparing the new * instance configuration. The instance configuration name is assigned by the * caller. If the named instance configuration already exists, * `CreateInstanceConfig` returns `ALREADY_EXISTS`. * * Immediately after the request returns: * * * The instance configuration is readable via the API, with all requested * attributes. The instance configuration's * {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling} * field is set to true. Its state is `CREATING`. * * While the operation is pending: * * * Cancelling the operation renders the instance configuration immediately * unreadable via the API. * * Except for deleting the creating resource, all other attempts to modify * the instance configuration are rejected. * * Upon completion of the returned operation: * * * Instances can be created using the instance configuration. * * The instance configuration's * {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling} * field becomes false. Its state becomes `READY`. * * The returned long-running operation will * have a name of the format * `<instance_config_name>/operations/<operation_id>` and can be used to track * creation of the instance configuration. The * metadata field type is * {@link protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata|CreateInstanceConfigMetadata}. * The response field type is * {@link protos.google.spanner.admin.instance.v1.InstanceConfig|InstanceConfig}, if * successful. * * Authorization requires `spanner.instanceConfigs.create` permission on * the resource * {@link protos.google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent|parent}. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The name of the project in which to create the instance * configuration. Values are of the form `projects/<project>`. * @param {string} request.instanceConfigId * Required. The ID of the instance configuration to create. Valid identifiers * are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 * characters in length. The `custom-` prefix is required to avoid name * conflicts with Google-managed configurations. * @param {google.spanner.admin.instance.v1.InstanceConfig} request.instanceConfig * Required. The `InstanceConfig` proto of the configuration to create. * `instance_config.name` must be * `<parent>/instanceConfigs/<instance_config_id>`. * `instance_config.base_config` must be a Google-managed configuration name, * e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3. * @param {boolean} request.validateOnly * An option to validate, but not actually execute, a request, * and provide the same response. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing * a long running operation. Its `promise()` method returns a promise * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. */ createInstanceConfig(request?: protos.google.spanner.admin.instance.v1.ICreateInstanceConfigRequest, options?: CallOptions): Promise<[ LROperation<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.ICreateInstanceConfigMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>; createInstanceConfig(request: protos.google.spanner.admin.instance.v1.ICreateInstanceConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.ICreateInstanceConfigMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; createInstanceConfig(request: protos.google.spanner.admin.instance.v1.ICreateInstanceConfigRequest, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.ICreateInstanceConfigMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; /** * Check the status of the long running operation returned by `createInstanceConfig()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. */ checkCreateInstanceConfigProgress(name: string): Promise<LROperation<protos.google.spanner.admin.instance.v1.InstanceConfig, protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata>>; /** * Updates an instance configuration. The returned * long-running operation can be used to track * the progress of updating the instance. If the named instance configuration * does not exist, returns `NOT_FOUND`. * * Only user-managed configurations can be updated. * * Immediately after the request returns: * * * The instance configuration's * {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling} * field is set to true. * * While the operation is pending: * * * Cancelling the operation sets its metadata's * {@link protos.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time|cancel_time}. * The operation is guaranteed to succeed at undoing all changes, after * which point it terminates with a `CANCELLED` status. * * All other attempts to modify the instance configuration are rejected. * * Reading the instance configuration via the API continues to give the * pre-request values. * * Upon completion of the returned operation: * * * Creating instances using the instance configuration uses the new * values. * * The new values of the instance configuration are readable via the API. * * The instance configuration's * {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling} * field becomes false. * * The returned long-running operation will * have a name of the format * `<instance_config_name>/operations/<operation_id>` and can be used to track * the instance configuration modification. The * metadata field type is * {@link protos.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata|UpdateInstanceConfigMetadata}. * The response field type is * {@link protos.google.spanner.admin.instance.v1.InstanceConfig|InstanceConfig}, if * successful. * * Authorization requires `spanner.instanceConfigs.update` permission on * the resource {@link protos.google.spanner.admin.instance.v1.InstanceConfig.name|name}. * * @param {Object} request * The request object that will be sent. * @param {google.spanner.admin.instance.v1.InstanceConfig} request.instanceConfig * Required. The user instance configuration to update, which must always * include the instance configuration name. Otherwise, only fields mentioned * in * {@link protos.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask|update_mask} * need be included. To prevent conflicts of concurrent updates, * {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|etag} can * be used. * @param {google.protobuf.FieldMask} request.updateMask * Required. A mask specifying which fields in * {@link protos.google.spanner.admin.instance.v1.InstanceConfig|InstanceConfig} should be * updated. The field mask must always be specified; this prevents any future * fields in {@link protos.google.spanner.admin.instance.v1.InstanceConfig|InstanceConfig} * from being erased accidentally by clients that do not know about them. Only * display_name and labels can be updated. * @param {boolean} request.validateOnly * An option to validate, but not actually execute, a request, * and provide the same response. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing * a long running operation. Its `promise()` method returns a promise * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. */ updateInstanceConfig(request?: protos.google.spanner.admin.instance.v1.IUpdateInstanceConfigRequest, options?: CallOptions): Promise<[ LROperation<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.IUpdateInstanceConfigMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>; updateInstanceConfig(request: protos.google.spanner.admin.instance.v1.IUpdateInstanceConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.IUpdateInstanceConfigMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; updateInstanceConfig(request: protos.google.spanner.admin.instance.v1.IUpdateInstanceConfigRequest, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.IUpdateInstanceConfigMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; /** * Check the status of the long running operation returned by `updateInstanceConfig()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. */ checkUpdateInstanceConfigProgress(name: string): Promise<LROperation<protos.google.spanner.admin.instance.v1.InstanceConfig, protos.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata>>; /** * Creates an instance and begins preparing it to begin serving. The * returned long-running operation * can be used to track the progress of preparing the new * instance. The instance name is assigned by the caller. If the * named instance already exists, `CreateInstance` returns * `ALREADY_EXISTS`. * * Immediately upon completion of this request: * * * The instance is readable via the API, with all requested attributes * but no allocated resources. Its state is `CREATING`. * * Until completion of the returned operation: * * * Cancelling the operation renders the instance immediately unreadable * via the API. * * The instance can be deleted. * * All other attempts to modify the instance are rejected. * * Upon completion of the returned operation: * * * Billing for all successfully-allocated resources begins (some types * may have lower than the requested levels). * * Databases can be created in the instance. * * The instance's allocated resource levels are readable via the API. * * The instance's state becomes `READY`. * * The returned long-running operation will * have a name of the format `<instance_name>/operations/<operation_id>` and * can be used to track creation of the instance. The * metadata field type is * {@link protos.google.spanner.admin.instance.v1.CreateInstanceMetadata|CreateInstanceMetadata}. * The response field type is * {@link protos.google.spanner.admin.instance.v1.Instance|Instance}, if successful. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The name of the project in which to create the instance. Values * are of the form `projects/<project>`. * @param {string} request.instanceId * Required. The ID of the instance to create. Valid identifiers are of the * form `{@link protos.-a-z0-9|a-z}*[a-z0-9]` and must be between 2 and 64 characters in * length. * @param {google.spanner.admin.instance.v1.Instance} request.instance * Required. The instance to create. The name may be omitted, but if * specified must be `<parent>/instances/<instance_id>`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing * a long running operation. Its `promise()` method returns a promise * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. */ 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 ]>; 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; 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; /** * Check the status of the long running operation returned by `createInstance()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. */ checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.spanner.admin.instance.v1.Instance, protos.google.spanner.admin.instance.v1.CreateInstanceMetadata>>; /** * Updates an instance, and begins allocating or releasing resources * as requested. The returned long-running operation can be used to track the * progress of updating the instance. If the named instance does not * exist, returns `NOT_FOUND`. * * Immediately upon completion of this request: * * * For resource types for which a decrease in the instance's allocation * has been requested, billing is based on the newly-requested level. * * Until completion of the returned operation: * * * Cancelling the operation sets its metadata's * {@link protos.google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time|cancel_time}, * and begins restoring resources to their pre-request values. The * operation is guaranteed to succeed at undoing all resource changes, * after which point it terminates with a `CANCELLED` status. * * All other attempts to modify the instance are rejected. * * Reading the instance via the API continues to give the pre-request * resource levels. * * Upon completion of the returned operation: * * * Billing begins for all successfully-allocated resources (some types * may have lower than the requested levels). * * All newly-reserved resources are available for serving the instance's * tables. * * The instance's new resource levels are readable via the API. * * The returned long-running operation will * have a name of the format `<instance_name>/operations/<operation_id>` and * can be used to track the instance modification. The * metadata field type is * {@link protos.google.spanner.admin.instance.v1.UpdateInstanceMetadata|UpdateInstanceMetadata}. * The response field type is * {@link protos.google.spanner.admin.instance.v1.Instance|Instance}, if successful. * * Authorization requires `spanner.instances.update` permission on * the resource {@link protos.google.spanner.admin.instance.v1.Instance.name|name}. * * @param {Object} request * The request object that will be sent. * @param {google.spanner.admin.instance.v1.Instance} request.instance * Required. The instance to update, which must always include the instance * name. Otherwise, only fields mentioned in * {@link protos.google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask|field_mask} * need be included. * @param {google.protobuf.FieldMask} request.fieldMask * Required. A mask specifying which fields in * {@link protos.google.spanner.admin.instance.v1.Instance|Instance} should be updated. * The field mask must always be specified; this prevents any future fields in * {@link protos.google.spanner.admin.instance.v1.Instance|Instance} from being erased * accidentally by clients that do not know about them. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing * a long running operation. Its `promise()` method returns a promise * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. */ 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 ]>; 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; 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; /** * Check the status of the long running operation returned by `updateInstance()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. */ checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.spanner.admin.instance.v1.Instance, protos.google.spanner.admin.instance.v1.UpdateInstanceMetadata>>; /** * Creates an instance partition and begins preparing it to be used. The * returned long-running operation * can be used to track the progress of preparing the new instance partition. * The instance partition name is assigned by the caller. If the named * instance partition already exists, `CreateInstancePartition` returns * `ALREADY_EXISTS`. * * Immediately upon completion of this request: * * * The instance partition is readable via the API, with all requested * attributes but no allocated resources. Its state is `CREATING`. * * Until completion of the returned operation: * * * Cancelling the operation renders the instance partition immediately * unreadable via the API. * * The instance partition can be deleted. * * All other attempts to modify the instance partition are rejected. * * Upon completion of the returned operation: * * * Billing for all successfully-allocated resources begins (some types * may have lower than the requested levels). * * Databases can start using this instance partition. * * The instance partition's allocated resource levels are readable via the * API. * * The instance partition's state becomes `READY`. * * The returned long-running operation will * have a name of the format * `<instance_partition_name>/operations/<operation_id>` and can be used to * track creation of the instance partition. The * metadata field type is * {@link protos.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata|CreateInstancePartitionMetadata}. * The response field type is * {@link protos.google.spanner.admin.instance.v1.InstancePartition|InstancePartition}, if * successful. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The name of the instance in which to create the instan