Class v2.BigtableTableAdminClient (4.6.0)

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
NameDescription
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: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

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

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.

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
NameDescription
project string
instance string
appProfile string
Returns
TypeDescription
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
NameDescription
project string
instance string
cluster string
backup string
Returns
TypeDescription
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
NameDescription
request ICheckConsistencyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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'

  // 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
NameDescription
request ICheckConsistencyRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.ICheckConsistencyResponse, protos.google.bigtable.admin.v2.ICheckConsistencyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request ICheckConsistencyRequest
callback Callback<protos.google.bigtable.admin.v2.ICheckConsistencyResponse, protos.google.bigtable.admin.v2.ICheckConsistencyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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
NameDescription
name string

The operation name that will be passed.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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
NameDescription
name string

The operation name that will be passed.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
name string

The operation name that will be passed.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the instance in which to create the restored
   *  table. This instance must be in the same project as the source backup.
   *  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
NameDescription
name string

The operation name that will be passed.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
name string

The operation name that will be passed.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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();

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
NameDescription
name string

The operation name that will be passed.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
TypeDescription
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
NameDescription
project string
instance string
cluster string
Returns
TypeDescription
string

{string} Resource name string.

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 can be used to track creation of the backup. The field type is . The field type is , if successful. Cancelling the returned operation will stop the creation and delete the backup.

Parameters
NameDescription
request ICreateBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICreateTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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 = 1234

  // 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
NameDescription
request ICreateTableRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request ICreateTableRequest
callback Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request ICreateTableFromSnapshotRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IDeleteBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the 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
NameDescription
request IDeleteBackupRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDeleteBackupRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDeleteSnapshotRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
request IDeleteSnapshotRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDeleteSnapshotRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDeleteTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
request IDeleteTableRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDeleteTableRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDropRowRangeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
request IDropRowRangeRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDropRowRangeRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGenerateConsistencyTokenRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
request IGenerateConsistencyTokenRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGenerateConsistencyTokenRequest
callback Callback<protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the 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
NameDescription
request IGetBackupRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetBackupRequest
callback Callback<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The 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
NameDescription
request IGetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

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

getProjectId(callback)

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

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
NameDescription
request IGetSnapshotRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
request IGetSnapshotRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.ISnapshot, protos.google.bigtable.admin.v2.IGetSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetSnapshotRequest
callback Callback<protos.google.bigtable.admin.v2.ISnapshot, protos.google.bigtable.admin.v2.IGetSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
request IGetTableRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IGetTableRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetTableRequest
callback Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IGetTableRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
project string
instance string
cluster string
hotTablet string
Returns
TypeDescription
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
TypeDescription
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
NameDescription
project string
instance string
Returns
TypeDescription
string

{string} Resource name string.

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
NameDescription
request IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listBackups(request, options, callback)

listBackups(request: protos.google.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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.bigtable.admin.v2.IBackup>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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 = await 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
NameDescription
request IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

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

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
NameDescription
request IListSnapshotsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListSnapshotsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.bigtable.admin.v2.ISnapshot>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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 = await 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
NameDescription
request IListSnapshotsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

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

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
NameDescription
request IListTablesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListTablesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.bigtable.admin.v2.ITable>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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.
   *  Only 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 = await 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
NameDescription
request IListTablesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

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

matchAppProfileFromAppProfileName(appProfileName)

matchAppProfileFromAppProfileName(appProfileName: string): string | number;

Parse the app_profile from AppProfile resource.

Parameter
NameDescription
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns
TypeDescription
string | number

{string} A string representing the app_profile.

matchBackupFromBackupName(backupName)

matchBackupFromBackupName(backupName: string): string | number;

Parse the backup from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the backup.

matchClusterFromBackupName(backupName)

matchClusterFromBackupName(backupName: string): string | number;

Parse the cluster from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchClusterFromClusterName(clusterName)

matchClusterFromClusterName(clusterName: string): string | number;

Parse the cluster from Cluster resource.

Parameter
NameDescription
clusterName string

A fully-qualified path representing Cluster resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchClusterFromHotTabletName(hotTabletName)

matchClusterFromHotTabletName(hotTabletName: string): string | number;

Parse the cluster from HotTablet resource.

Parameter
NameDescription
hotTabletName string

A fully-qualified path representing HotTablet resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchClusterFromSnapshotName(snapshotName)

matchClusterFromSnapshotName(snapshotName: string): string | number;

Parse the cluster from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchHotTabletFromHotTabletName(hotTabletName)

matchHotTabletFromHotTabletName(hotTabletName: string): string | number;

Parse the hot_tablet from HotTablet resource.

Parameter
NameDescription
hotTabletName string

A fully-qualified path representing HotTablet resource.

Returns
TypeDescription
string | number

{string} A string representing the hot_tablet.

matchInstanceFromAppProfileName(appProfileName)

matchInstanceFromAppProfileName(appProfileName: string): string | number;

Parse the instance from AppProfile resource.

Parameter
NameDescription
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromBackupName(backupName)

matchInstanceFromBackupName(backupName: string): string | number;

Parse the instance from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromClusterName(clusterName)

matchInstanceFromClusterName(clusterName: string): string | number;

Parse the instance from Cluster resource.

Parameter
NameDescription
clusterName string

A fully-qualified path representing Cluster resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromHotTabletName(hotTabletName)

matchInstanceFromHotTabletName(hotTabletName: string): string | number;

Parse the instance from HotTablet resource.

Parameter
NameDescription
hotTabletName string

A fully-qualified path representing HotTablet resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromInstanceName(instanceName)

matchInstanceFromInstanceName(instanceName: string): string | number;

Parse the instance from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromSnapshotName(snapshotName)

matchInstanceFromSnapshotName(snapshotName: string): string | number;

Parse the instance from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromTableName(tableName)

matchInstanceFromTableName(tableName: string): string | number;

Parse the instance from Table resource.

Parameter
NameDescription
tableName string

A fully-qualified path representing Table resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchProjectFromAppProfileName(appProfileName)

matchProjectFromAppProfileName(appProfileName: string): string | number;

Parse the project from AppProfile resource.

Parameter
NameDescription
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromBackupName(backupName)

matchProjectFromBackupName(backupName: string): string | number;

Parse the project from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromClusterName(clusterName)

matchProjectFromClusterName(clusterName: string): string | number;

Parse the project from Cluster resource.

Parameter
NameDescription
clusterName string

A fully-qualified path representing Cluster resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromHotTabletName(hotTabletName)

matchProjectFromHotTabletName(hotTabletName: string): string | number;

Parse the project from HotTablet resource.

Parameter
NameDescription
hotTabletName string

A fully-qualified path representing HotTablet resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromInstanceName(instanceName)

matchProjectFromInstanceName(instanceName: string): string | number;

Parse the project from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromSnapshotName(snapshotName)

matchProjectFromSnapshotName(snapshotName: string): string | number;

Parse the project from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTableName(tableName)

matchProjectFromTableName(tableName: string): string | number;

Parse the project from Table resource.

Parameter
NameDescription
tableName string

A fully-qualified path representing Table resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchSnapshotFromSnapshotName(snapshotName)

matchSnapshotFromSnapshotName(snapshotName: string): string | number;

Parse the snapshot from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the snapshot.

matchTableFromTableName(tableName)

matchTableFromTableName(tableName: string): string | number;

Parse the table from Table resource.

Parameter
NameDescription
tableName string

A fully-qualified path representing Table resource.

Returns
TypeDescription
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
NameDescription
request IModifyColumnFamiliesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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 = 1234

  // 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
NameDescription
request IModifyColumnFamiliesRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IModifyColumnFamiliesRequest
callback Callback<protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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 new table must be in the same project as the instance containing the backup. The returned table can be used to track the progress of the operation, and to cancel it. The field type is . The type is , if successful.

Parameters
NameDescription
request IRestoreTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the instance in which to create the restored
   *  table. This instance must be in the same project as the source backup.
   *  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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ISetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The 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
NameDescription
request ISetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request ISetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
project string
instance string
cluster string
snapshot string
Returns
TypeDescription
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
NameDescription
request ISnapshotTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
void

tablePath(project, instance, table)

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

Return a fully-qualified table resource name string.

Parameters
NameDescription
project string
instance string
table string
Returns
TypeDescription
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
NameDescription
request ITestIamPermissionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The 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 = 'abc123'

  // 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
NameDescription
request ITestIamPermissionsRequest
options CallOptions
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request ITestIamPermissionsRequest
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IUndeleteTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IUpdateBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
request IUpdateBackupRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IUpdateBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IUpdateBackupRequest
callback Callback<protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IUpdateBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IUpdateTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
void