Class v2.BigtableInstanceAdminClient (5.1.2)

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, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of BigtableInstanceAdminClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new BigtableInstanceAdminClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

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.

universeDomain

get universeDomain(): string;

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
Name Description
project string
instance string
appProfile string
Returns
Type Description
string

{string} Resource name string.

authorizedViewPath(project, instance, table, authorizedView)

authorizedViewPath(project: string, instance: string, table: string, authorizedView: string): string;

Return a fully-qualified authorizedView resource name string.

Parameters
Name Description
project string
instance string
table string
authorizedView string
Returns
Type Description
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
Name Description
project string
instance string
cluster string
backup string
Returns
Type Description
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
Name Description
name string

The operation name that will be passed.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
name string

The operation name that will be passed.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 = [1,2,3,4]

  // 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();

checkPartialUpdateClusterProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.bigtable.admin.v2.Cluster, protos.google.bigtable.admin.v2.PartialUpdateClusterMetadata>>

{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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The Cluster which contains the partial updates to be applied,
   *  subject to the update_mask.
   */
  // const cluster = {}
  /**
   *  Required. The subset of Cluster fields which should be replaced.
   */
  // const updateMask = {}

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

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

  async function callPartialUpdateCluster() {
    // Construct request
    const request = {
      cluster,
      updateMask,
    };

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

  callPartialUpdateCluster();

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
Name Description
name string

The operation name that will be passed.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
name string

The operation name that will be passed.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
name string

The operation name that will be passed.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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'
  /**
   *  Immutable. 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'
  /**
   *  Output only. The current state of the cluster.
   */
  // const state = {}
  /**
   *  The number of nodes allocated to this cluster. More nodes enable higher
   *  throughput and more consistent performance.
   */
  // const serveNodes = 1234
  /**
   *  Configuration for this cluster.
   */
  // const clusterConfig = {}
  /**
   *  Immutable. 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 = {
      location,
      state,
      defaultStorageType,
      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
Type Description
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
Name Description
project string
instance string
cluster string
Returns
Type Description
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
Name Description
request ICreateAppProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
request ICreateAppProfileRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request ICreateAppProfileRequest
callback Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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.

Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled.

Parameters
Name Description
request ICreateClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
request 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
Type Description
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
Name Description
request 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
Type Description
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.

Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled.

Parameters
Name Description
request ICreateInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 = [1,2,3,4]

  // 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
Name Description
request 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
Type Description
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
Name Description
request 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
Type Description
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
Name Description
request IDeleteAppProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
request IDeleteAppProfileRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IDeleteAppProfileRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IDeleteClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
request IDeleteClusterRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IDeleteClusterRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IDeleteInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
request IDeleteInstanceRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IDeleteInstanceRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IGetAppProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
request IGetAppProfileRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IGetAppProfileRequest
callback Callback<protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IGetClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
request IGetClusterRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IGetClusterRequest
callback Callback<protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IGetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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`.
   */
  // 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
Name Description
request IGetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IGetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IGetInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
request IGetInstanceRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IGetInstanceRequest
callback Callback<protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

hotTabletPath(project, instance, cluster, hotTablet)

hotTabletPath(project: string, instance: string, cluster: string, hotTablet: string): string;

Return a fully-qualified hotTablet resource name string.

Parameters
Name Description
project string
instance string
cluster string
hotTablet string
Returns
Type Description
string

{string} Resource name string.

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
Type Description
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
Name Description
project string
instance string
Returns
Type Description
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
Name Description
request IListAppProfilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 . 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 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
Name Description
request 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
Type Description
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
Name Description
request IListAppProfilesRequest
callback PaginationCallback<protos.google.bigtable.admin.v2.IListAppProfilesRequest, protos.google.bigtable.admin.v2.IListAppProfilesResponse | null | undefined, protos.google.bigtable.admin.v2.IAppProfile>
Returns
Type Description
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
Name Description
request IListAppProfilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.bigtable.admin.v2.IAppProfile>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 = 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
Name Description
request IListAppProfilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing 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 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
Name Description
request IListClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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
Name Description
request IListClustersRequest
options CallOptions
callback Callback<protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
request IListClustersRequest
callback Callback<protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

listHotTablets(request, options)

listHotTablets(request?: protos.google.bigtable.admin.v2.IListHotTabletsRequest, options?: CallOptions): Promise<[
        protos.google.bigtable.admin.v2.IHotTablet[],
        protos.google.bigtable.admin.v2.IListHotTabletsRequest | null,
        protos.google.bigtable.admin.v2.IListHotTabletsResponse
    ]>;

Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based on CPU usage.

Parameters
Name Description
request IListHotTabletsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.bigtable.admin.v2.IHotTablet[], protos.google.bigtable.admin.v2.IListHotTabletsRequest | null, protos.google.bigtable.admin.v2.IListHotTabletsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of HotTablet. 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 listHotTabletsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listHotTablets(request, options, callback)

listHotTablets(request: protos.google.bigtable.admin.v2.IListHotTabletsRequest, options: CallOptions, callback: PaginationCallback<protos.google.bigtable.admin.v2.IListHotTabletsRequest, protos.google.bigtable.admin.v2.IListHotTabletsResponse | null | undefined, protos.google.bigtable.admin.v2.IHotTablet>):