Class v2.BigtableTableAdminClient (5.1.2)

Service for creating, configuring, and deleting Cloud Bigtable tables.

Provides access to the table schemas only, not the data stored within the tables. v2

Package

@google-cloud/bigtable

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of BigtableTableAdminClient.

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 BigtableTableAdminClient({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;

bigtableTableAdminStub

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

descriptors

descriptors: Descriptors;

innerApiCalls

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

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

appProfilePath(project, instance, appProfile)

appProfilePath(project: string, instance: string, appProfile: string): string;

Return a fully-qualified appProfile resource name string.

Parameters
Name Description
project string
instance string
appProfile string
Returns
Type Description
string

{string} Resource name string.

authorizedViewPath(project, instance, table, authorizedView)

authorizedViewPath(project: string, instance: string, table: string, authorizedView: string): string;

Return a fully-qualified authorizedView resource name string.

Parameters
Name Description
project string
instance string
table string
authorizedView string
Returns
Type Description
string

{string} Resource name string.

backupPath(project, instance, cluster, backup)

backupPath(project: string, instance: string, cluster: string, backup: string): string;

Return a fully-qualified backup resource name string.

Parameters
Name Description
project string
instance string
cluster string
backup string
Returns
Type Description
string

{string} Resource name string.

checkConsistency(request, options)

checkConsistency(request?: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, options?: CallOptions): Promise<[
        protos.google.bigtable.admin.v2.ICheckConsistencyResponse,
        protos.google.bigtable.admin.v2.ICheckConsistencyRequest | undefined,
        {} | undefined
    ]>;

Checks replication consistency based on a consistency token, that is, if replication has caught up based on the conditions specified in the token and the check request.

Parameters
Name Description
request ICheckConsistencyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.bigtable.admin.v2.ICheckConsistencyResponse, protos.google.bigtable.admin.v2.ICheckConsistencyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing CheckConsistencyResponse. 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 unique name of the Table for which to check replication
   *  consistency. Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const name = 'abc123'
  /**
   *  Required. The token created using GenerateConsistencyToken for the Table.
   */
  // const consistencyToken = 'abc123'
  /**
   *  Checks that reads using an app profile with `StandardIsolation` can
   *  see all writes committed before the token was created, even if the
   *  read and write target different clusters.
   */
  // const standardReadRemoteWrites = {}
  /**
   *  Checks that reads using an app profile with `DataBoostIsolationReadOnly`
   *  can see all writes committed before the token was created, but only if
   *  the read and write target the same cluster.
   */
  // const dataBoostReadLocalWrites = {}

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

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

    // Run request
    const response = await adminClient.checkConsistency(request);
    console.log(response);
  }

  callCheckConsistency();

checkConsistency(request, options, callback)

checkConsistency(request: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, options: CallOptions, callback: Callback<protos.google.bigtable.admin.v2.ICheckConsistencyResponse, protos.google.bigtable.admin.v2.ICheckConsistencyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICheckConsistencyRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.ICheckConsistencyResponse, protos.google.bigtable.admin.v2.ICheckConsistencyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

checkConsistency(request, callback)

checkConsistency(request: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, callback: Callback<protos.google.bigtable.admin.v2.ICheckConsistencyResponse, protos.google.bigtable.admin.v2.ICheckConsistencyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICheckConsistencyRequest
callback Callback<protos.google.bigtable.admin.v2.ICheckConsistencyResponse, protos.google.bigtable.admin.v2.ICheckConsistencyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

checkCopyBackupProgress(name)

checkCopyBackupProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Backup, protos.google.bigtable.admin.v2.CopyBackupMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.bigtable.admin.v2.Backup, protos.google.bigtable.admin.v2.CopyBackupMetadata>>

{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 name of the destination cluster that will contain the backup
   *  copy. The cluster must already exists. Values are of the form:
   *  `projects/{project}/instances/{instance}/clusters/{cluster}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The id of the new backup. The `backup_id` along with `parent`
   *  are combined as {parent}/backups/{backup_id} to create the full backup
   *  name, of the form:
   *  `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
   *  This string must be between 1 and 50 characters in length and match the
   *  regex _a-zA-Z0-9 -_.a-zA-Z0-9 *.
   */
  // const backupId = 'abc123'
  /**
   *  Required. The source backup to be copied from.
   *  The source backup needs to be in READY state for it to be copied.
   *  Copying a copied backup is not allowed.
   *  Once CopyBackup is in progress, the source backup cannot be deleted or
   *  cleaned up on expiration until CopyBackup is finished.
   *  Values are of the form:
   *  `projects/

checkCreateAuthorizedViewProgress(name)

checkCreateAuthorizedViewProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.AuthorizedView, protos.google.bigtable.admin.v2.CreateAuthorizedViewMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.bigtable.admin.v2.AuthorizedView, protos.google.bigtable.admin.v2.CreateAuthorizedViewMetadata>>

{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. This is the name of the table the AuthorizedView belongs to.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The id of the AuthorizedView to create. This AuthorizedView must
   *  not already exist. The `authorized_view_id` appended to `parent` forms the
   *  full AuthorizedView name of the form
   *  `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
   */
  // const authorizedViewId = 'abc123'
  /**
   *  Required. The AuthorizedView to create.
   */
  // const authorizedView = {}

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

  async function callCreateAuthorizedView() {
    // Construct request
    const request = {
      parent,
      authorizedViewId,
      authorizedView,
    };

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

  callCreateAuthorizedView();

checkCreateBackupProgress(name)

checkCreateBackupProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Backup, protos.google.bigtable.admin.v2.CreateBackupMetadata>>;

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.bigtable.admin.v2.Backup, protos.google.bigtable.admin.v2.CreateBackupMetadata>>

{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. This must be one of the clusters in the instance in which this
   *  table is located. The backup will be stored in this cluster. Values are
   *  of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The id of the backup to be created. The `backup_id` along with
   *  the parent `parent` are combined as {parent}/backups/{backup_id} to create
   *  the full backup name, of the form:
   *  `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
   *  This string must be between 1 and 50 characters in length and match the
   *  regex _a-zA-Z0-9 -_.a-zA-Z0-9 *.
   */
  // const backupId = 'abc123'
  /**
   *  Required. The backup to create.
   */
  // const backup = {}

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

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

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

  callCreateBackup();

checkCreateTableFromSnapshotProgress(name)

checkCreateTableFromSnapshotProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Table, protos.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.bigtable.admin.v2.Table, protos.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata>>

{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 unique name of the instance in which to create the table.
   *  Values are of the form `projects/{project}/instances/{instance}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The name by which the new table should be referred to within the
   *  parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
   */
  // const tableId = 'abc123'
  /**
   *  Required. The unique name of the snapshot from which to restore the table.
   *  The snapshot and the table must be in the same instance. Values are of the
   *  form
   *  `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
   */
  // const sourceSnapshot = 'abc123'

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

  async function callCreateTableFromSnapshot() {
    // Construct request
    const request = {
      parent,
      tableId,
      sourceSnapshot,
    };

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

  callCreateTableFromSnapshot();

checkRestoreTableProgress(name)

checkRestoreTableProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Table, protos.google.bigtable.admin.v2.RestoreTableMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.bigtable.admin.v2.Table, protos.google.bigtable.admin.v2.RestoreTableMetadata>>

{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 name of the instance in which to create the restored
   *  table. Values are of the form `projects/

checkSnapshotTableProgress(name)

checkSnapshotTableProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Snapshot, protos.google.bigtable.admin.v2.SnapshotTableMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.bigtable.admin.v2.Snapshot, protos.google.bigtable.admin.v2.SnapshotTableMetadata>>

{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 unique name of the table to have the snapshot taken.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const name = 'abc123'
  /**
   *  Required. The name of the cluster where the snapshot will be created in.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/clusters/{cluster}`.
   */
  // const cluster = 'abc123'
  /**
   *  Required. The ID by which the new snapshot should be referred to within the
   *  parent cluster, e.g., `mysnapshot` of the form:
   *  `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
   *  `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
   */
  // const snapshotId = 'abc123'
  /**
   *  The amount of time that the new snapshot can stay active after it is
   *  created. Once 'ttl' expires, the snapshot will get deleted. The maximum
   *  amount of time a snapshot can stay active is 7 days. If 'ttl' is not
   *  specified, the default value of 24 hours will be used.
   */
  // const ttl = {}
  /**
   *  Description of the snapshot.
   */
  // const description = 'abc123'

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

  async function callSnapshotTable() {
    // Construct request
    const request = {
      name,
      cluster,
      snapshotId,
    };

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

  callSnapshotTable();

checkUndeleteTableProgress(name)

checkUndeleteTableProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Table, protos.google.bigtable.admin.v2.UndeleteTableMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.bigtable.admin.v2.Table, protos.google.bigtable.admin.v2.UndeleteTableMetadata>>

{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 unique name of the table to be restored.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const name = 'abc123'

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

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

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

  callUndeleteTable();

checkUpdateAuthorizedViewProgress(name)

checkUpdateAuthorizedViewProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.AuthorizedView, protos.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.bigtable.admin.v2.AuthorizedView, protos.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata>>

{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 AuthorizedView to update. The `name` in `authorized_view` is
   *  used to identify the AuthorizedView. AuthorizedView name must in this
   *  format
   *  projects/

checkUpdateTableProgress(name)

checkUpdateTableProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Table, protos.google.bigtable.admin.v2.UpdateTableMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.bigtable.admin.v2.Table, protos.google.bigtable.admin.v2.UpdateTableMetadata>>

{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 table to update.
   *  The table's `name` field is used to identify the table to update.
   */
  // const table = {}
  /**
   *  Required. The list of fields to update.
   *  A mask specifying which fields (e.g. `change_stream_config`) in the `table`
   *  field should be updated. This mask is relative to the `table` field, not to
   *  the request message. The wildcard (*) path is currently not supported.
   *  Currently UpdateTable is only supported for the following fields:
   *  * `change_stream_config`
   *  * `change_stream_config.retention_period`
   *  * `deletion_protection`
   *  If `column_families` is set in `update_mask`, it will return an
   *  UNIMPLEMENTED error.
   */
  // const updateMask = {}

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

  async function callUpdateTable() {
    // Construct request
    const request = {
      table,
      updateMask,
    };

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

  callUpdateTable();

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.

clusterPath(project, instance, cluster)

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

Return a fully-qualified cluster resource name string.

Parameters
Name Description
project string
instance string
cluster string
Returns
Type Description
string

{string} Resource name string.

copyBackup(request, options)

copyBackup(request?: protos.google.bigtable.admin.v2.ICopyBackupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICopyBackupMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.

Parameters
Name Description
request ICopyBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICopyBackupMetadata>, 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 name of the destination cluster that will contain the backup
   *  copy. The cluster must already exists. Values are of the form:
   *  `projects/{project}/instances/{instance}/clusters/{cluster}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The id of the new backup. The `backup_id` along with `parent`
   *  are combined as {parent}/backups/{backup_id} to create the full backup
   *  name, of the form:
   *  `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
   *  This string must be between 1 and 50 characters in length and match the
   *  regex _a-zA-Z0-9 -_.a-zA-Z0-9 *.
   */
  // const backupId = 'abc123'
  /**
   *  Required. The source backup to be copied from.
   *  The source backup needs to be in READY state for it to be copied.
   *  Copying a copied backup is not allowed.
   *  Once CopyBackup is in progress, the source backup cannot be deleted or
   *  cleaned up on expiration until CopyBackup is finished.
   *  Values are of the form:
   *  `projects/

copyBackup(request, options, callback)

copyBackup(request: protos.google.bigtable.admin.v2.ICopyBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICopyBackupMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICopyBackupRequest
options CallOptions
callback Callback<LROperation<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICopyBackupMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

copyBackup(request, callback)

copyBackup(request: protos.google.bigtable.admin.v2.ICopyBackupRequest, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICopyBackupMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICopyBackupRequest
callback Callback<LROperation<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICopyBackupMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createAuthorizedView(request, options)

createAuthorizedView(request?: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.bigtable.admin.v2.IAuthorizedView, protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new AuthorizedView in a table.

Parameters
Name Description
request ICreateAuthorizedViewRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.bigtable.admin.v2.IAuthorizedView, protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata>, 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. This is the name of the table the AuthorizedView belongs to.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The id of the AuthorizedView to create. This AuthorizedView must
   *  not already exist. The `authorized_view_id` appended to `parent` forms the
   *  full AuthorizedView name of the form
   *  `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
   */
  // const authorizedViewId = 'abc123'
  /**
   *  Required. The AuthorizedView to create.
   */
  // const authorizedView = {}

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

  async function callCreateAuthorizedView() {
    // Construct request
    const request = {
      parent,
      authorizedViewId,
      authorizedView,
    };

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

  callCreateAuthorizedView();

createAuthorizedView(request, options, callback)

createAuthorizedView(request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, options: CallOptions, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IAuthorizedView, protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateAuthorizedViewRequest
options CallOptions
callback Callback<LROperation<protos.google.bigtable.admin.v2.IAuthorizedView, protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createAuthorizedView(request, callback)

createAuthorizedView(request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IAuthorizedView, protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateAuthorizedViewRequest
callback Callback<LROperation<protos.google.bigtable.admin.v2.IAuthorizedView, protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createBackup(request, options)

createBackup(request?: protos.google.bigtable.admin.v2.ICreateBackupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICreateBackupMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Starts creating a new Cloud Bigtable Backup. The returned backup long-running operation can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is , if successful. Cancelling the returned operation will stop the creation and delete the backup.

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.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICreateBackupMetadata>, 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. This must be one of the clusters in the instance in which this
   *  table is located. The backup will be stored in this cluster. Values are
   *  of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The id of the backup to be created. The `backup_id` along with
   *  the parent `parent` are combined as {parent}/backups/{backup_id} to create
   *  the full backup name, of the form:
   *  `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
   *  This string must be between 1 and 50 characters in length and match the
   *  regex _a-zA-Z0-9 -_.a-zA-Z0-9 *.
   */
  // const backupId = 'abc123'
  /**
   *  Required. The backup to create.
   */
  // const backup = {}

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

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

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

  callCreateBackup();

createBackup(request, options, callback)

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

createBackup(request, callback)

createBackup(request: protos.google.bigtable.admin.v2.ICreateBackupRequest, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICreateBackupMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateBackupRequest
callback Callback<LROperation<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.ICreateBackupMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createTable(request, options)

createTable(request?: protos.google.bigtable.admin.v2.ICreateTableRequest, options?: CallOptions): Promise<[
        protos.google.bigtable.admin.v2.ITable,
        protos.google.bigtable.admin.v2.ICreateTableRequest | undefined,
        {} | undefined
    ]>;

Creates a new table in the specified instance. The table can be created with a full set of initial column families, specified in the request.

Parameters
Name Description
request ICreateTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | 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. The unique name of the instance in which to create the table.
   *  Values are of the form `projects/{project}/instances/{instance}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The name by which the new table should be referred to within the
   *  parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
   *  Maximum 50 characters.
   */
  // const tableId = 'abc123'
  /**
   *  Required. The Table to create.
   */
  // const table = {}
  /**
   *  The optional list of row keys that will be used to initially split the
   *  table into several tablets (tablets are similar to HBase regions).
   *  Given two split keys, `s1` and `s2`, three tablets will be created,
   *  spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
   *  Example:
   *  * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
   *                 `"other", "zz"`
   *  * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
   *  * Key assignment:
   *      - Tablet 1 `[, apple)                => {"a"}.`
   *      - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
   *      - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
   *      - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
   *      - Tablet 5 `[other, )                => {"other", "zz"}.`
   */
  // const initialSplits = [1,2,3,4]

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

  async function callCreateTable() {
    // Construct request
    const request = {
      parent,
      tableId,
      table,
    };

    // Run request
    const response = await adminClient.createTable(request);
    console.log(response);
  }

  callCreateTable();

createTable(request, options, callback)

createTable(request: protos.google.bigtable.admin.v2.ICreateTableRequest, options: CallOptions, callback: Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateTableRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createTable(request, callback)

createTable(request: protos.google.bigtable.admin.v2.ICreateTableRequest, callback: Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateTableRequest
callback Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createTableFromSnapshot(request, options)

createTableFromSnapshot(request?: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new table from the specified snapshot. The target table must not exist. The snapshot and the table must be in the same instance.

Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.

Parameters
Name Description
request ICreateTableFromSnapshotRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata>, 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 unique name of the instance in which to create the table.
   *  Values are of the form `projects/{project}/instances/{instance}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The name by which the new table should be referred to within the
   *  parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
   */
  // const tableId = 'abc123'
  /**
   *  Required. The unique name of the snapshot from which to restore the table.
   *  The snapshot and the table must be in the same instance. Values are of the
   *  form
   *  `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
   */
  // const sourceSnapshot = 'abc123'

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

  async function callCreateTableFromSnapshot() {
    // Construct request
    const request = {
      parent,
      tableId,
      sourceSnapshot,
    };

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

  callCreateTableFromSnapshot();

createTableFromSnapshot(request, options, callback)

createTableFromSnapshot(request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, options: CallOptions, callback: Callback<LROperation<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateTableFromSnapshotRequest
options CallOptions
callback Callback<LROperation<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createTableFromSnapshot(request, callback)

createTableFromSnapshot(request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, callback: Callback<LROperation<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateTableFromSnapshotRequest
callback Callback<LROperation<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteAuthorizedView(request, options)

deleteAuthorizedView(request?: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | undefined,
        {} | undefined
    ]>;

Permanently deletes a specified AuthorizedView.

Parameters
Name Description
request IDeleteAuthorizedViewRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. 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 unique name of the AuthorizedView to be deleted.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. The current etag of the AuthorizedView.
   *  If an etag is provided and does not match the current etag of the
   *  AuthorizedView, deletion will be blocked and an ABORTED error will be
   *  returned.
   */
  // const etag = 'abc123'

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

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

    // Run request
    const response = await adminClient.deleteAuthorizedView(request);
    console.log(response);
  }

  callDeleteAuthorizedView();

deleteAuthorizedView(request, options, callback)

deleteAuthorizedView(request: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteAuthorizedViewRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteAuthorizedView(request, callback)

deleteAuthorizedView(request: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteAuthorizedViewRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackup(request, options)

deleteBackup(request?: protos.google.bigtable.admin.v2.IDeleteBackupRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.bigtable.admin.v2.IDeleteBackupRequest | undefined,
        {} | undefined
    ]>;

Deletes a pending or completed Cloud Bigtable 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<[ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. 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 to delete.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
   */
  // const name = 'abc123'

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

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

    // Run request
    const response = await adminClient.deleteBackup(request);
    console.log(response);
  }

  callDeleteBackup();

deleteBackup(request, options, callback)

deleteBackup(request: protos.google.bigtable.admin.v2.IDeleteBackupRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteBackupRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackup(request, callback)

deleteBackup(request: protos.google.bigtable.admin.v2.IDeleteBackupRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteBackupRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSnapshot(request, options)

deleteSnapshot(request?: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | undefined,
        {} | undefined
    ]>;

Permanently deletes the specified snapshot.

Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.

Parameters
Name Description
request IDeleteSnapshotRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. 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 unique name of the snapshot to be deleted.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
   */
  // const name = 'abc123'

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

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

    // Run request
    const response = await adminClient.deleteSnapshot(request);
    console.log(response);
  }

  callDeleteSnapshot();

deleteSnapshot(request, options, callback)

deleteSnapshot(request: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSnapshotRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSnapshot(request, callback)

deleteSnapshot(request: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSnapshotRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteTable(request, options)

deleteTable(request?: protos.google.bigtable.admin.v2.IDeleteTableRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.bigtable.admin.v2.IDeleteTableRequest | undefined,
        {} | undefined
    ]>;

Permanently deletes a specified table and all of its data.

Parameters
Name Description
request IDeleteTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. 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 unique name of the table to be deleted.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const name = 'abc123'

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

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

    // Run request
    const response = await adminClient.deleteTable(request);
    console.log(response);
  }

  callDeleteTable();

deleteTable(request, options, callback)

deleteTable(request: protos.google.bigtable.admin.v2.IDeleteTableRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteTableRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteTable(request, callback)

deleteTable(request: protos.google.bigtable.admin.v2.IDeleteTableRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteTableRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

dropRowRange(request, options)

dropRowRange(request?: protos.google.bigtable.admin.v2.IDropRowRangeRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.bigtable.admin.v2.IDropRowRangeRequest | undefined,
        {} | undefined
    ]>;

Permanently drop/delete a row range from a specified table. The request can specify whether to delete all rows in a table, or only those that match a particular prefix.

Parameters
Name Description
request IDropRowRangeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. 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 unique name of the table on which to drop a range of rows.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const name = 'abc123'
  /**
   *  Delete all rows that start with this row key prefix. Prefix cannot be
   *  zero length.
   */
  // const rowKeyPrefix = Buffer.from('string')
  /**
   *  Delete all rows in the table. Setting this to false is a no-op.
   */
  // const deleteAllDataFromTable = true

  // Imports the Admin library
  const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableTableAdminClient();

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

    // Run request
    const response = await adminClient.dropRowRange(request);
    console.log(response);
  }

  callDropRowRange();

dropRowRange(request, options, callback)

dropRowRange(request: protos.google.bigtable.admin.v2.IDropRowRangeRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDropRowRangeRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

dropRowRange(request, callback)

dropRowRange(request: protos.google.bigtable.admin<