BigtableTableAdminClient

BigtableTableAdminClient

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

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

Constructor

new BigtableTableAdminClient(optionsopt)

Construct an instance of BigtableTableAdminClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

Client configuration override. Follows the structure of gapicConfig.

fallback boolean <optional>

Use HTTP fallback mode. In fallback mode, a special browser-compatible transport implementation is used instead of gRPC transport. In browser context (if the window object is defined) the fallback mode is enabled automatically; set options.fallback to false if you need to override this behavior.

Members

apiEndpoint

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

port

The port for this API service.

scopes

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

servicePath

The DNS address for this API service.

Methods

appProfilePath(project, instance, app_profile) → {string}

Return a fully-qualified appProfile resource name string.

Parameters:
Name Type Description
project string
instance string
app_profile string
Returns:
Type Description
string

Resource name string.

backupPath(project, instance, cluster, backup) → {string}

Return a fully-qualified backup resource name string.

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

Resource name string.

checkConsistency(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The unique name of the Table for which to check replication consistency. Values are of the form projects/{project}/instances/{instance}/tables/{table}.

consistencyToken string

Required. The token created using GenerateConsistencyToken for the Table.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.checkConsistency(request);

(async) checkCreateBackupProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkCreateBackupProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkCreateTableFromSnapshotProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkCreateTableFromSnapshotProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkRestoreTableProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkRestoreTableProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkSnapshotTableProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkSnapshotTableProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

close() → {Promise}

Terminate the gRPC channel and close the client.

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

Returns:
Type Description
Promise

A promise that resolves when the client is closed.

clusterPath(project, instance, cluster) → {string}

Return a fully-qualified cluster resource name string.

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

Resource name string.

createBackup(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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}.

backupId string

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*.

backup google.bigtable.admin.v2.Backup

Required. The backup to create.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.createBackup(request);
const [response] = await operation.promise();

createTable(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The unique name of the instance in which to create the table. Values are of the form projects/{project}/instances/{instance}.

tableId string

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.

table google.bigtable.admin.v2.Table

Required. The Table to create.

initialSplits Array.<number>

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"}.
options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Table. Please see the documentation for more details and examples.
Example
const [response] = await client.createTable(request);

createTableFromSnapshot(request, optionsopt) → {Promise}

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

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The unique name of the instance in which to create the table. Values are of the form projects/{project}/instances/{instance}.

tableId string

Required. The name by which the new table should be referred to within the parent instance, e.g., foobar rather than {parent}/tables/foobar.

sourceSnapshot string

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}.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.createTableFromSnapshot(request);
const [response] = await operation.promise();

deleteBackup(request, optionsopt) → {Promise}

Deletes a pending or completed Cloud Bigtable backup.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Name of the backup to delete. Values are of the form projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteBackup(request);

deleteSnapshot(request, optionsopt) → {Promise}

Permanently deletes the specified snapshot.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The unique name of the snapshot to be deleted. Values are of the form projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteSnapshot(request);

deleteTable(request, optionsopt) → {Promise}

Permanently deletes a specified table and all of its data.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The unique name of the table to be deleted. Values are of the form projects/{project}/instances/{instance}/tables/{table}.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteTable(request);

dropRowRange(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

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}.

rowKeyPrefix Buffer

Delete all rows that start with this row key prefix. Prefix cannot be zero length.

deleteAllDataFromTable boolean

Delete all rows in the table. Setting this to false is a no-op.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.dropRowRange(request);

generateConsistencyToken(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

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}.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.generateConsistencyToken(request);

getBackup(request, optionsopt) → {Promise}

Gets metadata on a pending or completed Cloud Bigtable Backup.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Name of the backup. Values are of the form projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Backup. Please see the documentation for more details and examples.
Example
const [response] = await client.getBackup(request);

getIamPolicy(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
resource string

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

options google.iam.v1.GetPolicyOptions

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy. This field is only used by Cloud IAM.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Policy. Please see the documentation for more details and examples.
Example
const [response] = await client.getIamPolicy(request);

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

getSnapshot(request, optionsopt) → {Promise}

Gets metadata information about the specified snapshot.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The unique name of the requested snapshot. Values are of the form projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Snapshot. Please see the documentation for more details and examples.
Example
const [response] = await client.getSnapshot(request);

getTable(request, optionsopt) → {Promise}

Gets metadata information about the specified table.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The unique name of the requested table. Values are of the form projects/{project}/instances/{instance}/tables/{table}.

view google.bigtable.admin.v2.Table.View

The view to be applied to the returned table's fields. Defaults to SCHEMA_VIEW if unspecified.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Table. Please see the documentation for more details and examples.
Example
const [response] = await client.getTable(request);

initialize() → {Promise}

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns:
Type Description
Promise

A promise that resolves to an authenticated service stub.

instancePath(project, instance) → {string}

Return a fully-qualified instance resource name string.

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

Resource name string.

listBackups(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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/-.

filter string

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
orderBy string

An expression for specifying the sort order of the results of the request. The string value should specify one or more fields in 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.

pageSize number

Number of backups to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.

pageToken string

If non-empty, page_token should contain a next_page_token from a previous ListBackupsResponse to the same parent and with the same filter.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Backup. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listBackupsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listBackupsAsync(request, optionsopt) → {Object}

Equivalent to listBackups, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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/-.

filter string

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
orderBy string

An expression for specifying the sort order of the results of the request. The string value should specify one or more fields in 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.

pageSize number

Number of backups to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.

pageToken string

If non-empty, page_token should contain a next_page_token from a previous ListBackupsResponse to the same parent and with the same filter.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Backup. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

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

listBackupsStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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/-.

filter string

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
orderBy string

An expression for specifying the sort order of the results of the request. The string value should specify one or more fields in 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.

pageSize number

Number of backups to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.

pageToken string

If non-empty, page_token should contain a next_page_token from a previous ListBackupsResponse to the same parent and with the same filter.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Backup on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listBackupsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSnapshots(request, optionsopt) → {Promise}

Lists all snapshots associated with the specified cluster.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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/-.

pageSize number

The maximum number of snapshots to return per page. CURRENTLY UNIMPLEMENTED AND IGNORED.

pageToken string

The value of next_page_token returned by a previous call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Snapshot. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listSnapshotsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSnapshotsAsync(request, optionsopt) → {Object}

Equivalent to listSnapshots, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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/-.

pageSize number

The maximum number of snapshots to return per page. CURRENTLY UNIMPLEMENTED AND IGNORED.

pageToken string

The value of next_page_token returned by a previous call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Snapshot. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

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

listSnapshotsStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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/-.

pageSize number

The maximum number of snapshots to return per page. CURRENTLY UNIMPLEMENTED AND IGNORED.

pageToken string

The value of next_page_token returned by a previous call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Snapshot on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSnapshotsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTables(request, optionsopt) → {Promise}

Lists all tables served from a specified instance.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The unique name of the instance for which tables should be listed. Values are of the form projects/{project}/instances/{instance}.

view google.bigtable.admin.v2.Table.View

The view to be applied to the returned tables' fields. Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.

pageSize number

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.

pageToken string

The value of next_page_token returned by a previous call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Table. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listTablesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTablesAsync(request, optionsopt) → {Object}

Equivalent to listTables, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The unique name of the instance for which tables should be listed. Values are of the form projects/{project}/instances/{instance}.

view google.bigtable.admin.v2.Table.View

The view to be applied to the returned tables' fields. Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.

pageSize number

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.

pageToken string

The value of next_page_token returned by a previous call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Table. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

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

listTablesStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The unique name of the instance for which tables should be listed. Values are of the form projects/{project}/instances/{instance}.

view google.bigtable.admin.v2.Table.View

The view to be applied to the returned tables' fields. Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.

pageSize number

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.

pageToken string

The value of next_page_token returned by a previous call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Table on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listTablesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchAppProfileFromAppProfileName(appProfileName) → {string}

Parse the app_profile from AppProfile resource.

Parameters:
Name Type Description
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns:
Type Description
string

A string representing the app_profile.

matchBackupFromBackupName(backupName) → {string}

Parse the backup from Backup resource.

Parameters:
Name Type Description
backupName string

A fully-qualified path representing Backup resource.

Returns:
Type Description
string

A string representing the backup.

matchClusterFromBackupName(backupName) → {string}

Parse the cluster from Backup resource.

Parameters:
Name Type Description
backupName string

A fully-qualified path representing Backup resource.

Returns:
Type Description
string

A string representing the cluster.

matchClusterFromClusterName(clusterName) → {string}

Parse the cluster from Cluster resource.

Parameters:
Name Type Description
clusterName string

A fully-qualified path representing Cluster resource.

Returns:
Type Description
string

A string representing the cluster.

matchClusterFromSnapshotName(snapshotName) → {string}

Parse the cluster from Snapshot resource.

Parameters:
Name Type Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns:
Type Description
string

A string representing the cluster.

matchInstanceFromAppProfileName(appProfileName) → {string}

Parse the instance from AppProfile resource.

Parameters:
Name Type Description
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromBackupName(backupName) → {string}

Parse the instance from Backup resource.

Parameters:
Name Type Description
backupName string

A fully-qualified path representing Backup resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromClusterName(clusterName) → {string}

Parse the instance from Cluster resource.

Parameters:
Name Type Description
clusterName string

A fully-qualified path representing Cluster resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromInstanceName(instanceName) → {string}

Parse the instance from Instance resource.

Parameters:
Name Type Description
instanceName string

A fully-qualified path representing Instance resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromSnapshotName(snapshotName) → {string}

Parse the instance from Snapshot resource.

Parameters:
Name Type Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns:
Type Description
string

A string representing the instance.

matchInstanceFromTableName(tableName) → {string}

Parse the instance from Table resource.

Parameters:
Name Type Description
tableName string

A fully-qualified path representing Table resource.

Returns:
Type Description
string

A string representing the instance.

matchProjectFromAppProfileName(appProfileName) → {string}

Parse the project from AppProfile resource.

Parameters:
Name Type Description
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromBackupName(backupName) → {string}

Parse the project from Backup resource.

Parameters:
Name Type Description
backupName string

A fully-qualified path representing Backup resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromClusterName(clusterName) → {string}

Parse the project from Cluster resource.

Parameters:
Name Type Description
clusterName string

A fully-qualified path representing Cluster resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromInstanceName(instanceName) → {string}

Parse the project from Instance resource.

Parameters:
Name Type Description
instanceName string

A fully-qualified path representing Instance resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromSnapshotName(snapshotName) → {string}

Parse the project from Snapshot resource.

Parameters:
Name Type Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromTableName(tableName) → {string}

Parse the project from Table resource.

Parameters:
Name Type Description
tableName string

A fully-qualified path representing Table resource.

Returns:
Type Description
string

A string representing the project.

matchSnapshotFromSnapshotName(snapshotName) → {string}

Parse the snapshot from Snapshot resource.

Parameters:
Name Type Description
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns:
Type Description
string

A string representing the snapshot.

matchTableFromTableName(tableName) → {string}

Parse the table from Table resource.

Parameters:
Name Type Description
tableName string

A fully-qualified path representing Table resource.

Returns:
Type Description
string

A string representing the table.

modifyColumnFamilies(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The unique name of the table whose families should be modified. Values are of the form projects/{project}/instances/{instance}/tables/{table}.

modifications Array.<number>

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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Table. Please see the documentation for more details and examples.
Example
const [response] = await client.modifyColumnFamilies(request);

restoreTable(request, optionsopt) → {Promise}

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 long-running operation can be used to track the progress of the operation, and to cancel it. The metadata field type is RestoreTableMetadata. The response type is Table, if successful.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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/<project>/instances/<instance>.

tableId string

Required. The id of the table to create and restore to. This table must not already exist. The table_id appended to parent forms the full table name of the form projects/<project>/instances/<instance>/tables/<table_id>.

backup string

Name of the backup from which to restore. Values are of the form projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.restoreTable(request);
const [response] = await operation.promise();

setIamPolicy(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
resource string

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy google.iam.v1.Policy

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.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Policy. Please see the documentation for more details and examples.
Example
const [response] = await client.setIamPolicy(request);

snapshotPath(project, instance, cluster, snapshot) → {string}

Return a fully-qualified snapshot resource name string.

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

Resource name string.

snapshotTable(request, optionsopt) → {Promise}

Creates a new snapshot in the specified cluster from the specified source table. The cluster and the table must be in the same instance.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The unique name of the table to have the snapshot taken. Values are of the form projects/{project}/instances/{instance}/tables/{table}.

cluster string

Required. The name of the cluster where the snapshot will be created in. Values are of the form projects/{project}/instances/{instance}/clusters/{cluster}.

snapshotId string

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* rather than projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot.

ttl google.protobuf.Duration

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.

description string

Description of the snapshot.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.snapshotTable(request);
const [response] = await operation.promise();

tablePath(project, instance, table) → {string}

Return a fully-qualified table resource name string.

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

Resource name string.

testIamPermissions(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions Array.<string>

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.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.testIamPermissions(request);

updateBackup(request, optionsopt) → {Promise}

Updates a pending or completed Cloud Bigtable Backup.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
backup google.bigtable.admin.v2.Backup

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.
updateMask google.protobuf.FieldMask

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.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Backup. Please see the documentation for more details and examples.
Example
const [response] = await client.updateBackup(request);