Constructor
new Backup(cluster, name)
Parameters:
| Name | Type | Description |
|---|---|---|
cluster |
Cluster |
The parent instance of this backup. |
name |
string |
Name of the backup. |
Members
endDate
A Date-compatible PreciseDate representing the time that the backup was finished.
expireDate
A Date-compatible PreciseDate representing the expiration time of this backup.
id
A unique backup string, e.g. "my-backup".
name
The full path of the backup which is in the form of:
projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}.
startDate
A Date-compatible PreciseDate representing the time that this backup was started.
Methods
create(config, callbackopt) → {void|Promise.<CreateBackupResponse>}
Starts creating a new Cloud Bigtable Backup.
The returned long-running operation can be used to track creation of the backup. Cancelling the returned operation will stop the creation and delete the backup.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
CreateBackupConfig |
Configuration object. Properties
|
|||||||||||||||||||||
callback |
CreateBackupCallback |
<optional> |
The callback function. Properties
|
Returns:
| Type | Description |
|---|---|
| void | Promise.<CreateBackupResponse> |
Example
include:samples/api-reference-doc-snippets/backups.create.js
region_tag:bigtable_api_create_backup
delete(gaxOptionsOrCallbackopt, callbackopt) → {void|Promise.<DeleteBackupResponse>}
Deletes this pending or completed Cloud Bigtable backup.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gaxOptionsOrCallback |
CallOptions | DeleteBackupCallback |
<optional> |
|||||||||||||
callback |
DeleteBackupCallback |
<optional> |
The callback function. Properties
|
Returns:
| Type | Description |
|---|---|
| void | Promise.<DeleteBackupResponse> |
Example
include:samples/api-reference-doc-snippets/backups.delete.js
region_tag:bigtable_api_delete_backup
exists(gaxOptionsopt, callback)
Check if a backup exists.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gaxOptions |
object |
<optional> |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||
callback |
function |
The callback function. Properties
|
get(gaxOptionsopt, callback)
Get a backup if it exists.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gaxOptions |
object |
<optional> |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||||||
callback |
function |
The callback function. Properties
|
Example
include:samples/api-reference-doc-snippets/backups.get.js
region_tag:bigtable_api_get_backup
getIamPolicy(optionsopt, cbopt, policy)
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
Configuration object. Properties
|
||||||||||||
cb |
function |
<optional> |
The callback function. |
||||||||||||
callback.error |
error |
<nullable> |
An error returned while making this request. |
||||||||||||
policy |
Policy |
The policy. |
Example
include:samples/api-reference-doc-snippets/instance.js
region_tag:bigtable_api_get_table_Iam_policy
getMetadata(gaxOptionsopt, callback)
Get a backup if it exists.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gaxOptions |
object |
<optional> |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||||||
callback |
function |
The callback function. Properties
|
Example
include:samples/api-reference-doc-snippets/backups.get.js
region_tag:bigtable_api_get_backup
restore(tableId, gaxOptionsOrCallbackopt, callbackopt) → {void|Promise.<RestoreTableResponse>}
Create a new table by restoring from this completed backup.
The new table must be in the same instance as the instance containing the backup. The returned long-running operation can be used to track the progress of the operation, and to cancel it.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tableId |
string |
The id of the table to create and restore to. This table must not already exist. |
|||||||||||||||||||||
gaxOptionsOrCallback |
CallOptions | RestoreTableCallback |
<optional> |
|||||||||||||||||||||
callback |
RestoreTableCallback |
<optional> |
The callback function. Properties
|
Returns:
| Type | Description |
|---|---|
| void | Promise.<RestoreTableResponse> |
Example
include:samples/api-reference-doc-snippets/backups.restore.js
region_tag:bigtable_api_restore_backup
restoreTo(config, tableId, instanceopt, gaxOptionsopt, callbackopt) → {void|Promise.<RestoreTableResponse>}
Create a new table by restoring from this completed backup.
The returned long-running operation can be used to track the progress of the operation, and to cancel it.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
RestoreTableConfig |
Configuration object. |
|||||||||||||||||||||
tableId |
string |
The id of the table to create and restore to. This table must not already exist. |
|||||||||||||||||||||
instance |
Instance | string |
<optional> |
Instance in which the new table will be created and restored to. Instance must be in the same project as the project containing backup. If omitted the instance containing the backup will be used instead. |
||||||||||||||||||||
gaxOptions |
CallOptions |
<optional> |
Request configuration options, outlined here: https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html. |
||||||||||||||||||||
callback |
RestoreTableCallback |
<optional> |
The callback function. Properties
|
Returns:
| Type | Description |
|---|---|
| void | Promise.<RestoreTableResponse> |
setIamPolicy(gaxOptionsopt, callbackopt, policy)
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
gaxOptions |
object |
<optional> |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||
callback |
function |
<optional> |
The callback function. Properties
|
||||||||
policy |
Policy |
The policy. |
Example
include:samples/api-reference-doc-snippets/instance.js
region_tag:bigtable_api_set_instance_Iam_policy
setMetadata(metadata, gaxOptionsOrCallbackopt, callbackopt) → {void|Promise.<BackupSetMetadataResponse>}
Updates this pending or completed Cloud Bigtable Backup.
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
metadata |
ModifiableBackupFields |
The fields to be updated. |
|||||||||
gaxOptionsOrCallback |
CallOptions | BackupSetMetadataCallback |
<optional> |
|||||||||
callback |
BackupSetMetadataCallback |
<optional> |
The callback function. Properties
|
||||||||
|
|||||||||||
callback.apiResponse |
object |
The full API response. |
Returns:
| Type | Description |
|---|---|
| void | Promise.<BackupSetMetadataResponse> |
Example
include:samples/api-reference-doc-snippets/backups.update.js
region_tag:bigtable_api_update_backup
testIamPermissions(permissions, gaxOptionsopt, callbackopt, permissions)
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
permissions |
string | Array.<string> |
The permission(s) to test for. |
|||||||||
gaxOptions |
object |
<optional> |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||
callback |
function |
<optional> |
The callback function. Properties
|
||||||||
permissions |
Array.<string> |
A subset of permissions that the caller is allowed. |