Class v2.BigtableInstanceAdminClient

Service for creating, configuring, and deleting Cloud Bigtable Instances and Clusters. Provides access to the Instance and Cluster schemas only, not the tables' metadata or data stored in those tables. v2

Package

@google-cloud/bigtable

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of BigtableInstanceAdminClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

bigtableInstanceAdminStub

bigtableInstanceAdminStub?: Promise<{
        [name: string]: Function;
    }>;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

appProfilePath(project, instance, appProfile)

appProfilePath(project: string, instance: string, appProfile: string): string;

Return a fully-qualified appProfile resource name string.

Parameters
NameDescription
project string
instance string
appProfile string
Returns
TypeDescription
string

{string} Resource name string.

backupPath(project, instance, cluster, backup)

backupPath(project: string, instance: string, cluster: string, backup: string): string;

Return a fully-qualified backup resource name string.

Parameters
NameDescription
project string
instance string
cluster string
backup string
Returns
TypeDescription
string

{string} Resource name string.

checkCreateClusterProgress(name)

checkCreateClusterProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Cluster, protos.google.bigtable.admin.v2.CreateClusterMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.bigtable.admin.v2.Cluster, protos.google.bigtable.admin.v2.CreateClusterMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the instance in which to create the new cluster.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID to be used when referring to the new cluster within its instance,
   *  e.g., just `mycluster` rather than
   *  `projects/myproject/instances/myinstance/clusters/mycluster`.
   */
  // const clusterId = 'abc123'
  /**
   *  Required. The cluster to be created.
   *  Fields marked `OutputOnly` must be left blank.
   */
  // const cluster = {}

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callCreateCluster() {
    // Construct request
    const request = {
      parent,
      clusterId,
      cluster,
    };

    // Run request
    const [operation] = await adminClient.createCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCluster();

checkCreateInstanceProgress(name)

checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Instance, protos.google.bigtable.admin.v2.CreateInstanceMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.bigtable.admin.v2.Instance, protos.google.bigtable.admin.v2.CreateInstanceMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the project in which to create the new instance.
   *  Values are of the form `projects/{project}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID to be used when referring to the new instance within its project,
   *  e.g., just `myinstance` rather than
   *  `projects/myproject/instances/myinstance`.
   */
  // const instanceId = 'abc123'
  /**
   *  Required. The instance to create.
   *  Fields marked `OutputOnly` must be left blank.
   */
  // const instance = {}
  /**
   *  Required. The clusters to be created within the instance, mapped by desired
   *  cluster ID, e.g., just `mycluster` rather than
   *  `projects/myproject/instances/myinstance/clusters/mycluster`.
   *  Fields marked `OutputOnly` must be left blank.
   *  Currently, at most four clusters can be specified.
   */
  // const clusters = 1234

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callCreateInstance() {
    // Construct request
    const request = {
      parent,
      instanceId,
      instance,
      clusters,
    };

    // Run request
    const [operation] = await adminClient.createInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateInstance();

checkPartialUpdateInstanceProgress(name)

checkPartialUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Instance, protos.google.bigtable.admin.v2.UpdateInstanceMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.bigtable.admin.v2.Instance, protos.google.bigtable.admin.v2.UpdateInstanceMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The Instance which will (partially) replace the current value.
   */
  // const instance = {}
  /**
   *  Required. The subset of Instance fields which should be replaced.
   *  Must be explicitly set.
   */
  // const updateMask = {}

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callPartialUpdateInstance() {
    // Construct request
    const request = {
      instance,
      updateMask,
    };

    // Run request
    const [operation] = await adminClient.partialUpdateInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callPartialUpdateInstance();

checkUpdateAppProfileProgress(name)

checkUpdateAppProfileProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.AppProfile, protos.google.bigtable.admin.v2.UpdateAppProfileMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.bigtable.admin.v2.AppProfile, protos.google.bigtable.admin.v2.UpdateAppProfileMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The app profile which will (partially) replace the current value.
   */
  // const appProfile = {}
  /**
   *  Required. The subset of app profile fields which should be replaced.
   *  If unset, all fields will be replaced.
   */
  // const updateMask = {}
  /**
   *  If true, ignore safety checks when updating the app profile.
   */
  // const ignoreWarnings = true

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callUpdateAppProfile() {
    // Construct request
    const request = {
      appProfile,
      updateMask,
    };

    // Run request
    const [operation] = await adminClient.updateAppProfile(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateAppProfile();

checkUpdateClusterProgress(name)

checkUpdateClusterProgress(name: string): Promise<LROperation<protos.google.bigtable.admin.v2.Cluster, protos.google.bigtable.admin.v2.UpdateClusterMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.bigtable.admin.v2.Cluster, protos.google.bigtable.admin.v2.UpdateClusterMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The unique name of the cluster. Values are of the form
   *  `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
   */
  // const name = 'abc123'
  /**
   *  (`CreationOnly`)
   *  The location where this cluster's nodes and storage reside. For best
   *  performance, clients should be located as close as possible to this
   *  cluster. Currently only zones are supported, so values should be of the
   *  form `projects/{project}/locations/{zone}`.
   */
  // const location = 'abc123'
  /**
   *  The current state of the cluster.
   */
  // const state = {}
  /**
   *  Required. The number of nodes allocated to this cluster. More nodes enable
   *  higher throughput and more consistent performance.
   */
  // const serveNodes = 1234
  /**
   *  (`CreationOnly`)
   *  The type of storage used by this cluster to serve its
   *  parent instance's tables, unless explicitly overridden.
   */
  // const defaultStorageType = {}
  /**
   *  Immutable. The encryption configuration for CMEK-protected clusters.
   */
  // const encryptionConfig = {}

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callUpdateCluster() {
    // Construct request
    const request = {
      name,
      state,
      serveNodes,
      encryptionConfig,
    };

    // Run request
    const [operation] = await adminClient.updateCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCluster();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

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

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

clusterPath(project, instance, cluster)

clusterPath(project: string, instance: string, cluster: string): string;

Return a fully-qualified cluster resource name string.

Parameters
NameDescription
project string
instance string
cluster string
Returns
TypeDescription
string

{string} Resource name string.

createAppProfile(request, options)

createAppProfile(request?: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, options?: CallOptions): Promise<[protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | undefined, {} | undefined]>;

Creates an app profile within an instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICreateAppProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [AppProfile]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the instance in which to create the new app profile.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID to be used when referring to the new app profile within its
   *  instance, e.g., just `myprofile` rather than
   *  `projects/myproject/instances/myinstance/appProfiles/myprofile`.
   */
  // const appProfileId = 'abc123'
  /**
   *  Required. The app profile to be created.
   *  Fields marked `OutputOnly` will be ignored.
   */
  // const appProfile = {}
  /**
   *  If true, ignore safety checks when creating the app profile.
   */
  // const ignoreWarnings = true

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callCreateAppProfile() {
    // Construct request
    const request = {
      parent,
      appProfileId,
      appProfile,
    };

    // Run request
    const response = await adminClient.createAppProfile(request);
    console.log(response);
  }

  callCreateAppProfile();

createAppProfile(request, options, callback)

createAppProfile(request: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, options: CallOptions, callback: Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICreateAppProfileRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createAppProfile(request, callback)

createAppProfile(request: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, callback: Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICreateAppProfileRequest
callback Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCluster(request, options)

createCluster(request?: protos.google.bigtable.admin.v2.ICreateClusterRequest, options?: CallOptions): Promise<[LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.ICreateClusterMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

Creates a cluster within an instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICreateClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.ICreateClusterMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the instance in which to create the new cluster.
   *  Values are of the form
   *  `projects/{project}/instances/{instance}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID to be used when referring to the new cluster within its instance,
   *  e.g., just `mycluster` rather than
   *  `projects/myproject/instances/myinstance/clusters/mycluster`.
   */
  // const clusterId = 'abc123'
  /**
   *  Required. The cluster to be created.
   *  Fields marked `OutputOnly` must be left blank.
   */
  // const cluster = {}

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callCreateCluster() {
    // Construct request
    const request = {
      parent,
      clusterId,
      cluster,
    };

    // Run request
    const [operation] = await adminClient.createCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCluster();

createCluster(request, options, callback)

createCluster(request: protos.google.bigtable.admin.v2.ICreateClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.ICreateClusterMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICreateClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.ICreateClusterMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCluster(request, callback)

createCluster(request: protos.google.bigtable.admin.v2.ICreateClusterRequest, callback: Callback<LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.ICreateClusterMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICreateClusterRequest
callback Callback<LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.ICreateClusterMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createInstance(request, options)

createInstance(request?: protos.google.bigtable.admin.v2.ICreateInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.ICreateInstanceMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

Create an instance within a project.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICreateInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.ICreateInstanceMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the project in which to create the new instance.
   *  Values are of the form `projects/{project}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID to be used when referring to the new instance within its project,
   *  e.g., just `myinstance` rather than
   *  `projects/myproject/instances/myinstance`.
   */
  // const instanceId = 'abc123'
  /**
   *  Required. The instance to create.
   *  Fields marked `OutputOnly` must be left blank.
   */
  // const instance = {}
  /**
   *  Required. The clusters to be created within the instance, mapped by desired
   *  cluster ID, e.g., just `mycluster` rather than
   *  `projects/myproject/instances/myinstance/clusters/mycluster`.
   *  Fields marked `OutputOnly` must be left blank.
   *  Currently, at most four clusters can be specified.
   */
  // const clusters = 1234

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callCreateInstance() {
    // Construct request
    const request = {
      parent,
      instanceId,
      instance,
      clusters,
    };

    // Run request
    const [operation] = await adminClient.createInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateInstance();

createInstance(request, options, callback)

createInstance(request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.ICreateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICreateInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.ICreateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createInstance(request, callback)

createInstance(request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.ICreateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICreateInstanceRequest
callback Callback<LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.ICreateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteAppProfile(request, options)

deleteAppProfile(request?: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | undefined, {} | undefined]>;

Deletes an app profile from an instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IDeleteAppProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the app profile to be deleted. Values are of the form
   *  `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
   */
  // const name = 'abc123'
  /**
   *  Required. If true, ignore safety checks when deleting the app profile.
   */
  // const ignoreWarnings = true

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callDeleteAppProfile() {
    // Construct request
    const request = {
      name,
      ignoreWarnings,
    };

    // Run request
    const response = await adminClient.deleteAppProfile(request);
    console.log(response);
  }

  callDeleteAppProfile();

deleteAppProfile(request, options, callback)

deleteAppProfile(request: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IDeleteAppProfileRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteAppProfile(request, callback)

deleteAppProfile(request: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IDeleteAppProfileRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCluster(request, options)

deleteCluster(request?: protos.google.bigtable.admin.v2.IDeleteClusterRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | undefined, {} | undefined]>;

Deletes a cluster from an instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IDeleteClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the cluster to be deleted. Values are of the form
   *  `projects/{project}/instances/{instance}/clusters/{cluster}`.
   */
  // const name = 'abc123'

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callDeleteCluster() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await adminClient.deleteCluster(request);
    console.log(response);
  }

  callDeleteCluster();

deleteCluster(request, options, callback)

deleteCluster(request: protos.google.bigtable.admin.v2.IDeleteClusterRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IDeleteClusterRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCluster(request, callback)

deleteCluster(request: protos.google.bigtable.admin.v2.IDeleteClusterRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IDeleteClusterRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteInstance(request, options)

deleteInstance(request?: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | undefined, {} | undefined]>;

Delete an instance from a project.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IDeleteInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the instance to be deleted.
   *  Values are of the form `projects/{project}/instances/{instance}`.
   */
  // const name = 'abc123'

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callDeleteInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await adminClient.deleteInstance(request);
    console.log(response);
  }

  callDeleteInstance();

deleteInstance(request, options, callback)

deleteInstance(request: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IDeleteInstanceRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteInstance(request, callback)

deleteInstance(request: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IDeleteInstanceRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getAppProfile(request, options)

getAppProfile(request?: protos.google.bigtable.admin.v2.IGetAppProfileRequest, options?: CallOptions): Promise<[protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | undefined, {} | undefined]>;

Gets information about an app profile.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IGetAppProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [AppProfile]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the requested app profile. Values are of the form
   *  `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
   */
  // const name = 'abc123'

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callGetAppProfile() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await adminClient.getAppProfile(request);
    console.log(response);
  }

  callGetAppProfile();

getAppProfile(request, options, callback)

getAppProfile(request: protos.google.bigtable.admin.v2.IGetAppProfileRequest, options: CallOptions, callback: Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IGetAppProfileRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getAppProfile(request, callback)

getAppProfile(request: protos.google.bigtable.admin.v2.IGetAppProfileRequest, callback: Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IGetAppProfileRequest
callback Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCluster(request, options)

getCluster(request?: protos.google.bigtable.admin.v2.IGetClusterRequest, options?: CallOptions): Promise<[protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | undefined, {} | undefined]>;

Gets information about a cluster.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IGetClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Cluster]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the requested cluster. Values are of the form
   *  `projects/{project}/instances/{instance}/clusters/{cluster}`.
   */
  // const name = 'abc123'

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callGetCluster() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await adminClient.getCluster(request);
    console.log(response);
  }

  callGetCluster();

getCluster(request, options, callback)

getCluster(request: protos.google.bigtable.admin.v2.IGetClusterRequest, options: CallOptions, callback: Callback<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IGetClusterRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCluster(request, callback)

getCluster(request: protos.google.bigtable.admin.v2.IGetClusterRequest, callback: Callback<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IGetClusterRequest
callback Callback<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options)

getIamPolicy(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]>;

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

Parameters
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Policy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  OPTIONAL: A `GetPolicyOptions` object for specifying options to
   *  `GetIamPolicy`. This field is only used by Cloud IAM.
   */
  // const options = {}

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callGetIamPolicy() {
    // Construct request
    const request = {
      resource,
    };

    // Run request
    const response = await adminClient.getIamPolicy(request);
    console.log(response);
  }

  callGetIamPolicy();

getIamPolicy(request, options, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getInstance(request, options)

getInstance(request?: protos.google.bigtable.admin.v2.IGetInstanceRequest, options?: CallOptions): Promise<[protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | undefined, {} | undefined]>;

Gets information about an instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IGetInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Instance]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the requested instance. Values are of the form
   *  `projects/{project}/instances/{instance}`.
   */
  // const name = 'abc123'

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callGetInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await adminClient.getInstance(request);
    console.log(response);
  }

  callGetInstance();

getInstance(request, options, callback)

getInstance(request: protos.google.bigtable.admin.v2.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IGetInstanceRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getInstance(request, callback)

getInstance(request: protos.google.bigtable.admin.v2.IGetInstanceRequest, callback: Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IGetInstanceRequest
callback Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

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
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

instancePath(project, instance)

instancePath(project: string, instance: string): string;

Return a fully-qualified instance resource name string.

Parameters
NameDescription
project string
instance string
Returns
TypeDescription
string

{string} Resource name string.

listAppProfiles(request, options)

listAppProfiles(request?: protos.google.bigtable.admin.v2.IListAppProfilesRequest, options?: CallOptions): Promise<[protos.google.bigtable.admin.v2.IAppProfile[], protos.google.bigtable.admin.v2.IListAppProfilesRequest | null, protos.google.bigtable.admin.v2.IListAppProfilesResponse]>;

Lists information about app profiles in an instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListAppProfilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.bigtable.admin.v2.IAppProfile[], protos.google.bigtable.admin.v2.IListAppProfilesRequest | null, protos.google.bigtable.admin.v2.IListAppProfilesResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [AppProfile]. 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 listAppProfilesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listAppProfiles(request, options, callback)

listAppProfiles(request: protos.google.bigtable.admin.v2.IListAppProfilesRequest, options: CallOptions, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListAppProfilesRequest, protos.google.bigtable.admin.v2.IListAppProfilesResponse | null | undefined, protos.google.bigtable.admin.v2.IAppProfile>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListAppProfilesRequest
options CallOptions
callback PaginationCallback<protos.google.bigtable.admin.v2.IListAppProfilesRequest, protos.google.bigtable.admin.v2.IListAppProfilesResponse | null | undefined, protos.google.bigtable.admin.v2.IAppProfile>
Returns
TypeDescription
void

listAppProfiles(request, callback)

listAppProfiles(request: protos.google.bigtable.admin.v2.IListAppProfilesRequest, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListAppProfilesRequest, protos.google.bigtable.admin.v2.IListAppProfilesResponse | null | undefined, protos.google.bigtable.admin.v2.IAppProfile>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListAppProfilesRequest
callback PaginationCallback<protos.google.bigtable.admin.v2.IListAppProfilesRequest, protos.google.bigtable.admin.v2.IListAppProfilesResponse | null | undefined, protos.google.bigtable.admin.v2.IAppProfile>
Returns
TypeDescription
void

listAppProfilesAsync(request, options)

listAppProfilesAsync(request?: protos.google.bigtable.admin.v2.IListAppProfilesRequest, options?: CallOptions): AsyncIterable<protos.google.bigtable.admin.v2.IAppProfile>;

Equivalent to listAppProfiles, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListAppProfilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.bigtable.admin.v2.IAppProfile>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [AppProfile]. 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the instance for which a list of app profiles is
   *  requested. Values are of the form
   *  `projects/{project}/instances/{instance}`.
   *  Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
   *  e.g., `projects/myproject/instances/-`.
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  The value of `next_page_token` returned by a previous call.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callListAppProfiles() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await adminClient.listAppProfilesAsync(request);
    for await (const response of iterable) {
      console.log(response);
    }
  }

  callListAppProfiles();

listAppProfilesStream(request, options)

listAppProfilesStream(request?: protos.google.bigtable.admin.v2.IListAppProfilesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListAppProfilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [AppProfile] 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 listAppProfilesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listClusters(request, options)

listClusters(request?: protos.google.bigtable.admin.v2.IListClustersRequest, options?: CallOptions): Promise<[protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | undefined, {} | undefined]>;

Lists information about clusters in an instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ListClustersResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the instance for which a list of clusters is requested.
   *  Values are of the form `projects/{project}/instances/{instance}`.
   *  Use `{instance} = '-'` to list Clusters for all Instances in a project,
   *  e.g., `projects/myproject/instances/-`.
   */
  // const parent = 'abc123'
  /**
   *  DEPRECATED: This field is unused and ignored.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callListClusters() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const response = await adminClient.listClusters(request);
    console.log(response);
  }

  callListClusters();

listClusters(request, options, callback)

listClusters(request: protos.google.bigtable.admin.v2.IListClustersRequest, options: CallOptions, callback: Callback<protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListClustersRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listClusters(request, callback)

listClusters(request: protos.google.bigtable.admin.v2.IListClustersRequest, callback: Callback<protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListClustersRequest
callback Callback<protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listInstances(request, options)

listInstances(request?: protos.google.bigtable.admin.v2.IListInstancesRequest, options?: CallOptions): Promise<[protos.google.bigtable.admin.v2.IListInstancesResponse, protos.google.bigtable.admin.v2.IListInstancesRequest | undefined, {} | undefined]>;

Lists information about instances in a project.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.bigtable.admin.v2.IListInstancesResponse, protos.google.bigtable.admin.v2.IListInstancesRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ListInstancesResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The unique name of the project for which a list of instances is requested.
   *  Values are of the form `projects/{project}`.
   */
  // const parent = 'abc123'
  /**
   *  DEPRECATED: This field is unused and ignored.
   */
  // const pageToken = 'abc123'

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callListInstances() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const response = await adminClient.listInstances(request);
    console.log(response);
  }

  callListInstances();

listInstances(request, options, callback)

listInstances(request: protos.google.bigtable.admin.v2.IListInstancesRequest, options: CallOptions, callback: Callback<protos.google.bigtable.admin.v2.IListInstancesResponse, protos.google.bigtable.admin.v2.IListInstancesRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListInstancesRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IListInstancesResponse, protos.google.bigtable.admin.v2.IListInstancesRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listInstances(request, callback)

listInstances(request: protos.google.bigtable.admin.v2.IListInstancesRequest, callback: Callback<protos.google.bigtable.admin.v2.IListInstancesResponse, protos.google.bigtable.admin.v2.IListInstancesRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IListInstancesRequest
callback Callback<protos.google.bigtable.admin.v2.IListInstancesResponse, protos.google.bigtable.admin.v2.IListInstancesRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

matchAppProfileFromAppProfileName(appProfileName)

matchAppProfileFromAppProfileName(appProfileName: string): string | number;

Parse the app_profile from AppProfile resource.

Parameter
NameDescription
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns
TypeDescription
string | number

{string} A string representing the app_profile.

matchBackupFromBackupName(backupName)

matchBackupFromBackupName(backupName: string): string | number;

Parse the backup from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the backup.

matchClusterFromBackupName(backupName)

matchClusterFromBackupName(backupName: string): string | number;

Parse the cluster from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchClusterFromClusterName(clusterName)

matchClusterFromClusterName(clusterName: string): string | number;

Parse the cluster from Cluster resource.

Parameter
NameDescription
clusterName string

A fully-qualified path representing Cluster resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchClusterFromSnapshotName(snapshotName)

matchClusterFromSnapshotName(snapshotName: string): string | number;

Parse the cluster from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchInstanceFromAppProfileName(appProfileName)

matchInstanceFromAppProfileName(appProfileName: string): string | number;

Parse the instance from AppProfile resource.

Parameter
NameDescription
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromBackupName(backupName)

matchInstanceFromBackupName(backupName: string): string | number;

Parse the instance from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromClusterName(clusterName)

matchInstanceFromClusterName(clusterName: string): string | number;

Parse the instance from Cluster resource.

Parameter
NameDescription
clusterName string

A fully-qualified path representing Cluster resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromInstanceName(instanceName)

matchInstanceFromInstanceName(instanceName: string): string | number;

Parse the instance from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromSnapshotName(snapshotName)

matchInstanceFromSnapshotName(snapshotName: string): string | number;

Parse the instance from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromTableName(tableName)

matchInstanceFromTableName(tableName: string): string | number;

Parse the instance from Table resource.

Parameter
NameDescription
tableName string

A fully-qualified path representing Table resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchProjectFromAppProfileName(appProfileName)

matchProjectFromAppProfileName(appProfileName: string): string | number;

Parse the project from AppProfile resource.

Parameter
NameDescription
appProfileName string

A fully-qualified path representing AppProfile resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromBackupName(backupName)

matchProjectFromBackupName(backupName: string): string | number;

Parse the project from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromClusterName(clusterName)

matchProjectFromClusterName(clusterName: string): string | number;

Parse the project from Cluster resource.

Parameter
NameDescription
clusterName string

A fully-qualified path representing Cluster resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromInstanceName(instanceName)

matchProjectFromInstanceName(instanceName: string): string | number;

Parse the project from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromSnapshotName(snapshotName)

matchProjectFromSnapshotName(snapshotName: string): string | number;

Parse the project from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTableName(tableName)

matchProjectFromTableName(tableName: string): string | number;

Parse the project from Table resource.

Parameter
NameDescription
tableName string

A fully-qualified path representing Table resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchSnapshotFromSnapshotName(snapshotName)

matchSnapshotFromSnapshotName(snapshotName: string): string | number;

Parse the snapshot from Snapshot resource.

Parameter
NameDescription
snapshotName string

A fully-qualified path representing Snapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the snapshot.

matchTableFromTableName(tableName)

matchTableFromTableName(tableName: string): string | number;

Parse the table from Table resource.

Parameter
NameDescription
tableName string

A fully-qualified path representing Table resource.

Returns
TypeDescription
string | number

{string} A string representing the table.

partialUpdateInstance(request, options)

partialUpdateInstance(request?: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IUpdateInstanceMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

Partially updates an instance within a project. This method can modify all fields of an Instance and is the preferred way to update an Instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IUpdateInstanceMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The Instance which will (partially) replace the current value.
   */
  // const instance = {}
  /**
   *  Required. The subset of Instance fields which should be replaced.
   *  Must be explicitly set.
   */
  // const updateMask = {}

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callPartialUpdateInstance() {
    // Construct request
    const request = {
      instance,
      updateMask,
    };

    // Run request
    const [operation] = await adminClient.partialUpdateInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callPartialUpdateInstance();

partialUpdateInstance(request, options, callback)

partialUpdateInstance(request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IUpdateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IUpdateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

partialUpdateInstance(request, callback)

partialUpdateInstance(request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IUpdateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest
callback Callback<LROperation<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IUpdateInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

setIamPolicy(request, options)

setIamPolicy(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]>;

Sets the access control policy on an instance resource. Replaces any existing policy.

Parameters
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Policy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy is being specified.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  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.
   */
  // const policy = {}

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callSetIamPolicy() {
    // Construct request
    const request = {
      resource,
      policy,
    };

    // Run request
    const response = await adminClient.setIamPolicy(request);
    console.log(response);
  }

  callSetIamPolicy();

setIamPolicy(request, options, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setIamPolicy(request, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

snapshotPath(project, instance, cluster, snapshot)

snapshotPath(project: string, instance: string, cluster: string, snapshot: string): string;

Return a fully-qualified snapshot resource name string.

Parameters
NameDescription
project string
instance string
cluster string
snapshot string
Returns
TypeDescription
string

{string} Resource name string.

tablePath(project, instance, table)

tablePath(project: string, instance: string, table: string): string;

Return a fully-qualified table resource name string.

Parameters
NameDescription
project string
instance string
table string
Returns
TypeDescription
string

{string} Resource name string.

testIamPermissions(request, options)

testIamPermissions(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]>;

Returns permissions that the caller has on the specified instance resource.

Parameters
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TestIamPermissionsResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy detail is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  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 (https://cloud.google.com/iam/docs/overview#permissions).
   */
  // const permissions = 'abc123'

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callTestIamPermissions() {
    // Construct request
    const request = {
      resource,
      permissions,
    };

    // Run request
    const response = await adminClient.testIamPermissions(request);
    console.log(response);
  }

  callTestIamPermissions();

testIamPermissions(request, options, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest
options CallOptions
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

testIamPermissions(request, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateAppProfile(request, options)

updateAppProfile(request?: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, options?: CallOptions): Promise<[LROperation<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

Updates an app profile within an instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IUpdateAppProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The app profile which will (partially) replace the current value.
   */
  // const appProfile = {}
  /**
   *  Required. The subset of app profile fields which should be replaced.
   *  If unset, all fields will be replaced.
   */
  // const updateMask = {}
  /**
   *  If true, ignore safety checks when updating the app profile.
   */
  // const ignoreWarnings = true

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callUpdateAppProfile() {
    // Construct request
    const request = {
      appProfile,
      updateMask,
    };

    // Run request
    const [operation] = await adminClient.updateAppProfile(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateAppProfile();

updateAppProfile(request, options, callback)

updateAppProfile(request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, options: CallOptions, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IUpdateAppProfileRequest
options CallOptions
callback Callback<LROperation<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateAppProfile(request, callback)

updateAppProfile(request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, callback: Callback<LROperation<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IUpdateAppProfileRequest
callback Callback<LROperation<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCluster(request, options)

updateCluster(request?: protos.google.bigtable.admin.v2.ICluster, options?: CallOptions): Promise<[LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IUpdateClusterMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

Updates a cluster within an instance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICluster

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IUpdateClusterMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The unique name of the cluster. Values are of the form
   *  `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
   */
  // const name = 'abc123'
  /**
   *  (`CreationOnly`)
   *  The location where this cluster's nodes and storage reside. For best
   *  performance, clients should be located as close as possible to this
   *  cluster. Currently only zones are supported, so values should be of the
   *  form `projects/{project}/locations/{zone}`.
   */
  // const location = 'abc123'
  /**
   *  The current state of the cluster.
   */
  // const state = {}
  /**
   *  Required. The number of nodes allocated to this cluster. More nodes enable
   *  higher throughput and more consistent performance.
   */
  // const serveNodes = 1234
  /**
   *  (`CreationOnly`)
   *  The type of storage used by this cluster to serve its
   *  parent instance's tables, unless explicitly overridden.
   */
  // const defaultStorageType = {}
  /**
   *  Immutable. The encryption configuration for CMEK-protected clusters.
   */
  // const encryptionConfig = {}

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callUpdateCluster() {
    // Construct request
    const request = {
      name,
      state,
      serveNodes,
      encryptionConfig,
    };

    // Run request
    const [operation] = await adminClient.updateCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCluster();

updateCluster(request, options, callback)

updateCluster(request: protos.google.bigtable.admin.v2.ICluster, options: CallOptions, callback: Callback<LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IUpdateClusterMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICluster
options CallOptions
callback Callback<LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IUpdateClusterMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCluster(request, callback)

updateCluster(request: protos.google.bigtable.admin.v2.ICluster, callback: Callback<LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IUpdateClusterMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.ICluster
callback Callback<LROperation<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IUpdateClusterMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateInstance(request, options)

updateInstance(request?: protos.google.bigtable.admin.v2.IInstance, options?: CallOptions): Promise<[protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | undefined, {} | undefined]>;

Updates an instance within a project. This method updates only the display name and type for an Instance. To update other Instance properties, such as labels, use PartialUpdateInstance.

Parameters
NameDescription
request protos.google.bigtable.admin.v2.IInstance

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Instance]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The unique name of the instance. Values are of the form
   *  `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
   */
  // const name = 'abc123'
  /**
   *  Required. The descriptive name for this instance as it appears in UIs.
   *  Can be changed at any time, but should be kept globally unique
   *  to avoid confusion.
   */
  // const displayName = 'abc123'
  /**
   *  (`OutputOnly`)
   *  The current state of the instance.
   */
  // const state = {}
  /**
   *  The type of the instance. Defaults to `PRODUCTION`.
   */
  // const type = {}
  /**
   *  Labels are a flexible and lightweight mechanism for organizing cloud
   *  resources into groups that reflect a customer's organizational needs and
   *  deployment strategies. They can be used to filter resources and aggregate
   *  metrics.
   *  * Label keys must be between 1 and 63 characters long and must conform to
   *    the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
   *  * Label values must be between 0 and 63 characters long and must conform to
   *    the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
   *  * No more than 64 labels can be associated with a given resource.
   *  * Keys and values must both be under 128 bytes.
   */
  // const labels = 1234
  /**
   *  Output only. A server-assigned timestamp representing when this Instance was created.
   *  For instances created before this field was added (August 2021), this value
   *  is `seconds: 0, nanos: 1`.
   */
  // const createTime = {}

  // Imports the Admin library
  const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;

  // Instantiates a client
  const adminClient = new BigtableInstanceAdminClient();

  async function callUpdateInstance() {
    // Construct request
    const request = {
      name,
      displayName,
      createTime,
    };

    // Run request
    const response = await adminClient.updateInstance(request);
    console.log(response);
  }

  callUpdateInstance();

updateInstance(request, options, callback)

updateInstance(request: protos.google.bigtable.admin.v2.IInstance, options: CallOptions, callback: Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IInstance
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateInstance(request, callback)

updateInstance(request: protos.google.bigtable.admin.v2.IInstance, callback: Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.bigtable.admin.v2.IInstance
callback Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | null | undefined, {} | null | undefined>
Returns
TypeDescription
void