Class Cluster (3.5.4)

Create a cluster object to interact with your cluster.

Package

@google-cloud/bigtable!

Constructors

(constructor)(instance, id)

  constructor 
 ( 
 instance 
 : 
  
 Instance 
 , 
  
 id 
 : 
  
 string 
 ); 
 

Constructs a new instance of the Cluster class

Parameters
Name Description
instance Instance
id string

Properties

bigtable

  bigtable 
 : 
  
 Bigtable 
 ; 
 
Property Value
Type Description
Bigtable

id

  id 
 : 
  
 string 
 ; 
 
Property Value
Type Description
string

instance

  instance 
 : 
  
 Instance 
 ; 
 
Property Value
Type Description
Instance
  metadata 
 ?: 
  
 ICluster 
 ; 
 
Property Value
Type Description
ICluster

name

  name 
 : 
  
 string 
 ; 
 
Property Value
Type Description
string

Methods

backup(id)

  backup 
 ( 
 id 
 : 
  
 string 
 ) 
 : 
  
 Backup 
 ; 
 

Get a reference to a Bigtable Cluster.

Parameter
Name Description
id string

The backup name or id.

Returns
Type Description
Backup

{Backup}

create()

  create 
 () 
 : 
  
 Promise<CreateClusterResponse> 
 ; 
 
Returns
Type Description
Promise < CreateClusterResponse >

create(options)

  create 
 ( 
 options 
 : 
  
 CreateClusterOptions 
 ) 
 : 
  
 Promise<CreateClusterResponse> 
 ; 
 
Parameter
Name Description
options CreateClusterOptions
Returns
Type Description
Promise < CreateClusterResponse >

create(callback)

  create 
 ( 
 callback 
 : 
  
 CreateClusterCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback CreateClusterCallback
Returns
Type Description
void

create(options, callback)

  create 
 ( 
 options 
 : 
  
 CreateClusterOptions 
 , 
  
 callback 
 : 
  
 CreateClusterCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
options CreateClusterOptions
callback CreateClusterCallback
Returns
Type Description
void

createBackup(id, config)

  createBackup 
 ( 
 id 
 : 
  
 string 
 , 
  
 config 
 : 
  
 CreateBackupConfig 
 ) 
 : 
  
 Promise<CreateBackupResponse> 
 ; 
 
Parameters
Name Description
id string
config CreateBackupConfig
Returns
Type Description
Promise < CreateBackupResponse >

createBackup(id, config, callback)

  createBackup 
 ( 
 id 
 : 
  
 string 
 , 
  
 config 
 : 
  
 CreateBackupConfig 
 , 
  
 callback 
 : 
  
 CreateBackupCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
id string
config CreateBackupConfig
callback CreateBackupCallback
Returns
Type Description
void

delete()

  delete 
 () 
 : 
  
 Promise<ApiResponse> 
 ; 
 
Returns
Type Description
Promise < ApiResponse >

delete(gaxOptions)

  delete 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 ) 
 : 
  
 Promise<ApiResponse> 
 ; 
 
Parameter
Name Description
gaxOptions CallOptions
Returns
Type Description
Promise < ApiResponse >

delete(callback)

  delete 
 ( 
 callback 
 : 
  
 DeleteClusterCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback DeleteClusterCallback
Returns
Type Description
void

delete(gaxOptions, callback)

  delete 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 DeleteClusterCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
gaxOptions CallOptions
callback DeleteClusterCallback
Returns
Type Description
void

exists()

  exists 
 () 
 : 
  
 Promise<BooleanResponse> 
 ; 
 
Returns
Type Description
Promise < BooleanResponse >

exists(gaxOptions)

  exists 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 ) 
 : 
  
 Promise<BooleanResponse> 
 ; 
 
Parameter
Name Description
gaxOptions CallOptions
Returns
Type Description
Promise < BooleanResponse >

exists(callback)

  exists 
 ( 
 callback 
 : 
  
 ExistsClusterCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback ExistsClusterCallback
Returns
Type Description
void

exists(gaxOptions, callback)

  exists 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 ExistsClusterCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
gaxOptions CallOptions
callback ExistsClusterCallback
Returns
Type Description
void

get()

  get 
 () 
 : 
  
 Promise<GetClusterResponse> 
 ; 
 
Returns
Type Description
Promise < GetClusterResponse >

get(gaxOptions)

  get 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 ) 
 : 
  
 Promise<GetClusterResponse> 
 ; 
 
Parameter
Name Description
gaxOptions CallOptions
Returns
Type Description
Promise < GetClusterResponse >

get(callback)

  get 
 ( 
 callback 
 : 
  
 GetClusterCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback GetClusterCallback
Returns
Type Description
void

get(gaxOptions, callback)

  get 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 GetClusterCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
gaxOptions CallOptions
callback GetClusterCallback
Returns
Type Description
void

getBackups(options)

  getBackups 
 ( 
 options 
 ?: 
  
 GetBackupsOptions 
 ) 
 : 
  
 Promise<GetBackupsResponse> 
 ; 
 
Parameter
Name Description
options GetBackupsOptions
Returns
Type Description
Promise < GetBackupsResponse >

getBackups(options, callback)

  getBackups 
 ( 
 options 
 : 
  
 GetBackupsOptions 
 , 
  
 callback 
 : 
  
 GetBackupsCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
options GetBackupsOptions
callback GetBackupsCallback
Returns
Type Description
void

getBackups(callback)

  getBackups 
 ( 
 callback 
 : 
  
 GetBackupsCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback GetBackupsCallback
Returns
Type Description
void

getBackupsStream(options)

  getBackupsStream 
 ( 
 options 
 ?: 
  
 GetBackupsOptions 
 ) 
 : 
  
 NodeJS 
 . 
 ReadableStream 
 ; 
 

Lists Cloud Bigtable backups within this cluster. Provides both completed and pending backups as a readable object stream.

Parameter
Name Description
options GetBackupsOptions

Configuration object. See for a complete list of options.

Returns
Type Description
NodeJS.ReadableStream

{ReadableStream

getLocation_(project, location)

  static 
  
 getLocation_ 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Formats zone location.

Parameters
Name Description
project string

The project ID.

location string

The zone location.

Returns
Type Description
string

{string}

  getMetadata 
 () 
 : 
  
 Promise<GetClusterMetadataResponse> 
 ; 
 
Returns
Type Description
Promise < GetClusterMetadataResponse >
  getMetadata 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 ) 
 : 
  
 Promise<GetClusterMetadataResponse> 
 ; 
 
Parameter
Name Description
gaxOptions CallOptions
Returns
Type Description
Promise < GetClusterMetadataResponse >
  getMetadata 
 ( 
 callback 
 : 
  
 GetClusterMetadataCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback GetClusterMetadataCallback
Returns
Type Description
void
  getMetadata 
 ( 
 gaxOptions 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 GetClusterMetadataCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
gaxOptions CallOptions
callback GetClusterMetadataCallback
Returns
Type Description
void

getStorageType_(type)

  static 
  
 getStorageType_ 
 ( 
 type 
 : 
  
 string 
 ) 
 : 
  
 number 
 ; 
 

Maps the storage type to the proper integer.

Parameter
Name Description
type string

The storage type (hdd, ssd).

Returns
Type Description
number

{number}

  setMetadata 
 ( 
 metadata 
 : 
  
 SetClusterMetadataOptions 
 , 
  
 gaxOptions 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise<SetClusterMetadataResponse> 
 ; 
 
Parameters
Name Description
metadata SetClusterMetadataOptions
gaxOptions CallOptions
Returns
Type Description
Promise < SetClusterMetadataResponse >
  setMetadata 
 ( 
 metadata 
 : 
  
 SetClusterMetadataOptions 
 , 
  
 callback 
 : 
  
 SetClusterMetadataCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
metadata SetClusterMetadataOptions
callback SetClusterMetadataCallback
Returns
Type Description
void
  setMetadata 
 ( 
 metadata 
 : 
  
 SetClusterMetadataOptions 
 , 
  
 gaxOptions 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 SetClusterMetadataCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
metadata SetClusterMetadataOptions
gaxOptions CallOptions
callback SetClusterMetadataCallback
Returns
Type Description
void
Create a Mobile Website
View Site in Mobile | Classic
Share by: