Cluster
Source: cluster.
Create a cluster object to interact with your cluster.
new Cluster(instance, id)
Example
const Bigtable = require('@google-cloud/bigtable');
const bigtable = new Bigtable();
const instance = bigtable.instance('my-instance');
const cluster = instance.cluster('my-cluster');
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
instance |
|
|
The parent instance of this cluster. |
|
id |
|
|
Id of the cluster. |
Methods
create([options][, callback])
Create a cluster.
Example
include:samples/document-snippets/cluster.js
region_tag:bigtable_create_cluster
Parameters
| Name | Type | Optional | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
options |
object |
Yes |
|||||||||||||
|
callback |
function() |
Yes |
The callback function. Values in
|
delete([gaxOptions][, callback])
Delete the cluster.
Example
include:samples/document-snippets/cluster.js
region_tag:bigtable_delete_cluster
Parameters
| Name | Type | Optional | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
gaxOptions |
object |
Yes |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||
|
callback |
function() |
Yes |
The callback function. Values in
|
exists([gaxOptions], callback)
Check if a cluster exists.
Example
include:samples/document-snippets/cluster.js
region_tag:bigtable_exists_cluster
Parameters
| Name | Type | Optional | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
gaxOptions |
object |
Yes |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||
|
callback |
function() |
|
The callback function. Values in
|
get([gaxOptions], callback)
Get a cluster if it exists.
Example
include:samples/document-snippets/cluster.js
region_tag:bigtable_get_cluster
Parameters
| Name | Type | Optional | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
gaxOptions |
object |
Yes |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||
|
callback |
function() |
|
The callback function. Values in
|
getMetadata([gaxOptions], callback)
Get the cluster metadata.
Example
include:samples/document-snippets/cluster.js
region_tag:bigtable_cluster_get_meta
Parameters
| Name | Type | Optional | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
gaxOptions |
object |
Yes |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||||||
|
callback |
function() |
|
The callback function. Values in
|
setMetadata(metadata[, gaxOptions], callback)
Set the cluster metadata.
Example
include:samples/document-snippets/cluster.js
region_tag:bigtable_cluster_set_meta
Parameters
| Name | Type | Optional | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
metadata |
object |
|
See Instance#createCluster for the available metadata options. |
||||||||||||||||
|
gaxOptions |
object |
Yes |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html. |
||||||||||||||||
|
callback |
function() |
|
The callback function. Values in
|