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

See Instance#createCluster.

callback

function()

Yes

The callback function.

Values in callback have the following properties:

Name Type Optional Description

err

error

 

An error returned while making this request.

Value can be null.

apiResponse

object

 

The full API response.

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 callback have the following properties:

Name Type Optional Description

err

error

 

An error returned while making this request.

Value can be null.

apiResponse

object

 

The full API response.

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 callback have the following properties:

Name Type Optional Description

err

error

 

An error returned while making this request.

Value can be null.

exists

boolean

 

Whether the cluster exists or not.

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 callback have the following properties:

Name Type Optional Description

err

error

 

An error returned while making this request.

Value can be null.

apiResponse

object

 

The full API response.

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 callback have the following properties:

Name Type Optional Description

err

error

 

An error returned while making this request.

Value can be null.

metadata

object

 

The metadata.

apiResponse

object

 

The full API response.

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 callback have the following properties:

Name Type Optional Description

err

error

 

An error returned while making this request.

Value can be null.

operation

Operation

 

An operation object that can be used to check the status of the request.

apiResponse

object

 

The full API response.