Class v1.BackupForGKEClient (2.1.0)

BackupForGKE allows Kubernetes administrators to configure, execute, and manage backup and restore operations for their GKE clusters. v1

Package

@google-cloud/gke-backup

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of BackupForGKEClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof 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 BackupForGKEClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

backupForGKEStub

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

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.

universeDomain

get universeDomain(): string;

warn

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

Methods

backupChannelPath(project, location, backupChannel)

backupChannelPath(project: string, location: string, backupChannel: string): string;

Return a fully-qualified backupChannel resource name string.

Parameters
Name Description
project string
location string
backupChannel string
Returns
Type Description
string

{string} Resource name string.

backupPath(project, location, backupPlan, backup)

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

Return a fully-qualified backup resource name string.

Parameters
Name Description
project string
location string
backupPlan string
backup string
Returns
Type Description
string

{string} Resource name string.

backupPlanBindingPath(project, location, backupChannel, backupPlanBinding)

backupPlanBindingPath(project: string, location: string, backupChannel: string, backupPlanBinding: string): string;

Return a fully-qualified backupPlanBinding resource name string.

Parameters
Name Description
project string
location string
backupChannel string
backupPlanBinding string
Returns
Type Description
string

{string} Resource name string.

backupPlanPath(project, location, backupPlan)

backupPlanPath(project: string, location: string, backupPlan: string): string;

Return a fully-qualified backupPlan resource name string.

Parameters
Name Description
project string
location string
backupPlan string
Returns
Type Description
string

{string} Resource name string.

cancelOperation(request, optionsOrCallback, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | 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
Name Description
request CancelOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
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
Type Description
Promise<protos.google.protobuf.Empty>
Example

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

checkCreateBackupChannelProgress(name)

checkCreateBackupChannelProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.BackupChannel, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.BackupChannel, protos.google.cloud.gkebackup.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 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 location within which to create the BackupChannel.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The BackupChannel resource object to create.
   */
  // const backupChannel = {}
  /**
   *  Optional. The client-provided short name for the BackupChannel resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of BackupChannels in this location
   *  If the user does not provide a name, a uuid will be used as the name.
   */
  // const backupChannelId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callCreateBackupChannel();

checkCreateBackupPlanProgress(name)

checkCreateBackupPlanProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.BackupPlan, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.BackupPlan, protos.google.cloud.gkebackup.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 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 location within which to create the BackupPlan.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The BackupPlan resource object to create.
   */
  // const backupPlan = {}
  /**
   *  Required. The client-provided short name for the BackupPlan resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of BackupPlans in this location
   */
  // const backupPlanId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callCreateBackupPlan() {
    // Construct request
    const request = {
      parent,
      backupPlan,
      backupPlanId,
    };

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

  callCreateBackupPlan();

checkCreateBackupProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.Backup, protos.google.cloud.gkebackup.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 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 BackupPlan within which to create the Backup.
   *  Format: `projects/* /locations/* /backupPlans/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The Backup resource to create.
   */
  // const backup = {}
  /**
   *  Optional. The client-provided short name for the Backup resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of Backups in this BackupPlan
   */
  // const backupId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callCreateBackup();

checkCreateRestoreChannelProgress(name)

checkCreateRestoreChannelProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.RestoreChannel, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.RestoreChannel, protos.google.cloud.gkebackup.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 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 location within which to create the RestoreChannel.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The RestoreChannel resource object to create.
   */
  // const restoreChannel = {}
  /**
   *  Optional. The client-provided short name for the RestoreChannel resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of RestoreChannels in this location
   *  If the user does not provide a name, a uuid will be used as the name.
   */
  // const restoreChannelId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callCreateRestoreChannel();

checkCreateRestorePlanProgress(name)

checkCreateRestorePlanProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.RestorePlan, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.RestorePlan, protos.google.cloud.gkebackup.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 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 location within which to create the RestorePlan.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The RestorePlan resource object to create.
   */
  // const restorePlan = {}
  /**
   *  Required. The client-provided short name for the RestorePlan resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of RestorePlans in this location
   */
  // const restorePlanId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callCreateRestorePlan() {
    // Construct request
    const request = {
      parent,
      restorePlan,
      restorePlanId,
    };

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

  callCreateRestorePlan();

checkCreateRestoreProgress(name)

checkCreateRestoreProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.Restore, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.Restore, protos.google.cloud.gkebackup.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 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 RestorePlan within which to create the Restore.
   *  Format: `projects/* /locations/* /restorePlans/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The restore resource to create.
   */
  // const restore = {}
  /**
   *  Required. The client-provided short name for the Restore resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of Restores in this RestorePlan.
   */
  // const restoreId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callCreateRestore() {
    // Construct request
    const request = {
      parent,
      restore,
      restoreId,
    };

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

  callCreateRestore();

checkDeleteBackupChannelProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gkebackup.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 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. Fully qualified BackupChannel name.
   *  Format: `projects/* /locations/* /backupChannels/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target BackupChannel's etag google.cloud.gkebackup.v1.BackupChannel.etag 
   *  field or the request is rejected.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set to true, any BackupPlanAssociations below this
   *  BackupChannel will also be deleted. Otherwise, the request will only
   *  succeed if the BackupChannel has no BackupPlanAssociations.
   */
  // const force = true

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteBackupChannel();

checkDeleteBackupPlanProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gkebackup.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 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. Fully qualified BackupPlan name.
   *  Format: `projects/* /locations/* /backupPlans/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target BackupPlan's etag google.cloud.gkebackup.v1.BackupPlan.etag  field
   *  or the request is rejected.
   */
  // const etag = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteBackupPlan();

checkDeleteBackupProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gkebackup.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 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 Backup resource.
   *  Format: `projects/* /locations/* /backupPlans/* /backups/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target Backup's etag google.cloud.gkebackup.v1.Backup.etag  field or the
   *  request is rejected.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set to true, any VolumeBackups below this Backup will also be
   *  deleted. Otherwise, the request will only succeed if the Backup has no
   *  VolumeBackups.
   */
  // const force = true

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteBackup();

checkDeleteRestoreChannelProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gkebackup.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 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. Fully qualified RestoreChannel name.
   *  Format: `projects/* /locations/* /restoreChannels/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target RestoreChannel's
   *  etag google.cloud.gkebackup.v1.RestoreChannel.etag  field or the request
   *  is rejected.
   */
  // const etag = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteRestoreChannel();

checkDeleteRestorePlanProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gkebackup.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 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. Fully qualified RestorePlan name.
   *  Format: `projects/* /locations/* /restorePlans/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target RestorePlan's etag google.cloud.gkebackup.v1.RestorePlan.etag 
   *  field or the request is rejected.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set to true, any Restores below this RestorePlan will also be
   *  deleted. Otherwise, the request will only succeed if the RestorePlan has no
   *  Restores.
   */
  // const force = true

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteRestorePlan();

checkDeleteRestoreProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gkebackup.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 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. Full name of the Restore
   *  Format: `projects/* /locations/* /restorePlans/* /restores/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target Restore's etag google.cloud.gkebackup.v1.Restore.etag  field or
   *  the request is rejected.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set to true, any VolumeRestores below this restore will also
   *  be deleted. Otherwise, the request will only succeed if the restore has no
   *  VolumeRestores.
   */
  // const force = true

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteRestore();

checkUpdateBackupChannelProgress(name)

checkUpdateBackupChannelProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.BackupChannel, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.BackupChannel, protos.google.cloud.gkebackup.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 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. A new version of the BackupChannel resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const backupChannel = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  BackupChannel targeted for update. The values for each of these
   *  updated fields will be taken from the `backup_channel` provided
   *  with this request. Field names are relative to the root of the resource
   *  (e.g., `description`, `labels`, etc.)
   *  If no `update_mask` is provided, all fields in `backup_channel` will
   *  be written to the target BackupChannel resource. Note that
   *  OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and
   *  are not used to update the target BackupChannel.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateBackupChannel() {
    // Construct request
    const request = {
      backupChannel,
    };

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

  callUpdateBackupChannel();

checkUpdateBackupPlanProgress(name)

checkUpdateBackupPlanProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.BackupPlan, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.BackupPlan, protos.google.cloud.gkebackup.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 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. A new version of the BackupPlan resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const backupPlan = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  BackupPlan targeted for update. The values for each of these
   *  updated fields will be taken from the `backup_plan` provided
   *  with this request. Field names are relative to the root of the resource
   *  (e.g., `description`, `backup_config.include_volume_data`, etc.)
   *  If no `update_mask` is provided, all fields in `backup_plan` will be
   *  written to the target BackupPlan resource.
   *  Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored
   *  and are not used to update the target BackupPlan.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateBackupPlan() {
    // Construct request
    const request = {
      backupPlan,
    };

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

  callUpdateBackupPlan();

checkUpdateBackupProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.Backup, protos.google.cloud.gkebackup.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 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. A new version of the Backup resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const backup = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  Backup targeted for update. The values for each of these
   *  updated fields will be taken from the `backup_plan` provided
   *  with this request. Field names are relative to the root of the resource.
   *  If no `update_mask` is provided, all fields in `backup` will be
   *  written to the target Backup resource.
   *  Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored
   *  and are not used to update the target Backup.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callUpdateBackup();

checkUpdateRestoreChannelProgress(name)

checkUpdateRestoreChannelProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.RestoreChannel, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.RestoreChannel, protos.google.cloud.gkebackup.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 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. A new version of the RestoreChannel resource that contains
   *  updated fields. This may be sparsely populated if an `update_mask` is
   *  provided.
   */
  // const restoreChannel = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  RestoreChannel targeted for update. The values for each of these
   *  updated fields will be taken from the `restore_channel` provided
   *  with this request. Field names are relative to the root of the resource
   *  (e.g., `description`, `destination_project_id`, etc.)
   *  If no `update_mask` is provided, all fields in `restore_channel` will
   *  be written to the target RestoreChannel resource. Note that
   *  OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and
   *  are not used to update the target RestoreChannel.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateRestoreChannel() {
    // Construct request
    const request = {
      restoreChannel,
    };

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

  callUpdateRestoreChannel();

checkUpdateRestorePlanProgress(name)

checkUpdateRestorePlanProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.RestorePlan, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.RestorePlan, protos.google.cloud.gkebackup.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 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. A new version of the RestorePlan resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const restorePlan = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  RestorePlan targeted for update. The values for each of these
   *  updated fields will be taken from the `restore_plan` provided
   *  with this request. Field names are relative to the root of the resource.
   *  If no `update_mask` is provided, all fields in `restore_plan` will be
   *  written to the target RestorePlan resource.
   *  Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored
   *  and are not used to update the target RestorePlan.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateRestorePlan() {
    // Construct request
    const request = {
      restorePlan,
    };

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

  callUpdateRestorePlan();

checkUpdateRestoreProgress(name)

checkUpdateRestoreProgress(name: string): Promise<LROperation<protos.google.cloud.gkebackup.v1.Restore, protos.google.cloud.gkebackup.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.gkebackup.v1.Restore, protos.google.cloud.gkebackup.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 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. A new version of the Restore resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const restore = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  Restore targeted for update. The values for each of these
   *  updated fields will be taken from the `restore` provided
   *  with this request. Field names are relative to the root of the resource.
   *  If no `update_mask` is provided, all fields in `restore` will be
   *  written to the target Restore resource.
   *  Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored
   *  and are not used to update the target Restore.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateRestore() {
    // Construct request
    const request = {
      restore,
    };

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

  callUpdateRestore();

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
Type Description
Promise<void>

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

createBackup(request, options)

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

Creates a Backup for the given BackupPlan.

Parameters
Name Description
request ICreateBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IBackup, protos.google.cloud.gkebackup.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 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 BackupPlan within which to create the Backup.
   *  Format: `projects/* /locations/* /backupPlans/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The Backup resource to create.
   */
  // const backup = {}
  /**
   *  Optional. The client-provided short name for the Backup resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of Backups in this BackupPlan
   */
  // const backupId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callCreateBackup();

createBackup(request, options, callback)

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

createBackup(request, callback)

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

createBackupChannel(request, options)

createBackupChannel(request?: protos.google.cloud.gkebackup.v1.ICreateBackupChannelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new BackupChannel in a given location.

Parameters
Name Description
request ICreateBackupChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.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 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 location within which to create the BackupChannel.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The BackupChannel resource object to create.
   */
  // const backupChannel = {}
  /**
   *  Optional. The client-provided short name for the BackupChannel resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of BackupChannels in this location
   *  If the user does not provide a name, a uuid will be used as the name.
   */
  // const backupChannelId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callCreateBackupChannel();

createBackupChannel(request, options, callback)

createBackupChannel(request: protos.google.cloud.gkebackup.v1.ICreateBackupChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateBackupChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createBackupChannel(request, callback)

createBackupChannel(request: protos.google.cloud.gkebackup.v1.ICreateBackupChannelRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateBackupChannelRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createBackupPlan(request, options)

createBackupPlan(request?: protos.google.cloud.gkebackup.v1.ICreateBackupPlanRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new BackupPlan in a given location.

Parameters
Name Description
request ICreateBackupPlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.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 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 location within which to create the BackupPlan.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The BackupPlan resource object to create.
   */
  // const backupPlan = {}
  /**
   *  Required. The client-provided short name for the BackupPlan resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of BackupPlans in this location
   */
  // const backupPlanId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callCreateBackupPlan() {
    // Construct request
    const request = {
      parent,
      backupPlan,
      backupPlanId,
    };

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

  callCreateBackupPlan();

createBackupPlan(request, options, callback)

createBackupPlan(request: protos.google.cloud.gkebackup.v1.ICreateBackupPlanRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateBackupPlanRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createBackupPlan(request, callback)

createBackupPlan(request: protos.google.cloud.gkebackup.v1.ICreateBackupPlanRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateBackupPlanRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestore(request, options)

createRestore(request?: protos.google.cloud.gkebackup.v1.ICreateRestoreRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Restore for the given RestorePlan.

Parameters
Name Description
request ICreateRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.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 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 RestorePlan within which to create the Restore.
   *  Format: `projects/* /locations/* /restorePlans/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The restore resource to create.
   */
  // const restore = {}
  /**
   *  Required. The client-provided short name for the Restore resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of Restores in this RestorePlan.
   */
  // const restoreId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callCreateRestore() {
    // Construct request
    const request = {
      parent,
      restore,
      restoreId,
    };

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

  callCreateRestore();

createRestore(request, options, callback)

createRestore(request: protos.google.cloud.gkebackup.v1.ICreateRestoreRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRestoreRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestore(request, callback)

createRestore(request: protos.google.cloud.gkebackup.v1.ICreateRestoreRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRestoreRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestoreChannel(request, options)

createRestoreChannel(request?: protos.google.cloud.gkebackup.v1.ICreateRestoreChannelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new RestoreChannel in a given location.

Parameters
Name Description
request ICreateRestoreChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.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 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 location within which to create the RestoreChannel.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The RestoreChannel resource object to create.
   */
  // const restoreChannel = {}
  /**
   *  Optional. The client-provided short name for the RestoreChannel resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of RestoreChannels in this location
   *  If the user does not provide a name, a uuid will be used as the name.
   */
  // const restoreChannelId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callCreateRestoreChannel();

createRestoreChannel(request, options, callback)

createRestoreChannel(request: protos.google.cloud.gkebackup.v1.ICreateRestoreChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRestoreChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestoreChannel(request, callback)

createRestoreChannel(request: protos.google.cloud.gkebackup.v1.ICreateRestoreChannelRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRestoreChannelRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestorePlan(request, options)

createRestorePlan(request?: protos.google.cloud.gkebackup.v1.ICreateRestorePlanRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new RestorePlan in a given location.

Parameters
Name Description
request ICreateRestorePlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.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 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 location within which to create the RestorePlan.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. The RestorePlan resource object to create.
   */
  // const restorePlan = {}
  /**
   *  Required. The client-provided short name for the RestorePlan resource.
   *  This name must:
   *  - be between 1 and 63 characters long (inclusive)
   *  - consist of only lower-case ASCII letters, numbers, and dashes
   *  - start with a lower-case letter
   *  - end with a lower-case letter or number
   *  - be unique within the set of RestorePlans in this location
   */
  // const restorePlanId = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callCreateRestorePlan() {
    // Construct request
    const request = {
      parent,
      restorePlan,
      restorePlanId,
    };

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

  callCreateRestorePlan();

createRestorePlan(request, options, callback)

createRestorePlan(request: protos.google.cloud.gkebackup.v1.ICreateRestorePlanRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRestorePlanRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestorePlan(request, callback)

createRestorePlan(request: protos.google.cloud.gkebackup.v1.ICreateRestorePlanRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRestorePlanRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackup(request, options)

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

Deletes an existing Backup.

Parameters
Name Description
request IDeleteBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.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 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 Backup resource.
   *  Format: `projects/* /locations/* /backupPlans/* /backups/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target Backup's etag google.cloud.gkebackup.v1.Backup.etag  field or the
   *  request is rejected.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set to true, any VolumeBackups below this Backup will also be
   *  deleted. Otherwise, the request will only succeed if the Backup has no
   *  VolumeBackups.
   */
  // const force = true

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteBackup();

deleteBackup(request, options, callback)

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

deleteBackup(request, callback)

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

deleteBackupChannel(request, options)

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

Deletes an existing BackupChannel.

Parameters
Name Description
request IDeleteBackupChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.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 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. Fully qualified BackupChannel name.
   *  Format: `projects/* /locations/* /backupChannels/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target BackupChannel's etag google.cloud.gkebackup.v1.BackupChannel.etag 
   *  field or the request is rejected.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set to true, any BackupPlanAssociations below this
   *  BackupChannel will also be deleted. Otherwise, the request will only
   *  succeed if the BackupChannel has no BackupPlanAssociations.
   */
  // const force = true

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteBackupChannel();

deleteBackupChannel(request, options, callback)

deleteBackupChannel(request: protos.google.cloud.gkebackup.v1.IDeleteBackupChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteBackupChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackupChannel(request, callback)

deleteBackupChannel(request: protos.google.cloud.gkebackup.v1.IDeleteBackupChannelRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteBackupChannelRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackupPlan(request, options)

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

Deletes an existing BackupPlan.

Parameters
Name Description
request IDeleteBackupPlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.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 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. Fully qualified BackupPlan name.
   *  Format: `projects/* /locations/* /backupPlans/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target BackupPlan's etag google.cloud.gkebackup.v1.BackupPlan.etag  field
   *  or the request is rejected.
   */
  // const etag = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteBackupPlan();

deleteBackupPlan(request, options, callback)

deleteBackupPlan(request: protos.google.cloud.gkebackup.v1.IDeleteBackupPlanRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteBackupPlanRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackupPlan(request, callback)

deleteBackupPlan(request: protos.google.cloud.gkebackup.v1.IDeleteBackupPlanRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteBackupPlanRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteOperation(request, optionsOrCallback, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: 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
Name Description
request DeleteOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
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
Type Description
Promise<protos.google.protobuf.Empty>
Example

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

deleteRestore(request, options)

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

Deletes an existing Restore.

Parameters
Name Description
request IDeleteRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.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 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. Full name of the Restore
   *  Format: `projects/* /locations/* /restorePlans/* /restores/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target Restore's etag google.cloud.gkebackup.v1.Restore.etag  field or
   *  the request is rejected.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set to true, any VolumeRestores below this restore will also
   *  be deleted. Otherwise, the request will only succeed if the restore has no
   *  VolumeRestores.
   */
  // const force = true

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteRestore();

deleteRestore(request, options, callback)

deleteRestore(request: protos.google.cloud.gkebackup.v1.IDeleteRestoreRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteRestoreRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRestore(request, callback)

deleteRestore(request: protos.google.cloud.gkebackup.v1.IDeleteRestoreRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteRestoreRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRestoreChannel(request, options)

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

Deletes an existing RestoreChannel.

Parameters
Name Description
request IDeleteRestoreChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.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 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. Fully qualified RestoreChannel name.
   *  Format: `projects/* /locations/* /restoreChannels/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target RestoreChannel's
   *  etag google.cloud.gkebackup.v1.RestoreChannel.etag  field or the request
   *  is rejected.
   */
  // const etag = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteRestoreChannel();

deleteRestoreChannel(request, options, callback)

deleteRestoreChannel(request: protos.google.cloud.gkebackup.v1.IDeleteRestoreChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteRestoreChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRestoreChannel(request, callback)

deleteRestoreChannel(request: protos.google.cloud.gkebackup.v1.IDeleteRestoreChannelRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteRestoreChannelRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRestorePlan(request, options)

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

Deletes an existing RestorePlan.

Parameters
Name Description
request IDeleteRestorePlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.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 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. Fully qualified RestorePlan name.
   *  Format: `projects/* /locations/* /restorePlans/*`
   */
  // const name = 'abc123'
  /**
   *  Optional. If provided, this value must match the current value of the
   *  target RestorePlan's etag google.cloud.gkebackup.v1.RestorePlan.etag 
   *  field or the request is rejected.
   */
  // const etag = 'abc123'
  /**
   *  Optional. If set to true, any Restores below this RestorePlan will also be
   *  deleted. Otherwise, the request will only succeed if the RestorePlan has no
   *  Restores.
   */
  // const force = true

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callDeleteRestorePlan();

deleteRestorePlan(request, options, callback)

deleteRestorePlan(request: protos.google.cloud.gkebackup.v1.IDeleteRestorePlanRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteRestorePlanRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRestorePlan(request, callback)

deleteRestorePlan(request: protos.google.cloud.gkebackup.v1.IDeleteRestorePlanRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteRestorePlanRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackup(request, options)

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

Retrieve the details of a single Backup.

Parameters
Name Description
request IGetBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IBackup, protos.google.cloud.gkebackup.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 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. Full name of the Backup resource.
   *  Format: `projects/* /locations/* /backupPlans/* /backups/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callGetBackup();

getBackup(request, options, callback)

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

getBackup(request, callback)

getBackup(request: protos.google.cloud.gkebackup.v1.IGetBackupRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IBackup, protos.google.cloud.gkebackup.v1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBackupRequest
callback Callback<protos.google.cloud.gkebackup.v1.IBackup, protos.google.cloud.gkebackup.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupChannel(request, options)

getBackupChannel(request?: protos.google.cloud.gkebackup.v1.IGetBackupChannelRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IBackupChannel,
        protos.google.cloud.gkebackup.v1.IGetBackupChannelRequest | undefined,
        {} | undefined
    ]>;

Retrieve the details of a single BackupChannel.

Parameters
Name Description
request IGetBackupChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IGetBackupChannelRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing BackupChannel. Please see the documentation 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. Fully qualified BackupChannel name.
   *  Format: `projects/* /locations/* /backupChannels/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getBackupChannel(request);
    console.log(response);
  }

  callGetBackupChannel();

getBackupChannel(request, options, callback)

getBackupChannel(request: protos.google.cloud.gkebackup.v1.IGetBackupChannelRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IGetBackupChannelRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBackupChannelRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IGetBackupChannelRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupChannel(request, callback)

getBackupChannel(request: protos.google.cloud.gkebackup.v1.IGetBackupChannelRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IGetBackupChannelRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBackupChannelRequest
callback Callback<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IGetBackupChannelRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupIndexDownloadUrl(request, options)

getBackupIndexDownloadUrl(request?: protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlResponse,
        (protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlRequest | undefined),
        {} | undefined
    ]>;

Retrieve the link to the backupIndex.

Parameters
Name Description
request IGetBackupIndexDownloadUrlRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlResponse, (protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing GetBackupIndexDownloadUrlResponse. Please see the documentation 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. Full name of Backup resource.
   *  Format:
   *  projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
   */
  // const backup = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getBackupIndexDownloadUrl(request);
    console.log(response);
  }

  callGetBackupIndexDownloadUrl();

getBackupIndexDownloadUrl(request, options, callback)

getBackupIndexDownloadUrl(request: protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlResponse, protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBackupIndexDownloadUrlRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlResponse, protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupIndexDownloadUrl(request, callback)

getBackupIndexDownloadUrl(request: protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlResponse, protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBackupIndexDownloadUrlRequest
callback Callback<protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlResponse, protos.google.cloud.gkebackup.v1.IGetBackupIndexDownloadUrlRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupPlan(request, options)

getBackupPlan(request?: protos.google.cloud.gkebackup.v1.IGetBackupPlanRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IBackupPlan,
        protos.google.cloud.gkebackup.v1.IGetBackupPlanRequest | undefined,
        {} | undefined
    ]>;

Retrieve the details of a single BackupPlan.

Parameters
Name Description
request IGetBackupPlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IGetBackupPlanRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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. Fully qualified BackupPlan name.
   *  Format: `projects/* /locations/* /backupPlans/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getBackupPlan(request);
    console.log(response);
  }

  callGetBackupPlan();

getBackupPlan(request, options, callback)

getBackupPlan(request: protos.google.cloud.gkebackup.v1.IGetBackupPlanRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBackupPlanRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupPlan(request, callback)

getBackupPlan(request: protos.google.cloud.gkebackup.v1.IGetBackupPlanRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBackupPlanRequest
callback Callback<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupPlanBinding(request, options)

getBackupPlanBinding(request?: protos.google.cloud.gkebackup.v1.IGetBackupPlanBindingRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IBackupPlanBinding,
        protos.google.cloud.gkebackup.v1.IGetBackupPlanBindingRequest | undefined,
        {} | undefined
    ]>;

Retrieve the details of a single BackupPlanBinding.

Parameters
Name Description
request IGetBackupPlanBindingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IBackupPlanBinding, protos.google.cloud.gkebackup.v1.IGetBackupPlanBindingRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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. Fully qualified BackupPlanBinding name.
   *  Format:
   *  `projects/* /locations/* /backupChannels/* /backupPlanBindings/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getBackupPlanBinding(request);
    console.log(response);
  }

  callGetBackupPlanBinding();

getBackupPlanBinding(request, options, callback)

getBackupPlanBinding(request: protos.google.cloud.gkebackup.v1.IGetBackupPlanBindingRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IBackupPlanBinding, protos.google.cloud.gkebackup.v1.IGetBackupPlanBindingRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBackupPlanBindingRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IBackupPlanBinding, protos.google.cloud.gkebackup.v1.IGetBackupPlanBindingRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupPlanBinding(request, callback)

getBackupPlanBinding(request: protos.google.cloud.gkebackup.v1.IGetBackupPlanBindingRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IBackupPlanBinding, protos.google.cloud.gkebackup.v1.IGetBackupPlanBindingRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBackupPlanBindingRequest
callback Callback<protos.google.cloud.gkebackup.v1.IBackupPlanBinding, protos.google.cloud.gkebackup.v1.IGetBackupPlanBindingRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, 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<google.iam.v1.Policy, 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
Type Description
Promise<[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.

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
Name Description
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

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

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
Type Description
Promise<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 for more details and examples.

Example

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

getOperation(request, optionsOrCallback, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: 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
Name Description
request GetOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
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
Type Description
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
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

getRestore(request, options)

getRestore(request?: protos.google.cloud.gkebackup.v1.IGetRestoreRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IRestore,
        protos.google.cloud.gkebackup.v1.IGetRestoreRequest | undefined,
        {} | undefined
    ]>;

Retrieves the details of a single Restore.

Parameters
Name Description
request IGetRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IGetRestoreRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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 restore resource.
   *  Format: `projects/* /locations/* /restorePlans/* /restores/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getRestore(request);
    console.log(response);
  }

  callGetRestore();

getRestore(request, options, callback)

getRestore(request: protos.google.cloud.gkebackup.v1.IGetRestoreRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IGetRestoreRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRestoreRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IGetRestoreRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestore(request, callback)

getRestore(request: protos.google.cloud.gkebackup.v1.IGetRestoreRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IGetRestoreRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRestoreRequest
callback Callback<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IGetRestoreRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestoreChannel(request, options)

getRestoreChannel(request?: protos.google.cloud.gkebackup.v1.IGetRestoreChannelRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IRestoreChannel,
        protos.google.cloud.gkebackup.v1.IGetRestoreChannelRequest | undefined,
        {} | undefined
    ]>;

Retrieve the details of a single RestoreChannel.

Parameters
Name Description
request IGetRestoreChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IGetRestoreChannelRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing RestoreChannel. Please see the documentation 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. Fully qualified RestoreChannel name.
   *  Format: `projects/* /locations/* /restoreChannels/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getRestoreChannel(request);
    console.log(response);
  }

  callGetRestoreChannel();

getRestoreChannel(request, options, callback)

getRestoreChannel(request: protos.google.cloud.gkebackup.v1.IGetRestoreChannelRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IGetRestoreChannelRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRestoreChannelRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IGetRestoreChannelRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestoreChannel(request, callback)

getRestoreChannel(request: protos.google.cloud.gkebackup.v1.IGetRestoreChannelRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IGetRestoreChannelRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRestoreChannelRequest
callback Callback<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IGetRestoreChannelRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestorePlan(request, options)

getRestorePlan(request?: protos.google.cloud.gkebackup.v1.IGetRestorePlanRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IRestorePlan,
        protos.google.cloud.gkebackup.v1.IGetRestorePlanRequest | undefined,
        {} | undefined
    ]>;

Retrieve the details of a single RestorePlan.

Parameters
Name Description
request IGetRestorePlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IGetRestorePlanRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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. Fully qualified RestorePlan name.
   *  Format: `projects/* /locations/* /restorePlans/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getRestorePlan(request);
    console.log(response);
  }

  callGetRestorePlan();

getRestorePlan(request, options, callback)

getRestorePlan(request: protos.google.cloud.gkebackup.v1.IGetRestorePlanRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IGetRestorePlanRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRestorePlanRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IGetRestorePlanRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestorePlan(request, callback)

getRestorePlan(request: protos.google.cloud.gkebackup.v1.IGetRestorePlanRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IGetRestorePlanRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRestorePlanRequest
callback Callback<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IGetRestorePlanRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestorePlanBinding(request, options)

getRestorePlanBinding(request?: protos.google.cloud.gkebackup.v1.IGetRestorePlanBindingRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IRestorePlanBinding,
        (protos.google.cloud.gkebackup.v1.IGetRestorePlanBindingRequest | undefined),
        {} | undefined
    ]>;

Retrieve the details of a single RestorePlanBinding.

Parameters
Name Description
request IGetRestorePlanBindingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IRestorePlanBinding, (protos.google.cloud.gkebackup.v1.IGetRestorePlanBindingRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing RestorePlanBinding. Please see the documentation 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. Fully qualified RestorePlanBinding name.
   *  Format:
   *  `projects/* /locations/* /restoreChannels/* /restorePlanBindings/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getRestorePlanBinding(request);
    console.log(response);
  }

  callGetRestorePlanBinding();

getRestorePlanBinding(request, options, callback)

getRestorePlanBinding(request: protos.google.cloud.gkebackup.v1.IGetRestorePlanBindingRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IRestorePlanBinding, protos.google.cloud.gkebackup.v1.IGetRestorePlanBindingRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRestorePlanBindingRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IRestorePlanBinding, protos.google.cloud.gkebackup.v1.IGetRestorePlanBindingRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestorePlanBinding(request, callback)

getRestorePlanBinding(request: protos.google.cloud.gkebackup.v1.IGetRestorePlanBindingRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IRestorePlanBinding, protos.google.cloud.gkebackup.v1.IGetRestorePlanBindingRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRestorePlanBindingRequest
callback Callback<protos.google.cloud.gkebackup.v1.IRestorePlanBinding, protos.google.cloud.gkebackup.v1.IGetRestorePlanBindingRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getVolumeBackup(request, options)

getVolumeBackup(request?: protos.google.cloud.gkebackup.v1.IGetVolumeBackupRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IVolumeBackup,
        protos.google.cloud.gkebackup.v1.IGetVolumeBackupRequest | undefined,
        {} | undefined
    ]>;

Retrieve the details of a single VolumeBackup.

Parameters
Name Description
request IGetVolumeBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IVolumeBackup, protos.google.cloud.gkebackup.v1.IGetVolumeBackupRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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. Full name of the VolumeBackup resource.
   *  Format: `projects/* /locations/* /backupPlans/* /backups/* /volumeBackups/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getVolumeBackup(request);
    console.log(response);
  }

  callGetVolumeBackup();

getVolumeBackup(request, options, callback)

getVolumeBackup(request: protos.google.cloud.gkebackup.v1.IGetVolumeBackupRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IVolumeBackup, protos.google.cloud.gkebackup.v1.IGetVolumeBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetVolumeBackupRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IVolumeBackup, protos.google.cloud.gkebackup.v1.IGetVolumeBackupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getVolumeBackup(request, callback)

getVolumeBackup(request: protos.google.cloud.gkebackup.v1.IGetVolumeBackupRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IVolumeBackup, protos.google.cloud.gkebackup.v1.IGetVolumeBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetVolumeBackupRequest
callback Callback<protos.google.cloud.gkebackup.v1.IVolumeBackup, protos.google.cloud.gkebackup.v1.IGetVolumeBackupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getVolumeRestore(request, options)

getVolumeRestore(request?: protos.google.cloud.gkebackup.v1.IGetVolumeRestoreRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IVolumeRestore,
        protos.google.cloud.gkebackup.v1.IGetVolumeRestoreRequest | undefined,
        {} | undefined
    ]>;

Retrieve the details of a single VolumeRestore.

Parameters
Name Description
request IGetVolumeRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IVolumeRestore, protos.google.cloud.gkebackup.v1.IGetVolumeRestoreRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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. Full name of the VolumeRestore resource.
   *  Format: `projects/* /locations/* /restorePlans/* /restores/* /volumeRestores/*`
   */
  // const name = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

    // Run request
    const response = await gkebackupClient.getVolumeRestore(request);
    console.log(response);
  }

  callGetVolumeRestore();

getVolumeRestore(request, options, callback)

getVolumeRestore(request: protos.google.cloud.gkebackup.v1.IGetVolumeRestoreRequest, options: CallOptions, callback: Callback<protos.google.cloud.gkebackup.v1.IVolumeRestore, protos.google.cloud.gkebackup.v1.IGetVolumeRestoreRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetVolumeRestoreRequest
options CallOptions
callback Callback<protos.google.cloud.gkebackup.v1.IVolumeRestore, protos.google.cloud.gkebackup.v1.IGetVolumeRestoreRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getVolumeRestore(request, callback)

getVolumeRestore(request: protos.google.cloud.gkebackup.v1.IGetVolumeRestoreRequest, callback: Callback<protos.google.cloud.gkebackup.v1.IVolumeRestore, protos.google.cloud.gkebackup.v1.IGetVolumeRestoreRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetVolumeRestoreRequest
callback Callback<protos.google.cloud.gkebackup.v1.IVolumeRestore, protos.google.cloud.gkebackup.v1.IGetVolumeRestoreRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Type Description
Promise<{ [name: string]: Function; }>

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

listBackupChannels(request, options)

listBackupChannels(request?: protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IBackupChannel[],
        protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest | null,
        protos.google.cloud.gkebackup.v1.IListBackupChannelsResponse
    ]>;

Lists BackupChannels in a given location.

Parameters
Name Description
request IListBackupChannelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IBackupChannel[], protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest | null, protos.google.cloud.gkebackup.v1.IListBackupChannelsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of BackupChannel. 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 listBackupChannelsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listBackupChannels(request, options, callback)

listBackupChannels(request: protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest, protos.google.cloud.gkebackup.v1.IListBackupChannelsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupChannel>): void;
Parameters
Name Description
request IListBackupChannelsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest, protos.google.cloud.gkebackup.v1.IListBackupChannelsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupChannel>
Returns
Type Description
void

listBackupChannels(request, callback)

listBackupChannels(request: protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest, protos.google.cloud.gkebackup.v1.IListBackupChannelsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupChannel>): void;
Parameters
Name Description
request IListBackupChannelsRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest, protos.google.cloud.gkebackup.v1.IListBackupChannelsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupChannel>
Returns
Type Description
void

listBackupChannelsAsync(request, options)

listBackupChannelsAsync(request?: protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.v1.IBackupChannel>;

Equivalent to listBackupChannels, but returns an iterable object.

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

Parameters
Name Description
request IListBackupChannelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IBackupChannel>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing BackupChannel. 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 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 location that contains the BackupChannels to list.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may include a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListBackupChannelsResponse.next_page_token 
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of
   *  next_page_token google.cloud.gkebackup.v1.ListBackupChannelsResponse.next_page_token 
   *  received from a previous `ListBackupChannels` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to
   *  `ListBackupChannels` must match the call that provided the page
   *  token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field by which to sort the results.
   */
  // const orderBy = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListBackupChannels();

listBackupChannelsStream(request, options)

listBackupChannelsStream(request?: protos.google.cloud.gkebackup.v1.IListBackupChannelsRequest, options?: CallOptions): Transform;

Equivalent to listBackupChannels, but returns a NodeJS Stream object.

Parameters
Name Description
request IListBackupChannelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing BackupChannel 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 listBackupChannelsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listBackupPlanBindings(request, options)

listBackupPlanBindings(request?: protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IBackupPlanBinding[],
        protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest | null,
        protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsResponse
    ]>;

Lists BackupPlanBindings in a given location.

Parameters
Name Description
request IListBackupPlanBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IBackupPlanBinding[], protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest | null, protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsResponse ]>

{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 listBackupPlanBindingsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listBackupPlanBindings(request, options, callback)

listBackupPlanBindings(request: protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest, protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupPlanBinding>): void;
Parameters
Name Description
request IListBackupPlanBindingsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest, protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupPlanBinding>
Returns
Type Description
void

listBackupPlanBindings(request, callback)

listBackupPlanBindings(request: protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest, protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupPlanBinding>): void;
Parameters
Name Description
request IListBackupPlanBindingsRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest, protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupPlanBinding>
Returns
Type Description
void

listBackupPlanBindingsAsync(request, options)

listBackupPlanBindingsAsync(request?: protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.v1.IBackupPlanBinding>;

Equivalent to listBackupPlanBindings, but returns an iterable object.

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

Parameters
Name Description
request IListBackupPlanBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IBackupPlanBinding>

{Object} An iterable Object that allows async iteration. 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 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 BackupChannel that contains the BackupPlanBindings to list.
   *  Format: `projects/* /locations/* /backupChannels/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may include a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListBackupPlanBindingsResponse.next_page_token 
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of
   *  next_page_token google.cloud.gkebackup.v1.ListBackupPlanBindingsResponse.next_page_token 
   *  received from a previous `ListBackupPlanBindings` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to
   *  `ListBackupPlanBindings` must match the call that provided the page
   *  token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field by which to sort the results.
   */
  // const orderBy = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListBackupPlanBindings();

listBackupPlanBindingsStream(request, options)

listBackupPlanBindingsStream(request?: protos.google.cloud.gkebackup.v1.IListBackupPlanBindingsRequest, options?: CallOptions): Transform;

Equivalent to listBackupPlanBindings, but returns a NodeJS Stream object.

Parameters
Name Description
request IListBackupPlanBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 listBackupPlanBindingsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listBackupPlans(request, options)

listBackupPlans(request?: protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IBackupPlan[],
        protos.google.cloud.gkebackup.v1.IListBackupPlansRequest | null,
        protos.google.cloud.gkebackup.v1.IListBackupPlansResponse
    ]>;

Lists BackupPlans in a given location.

Parameters
Name Description
request IListBackupPlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IBackupPlan[], protos.google.cloud.gkebackup.v1.IListBackupPlansRequest | null, protos.google.cloud.gkebackup.v1.IListBackupPlansResponse ]>

{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 listBackupPlansAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listBackupPlans(request, options, callback)

listBackupPlans(request: protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, protos.google.cloud.gkebackup.v1.IListBackupPlansResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupPlan>): void;
Parameters
Name Description
request IListBackupPlansRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, protos.google.cloud.gkebackup.v1.IListBackupPlansResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupPlan>
Returns
Type Description
void

listBackupPlans(request, callback)

listBackupPlans(request: protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, protos.google.cloud.gkebackup.v1.IListBackupPlansResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupPlan>): void;
Parameters
Name Description
request IListBackupPlansRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, protos.google.cloud.gkebackup.v1.IListBackupPlansResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackupPlan>
Returns
Type Description
void

listBackupPlansAsync(request, options)

listBackupPlansAsync(request?: protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.v1.IBackupPlan>;

Equivalent to listBackupPlans, but returns an iterable object.

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

Parameters
Name Description
request IListBackupPlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IBackupPlan>

{Object} An iterable Object that allows async iteration. 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 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 location that contains the BackupPlans to list.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may include a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token 
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of
   *  next_page_token google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token 
   *  received from a previous `ListBackupPlans` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to
   *  `ListBackupPlans` must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field by which to sort the results.
   */
  // const orderBy = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListBackupPlans();

listBackupPlansStream(request, options)

listBackupPlansStream(request?: protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, options?: CallOptions): Transform;

Equivalent to listBackupPlans, but returns a NodeJS Stream object.

Parameters
Name Description
request IListBackupPlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 listBackupPlansAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listBackups(request, options)

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

Lists the Backups for a given BackupPlan.

Parameters
Name Description
request IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IBackup[], protos.google.cloud.gkebackup.v1.IListBackupsRequest | null, protos.google.cloud.gkebackup.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 for more details and examples.

listBackups(request, options, callback)

listBackups(request: protos.google.cloud.gkebackup.v1.IListBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupsRequest, protos.google.cloud.gkebackup.v1.IListBackupsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackup>): void;
Parameters
Name Description
request IListBackupsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupsRequest, protos.google.cloud.gkebackup.v1.IListBackupsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackup>
Returns
Type Description
void

listBackups(request, callback)

listBackups(request: protos.google.cloud.gkebackup.v1.IListBackupsRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupsRequest, protos.google.cloud.gkebackup.v1.IListBackupsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackup>): void;
Parameters
Name Description
request IListBackupsRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListBackupsRequest, protos.google.cloud.gkebackup.v1.IListBackupsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IBackup>
Returns
Type Description
void

listBackupsAsync(request, options)

listBackupsAsync(request?: protos.google.cloud.gkebackup.v1.IListBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.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
Name Description
request IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IBackup>

{Object} An iterable Object that allows async iteration. 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 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 BackupPlan that contains the Backups to list.
   *  Format: `projects/* /locations/* /backupPlans/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may include a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token 
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of
   *  next_page_token google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token 
   *  received from a previous `ListBackups` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to
   *  `ListBackups` must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field by which to sort the results.
   */
  // const orderBy = 'abc123'
  /**
   *  Optional. If set to true, the response will return partial results when
   *  some regions are unreachable and the unreachable field will be populated.
   */
  // const returnPartialSuccess = true

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListBackups();

listBackupsStream(request, options)

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

Equivalent to listBackups, but returns a NodeJS Stream object.

Parameters
Name Description
request IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 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
Name Description
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<google.cloud.location.ILocation>

{Object} An iterable Object that allows async iteration. 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 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.IOperation>;

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
Name Description
request ListOperationsRequest

The request object that will be sent.

options 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
Type Description
AsyncIterable<protos.google.longrunning.IOperation>

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

Example

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

listRestoreChannels(request, options)

listRestoreChannels(request?: protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IRestoreChannel[],
        protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest | null,
        protos.google.cloud.gkebackup.v1.IListRestoreChannelsResponse
    ]>;

Lists RestoreChannels in a given location.

Parameters
Name Description
request IListRestoreChannelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IRestoreChannel[], protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest | null, protos.google.cloud.gkebackup.v1.IListRestoreChannelsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of RestoreChannel. 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 listRestoreChannelsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRestoreChannels(request, options, callback)

listRestoreChannels(request: protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest, protos.google.cloud.gkebackup.v1.IListRestoreChannelsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestoreChannel>): void;
Parameters
Name Description
request IListRestoreChannelsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest, protos.google.cloud.gkebackup.v1.IListRestoreChannelsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestoreChannel>
Returns
Type Description
void

listRestoreChannels(request, callback)

listRestoreChannels(request: protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest, protos.google.cloud.gkebackup.v1.IListRestoreChannelsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestoreChannel>): void;
Parameters
Name Description
request IListRestoreChannelsRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest, protos.google.cloud.gkebackup.v1.IListRestoreChannelsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestoreChannel>
Returns
Type Description
void

listRestoreChannelsAsync(request, options)

listRestoreChannelsAsync(request?: protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.v1.IRestoreChannel>;

Equivalent to listRestoreChannels, but returns an iterable object.

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

Parameters
Name Description
request IListRestoreChannelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IRestoreChannel>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing RestoreChannel. 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 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 location that contains the RestoreChannels to list.
   *  Format: `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may include a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListRestoreChannelsResponse.next_page_token 
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of
   *  next_page_token google.cloud.gkebackup.v1.ListRestoreChannelsResponse.next_page_token 
   *  received from a previous `ListRestoreChannels` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to
   *  `ListRestoreChannels` must match the call that provided the page
   *  token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field by which to sort the results.
   */
  // const orderBy = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListRestoreChannels();

listRestoreChannelsStream(request, options)

listRestoreChannelsStream(request?: protos.google.cloud.gkebackup.v1.IListRestoreChannelsRequest, options?: CallOptions): Transform;

Equivalent to listRestoreChannels, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRestoreChannelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing RestoreChannel 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 listRestoreChannelsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRestorePlanBindings(request, options)

listRestorePlanBindings(request?: protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IRestorePlanBinding[],
        protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest | null,
        protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsResponse
    ]>;

Lists RestorePlanBindings in a given location.

Parameters
Name Description
request IListRestorePlanBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IRestorePlanBinding[], protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest | null, protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of RestorePlanBinding. 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 listRestorePlanBindingsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRestorePlanBindings(request, options, callback)

listRestorePlanBindings(request: protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest, protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestorePlanBinding>): void;
Parameters
Name Description
request IListRestorePlanBindingsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest, protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestorePlanBinding>
Returns
Type Description
void

listRestorePlanBindings(request, callback)

listRestorePlanBindings(request: protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest, protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestorePlanBinding>): void;
Parameters
Name Description
request IListRestorePlanBindingsRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest, protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestorePlanBinding>
Returns
Type Description
void

listRestorePlanBindingsAsync(request, options)

listRestorePlanBindingsAsync(request?: protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.v1.IRestorePlanBinding>;

Equivalent to listRestorePlanBindings, but returns an iterable object.

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

Parameters
Name Description
request IListRestorePlanBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IRestorePlanBinding>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing RestorePlanBinding. 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 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 RestoreChannel that contains the ListRestorePlanBindings to
   *  list. Format: `projects/* /locations/* /restoreChannels/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may include a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListRestorePlanBindingsResponse.next_page_token 
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of
   *  next_page_token google.cloud.gkebackup.v1.ListRestorePlanBindingsResponse.next_page_token 
   *  received from a previous `ListRestorePlanBindings` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to
   *  `ListRestorePlanBindings` must match the call that provided the page
   *  token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field by which to sort the results.
   */
  // const orderBy = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListRestorePlanBindings();

listRestorePlanBindingsStream(request, options)

listRestorePlanBindingsStream(request?: protos.google.cloud.gkebackup.v1.IListRestorePlanBindingsRequest, options?: CallOptions): Transform;

Equivalent to listRestorePlanBindings, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRestorePlanBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing RestorePlanBinding 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 listRestorePlanBindingsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRestorePlans(request, options)

listRestorePlans(request?: protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IRestorePlan[],
        protos.google.cloud.gkebackup.v1.IListRestorePlansRequest | null,
        protos.google.cloud.gkebackup.v1.IListRestorePlansResponse
    ]>;

Lists RestorePlans in a given location.

Parameters
Name Description
request IListRestorePlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IRestorePlan[], protos.google.cloud.gkebackup.v1.IListRestorePlansRequest | null, protos.google.cloud.gkebackup.v1.IListRestorePlansResponse ]>

{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 listRestorePlansAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRestorePlans(request, options, callback)

listRestorePlans(request: protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, protos.google.cloud.gkebackup.v1.IListRestorePlansResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestorePlan>): void;
Parameters
Name Description
request IListRestorePlansRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, protos.google.cloud.gkebackup.v1.IListRestorePlansResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestorePlan>
Returns
Type Description
void

listRestorePlans(request, callback)

listRestorePlans(request: protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, protos.google.cloud.gkebackup.v1.IListRestorePlansResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestorePlan>): void;
Parameters
Name Description
request IListRestorePlansRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, protos.google.cloud.gkebackup.v1.IListRestorePlansResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestorePlan>
Returns
Type Description
void

listRestorePlansAsync(request, options)

listRestorePlansAsync(request?: protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.v1.IRestorePlan>;

Equivalent to listRestorePlans, but returns an iterable object.

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

Parameters
Name Description
request IListRestorePlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IRestorePlan>

{Object} An iterable Object that allows async iteration. 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 for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The location that contains the RestorePlans to list.
   *  Format: projects/* /locations/*
   */
  // const parent = 'abc123'
  /**
   *  The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may inclue a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  The value of
   *  next_page_token google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token
   *  received from a previous `ListRestorePlans` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to
   *  `ListRestorePlans` must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Field by which to sort the results.
   */
  // const orderBy = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListRestorePlans();

listRestorePlansStream(request, options)

listRestorePlansStream(request?: protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, options?: CallOptions): Transform;

Equivalent to listRestorePlans, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRestorePlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 listRestorePlansAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRestores(request, options)

listRestores(request?: protos.google.cloud.gkebackup.v1.IListRestoresRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IRestore[],
        protos.google.cloud.gkebackup.v1.IListRestoresRequest | null,
        protos.google.cloud.gkebackup.v1.IListRestoresResponse
    ]>;

Lists the Restores for a given RestorePlan.

Parameters
Name Description
request IListRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IRestore[], protos.google.cloud.gkebackup.v1.IListRestoresRequest | null, protos.google.cloud.gkebackup.v1.IListRestoresResponse ]>

{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 listRestoresAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRestores(request, options, callback)

listRestores(request: protos.google.cloud.gkebackup.v1.IListRestoresRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestoresRequest, protos.google.cloud.gkebackup.v1.IListRestoresResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestore>): void;
Parameters
Name Description
request IListRestoresRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestoresRequest, protos.google.cloud.gkebackup.v1.IListRestoresResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestore>
Returns
Type Description
void

listRestores(request, callback)

listRestores(request: protos.google.cloud.gkebackup.v1.IListRestoresRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestoresRequest, protos.google.cloud.gkebackup.v1.IListRestoresResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestore>): void;
Parameters
Name Description
request IListRestoresRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListRestoresRequest, protos.google.cloud.gkebackup.v1.IListRestoresResponse | null | undefined, protos.google.cloud.gkebackup.v1.IRestore>
Returns
Type Description
void

listRestoresAsync(request, options)

listRestoresAsync(request?: protos.google.cloud.gkebackup.v1.IListRestoresRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.v1.IRestore>;

Equivalent to listRestores, but returns an iterable object.

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

Parameters
Name Description
request IListRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IRestore>

{Object} An iterable Object that allows async iteration. 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 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 RestorePlan that contains the Restores to list.
   *  Format: `projects/* /locations/* /restorePlans/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may include a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token 
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of
   *  next_page_token google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token 
   *  received from a previous `ListRestores` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to `ListRestores`
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field by which to sort the results.
   */
  // const orderBy = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListRestores();

listRestoresStream(request, options)

listRestoresStream(request?: protos.google.cloud.gkebackup.v1.IListRestoresRequest, options?: CallOptions): Transform;

Equivalent to listRestores, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 listRestoresAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listVolumeBackups(request, options)

listVolumeBackups(request?: protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IVolumeBackup[],
        protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest | null,
        protos.google.cloud.gkebackup.v1.IListVolumeBackupsResponse
    ]>;

Lists the VolumeBackups for a given Backup.

Parameters
Name Description
request IListVolumeBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IVolumeBackup[], protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest | null, protos.google.cloud.gkebackup.v1.IListVolumeBackupsResponse ]>

{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 listVolumeBackupsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listVolumeBackups(request, options, callback)

listVolumeBackups(request: protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, protos.google.cloud.gkebackup.v1.IListVolumeBackupsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IVolumeBackup>): void;
Parameters
Name Description
request IListVolumeBackupsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, protos.google.cloud.gkebackup.v1.IListVolumeBackupsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IVolumeBackup>
Returns
Type Description
void

listVolumeBackups(request, callback)

listVolumeBackups(request: protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, protos.google.cloud.gkebackup.v1.IListVolumeBackupsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IVolumeBackup>): void;
Parameters
Name Description
request IListVolumeBackupsRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, protos.google.cloud.gkebackup.v1.IListVolumeBackupsResponse | null | undefined, protos.google.cloud.gkebackup.v1.IVolumeBackup>
Returns
Type Description
void

listVolumeBackupsAsync(request, options)

listVolumeBackupsAsync(request?: protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.v1.IVolumeBackup>;

Equivalent to listVolumeBackups, but returns an iterable object.

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

Parameters
Name Description
request IListVolumeBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IVolumeBackup>

{Object} An iterable Object that allows async iteration. 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 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 Backup that contains the VolumeBackups to list.
   *  Format: `projects/* /locations/* /backupPlans/* /backups/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may include a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token 
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of
   *  next_page_token google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token 
   *  received from a previous `ListVolumeBackups` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to
   *  `ListVolumeBackups` must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field by which to sort the results.
   */
  // const orderBy = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListVolumeBackups();

listVolumeBackupsStream(request, options)

listVolumeBackupsStream(request?: protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, options?: CallOptions): Transform;

Equivalent to listVolumeBackups, but returns a NodeJS Stream object.

Parameters
Name Description
request IListVolumeBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 listVolumeBackupsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listVolumeRestores(request, options)

listVolumeRestores(request?: protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gkebackup.v1.IVolumeRestore[],
        protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest | null,
        protos.google.cloud.gkebackup.v1.IListVolumeRestoresResponse
    ]>;

Lists the VolumeRestores for a given Restore.

Parameters
Name Description
request IListVolumeRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gkebackup.v1.IVolumeRestore[], protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest | null, protos.google.cloud.gkebackup.v1.IListVolumeRestoresResponse ]>

{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 listVolumeRestoresAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listVolumeRestores(request, options, callback)

listVolumeRestores(request: protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, protos.google.cloud.gkebackup.v1.IListVolumeRestoresResponse | null | undefined, protos.google.cloud.gkebackup.v1.IVolumeRestore>): void;
Parameters
Name Description
request IListVolumeRestoresRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, protos.google.cloud.gkebackup.v1.IListVolumeRestoresResponse | null | undefined, protos.google.cloud.gkebackup.v1.IVolumeRestore>
Returns
Type Description
void

listVolumeRestores(request, callback)

listVolumeRestores(request: protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, callback: PaginationCallback<protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, protos.google.cloud.gkebackup.v1.IListVolumeRestoresResponse | null | undefined, protos.google.cloud.gkebackup.v1.IVolumeRestore>): void;
Parameters
Name Description
request IListVolumeRestoresRequest
callback PaginationCallback<protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, protos.google.cloud.gkebackup.v1.IListVolumeRestoresResponse | null | undefined, protos.google.cloud.gkebackup.v1.IVolumeRestore>
Returns
Type Description
void

listVolumeRestoresAsync(request, options)

listVolumeRestoresAsync(request?: protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gkebackup.v1.IVolumeRestore>;

Equivalent to listVolumeRestores, but returns an iterable object.

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

Parameters
Name Description
request IListVolumeRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gkebackup.v1.IVolumeRestore>

{Object} An iterable Object that allows async iteration. 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 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 Restore that contains the VolumeRestores to list.
   *  Format: `projects/* /locations/* /restorePlans/* /restores/*`
   */
  // const parent = 'abc123'
  /**
   *  Optional. The target number of results to return in a single response.
   *  If not specified, a default value will be chosen by the service.
   *  Note that the response may include a partial list and a caller should
   *  only rely on the response's
   *  next_page_token google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token 
   *  to determine if there are more instances left to be queried.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of
   *  next_page_token google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token 
   *  received from a previous `ListVolumeRestores` call.
   *  Provide this to retrieve the subsequent page in a multi-page list of
   *  results. When paginating, all other parameters provided to
   *  `ListVolumeRestores` must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Field match expression used to filter the results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field by which to sort the results.
   */
  // const orderBy = 'abc123'

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callListVolumeRestores();

listVolumeRestoresStream(request, options)

listVolumeRestoresStream(request?: protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, options?: CallOptions): Transform;

Equivalent to listVolumeRestores, but returns a NodeJS Stream object.

Parameters
Name Description
request IListVolumeRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 listVolumeRestoresAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

matchBackupChannelFromBackupChannelName(backupChannelName)

matchBackupChannelFromBackupChannelName(backupChannelName: string): string | number;

Parse the backup_channel from BackupChannel resource.

Parameter
Name Description
backupChannelName string

A fully-qualified path representing BackupChannel resource.

Returns
Type Description
string | number

{string} A string representing the backup_channel.

matchBackupChannelFromBackupPlanBindingName(backupPlanBindingName)

matchBackupChannelFromBackupPlanBindingName(backupPlanBindingName: string): string | number;

Parse the backup_channel from BackupPlanBinding resource.

Parameter
Name Description
backupPlanBindingName string

A fully-qualified path representing BackupPlanBinding resource.

Returns
Type Description
string | number

{string} A string representing the backup_channel.

matchBackupFromBackupName(backupName)

matchBackupFromBackupName(backupName: string): string | number;

Parse the backup from Backup resource.

Parameter
Name Description
backupName string

A fully-qualified path representing Backup resource.

Returns
Type Description
string | number

{string} A string representing the backup.

matchBackupFromVolumeBackupName(volumeBackupName)

matchBackupFromVolumeBackupName(volumeBackupName: string): string | number;

Parse the backup from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the backup.

matchBackupPlanBindingFromBackupPlanBindingName(backupPlanBindingName)

matchBackupPlanBindingFromBackupPlanBindingName(backupPlanBindingName: string): string | number;

Parse the backup_plan_binding from BackupPlanBinding resource.

Parameter
Name Description
backupPlanBindingName string

A fully-qualified path representing BackupPlanBinding resource.

Returns
Type Description
string | number

{string} A string representing the backup_plan_binding.

matchBackupPlanFromBackupName(backupName)

matchBackupPlanFromBackupName(backupName: string): string | number;

Parse the backup_plan from Backup resource.

Parameter
Name Description
backupName string

A fully-qualified path representing Backup resource.

Returns
Type Description
string | number

{string} A string representing the backup_plan.

matchBackupPlanFromBackupPlanName(backupPlanName)

matchBackupPlanFromBackupPlanName(backupPlanName: string): string | number;

Parse the backup_plan from BackupPlan resource.

Parameter
Name Description
backupPlanName string

A fully-qualified path representing BackupPlan resource.

Returns
Type Description
string | number

{string} A string representing the backup_plan.

matchBackupPlanFromVolumeBackupName(volumeBackupName)

matchBackupPlanFromVolumeBackupName(volumeBackupName: string): string | number;

Parse the backup_plan from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the backup_plan.

matchLocationFromBackupChannelName(backupChannelName)

matchLocationFromBackupChannelName(backupChannelName: string): string | number;

Parse the location from BackupChannel resource.

Parameter
Name Description
backupChannelName string

A fully-qualified path representing BackupChannel resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromBackupName(backupName)

matchLocationFromBackupName(backupName: string): string | number;

Parse the location from Backup resource.

Parameter
Name Description
backupName string

A fully-qualified path representing Backup resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromBackupPlanBindingName(backupPlanBindingName)

matchLocationFromBackupPlanBindingName(backupPlanBindingName: string): string | number;

Parse the location from BackupPlanBinding resource.

Parameter
Name Description
backupPlanBindingName string

A fully-qualified path representing BackupPlanBinding resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromBackupPlanName(backupPlanName)

matchLocationFromBackupPlanName(backupPlanName: string): string | number;

Parse the location from BackupPlan resource.

Parameter
Name Description
backupPlanName string

A fully-qualified path representing BackupPlan resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRestoreChannelName(restoreChannelName)

matchLocationFromRestoreChannelName(restoreChannelName: string): string | number;

Parse the location from RestoreChannel resource.

Parameter
Name Description
restoreChannelName string

A fully-qualified path representing RestoreChannel resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRestoreName(restoreName)

matchLocationFromRestoreName(restoreName: string): string | number;

Parse the location from Restore resource.

Parameter
Name Description
restoreName string

A fully-qualified path representing Restore resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRestorePlanBindingName(restorePlanBindingName)

matchLocationFromRestorePlanBindingName(restorePlanBindingName: string): string | number;

Parse the location from RestorePlanBinding resource.

Parameter
Name Description
restorePlanBindingName string

A fully-qualified path representing RestorePlanBinding resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRestorePlanName(restorePlanName)

matchLocationFromRestorePlanName(restorePlanName: string): string | number;

Parse the location from RestorePlan resource.

Parameter
Name Description
restorePlanName string

A fully-qualified path representing RestorePlan resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromVolumeBackupName(volumeBackupName)

matchLocationFromVolumeBackupName(volumeBackupName: string): string | number;

Parse the location from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromVolumeRestoreName(volumeRestoreName)

matchLocationFromVolumeRestoreName(volumeRestoreName: string): string | number;

Parse the location from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchProjectFromBackupChannelName(backupChannelName)

matchProjectFromBackupChannelName(backupChannelName: string): string | number;

Parse the project from BackupChannel resource.

Parameter
Name Description
backupChannelName string

A fully-qualified path representing BackupChannel resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromBackupName(backupName)

matchProjectFromBackupName(backupName: string): string | number;

Parse the project from Backup resource.

Parameter
Name Description
backupName string

A fully-qualified path representing Backup resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromBackupPlanBindingName(backupPlanBindingName)

matchProjectFromBackupPlanBindingName(backupPlanBindingName: string): string | number;

Parse the project from BackupPlanBinding resource.

Parameter
Name Description
backupPlanBindingName string

A fully-qualified path representing BackupPlanBinding resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromBackupPlanName(backupPlanName)

matchProjectFromBackupPlanName(backupPlanName: string): string | number;

Parse the project from BackupPlan resource.

Parameter
Name Description
backupPlanName string

A fully-qualified path representing BackupPlan resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRestoreChannelName(restoreChannelName)

matchProjectFromRestoreChannelName(restoreChannelName: string): string | number;

Parse the project from RestoreChannel resource.

Parameter
Name Description
restoreChannelName string

A fully-qualified path representing RestoreChannel resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRestoreName(restoreName)

matchProjectFromRestoreName(restoreName: string): string | number;

Parse the project from Restore resource.

Parameter
Name Description
restoreName string

A fully-qualified path representing Restore resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRestorePlanBindingName(restorePlanBindingName)

matchProjectFromRestorePlanBindingName(restorePlanBindingName: string): string | number;

Parse the project from RestorePlanBinding resource.

Parameter
Name Description
restorePlanBindingName string

A fully-qualified path representing RestorePlanBinding resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRestorePlanName(restorePlanName)

matchProjectFromRestorePlanName(restorePlanName: string): string | number;

Parse the project from RestorePlan resource.

Parameter
Name Description
restorePlanName string

A fully-qualified path representing RestorePlan resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromVolumeBackupName(volumeBackupName)

matchProjectFromVolumeBackupName(volumeBackupName: string): string | number;

Parse the project from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromVolumeRestoreName(volumeRestoreName)

matchProjectFromVolumeRestoreName(volumeRestoreName: string): string | number;

Parse the project from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchRestoreChannelFromRestoreChannelName(restoreChannelName)

matchRestoreChannelFromRestoreChannelName(restoreChannelName: string): string | number;

Parse the restore_channel from RestoreChannel resource.

Parameter
Name Description
restoreChannelName string

A fully-qualified path representing RestoreChannel resource.

Returns
Type Description
string | number

{string} A string representing the restore_channel.

matchRestoreChannelFromRestorePlanBindingName(restorePlanBindingName)

matchRestoreChannelFromRestorePlanBindingName(restorePlanBindingName: string): string | number;

Parse the restore_channel from RestorePlanBinding resource.

Parameter
Name Description
restorePlanBindingName string

A fully-qualified path representing RestorePlanBinding resource.

Returns
Type Description
string | number

{string} A string representing the restore_channel.

matchRestoreFromRestoreName(restoreName)

matchRestoreFromRestoreName(restoreName: string): string | number;

Parse the restore from Restore resource.

Parameter
Name Description
restoreName string

A fully-qualified path representing Restore resource.

Returns
Type Description
string | number

{string} A string representing the restore.

matchRestoreFromVolumeRestoreName(volumeRestoreName)

matchRestoreFromVolumeRestoreName(volumeRestoreName: string): string | number;

Parse the restore from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the restore.

matchRestorePlanBindingFromRestorePlanBindingName(restorePlanBindingName)

matchRestorePlanBindingFromRestorePlanBindingName(restorePlanBindingName: string): string | number;

Parse the restore_plan_binding from RestorePlanBinding resource.

Parameter
Name Description
restorePlanBindingName string

A fully-qualified path representing RestorePlanBinding resource.

Returns
Type Description
string | number

{string} A string representing the restore_plan_binding.

matchRestorePlanFromRestoreName(restoreName)

matchRestorePlanFromRestoreName(restoreName: string): string | number;

Parse the restore_plan from Restore resource.

Parameter
Name Description
restoreName string

A fully-qualified path representing Restore resource.

Returns
Type Description
string | number

{string} A string representing the restore_plan.

matchRestorePlanFromRestorePlanName(restorePlanName)

matchRestorePlanFromRestorePlanName(restorePlanName: string): string | number;

Parse the restore_plan from RestorePlan resource.

Parameter
Name Description
restorePlanName string

A fully-qualified path representing RestorePlan resource.

Returns
Type Description
string | number

{string} A string representing the restore_plan.

matchRestorePlanFromVolumeRestoreName(volumeRestoreName)

matchRestorePlanFromVolumeRestoreName(volumeRestoreName: string): string | number;

Parse the restore_plan from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the restore_plan.

matchVolumeBackupFromVolumeBackupName(volumeBackupName)

matchVolumeBackupFromVolumeBackupName(volumeBackupName: string): string | number;

Parse the volume_backup from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the volume_backup.

matchVolumeRestoreFromVolumeRestoreName(volumeRestoreName)

matchVolumeRestoreFromVolumeRestoreName(volumeRestoreName: string): string | number;

Parse the volume_restore from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the volume_restore.

restoreChannelPath(project, location, restoreChannel)

restoreChannelPath(project: string, location: string, restoreChannel: string): string;

Return a fully-qualified restoreChannel resource name string.

Parameters
Name Description
project string
location string
restoreChannel string
Returns
Type Description
string

{string} Resource name string.

restorePath(project, location, restorePlan, restore)

restorePath(project: string, location: string, restorePlan: string, restore: string): string;

Return a fully-qualified restore resource name string.

Parameters
Name Description
project string
location string
restorePlan string
restore string
Returns
Type Description
string

{string} Resource name string.

restorePlanBindingPath(project, location, restoreChannel, restorePlanBinding)

restorePlanBindingPath(project: string, location: string, restoreChannel: string, restorePlanBinding: string): string;

Return a fully-qualified restorePlanBinding resource name string.

Parameters
Name Description
project string
location string
restoreChannel string
restorePlanBinding string
Returns
Type Description
string

{string} Resource name string.

restorePlanPath(project, location, restorePlan)

restorePlanPath(project: string, location: string, restorePlan: string): string;

Return a fully-qualified restorePlan resource name string.

Parameters
Name Description
project string
location string
restorePlan string
Returns
Type Description
string

{string} Resource name string.

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
Name Description
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, 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<google.iam.v1.Policy, 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
Type Description
Promise<[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.

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
Name Description
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, 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<google.iam.v1.TestIamPermissionsResponse, 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
Type Description
Promise<[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.gkebackup.v1.IUpdateBackupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IBackup, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a Backup.

Parameters
Name Description
request IUpdateBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IBackup, protos.google.cloud.gkebackup.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 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. A new version of the Backup resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const backup = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  Backup targeted for update. The values for each of these
   *  updated fields will be taken from the `backup_plan` provided
   *  with this request. Field names are relative to the root of the resource.
   *  If no `update_mask` is provided, all fields in `backup` will be
   *  written to the target Backup resource.
   *  Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored
   *  and are not used to update the target Backup.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

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

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

  callUpdateBackup();

updateBackup(request, options, callback)

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

updateBackup(request, callback)

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

updateBackupChannel(request, options)

updateBackupChannel(request?: protos.google.cloud.gkebackup.v1.IUpdateBackupChannelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a BackupChannel.

Parameters
Name Description
request IUpdateBackupChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.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 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. A new version of the BackupChannel resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const backupChannel = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  BackupChannel targeted for update. The values for each of these
   *  updated fields will be taken from the `backup_channel` provided
   *  with this request. Field names are relative to the root of the resource
   *  (e.g., `description`, `labels`, etc.)
   *  If no `update_mask` is provided, all fields in `backup_channel` will
   *  be written to the target BackupChannel resource. Note that
   *  OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and
   *  are not used to update the target BackupChannel.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateBackupChannel() {
    // Construct request
    const request = {
      backupChannel,
    };

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

  callUpdateBackupChannel();

updateBackupChannel(request, options, callback)

updateBackupChannel(request: protos.google.cloud.gkebackup.v1.IUpdateBackupChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateBackupChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateBackupChannel(request, callback)

updateBackupChannel(request: protos.google.cloud.gkebackup.v1.IUpdateBackupChannelRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateBackupChannelRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateBackupPlan(request, options)

updateBackupPlan(request?: protos.google.cloud.gkebackup.v1.IUpdateBackupPlanRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a BackupPlan.

Parameters
Name Description
request IUpdateBackupPlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.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 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. A new version of the BackupPlan resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const backupPlan = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  BackupPlan targeted for update. The values for each of these
   *  updated fields will be taken from the `backup_plan` provided
   *  with this request. Field names are relative to the root of the resource
   *  (e.g., `description`, `backup_config.include_volume_data`, etc.)
   *  If no `update_mask` is provided, all fields in `backup_plan` will be
   *  written to the target BackupPlan resource.
   *  Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored
   *  and are not used to update the target BackupPlan.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateBackupPlan() {
    // Construct request
    const request = {
      backupPlan,
    };

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

  callUpdateBackupPlan();

updateBackupPlan(request, options, callback)

updateBackupPlan(request: protos.google.cloud.gkebackup.v1.IUpdateBackupPlanRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateBackupPlanRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateBackupPlan(request, callback)

updateBackupPlan(request: protos.google.cloud.gkebackup.v1.IUpdateBackupPlanRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateBackupPlanRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IBackupPlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestore(request, options)

updateRestore(request?: protos.google.cloud.gkebackup.v1.IUpdateRestoreRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a Restore.

Parameters
Name Description
request IUpdateRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.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 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. A new version of the Restore resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const restore = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  Restore targeted for update. The values for each of these
   *  updated fields will be taken from the `restore` provided
   *  with this request. Field names are relative to the root of the resource.
   *  If no `update_mask` is provided, all fields in `restore` will be
   *  written to the target Restore resource.
   *  Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored
   *  and are not used to update the target Restore.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateRestore() {
    // Construct request
    const request = {
      restore,
    };

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

  callUpdateRestore();

updateRestore(request, options, callback)

updateRestore(request: protos.google.cloud.gkebackup.v1.IUpdateRestoreRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRestoreRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestore(request, callback)

updateRestore(request: protos.google.cloud.gkebackup.v1.IUpdateRestoreRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRestoreRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestore, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestoreChannel(request, options)

updateRestoreChannel(request?: protos.google.cloud.gkebackup.v1.IUpdateRestoreChannelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a RestoreChannel.

Parameters
Name Description
request IUpdateRestoreChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.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 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. A new version of the RestoreChannel resource that contains
   *  updated fields. This may be sparsely populated if an `update_mask` is
   *  provided.
   */
  // const restoreChannel = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  RestoreChannel targeted for update. The values for each of these
   *  updated fields will be taken from the `restore_channel` provided
   *  with this request. Field names are relative to the root of the resource
   *  (e.g., `description`, `destination_project_id`, etc.)
   *  If no `update_mask` is provided, all fields in `restore_channel` will
   *  be written to the target RestoreChannel resource. Note that
   *  OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and
   *  are not used to update the target RestoreChannel.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateRestoreChannel() {
    // Construct request
    const request = {
      restoreChannel,
    };

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

  callUpdateRestoreChannel();

updateRestoreChannel(request, options, callback)

updateRestoreChannel(request: protos.google.cloud.gkebackup.v1.IUpdateRestoreChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRestoreChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestoreChannel(request, callback)

updateRestoreChannel(request: protos.google.cloud.gkebackup.v1.IUpdateRestoreChannelRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRestoreChannelRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestoreChannel, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestorePlan(request, options)

updateRestorePlan(request?: protos.google.cloud.gkebackup.v1.IUpdateRestorePlanRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a RestorePlan.

Parameters
Name Description
request IUpdateRestorePlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.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 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. A new version of the RestorePlan resource that contains updated
   *  fields. This may be sparsely populated if an `update_mask` is provided.
   */
  // const restorePlan = {}
  /**
   *  Optional. This is used to specify the fields to be overwritten in the
   *  RestorePlan targeted for update. The values for each of these
   *  updated fields will be taken from the `restore_plan` provided
   *  with this request. Field names are relative to the root of the resource.
   *  If no `update_mask` is provided, all fields in `restore_plan` will be
   *  written to the target RestorePlan resource.
   *  Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored
   *  and are not used to update the target RestorePlan.
   */
  // const updateMask = {}

  // Imports the Gkebackup library
  const {BackupForGKEClient} = require('@google-cloud/gke-backup').v1;

  // Instantiates a client
  const gkebackupClient = new BackupForGKEClient();

  async function callUpdateRestorePlan() {
    // Construct request
    const request = {
      restorePlan,
    };

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

  callUpdateRestorePlan();

updateRestorePlan(request, options, callback)

updateRestorePlan(request: protos.google.cloud.gkebackup.v1.IUpdateRestorePlanRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRestorePlanRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestorePlan(request, callback)

updateRestorePlan(request: protos.google.cloud.gkebackup.v1.IUpdateRestorePlanRequest, callback: Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRestorePlanRequest
callback Callback<LROperation<protos.google.cloud.gkebackup.v1.IRestorePlan, protos.google.cloud.gkebackup.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

volumeBackupPath(project, location, backupPlan, backup, volumeBackup)

volumeBackupPath(project: string, location: string, backupPlan: string, backup: string, volumeBackup: string): string;

Return a fully-qualified volumeBackup resource name string.

Parameters
Name Description
project string
location string
backupPlan string
backup string
volumeBackup string
Returns
Type Description
string

{string} Resource name string.

volumeRestorePath(project, location, restorePlan, restore, volumeRestore)

volumeRestorePath(project: string, location: string, restorePlan: string, restore: string, volumeRestore: string): string;

Return a fully-qualified volumeRestore resource name string.

Parameters
Name Description
project string
location string
restorePlan string
restore string
volumeRestore string
Returns
Type Description
string

{string} Resource name string.