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.v2.IDropRowRangeRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDropRowRangeRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

generateConsistencyToken(request, options)

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

Generates a consistency token for a Table, which can be used in CheckConsistency to check whether mutations to the table that finished before this call started have been replicated. The tokens will be available for 90 days.

Parameters
Name Description
request IGenerateConsistencyTokenRequest

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.IGenerateConsistencyTokenResponse, (protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing GenerateConsistencyTokenResponse. 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 create a consistency
   *  token. 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 callGenerateConsistencyToken() {
    // Construct request
    const request = {
      name,
    };

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

  callGenerateConsistencyToken();

generateConsistencyToken(request, options, callback)

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

generateConsistencyToken(request, callback)

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

getAuthorizedView(request, options)

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

Gets information from a specified AuthorizedView.

Parameters
Name Description
request IGetAuthorizedViewRequest

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.IAuthorizedView, protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest | 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 requested AuthorizedView.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. The resource_view to be applied to the returned AuthorizedView's
   *  fields. Default to BASIC.
   */
  // const view = {}

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

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

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

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

  callGetAuthorizedView();

getAuthorizedView(request, options, callback)

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

getAuthorizedView(request, callback)

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

getBackup(request, options)

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

Gets metadata on a pending or completed Cloud Bigtable 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.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.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. Name of the backup.
   *  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 callGetBackup() {
    // Construct request
    const request = {
      name,
    };

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

  callGetBackup();

getBackup(request, options, callback)

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

getBackup(request, callback)

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

getIamPolicy(request, options)

getIamPolicy(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.IGetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Gets the access control policy for a Table or Backup resource. Returns an empty policy if the resource exists but does not have a policy set.

Parameters
Name Description
request IGetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Policy. 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 resource for which the policy is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  OPTIONAL: A `GetPolicyOptions` object for specifying options to
   *  `GetIamPolicy`.
   */
  // const options = {}

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

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

  async function callGetIamPolicy() {
    // Construct request
    const request = {
      resource,
    };

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

  callGetIamPolicy();

getIamPolicy(request, options, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIamPolicy(request, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

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

getSnapshot(request, options)

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

Gets metadata information about 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 IGetSnapshotRequest

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.ISnapshot, protos.google.bigtable.admin.v2.IGetSnapshotRequest | 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 requested snapshot.
   *  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 callGetSnapshot() {
    // Construct request
    const request = {
      name,
    };

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

  callGetSnapshot();

getSnapshot(request, options, callback)

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

getSnapshot(request, callback)

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

getTable(request, options)

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

Gets metadata information about the specified table.

Parameters
Name Description
request IGetTableRequest

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.IGetTableRequest | 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 requested table.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const name = 'abc123'
  /**
   *  The view to be applied to the returned table's fields.
   *  Defaults to `SCHEMA_VIEW` if unspecified.
   */
  // const view = {}

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

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

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

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

  callGetTable();

getTable(request, options, callback)

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

getTable(request, callback)

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

hotTabletPath(project, instance, cluster, hotTablet)

hotTabletPath(project: string, instance: string, cluster: string, hotTablet: string): string;

Return a fully-qualified hotTablet resource name string.

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

{string} Resource name string.

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.

instancePath(project, instance)

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

Return a fully-qualified instance resource name string.

Parameters
Name Description
project string
instance string
Returns
Type Description
string

{string} Resource name string.

listAuthorizedViews(request, options)

listAuthorizedViews(request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, options?: CallOptions): Promise<[
        protos.google.bigtable.admin.v2.IAuthorizedView[],
        protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest | null,
        protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse
    ]>;

Lists all AuthorizedViews from a specific table.

Parameters
Name Description
request IListAuthorizedViewsRequest

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.IAuthorizedView[], protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest | null, protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse ]>

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

listAuthorizedViews(request, options, callback)

listAuthorizedViews(request: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, options: CallOptions, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse | null | undefined, protos.google.bigtable.admin.v2.IAuthorizedView>): void;
Parameters
Name Description
request IListAuthorizedViewsRequest
options CallOptions
callback PaginationCallback<protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse | null | undefined, protos.google.bigtable.admin.v2.IAuthorizedView>
Returns
Type Description
void

listAuthorizedViews(request, callback)

listAuthorizedViews(request: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse | null | undefined, protos.google.bigtable.admin.v2.IAuthorizedView>): void;
Parameters
Name Description
request IListAuthorizedViewsRequest
callback PaginationCallback<protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse | null | undefined, protos.google.bigtable.admin.v2.IAuthorizedView>
Returns
Type Description
void

listAuthorizedViewsAsync(request, options)

listAuthorizedViewsAsync(request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, options?: CallOptions): AsyncIterable<protos.google.bigtable.admin.v2.IAuthorizedView>;

Equivalent to listAuthorizedViews, but returns an iterable object.

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

Parameters
Name Description
request IListAuthorizedViewsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.bigtable.admin.v2.IAuthorizedView>

{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 unique name of the table for which AuthorizedViews should be
   *  listed. Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Maximum number of results per page.
   *  A page_size of zero lets the server choose the number of items to return.
   *  A page_size which is strictly positive will return at most that many items.
   *  A negative page_size will cause an error.
   *  Following the first request, subsequent paginated calls are not required
   *  to pass a page_size. If a page_size is set in subsequent calls, it must
   *  match the page_size given in the first request.
   */
  // const pageSize = 1234
  /**
   *  Optional. The value of `next_page_token` returned by a previous call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The resource_view to be applied to the returned views' fields.
   *  Default to NAME_ONLY.
   */
  // const view = {}

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

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

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

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

  callListAuthorizedViews();

listAuthorizedViewsStream(request, options)

listAuthorizedViewsStream(request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, options?: CallOptions): Transform;

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

Parameters
Name Description
request IListAuthorizedViewsRequest

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 listAuthorizedViewsAsync() 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.bigtable.admin.v2.IListBackupsRequest, options?: CallOptions): Promise<[
        protos.google.bigtable.admin.v2.IBackup[],
        protos.google.bigtable.admin.v2.IListBackupsRequest | null,
        protos.google.bigtable.admin.v2.IListBackupsResponse
    ]>;

Lists Cloud Bigtable backups. Returns both completed and pending backups.

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.bigtable.admin.v2.IBackup[], protos.google.bigtable.admin.v2.IListBackupsRequest | null, protos.google.bigtable.admin.v2.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.bigtable.admin.v2.IListBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListBackupsRequest, protos.google.bigtable.admin.v2.IListBackupsResponse | null | undefined, protos.google.bigtable.admin.v2.IBackup>): void;
Parameters
Name Description
request IListBackupsRequest
options CallOptions
callback PaginationCallback<protos.google.bigtable.admin.v2.IListBackupsRequest, protos.google.bigtable.admin.v2.IListBackupsResponse | null | undefined, protos.google.bigtable.admin.v2.IBackup>
Returns
Type Description
void

listBackups(request, callback)

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

listBackupsAsync(request, options)

listBackupsAsync(request?: protos.google.bigtable.admin.v2.IListBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.bigtable.admin.v2.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.bigtable.admin.v2.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 cluster to list backups from.  Values are of the
   *  form `projects/{project}/instances/{instance}/clusters/{cluster}`.
   *  Use `{cluster} = '-'` to list backups for all clusters in an instance,
   *  e.g., `projects/{project}/instances/{instance}/clusters/-`.
   */
  // const parent = 'abc123'
  /**
   *  A filter expression that filters backups listed in the response.
   *  The expression must specify the field name, a comparison operator,
   *  and the value that you want to use for filtering. The value must be a
   *  string, a number, or a boolean. The comparison operator must be
   *  <,>, <=,>=, !=, =, or :. Colon ':' represents a HAS operator which is
   *  roughly synonymous with equality. Filter rules are case insensitive.
   *  The fields eligible for filtering are:
   *  * `name`
   *  * `source_table`
   *  * `state`
   *  * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
   *  * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
   *  * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
   *  * `size_bytes`
   *  To filter on multiple expressions, provide each separate expression within
   *  parentheses. By default, each expression is an AND expression. However,
   *  you can include AND, OR, and NOT expressions explicitly.
   *  Some examples of using filters are:
   *  * `name:"exact"` --> The backup's name is the string "exact".
   *  * `name:howl` --> The backup's name contains the string "howl".
   *  * `source_table:prod`
   *         --> The source_table's name contains the string "prod".
   *  * `state:CREATING` --> The backup is pending creation.
   *  * `state:READY` --> The backup is fully created and ready for use.
   *  * `(name:howl) AND (start_time < \"2018-03-28t14:50:00z\")`="" *="" --=""> The backup name contains the string "howl" and start_time
   *             of the backup is before 2018-03-28T14:50:00Z.
   *  * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
   */
  // const filter = 'abc123'
  /**
   *  An expression for specifying the sort order of the results of the request.
   *  The string value should specify one or more fields in
   *  Backup google.bigtable.admin.v2.Backup. The full syntax is described at
   *  https://aip.dev/132#ordering.
   *  Fields supported are:
   *  * name
   *  * source_table
   *  * expire_time
   *  * start_time
   *  * end_time
   *  * size_bytes
   *  * state
   *  For example, "start_time". The default sorting order is ascending.
   *  To specify descending order for the field, a suffix " desc" should
   *  be appended to the field name. For example, "start_time desc".
   *  Redundant space characters in the syntax are insigificant.
   *  If order_by is empty, results will be sorted by `start_time` in descending
   *  order starting from the most recently created backup.
   */
  // const orderBy = 'abc123'
  /**
   *  Number of backups to be returned in the response. If 0 or
   *  less, defaults to the server's maximum allowed page size.
   */
  // const pageSize = 1234
  /**
   *  If non-empty, `page_token` should contain a
   *  next_page_token google.bigtable.admin.v2.ListBackupsResponse.next_page_token 
   *  from a previous
   *  ListBackupsResponse google.bigtable.admin.v2.ListBackupsResponse  to the
   *  same `parent` and with the same `filter`.
   */
  // const pageToken = 'abc123'

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

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

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

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

  callListBackups();

listBackupsStream(request, options)

listBackupsStream(request?: protos.google.bigtable.admin.v2.IListBackupsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), 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.

listSnapshots(request, options)

listSnapshots(request?: protos.google.bigtable.admin.v2.IListSnapshotsRequest, options?: CallOptions): Promise<[
        protos.google.bigtable.admin.v2.ISnapshot[],
        protos.google.bigtable.admin.v2.IListSnapshotsRequest | null,
        protos.google.bigtable.admin.v2.IListSnapshotsResponse
    ]>;

Lists all snapshots associated with the specified cluster.

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 IListSnapshotsRequest

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.ISnapshot[], protos.google.bigtable.admin.v2.IListSnapshotsRequest | null, protos.google.bigtable.admin.v2.IListSnapshotsResponse ]>

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

listSnapshots(request, options, callback)

listSnapshots(request: protos.google.bigtable.admin.v2.IListSnapshotsRequest, options: CallOptions, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListSnapshotsRequest, protos.google.bigtable.admin.v2.IListSnapshotsResponse | null | undefined, protos.google.bigtable.admin.v2.ISnapshot>): void;
Parameters
Name Description
request IListSnapshotsRequest
options CallOptions
callback PaginationCallback<protos.google.bigtable.admin.v2.IListSnapshotsRequest, protos.google.bigtable.admin.v2.IListSnapshotsResponse | null | undefined, protos.google.bigtable.admin.v2.ISnapshot>
Returns
Type Description
void

listSnapshots(request, callback)

listSnapshots(request: protos.google.bigtable.admin.v2.IListSnapshotsRequest, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListSnapshotsRequest, protos.google.bigtable.admin.v2.IListSnapshotsResponse | null | undefined, protos.google.bigtable.admin.v2.ISnapshot>): void;
Parameters
Name Description
request IListSnapshotsRequest
callback PaginationCallback<protos.google.bigtable.admin.v2.IListSnapshotsRequest, protos.google.bigtable.admin.v2.IListSnapshotsResponse | null | undefined, protos.google.bigtable.admin.v2.ISnapshot>
Returns
Type Description
void

listSnapshotsAsync(request, options)

listSnapshotsAsync(request?: protos.google.bigtable.admin.v2.IListSnapshotsRequest, options?: CallOptions): AsyncIterable<protos.google.bigtable.admin.v2.ISnapshot>;

Equivalent to listSnapshots, but returns an iterable object.

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

Parameters
Name Description
request IListSnapshotsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.bigtable.admin.v2.ISnapshot>

{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 unique name of the cluster for which snapshots should be
   *  listed. Values are of the form
   *  `projects/{project}/instances/{instance}/clusters/{cluster}`.
   *  Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
   *  e.g., `projects/{project}/instances/{instance}/clusters/-`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of snapshots to return per page.
   *  CURRENTLY UNIMPLEMENTED AND IGNORED.
   */
  // const pageSize = 1234
  /**
   *  The value of `next_page_token` returned by a previous call.
   */
  // const pageToken = 'abc123'

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

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

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

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

  callListSnapshots();

listSnapshotsStream(request, options)

listSnapshotsStream(request?: protos.google.bigtable.admin.v2.IListSnapshotsRequest, options?: CallOptions): Transform;

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

Parameters
Name Description
request IListSnapshotsRequest

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

listTables(request, options)

listTables(request?: protos.google.bigtable.admin.v2.IListTablesRequest, options?: CallOptions): Promise<[
        protos.google.bigtable.admin.v2.ITable[],
        protos.google.bigtable.admin.v2.IListTablesRequest | null,
        protos.google.bigtable.admin.v2.IListTablesResponse
    ]>;

Lists all tables served from a specified instance.

Parameters
Name Description
request IListTablesRequest

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.IListTablesRequest | null, protos.google.bigtable.admin.v2.IListTablesResponse ]>

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

listTables(request, options, callback)

listTables(request: protos.google.bigtable.admin.v2.IListTablesRequest, options: CallOptions, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListTablesRequest, protos.google.bigtable.admin.v2.IListTablesResponse | null | undefined, protos.google.bigtable.admin.v2.ITable>): void;
Parameters
Name Description
request IListTablesRequest
options CallOptions
callback PaginationCallback<protos.google.bigtable.admin.v2.IListTablesRequest, protos.google.bigtable.admin.v2.IListTablesResponse | null | undefined, protos.google.bigtable.admin.v2.ITable>
Returns
Type Description
void

listTables(request, callback)

listTables(request: protos.google.bigtable.admin.v2.IListTablesRequest, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListTablesRequest, protos.google.bigtable.admin.v2.IListTablesResponse | null | undefined, protos.google.bigtable.admin.v2.ITable>): void;
Parameters
Name Description
request IListTablesRequest
callback PaginationCallback<protos.google.bigtable.admin.v2.IListTablesRequest, protos.google.bigtable.admin.v2.IListTablesResponse | null | undefined, protos.google.bigtable.admin.v2.ITable>
Returns
Type Description
void

listTablesAsync(request, options)

listTablesAsync(request?: protos.google.bigtable.admin.v2.IListTablesRequest, options?: CallOptions): AsyncIterable<protos.google.bigtable.admin.v2.ITable>;

Equivalent to listTables, but returns an iterable object.

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

Parameters
Name Description
request IListTablesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.bigtable.admin.v2.ITable>

{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 unique name of the instance for which tables should be
   *  listed. Values are of the form `projects/{project}/instances/{instance}`.
   */
  // const parent = 'abc123'
  /**
   *  The view to be applied to the returned tables' fields.
   *  NAME_ONLY view (default) and REPLICATION_VIEW are supported.
   */
  // const view = {}
  /**
   *  Maximum number of results per page.
   *  A page_size of zero lets the server choose the number of items to return.
   *  A page_size which is strictly positive will return at most that many items.
   *  A negative page_size will cause an error.
   *  Following the first request, subsequent paginated calls are not required
   *  to pass a page_size. If a page_size is set in subsequent calls, it must
   *  match the page_size given in the first request.
   */
  // const pageSize = 1234
  /**
   *  The value of `next_page_token` returned by a previous call.
   */
  // const pageToken = 'abc123'

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

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

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

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

  callListTables();

listTablesStream(request, options)

listTablesStream(request?: protos.google.bigtable.admin.v2.IListTablesRequest, options?: CallOptions): Transform;

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

Parameters
Name Description
request IListTablesRequest

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

matchAppProfileFromAppProfileName(appProfileName)

matchAppProfileFromAppProfileName(appProfileName: string): string | number;

Parse the app_profile from AppProfile resource.

Parameter
Name Description
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns
Type Description
string | number

{string} A string representing the app_profile.

matchAuthorizedViewFromAuthorizedViewName(authorizedViewName)

matchAuthorizedViewFromAuthorizedViewName(authorizedViewName: string): string | number;

Parse the authorized_view from AuthorizedView resource.

Parameter
Name Description
authorizedViewName string

A fully-qualified path representing AuthorizedView resource.

Returns
Type Description
string | number

{string} A string representing the authorized_view.

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.

matchClusterFromBackupName(backupName)

matchClusterFromBackupName(backupName: string): string | number;

Parse the cluster 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 cluster.

matchClusterFromClusterName(clusterName)

matchClusterFromClusterName(clusterName: string): string | number;

Parse the cluster from Cluster resource.

Parameter
Name Description
clusterName string

A fully-qualified path representing Cluster resource.

Returns
Type Description
string | number

{string} A string representing the cluster.

matchClusterFromHotTabletName(hotTabletName)

matchClusterFromHotTabletName(hotTabletName: string): string | number;

Parse the cluster from HotTablet resource.

Parameter
Name Description
hotTabletName string

A fully-qualified path representing HotTablet resource.

Returns
Type Description
string | number

{string} A string representing the cluster.

matchClusterFromSnapshotName(snapshotName)

matchClusterFromSnapshotName(snapshotName: string): string | number;

Parse the cluster from Snapshot resource.

Parameter
Name Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
Type Description
string | number

{string} A string representing the cluster.

matchHotTabletFromHotTabletName(hotTabletName)

matchHotTabletFromHotTabletName(hotTabletName: string): string | number;

Parse the hot_tablet from HotTablet resource.

Parameter
Name Description
hotTabletName string

A fully-qualified path representing HotTablet resource.

Returns
Type Description
string | number

{string} A string representing the hot_tablet.

matchInstanceFromAppProfileName(appProfileName)

matchInstanceFromAppProfileName(appProfileName: string): string | number;

Parse the instance from AppProfile resource.

Parameter
Name Description
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromAuthorizedViewName(authorizedViewName)

matchInstanceFromAuthorizedViewName(authorizedViewName: string): string | number;

Parse the instance from AuthorizedView resource.

Parameter
Name Description
authorizedViewName string

A fully-qualified path representing AuthorizedView resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromBackupName(backupName)

matchInstanceFromBackupName(backupName: string): string | number;

Parse the instance 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 instance.

matchInstanceFromClusterName(clusterName)

matchInstanceFromClusterName(clusterName: string): string | number;

Parse the instance from Cluster resource.

Parameter
Name Description
clusterName string

A fully-qualified path representing Cluster resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromHotTabletName(hotTabletName)

matchInstanceFromHotTabletName(hotTabletName: string): string | number;

Parse the instance from HotTablet resource.

Parameter
Name Description
hotTabletName string

A fully-qualified path representing HotTablet resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromInstanceName(instanceName)

matchInstanceFromInstanceName(instanceName: string): string | number;

Parse the instance from Instance resource.

Parameter
Name Description
instanceName string

A fully-qualified path representing Instance resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromSnapshotName(snapshotName)

matchInstanceFromSnapshotName(snapshotName: string): string | number;

Parse the instance from Snapshot resource.

Parameter
Name Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchInstanceFromTableName(tableName)

matchInstanceFromTableName(tableName: string): string | number;

Parse the instance from Table resource.

Parameter
Name Description
tableName string

A fully-qualified path representing Table resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchProjectFromAppProfileName(appProfileName)

matchProjectFromAppProfileName(appProfileName: string): string | number;

Parse the project from AppProfile resource.

Parameter
Name Description
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromAuthorizedViewName(authorizedViewName)

matchProjectFromAuthorizedViewName(authorizedViewName: string): string | number;

Parse the project from AuthorizedView resource.

Parameter
Name Description
authorizedViewName string

A fully-qualified path representing AuthorizedView 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.

matchProjectFromClusterName(clusterName)

matchProjectFromClusterName(clusterName: string): string | number;

Parse the project from Cluster resource.

Parameter
Name Description
clusterName string

A fully-qualified path representing Cluster resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromHotTabletName(hotTabletName)

matchProjectFromHotTabletName(hotTabletName: string): string | number;

Parse the project from HotTablet resource.

Parameter
Name Description
hotTabletName string

A fully-qualified path representing HotTablet resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromInstanceName(instanceName)

matchProjectFromInstanceName(instanceName: string): string | number;

Parse the project from Instance resource.

Parameter
Name Description
instanceName string

A fully-qualified path representing Instance resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromSnapshotName(snapshotName)

matchProjectFromSnapshotName(snapshotName: string): string | number;

Parse the project from Snapshot resource.

Parameter
Name Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromTableName(tableName)

matchProjectFromTableName(tableName: string): string | number;

Parse the project from Table resource.

Parameter
Name Description
tableName string

A fully-qualified path representing Table resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchSnapshotFromSnapshotName(snapshotName)

matchSnapshotFromSnapshotName(snapshotName: string): string | number;

Parse the snapshot from Snapshot resource.

Parameter
Name Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
Type Description
string | number

{string} A string representing the snapshot.

matchTableFromAuthorizedViewName(authorizedViewName)

matchTableFromAuthorizedViewName(authorizedViewName: string): string | number;

Parse the table from AuthorizedView resource.

Parameter
Name Description
authorizedViewName string

A fully-qualified path representing AuthorizedView resource.

Returns
Type Description
string | number

{string} A string representing the table.

matchTableFromTableName(tableName)

matchTableFromTableName(tableName: string): string | number;

Parse the table from Table resource.

Parameter
Name Description
tableName string

A fully-qualified path representing Table resource.

Returns
Type Description
string | number

{string} A string representing the table.

modifyColumnFamilies(request, options)

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

Performs a series of column family modifications on the specified table. Either all or none of the modifications will occur before this method returns, but data requests received prior to that point may see a table where only some modifications have taken effect.

Parameters
Name Description
request IModifyColumnFamiliesRequest

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.IModifyColumnFamiliesRequest | 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 table whose families should be modified.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}/tables/{table}`.
   */
  // const name = 'abc123'
  /**
   *  Required. Modifications to be atomically applied to the specified table's
   *  families. Entries are applied in order, meaning that earlier modifications
   *  can be masked by later ones (in the case of repeated updates to the same
   *  family, for example).
   */
  // const modifications = [1,2,3,4]
  /**
   *  Optional. If true, ignore safety checks when modifying the column families.
   */
  // const ignoreWarnings = true

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

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

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

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

  callModifyColumnFamilies();

modifyColumnFamilies(request, options, callback)

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

modifyColumnFamilies(request, callback)

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

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

restoreTable(request, options)

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

Create a new table by restoring from a completed backup. The returned table long-running operation can be used to track the progress of the operation, and to cancel it. The metadata field type is . The response type is , if successful.

Parameters
Name Description
request IRestoreTableRequest

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

restoreTable(request, options, callback)

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

restoreTable(request, callback)

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

setIamPolicy(request, options)

setIamPolicy(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.ISetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Sets the access control policy on a Table or Backup resource. Replaces any existing policy.

Parameters
Name Description
request ISetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Policy. 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 resource for which the policy is being specified.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  REQUIRED: The complete policy to be applied to the `resource`. The size of
   *  the policy is limited to a few 10s of KB. An empty policy is a
   *  valid policy but certain Cloud Platform services (such as Projects)
   *  might reject them.
   */
  // const policy = {}
  /**
   *  OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
   *  the fields in the mask will be modified. If no mask is provided, the
   *  following default mask is used:
   *  `paths: "bindings, etag"`
   */
  // const updateMask = {}

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

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

  async function callSetIamPolicy() {
    // Construct request
    const request = {
      resource,
      policy,
    };

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

  callSetIamPolicy();

setIamPolicy(request, options, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ISetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

setIamPolicy(request, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ISetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

snapshotPath(project, instance, cluster, snapshot)

snapshotPath(project: string, instance: string, cluster: string, snapshot: string): string;

Return a fully-qualified snapshot resource name string.

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

{string} Resource name string.

snapshotTable(request, options)

snapshotTable(request?: protos.google.bigtable.admin.v2.ISnapshotTableRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.bigtable.admin.v2.ISnapshot, protos.google.bigtable.admin.v2.ISnapshotTableMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new snapshot in the specified cluster from the specified source table. The cluster 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 ISnapshotTableRequest

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.ISnapshot, protos.google.bigtable.admin.v2.ISnapshotTableMetadata>, 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 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();

snapshotTable(request, options, callback)

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

snapshotTable(request, callback)

snapshotTable(request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, callback: Callback<LROperation<protos.google.bigtable.admin.v2.ISnapshot, protos.google.bigtable.admin.v2.ISnapshotTableMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ISnapshotTableRequest
callback Callback<LROperation<protos.google.bigtable.admin.v2.ISnapshot, protos.google.bigtable.admin.v2.ISnapshotTableMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

tablePath(project, instance, table)

tablePath(project: string, instance: string, table: string): string;

Return a fully-qualified table resource name string.

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

{string} Resource name string.

testIamPermissions(request, options)

testIamPermissions(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.ITestIamPermissionsResponse,
        protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
        {} | undefined
    ]>;

Returns permissions that the caller has on the specified Table or Backup resource.

Parameters
Name Description
request ITestIamPermissionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing TestIamPermissionsResponse. 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 resource for which the policy detail is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  The set of permissions to check for the `resource`. Permissions with
   *  wildcards (such as '*' or 'storage.*') are not allowed. For more
   *  information see
   *  IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
   */
  // const permissions = ['abc','def']

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

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

  async function callTestIamPermissions() {
    // Construct request
    const request = {
      resource,
      permissions,
    };

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

  callTestIamPermissions();

testIamPermissions(request, options, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ITestIamPermissionsRequest
options CallOptions
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

testIamPermissions(request, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ITestIamPermissionsRequest
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

undeleteTable(request, options)

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

Restores a specified table which was accidentally deleted.

Parameters
Name Description
request IUndeleteTableRequest

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.IUndeleteTableMetadata>, 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 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();

undeleteTable(request, options, callback)

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

undeleteTable(request, callback)

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

updateAuthorizedView(request, options)

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

Updates an AuthorizedView in a table.

Parameters
Name Description
request IUpdateAuthorizedViewRequest

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

updateAuthorizedView(request, options, callback)

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

updateAuthorizedView(request, callback)

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

updateBackup(request, options)

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

Updates a pending or completed Cloud Bigtable 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<[ protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IUpdateBackupRequest | 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 backup to update. `backup.name`, and the fields to be updated
   *  as specified by `update_mask` are required. Other fields are ignored.
   *  Update is only supported for the following fields:
   *   * `backup.expire_time`.
   */
  // const backup = {}
  /**
   *  Required. A mask specifying which fields (e.g. `expire_time`) in the
   *  Backup resource should be updated. This mask is relative to the Backup
   *  resource, not to the request message. The field mask must always be
   *  specified; this prevents any future fields from being erased accidentally
   *  by clients that do not know about them.
   */
  // const updateMask = {}

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

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

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

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

  callUpdateBackup();

updateBackup(request, options, callback)

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

updateBackup(request, callback)

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

updateTable(request, options)

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

Updates a specified table.

Parameters
Name Description
request IUpdateTableRequest

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.IUpdateTableMetadata>, 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 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();

updateTable(request, options, callback)

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

updateTable(request, callback)

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