Class v1.AlloyDBAdminClient (0.1.1)

Service describing handlers for resources v1

Package

@google-cloud/alloydb

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of AlloyDBAdminClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.fallback

: 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 AlloyDBAdminClient({fallback: 'rest'}, gax); ```

Properties

alloyDBAdminStub

alloyDBAdminStub?: Promise<{
        [name: string]: Function;
    }>;

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

backupPath(project, location, backup)

backupPath(project: string, location: string, backup: string): string;

Return a fully-qualified backup resource name string.

Parameters
NameDescription
project string
location string
backup string
Returns
TypeDescription
string

{string} Resource name string.

batchCreateInstances(request, options)

batchCreateInstances(request?: protos.google.cloud.alloydb.v1.IBatchCreateInstancesRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.IBatchCreateInstancesResponse, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates new instances under the given project, location and cluster. There can be only one primary instance in a cluster. If the primary instance exists in the cluster as well as this request, then API will throw an error. The primary instance should exist before any read pool instance is created. If the primary instance is a part of the request payload, then the API will take care of creating instances in the correct order. This method is here to support Google-internal use cases, and is not meant for external customers to consume. Please do not start relying on it; its behavior is subject to change without notice.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IBatchCreateInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.IBatchCreateInstancesResponse, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource.
   */
  // const parent = 'abc123'
  /**
   *  Required. Resources being created.
   */
  // const requests = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callBatchCreateInstances() {
    // Construct request
    const request = {
      parent,
      requests,
    };

    // Run request
    const [operation] = await alloydbClient.batchCreateInstances(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callBatchCreateInstances();

batchCreateInstances(request, options, callback)

batchCreateInstances(request: protos.google.cloud.alloydb.v1.IBatchCreateInstancesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IBatchCreateInstancesResponse, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IBatchCreateInstancesRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IBatchCreateInstancesResponse, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

batchCreateInstances(request, callback)

batchCreateInstances(request: protos.google.cloud.alloydb.v1.IBatchCreateInstancesRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IBatchCreateInstancesResponse, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IBatchCreateInstancesRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IBatchCreateInstancesResponse, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

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 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 value with a of 1, corresponding to Code.CANCELLED.

Parameters
NameDescription
request protos.google.longrunning.CancelOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkBatchCreateInstancesProgress(name)

checkBatchCreateInstancesProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.BatchCreateInstancesResponse, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by batchCreateInstances().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.BatchCreateInstancesResponse, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource.
   */
  // const parent = 'abc123'
  /**
   *  Required. Resources being created.
   */
  // const requests = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callBatchCreateInstances() {
    // Construct request
    const request = {
      parent,
      requests,
    };

    // Run request
    const [operation] = await alloydbClient.batchCreateInstances(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callBatchCreateInstances();

checkCreateBackupProgress(name)

checkCreateBackupProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.Backup, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by createBackup().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.Backup, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   */
  // const backupId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const backup = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, the backend validates the request, but doesn't actually
   *  execute it.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callCreateBackup() {
    // Construct request
    const request = {
      parent,
      backupId,
      backup,
    };

    // Run request
    const [operation] = await alloydbClient.createBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateBackup();

checkCreateClusterProgress(name)

checkCreateClusterProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.Cluster, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by createCluster().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.Cluster, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource. For the required format, see the
   *  comment on the Cluster.name field.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   */
  // const clusterId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const cluster = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the create
   *  request.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callCreateCluster() {
    // Construct request
    const request = {
      parent,
      clusterId,
      cluster,
    };

    // Run request
    const [operation] = await alloydbClient.createCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCluster();

checkCreateInstanceProgress(name)

checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.Instance, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by createInstance().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.Instance, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource. For the required format, see the
   *  comment on the Instance.name field.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   */
  // const instanceId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const instance = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the create
   *  request.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callCreateInstance() {
    // Construct request
    const request = {
      parent,
      instanceId,
      instance,
    };

    // Run request
    const [operation] = await alloydbClient.createInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateInstance();

checkDeleteBackupProgress(name)

checkDeleteBackupProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteBackup().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource. For the required format, see the comment on
   *  the Backup.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, the backend validates the request, but doesn't actually
   *  execute it.
   */
  // const validateOnly = true
  /**
   *  Optional. The current etag of the Backup.
   *  If an etag is provided and does not match the current etag of the Backup,
   *  deletion will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callDeleteBackup() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.deleteBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteBackup();

checkDeleteClusterProgress(name)

checkDeleteClusterProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteCluster().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Cluster.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. The current etag of the Cluster.
   *  If an etag is provided and does not match the current etag of the Cluster,
   *  deletion will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the delete.
   */
  // const validateOnly = true
  /**
   *  Optional. Whether to cascade delete child instances for given cluster.
   */
  // const force = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callDeleteCluster() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.deleteCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteCluster();

checkDeleteInstanceProgress(name)

checkDeleteInstanceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteInstance().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Instance.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. The current etag of the Instance.
   *  If an etag is provided and does not match the current etag of the Instance,
   *  deletion will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the delete.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callDeleteInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.deleteInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteInstance();

checkFailoverInstanceProgress(name)

checkFailoverInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.Instance, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by failoverInstance().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.Instance, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Instance.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the failover.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callFailoverInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.failoverInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callFailoverInstance();

checkRestartInstanceProgress(name)

checkRestartInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.Instance, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by restartInstance().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.Instance, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Instance.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the restart.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callRestartInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.restartInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRestartInstance();

checkRestoreClusterProgress(name)

checkRestoreClusterProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.Cluster, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by restoreCluster().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.Cluster, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Backup source.
   */
  // const backupSource = {}
  /**
   *  Required. The name of the parent resource. For the required format, see the
   *  comment on the Cluster.name field.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   */
  // const clusterId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const cluster = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the import
   *  request.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callRestoreCluster() {
    // Construct request
    const request = {
      parent,
      clusterId,
      cluster,
    };

    // Run request
    const [operation] = await alloydbClient.restoreCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRestoreCluster();

checkUpdateBackupProgress(name)

checkUpdateBackupProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.Backup, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateBackup().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.Backup, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Backup resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const backup = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, the backend validates the request, but doesn't actually
   *  execute it.
   */
  // const validateOnly = true
  /**
   *  Optional. If set to true, update succeeds even if instance is not found. In
   *  that case, a new backup is created and `update_mask` is ignored.
   */
  // const allowMissing = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callUpdateBackup() {
    // Construct request
    const request = {
      backup,
    };

    // Run request
    const [operation] = await alloydbClient.updateBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateBackup();

checkUpdateClusterProgress(name)

checkUpdateClusterProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.Cluster, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateCluster().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.Cluster, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Cluster resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const cluster = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the update
   *  request.
   */
  // const validateOnly = true
  /**
   *  Optional. If set to true, update succeeds even if cluster is not found. In
   *  that case, a new cluster is created and `update_mask` is ignored.
   */
  // const allowMissing = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callUpdateCluster() {
    // Construct request
    const request = {
      cluster,
    };

    // Run request
    const [operation] = await alloydbClient.updateCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCluster();

checkUpdateInstanceProgress(name)

checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.alloydb.v1.Instance, protos.google.cloud.alloydb.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateInstance().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.alloydb.v1.Instance, protos.google.cloud.alloydb.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Instance resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const instance = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the update
   *  request.
   */
  // const validateOnly = true
  /**
   *  Optional. If set to true, update succeeds even if instance is not found. In
   *  that case, a new instance is created and `update_mask` is ignored.
   */
  // const allowMissing = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callUpdateInstance() {
    // Construct request
    const request = {
      instance,
    };

    // Run request
    const [operation] = await alloydbClient.updateInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateInstance();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

clusterPath(project, location, cluster)

clusterPath(project: string, location: string, cluster: string): string;

Return a fully-qualified cluster resource name string.

Parameters
NameDescription
project string
location string
cluster string
Returns
TypeDescription
string

{string} Resource name string.

createBackup(request, options)

createBackup(request?: protos.google.cloud.alloydb.v1.ICreateBackupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Backup in a given project and location.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.ICreateBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   */
  // const backupId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const backup = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, the backend validates the request, but doesn't actually
   *  execute it.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callCreateBackup() {
    // Construct request
    const request = {
      parent,
      backupId,
      backup,
    };

    // Run request
    const [operation] = await alloydbClient.createBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateBackup();

createBackup(request, options, callback)

createBackup(request: protos.google.cloud.alloydb.v1.ICreateBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.ICreateBackupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createBackup(request, callback)

createBackup(request: protos.google.cloud.alloydb.v1.ICreateBackupRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.ICreateBackupRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCluster(request, options)

createCluster(request?: protos.google.cloud.alloydb.v1.ICreateClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Cluster in a given project and location.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.ICreateClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource. For the required format, see the
   *  comment on the Cluster.name field.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   */
  // const clusterId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const cluster = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the create
   *  request.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callCreateCluster() {
    // Construct request
    const request = {
      parent,
      clusterId,
      cluster,
    };

    // Run request
    const [operation] = await alloydbClient.createCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCluster();

createCluster(request, options, callback)

createCluster(request: protos.google.cloud.alloydb.v1.ICreateClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.ICreateClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCluster(request, callback)

createCluster(request: protos.google.cloud.alloydb.v1.ICreateClusterRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.ICreateClusterRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createInstance(request, options)

createInstance(request?: protos.google.cloud.alloydb.v1.ICreateInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Instance in a given project and location.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.ICreateInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource. For the required format, see the
   *  comment on the Instance.name field.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   */
  // const instanceId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const instance = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the create
   *  request.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callCreateInstance() {
    // Construct request
    const request = {
      parent,
      instanceId,
      instance,
    };

    // Run request
    const [operation] = await alloydbClient.createInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateInstance();

createInstance(request, options, callback)

createInstance(request: protos.google.cloud.alloydb.v1.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.ICreateInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createInstance(request, callback)

createInstance(request: protos.google.cloud.alloydb.v1.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.ICreateInstanceRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteBackup(request, options)

deleteBackup(request?: protos.google.cloud.alloydb.v1.IDeleteBackupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single Backup.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IDeleteBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource. For the required format, see the comment on
   *  the Backup.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, the backend validates the request, but doesn't actually
   *  execute it.
   */
  // const validateOnly = true
  /**
   *  Optional. The current etag of the Backup.
   *  If an etag is provided and does not match the current etag of the Backup,
   *  deletion will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callDeleteBackup() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.deleteBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteBackup();

deleteBackup(request, options, callback)

deleteBackup(request: protos.google.cloud.alloydb.v1.IDeleteBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IDeleteBackupRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteBackup(request, callback)

deleteBackup(request: protos.google.cloud.alloydb.v1.IDeleteBackupRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IDeleteBackupRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCluster(request, options)

deleteCluster(request?: protos.google.cloud.alloydb.v1.IDeleteClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single Cluster.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IDeleteClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Cluster.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. The current etag of the Cluster.
   *  If an etag is provided and does not match the current etag of the Cluster,
   *  deletion will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the delete.
   */
  // const validateOnly = true
  /**
   *  Optional. Whether to cascade delete child instances for given cluster.
   */
  // const force = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callDeleteCluster() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.deleteCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteCluster();

deleteCluster(request, options, callback)

deleteCluster(request: protos.google.cloud.alloydb.v1.IDeleteClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IDeleteClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCluster(request, callback)

deleteCluster(request: protos.google.cloud.alloydb.v1.IDeleteClusterRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IDeleteClusterRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteInstance(request, options)

deleteInstance(request?: protos.google.cloud.alloydb.v1.IDeleteInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single Instance.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IDeleteInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Instance.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. The current etag of the Instance.
   *  If an etag is provided and does not match the current etag of the Instance,
   *  deletion will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the delete.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callDeleteInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.deleteInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteInstance();

deleteInstance(request, options, callback)

deleteInstance(request: protos.google.cloud.alloydb.v1.IDeleteInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IDeleteInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteInstance(request, callback)

deleteInstance(request: protos.google.cloud.alloydb.v1.IDeleteInstanceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IDeleteInstanceRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteOperation(request, options, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

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.

Parameters
NameDescription
request protos.google.longrunning.DeleteOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

failoverInstance(request, options)

failoverInstance(request?: protos.google.cloud.alloydb.v1.IFailoverInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IFailoverInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Instance.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the failover.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callFailoverInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.failoverInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callFailoverInstance();

failoverInstance(request, options, callback)

failoverInstance(request: protos.google.cloud.alloydb.v1.IFailoverInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IFailoverInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

failoverInstance(request, callback)

failoverInstance(request: protos.google.cloud.alloydb.v1.IFailoverInstanceRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IFailoverInstanceRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getBackup(request, options)

getBackup(request?: protos.google.cloud.alloydb.v1.IGetBackupRequest, options?: CallOptions): Promise<[
        protos.google.cloud.alloydb.v1.IBackup,
        protos.google.cloud.alloydb.v1.IGetBackupRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Backup.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IGetBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IGetBackupRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource
   */
  // const name = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callGetBackup() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await alloydbClient.getBackup(request);
    console.log(response);
  }

  callGetBackup();

getBackup(request, options, callback)

getBackup(request: protos.google.cloud.alloydb.v1.IGetBackupRequest, options: CallOptions, callback: Callback<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IGetBackupRequest
options CallOptions
callback Callback<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getBackup(request, callback)

getBackup(request: protos.google.cloud.alloydb.v1.IGetBackupRequest, callback: Callback<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IGetBackupRequest
callback Callback<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCluster(request, options)

getCluster(request?: protos.google.cloud.alloydb.v1.IGetClusterRequest, options?: CallOptions): Promise<[
        protos.google.cloud.alloydb.v1.ICluster,
        protos.google.cloud.alloydb.v1.IGetClusterRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Cluster.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IGetClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IGetClusterRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Cluster.name field.
   */
  // const name = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callGetCluster() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await alloydbClient.getCluster(request);
    console.log(response);
  }

  callGetCluster();

getCluster(request, options, callback)

getCluster(request: protos.google.cloud.alloydb.v1.IGetClusterRequest, options: CallOptions, callback: Callback<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IGetClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IGetClusterRequest
options CallOptions
callback Callback<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IGetClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCluster(request, callback)

getCluster(request: protos.google.cloud.alloydb.v1.IGetClusterRequest, callback: Callback<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IGetClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IGetClusterRequest
callback Callback<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IGetClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options, callback)

getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.Policy>;

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<IamProtos.google.iam.v1.Policy>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

getInstance(request, options)

getInstance(request?: protos.google.cloud.alloydb.v1.IGetInstanceRequest, options?: CallOptions): Promise<[
        protos.google.cloud.alloydb.v1.IInstance,
        protos.google.cloud.alloydb.v1.IGetInstanceRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Instance.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IGetInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IGetInstanceRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Instance.name field.
   */
  // const name = 'abc123'
  /**
   *  The view of the instance to return.
   */
  // const view = {}

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callGetInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await alloydbClient.getInstance(request);
    console.log(response);
  }

  callGetInstance();

getInstance(request, options, callback)

getInstance(request: protos.google.cloud.alloydb.v1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IGetInstanceRequest
options CallOptions
callback Callback<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getInstance(request, callback)

getInstance(request: protos.google.cloud.alloydb.v1.IGetInstanceRequest, callback: Callback<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IGetInstanceRequest
callback Callback<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
NameDescription
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
Promise<LocationProtos.google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

const [response] = await client.getLocation(request);

getOperation(request, options, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

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.

Parameters
NameDescription
request protos.google.longrunning.GetOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

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
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

instancePath(project, location, cluster, instance)

instancePath(project: string, location: string, cluster: string, instance: string): string;

Return a fully-qualified instance resource name string.

Parameters
NameDescription
project string
location string
cluster string
instance string
Returns
TypeDescription
string

{string} Resource name string.

listBackups(request, options)

listBackups(request?: protos.google.cloud.alloydb.v1.IListBackupsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.alloydb.v1.IBackup[],
        protos.google.cloud.alloydb.v1.IListBackupsRequest | null,
        protos.google.cloud.alloydb.v1.IListBackupsResponse
    ]>;

Lists Backups in a given project and location.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.alloydb.v1.IBackup[], protos.google.cloud.alloydb.v1.IListBackupsRequest | null, protos.google.cloud.alloydb.v1.IListBackupsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listBackupsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listBackups(request, options, callback)

listBackups(request: protos.google.cloud.alloydb.v1.IListBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.alloydb.v1.IListBackupsRequest, protos.google.cloud.alloydb.v1.IListBackupsResponse | null | undefined, protos.google.cloud.alloydb.v1.IBackup>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListBackupsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.alloydb.v1.IListBackupsRequest, protos.google.cloud.alloydb.v1.IListBackupsResponse | null | undefined, protos.google.cloud.alloydb.v1.IBackup>
Returns
TypeDescription
void

listBackups(request, callback)

listBackups(request: protos.google.cloud.alloydb.v1.IListBackupsRequest, callback: PaginationCallback<protos.google.cloud.alloydb.v1.IListBackupsRequest, protos.google.cloud.alloydb.v1.IListBackupsResponse | null | undefined, protos.google.cloud.alloydb.v1.IBackup>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListBackupsRequest
callback PaginationCallback<protos.google.cloud.alloydb.v1.IListBackupsRequest, protos.google.cloud.alloydb.v1.IListBackupsResponse | null | undefined, protos.google.cloud.alloydb.v1.IBackup>
Returns
TypeDescription
void

listBackupsAsync(request, options)

listBackupsAsync(request?: protos.google.cloud.alloydb.v1.IListBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.alloydb.v1.IBackup>;

Equivalent to listBackups, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.alloydb.v1.IBackup>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListBackupsRequest
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results
   */
  // const filter = 'abc123'
  /**
   *  Hint for how to order the results
   */
  // const orderBy = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callListBackups() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await alloydbClient.listBackupsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListBackups();

listBackupsStream(request, options)

listBackupsStream(request?: protos.google.cloud.alloydb.v1.IListBackupsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listBackupsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listClusters(request, options)

listClusters(request?: protos.google.cloud.alloydb.v1.IListClustersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.alloydb.v1.ICluster[],
        protos.google.cloud.alloydb.v1.IListClustersRequest | null,
        protos.google.cloud.alloydb.v1.IListClustersResponse
    ]>;

Lists Clusters in a given project and location.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.alloydb.v1.ICluster[], protos.google.cloud.alloydb.v1.IListClustersRequest | null, protos.google.cloud.alloydb.v1.IListClustersResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listClustersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listClusters(request, options, callback)

listClusters(request: protos.google.cloud.alloydb.v1.IListClustersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.alloydb.v1.IListClustersRequest, protos.google.cloud.alloydb.v1.IListClustersResponse | null | undefined, protos.google.cloud.alloydb.v1.ICluster>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListClustersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.alloydb.v1.IListClustersRequest, protos.google.cloud.alloydb.v1.IListClustersResponse | null | undefined, protos.google.cloud.alloydb.v1.ICluster>
Returns
TypeDescription
void

listClusters(request, callback)

listClusters(request: protos.google.cloud.alloydb.v1.IListClustersRequest, callback: PaginationCallback<protos.google.cloud.alloydb.v1.IListClustersRequest, protos.google.cloud.alloydb.v1.IListClustersResponse | null | undefined, protos.google.cloud.alloydb.v1.ICluster>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListClustersRequest
callback PaginationCallback<protos.google.cloud.alloydb.v1.IListClustersRequest, protos.google.cloud.alloydb.v1.IListClustersResponse | null | undefined, protos.google.cloud.alloydb.v1.ICluster>
Returns
TypeDescription
void

listClustersAsync(request, options)

listClustersAsync(request?: protos.google.cloud.alloydb.v1.IListClustersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.alloydb.v1.ICluster>;

Equivalent to listClusters, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.alloydb.v1.ICluster>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource. For the required format, see the
   *  comment on the Cluster.name field. Additionally, you can perform an
   *  aggregated list operation by specifying a value with the following format:
   *   * projects/{project}/locations/-
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. Server may return fewer items than
   *  requested. If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Filtering results
   */
  // const filter = 'abc123'
  /**
   *  Optional. Hint for how to order the results
   */
  // const orderBy = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callListClusters() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await alloydbClient.listClustersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListClusters();

listClustersStream(request, options)

listClustersStream(request?: protos.google.cloud.alloydb.v1.IListClustersRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listClustersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listInstances(request, options)

listInstances(request?: protos.google.cloud.alloydb.v1.IListInstancesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.alloydb.v1.IInstance[],
        protos.google.cloud.alloydb.v1.IListInstancesRequest | null,
        protos.google.cloud.alloydb.v1.IListInstancesResponse
    ]>;

Lists Instances in a given project and location.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.alloydb.v1.IInstance[], protos.google.cloud.alloydb.v1.IListInstancesRequest | null, protos.google.cloud.alloydb.v1.IListInstancesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listInstancesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listInstances(request, options, callback)

listInstances(request: protos.google.cloud.alloydb.v1.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.alloydb.v1.IListInstancesRequest, protos.google.cloud.alloydb.v1.IListInstancesResponse | null | undefined, protos.google.cloud.alloydb.v1.IInstance>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListInstancesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.alloydb.v1.IListInstancesRequest, protos.google.cloud.alloydb.v1.IListInstancesResponse | null | undefined, protos.google.cloud.alloydb.v1.IInstance>
Returns
TypeDescription
void

listInstances(request, callback)

listInstances(request: protos.google.cloud.alloydb.v1.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.alloydb.v1.IListInstancesRequest, protos.google.cloud.alloydb.v1.IListInstancesResponse | null | undefined, protos.google.cloud.alloydb.v1.IInstance>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListInstancesRequest
callback PaginationCallback<protos.google.cloud.alloydb.v1.IListInstancesRequest, protos.google.cloud.alloydb.v1.IListInstancesResponse | null | undefined, protos.google.cloud.alloydb.v1.IInstance>
Returns
TypeDescription
void

listInstancesAsync(request, options)

listInstancesAsync(request?: protos.google.cloud.alloydb.v1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.alloydb.v1.IInstance>;

Equivalent to listInstances, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.alloydb.v1.IInstance>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource. For the required format, see the
   *  comment on the Instance.name field. Additionally, you can perform an
   *  aggregated list operation by specifying a value with one of the following
   *  formats:
   *   * projects/{project}/locations/-/clusters/-
   *   * projects/{project}/locations/{region}/clusters/-
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. Server may return fewer items than
   *  requested. If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Filtering results
   */
  // const filter = 'abc123'
  /**
   *  Optional. Hint for how to order the results
   */
  // const orderBy = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callListInstances() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await alloydbClient.listInstancesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListInstances();

listInstancesStream(request, options)

listInstancesStream(request?: protos.google.cloud.alloydb.v1.IListInstancesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listInstancesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<LocationProtos.google.cloud.location.ILocation>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
NameDescription
request protos.google.longrunning.ListOperationsRequest

The request object that will be sent.

options gax.CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
TypeDescription
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listSupportedDatabaseFlags(request, options)

listSupportedDatabaseFlags(request?: protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.alloydb.v1.ISupportedDatabaseFlag[],
        protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest | null,
        protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsResponse
    ]>;

Lists SupportedDatabaseFlags for a given project and location.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.alloydb.v1.ISupportedDatabaseFlag[], protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest | null, protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listSupportedDatabaseFlagsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSupportedDatabaseFlags(request, options, callback)

listSupportedDatabaseFlags(request: protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsResponse | null | undefined, protos.google.cloud.alloydb.v1.ISupportedDatabaseFlag>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsResponse | null | undefined, protos.google.cloud.alloydb.v1.ISupportedDatabaseFlag>
Returns
TypeDescription
void

listSupportedDatabaseFlags(request, callback)

listSupportedDatabaseFlags(request: protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, callback: PaginationCallback<protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsResponse | null | undefined, protos.google.cloud.alloydb.v1.ISupportedDatabaseFlag>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest
callback PaginationCallback<protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsResponse | null | undefined, protos.google.cloud.alloydb.v1.ISupportedDatabaseFlag>
Returns
TypeDescription
void

listSupportedDatabaseFlagsAsync(request, options)

listSupportedDatabaseFlagsAsync(request?: protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.alloydb.v1.ISupportedDatabaseFlag>;

Equivalent to listSupportedDatabaseFlags, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.alloydb.v1.ISupportedDatabaseFlag>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the parent resource. The required format is:
   *   * projects/{project}/locations/{location}
   *  Regardless of the parent specified here, as long it is contains a valid
   *  project and location, the service will return a static list of supported
   *  flags resources. Note that we do not yet support region-specific
   *  flags.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callListSupportedDatabaseFlags() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await alloydbClient.listSupportedDatabaseFlagsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListSupportedDatabaseFlags();

listSupportedDatabaseFlagsStream(request, options)

listSupportedDatabaseFlagsStream(request?: protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSupportedDatabaseFlagsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchBackupFromBackupName(backupName)

matchBackupFromBackupName(backupName: string): string | number;

Parse the backup from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the backup.

matchClusterFromClusterName(clusterName)

matchClusterFromClusterName(clusterName: string): string | number;

Parse the cluster from Cluster resource.

Parameter
NameDescription
clusterName string

A fully-qualified path representing Cluster resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchClusterFromInstanceName(instanceName)

matchClusterFromInstanceName(instanceName: string): string | number;

Parse the cluster from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchFlagFromSupportedDatabaseFlagName(supportedDatabaseFlagName)

matchFlagFromSupportedDatabaseFlagName(supportedDatabaseFlagName: string): string | number;

Parse the flag from SupportedDatabaseFlag resource.

Parameter
NameDescription
supportedDatabaseFlagName string

A fully-qualified path representing SupportedDatabaseFlag resource.

Returns
TypeDescription
string | number

{string} A string representing the flag.

matchInstanceFromInstanceName(instanceName)

matchInstanceFromInstanceName(instanceName: string): string | number;

Parse the instance from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchLocationFromBackupName(backupName)

matchLocationFromBackupName(backupName: string): string | number;

Parse the location from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromClusterName(clusterName)

matchLocationFromClusterName(clusterName: string): string | number;

Parse the location from Cluster resource.

Parameter
NameDescription
clusterName string

A fully-qualified path representing Cluster resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromInstanceName(instanceName)

matchLocationFromInstanceName(instanceName: string): string | number;

Parse the location from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromSupportedDatabaseFlagName(supportedDatabaseFlagName)

matchLocationFromSupportedDatabaseFlagName(supportedDatabaseFlagName: string): string | number;

Parse the location from SupportedDatabaseFlag resource.

Parameter
NameDescription
supportedDatabaseFlagName string

A fully-qualified path representing SupportedDatabaseFlag resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromBackupName(backupName)

matchProjectFromBackupName(backupName: string): string | number;

Parse the project from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromClusterName(clusterName)

matchProjectFromClusterName(clusterName: string): string | number;

Parse the project from Cluster resource.

Parameter
NameDescription
clusterName string

A fully-qualified path representing Cluster resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromInstanceName(instanceName)

matchProjectFromInstanceName(instanceName: string): string | number;

Parse the project from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromSupportedDatabaseFlagName(supportedDatabaseFlagName)

matchProjectFromSupportedDatabaseFlagName(supportedDatabaseFlagName: string): string | number;

Parse the project from SupportedDatabaseFlag resource.

Parameter
NameDescription
supportedDatabaseFlagName string

A fully-qualified path representing SupportedDatabaseFlag resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

restartInstance(request, options)

restartInstance(request?: protos.google.cloud.alloydb.v1.IRestartInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Restart an Instance in a cluster. Imperative only.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IRestartInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the resource. For the required format, see the
   *  comment on the Instance.name field.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the restart.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callRestartInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await alloydbClient.restartInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRestartInstance();

restartInstance(request, options, callback)

restartInstance(request: protos.google.cloud.alloydb.v1.IRestartInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IRestartInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

restartInstance(request, callback)

restartInstance(request: protos.google.cloud.alloydb.v1.IRestartInstanceRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IRestartInstanceRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

restoreCluster(request, options)

restoreCluster(request?: protos.google.cloud.alloydb.v1.IRestoreClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IRestoreClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Backup source.
   */
  // const backupSource = {}
  /**
   *  Required. The name of the parent resource. For the required format, see the
   *  comment on the Cluster.name field.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the requesting object.
   */
  // const clusterId = 'abc123'
  /**
   *  Required. The resource being created
   */
  // const cluster = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the import
   *  request.
   */
  // const validateOnly = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callRestoreCluster() {
    // Construct request
    const request = {
      parent,
      clusterId,
      cluster,
    };

    // Run request
    const [operation] = await alloydbClient.restoreCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRestoreCluster();

restoreCluster(request, options, callback)

restoreCluster(request: protos.google.cloud.alloydb.v1.IRestoreClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IRestoreClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

restoreCluster(request, callback)

restoreCluster(request: protos.google.cloud.alloydb.v1.IRestoreClusterRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IRestoreClusterRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setIamPolicy(request, options, callback)

setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.Policy>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<IamProtos.google.iam.v1.Policy>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

supportedDatabaseFlagPath(project, location, flag)

supportedDatabaseFlagPath(project: string, location: string, flag: string): string;

Return a fully-qualified supportedDatabaseFlag resource name string.

Parameters
NameDescription
project string
location string
flag string
Returns
TypeDescription
string

{string} Resource name string.

testIamPermissions(request, options, callback)

testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

updateBackup(request, options)

updateBackup(request?: protos.google.cloud.alloydb.v1.IUpdateBackupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single Backup.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IUpdateBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Backup resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const backup = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, the backend validates the request, but doesn't actually
   *  execute it.
   */
  // const validateOnly = true
  /**
   *  Optional. If set to true, update succeeds even if instance is not found. In
   *  that case, a new backup is created and `update_mask` is ignored.
   */
  // const allowMissing = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callUpdateBackup() {
    // Construct request
    const request = {
      backup,
    };

    // Run request
    const [operation] = await alloydbClient.updateBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateBackup();

updateBackup(request, options, callback)

updateBackup(request: protos.google.cloud.alloydb.v1.IUpdateBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IUpdateBackupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateBackup(request, callback)

updateBackup(request: protos.google.cloud.alloydb.v1.IUpdateBackupRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IUpdateBackupRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IBackup, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCluster(request, options)

updateCluster(request?: protos.google.cloud.alloydb.v1.IUpdateClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single Cluster.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IUpdateClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Cluster resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const cluster = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the update
   *  request.
   */
  // const validateOnly = true
  /**
   *  Optional. If set to true, update succeeds even if cluster is not found. In
   *  that case, a new cluster is created and `update_mask` is ignored.
   */
  // const allowMissing = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callUpdateCluster() {
    // Construct request
    const request = {
      cluster,
    };

    // Run request
    const [operation] = await alloydbClient.updateCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCluster();

updateCluster(request, options, callback)

updateCluster(request: protos.google.cloud.alloydb.v1.IUpdateClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IUpdateClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCluster(request, callback)

updateCluster(request: protos.google.cloud.alloydb.v1.IUpdateClusterRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IUpdateClusterRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.ICluster, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateInstance(request, options)

updateInstance(request?: protos.google.cloud.alloydb.v1.IUpdateInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single Instance.

Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IUpdateInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Instance resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const instance = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set, performs request validation (e.g. permission checks and
   *  any other type of validation), but do not actually execute the update
   *  request.
   */
  // const validateOnly = true
  /**
   *  Optional. If set to true, update succeeds even if instance is not found. In
   *  that case, a new instance is created and `update_mask` is ignored.
   */
  // const allowMissing = true

  // Imports the Alloydb library
  const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;

  // Instantiates a client
  const alloydbClient = new AlloyDBAdminClient();

  async function callUpdateInstance() {
    // Construct request
    const request = {
      instance,
    };

    // Run request
    const [operation] = await alloydbClient.updateInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateInstance();

updateInstance(request, options, callback)

updateInstance(request: protos.google.cloud.alloydb.v1.IUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IUpdateInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateInstance(request, callback)

updateInstance(request: protos.google.cloud.alloydb.v1.IUpdateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.alloydb.v1.IUpdateInstanceRequest
callback Callback<LROperation<protos.google.cloud.alloydb.v1.IInstance, protos.google.cloud.alloydb.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void