Cloud Bigtable V2 Client - Class BigtableInstanceAdminClient (1.30.0)

Reference documentation and code samples for the Cloud Bigtable V2 Client class BigtableInstanceAdminClient.

Service Description: 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.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parseName method to extract the individual identifiers contained within formatted names that are returned by the API.

Namespace

Google \ Cloud \ Bigtable \ Admin \ V2 \ Client

Methods

__construct

Constructor.

Parameters
NameDescription
options array

Optional. Options for configuring the service API wrapper.

↳ apiEndpoint string

The address of the API remote host. May optionally include the port, formatted as "

↳ credentials string|array|FetchAuthTokenInterface|CredentialsWrapper

The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored.

↳ credentialsConfig array

Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() .

↳ disableRetries bool

Determines whether or not retries defined by the client configuration should be disabled. Defaults to false.

↳ clientConfig string|array

Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder.

↳ transport string|TransportInterface

The transport used for executing network requests. May be either the string rest or grpc. Defaults to grpc if gRPC support is detected on the system. Advanced usage: Additionally, it is possible to pass in an already instantiated Google\ApiCore\Transport\TransportInterface object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored.

↳ transportConfig array

Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options.

↳ clientCertSource callable

A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS.

createAppProfile

Creates an app profile within an instance.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::createAppProfileAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\CreateAppProfileRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Bigtable\Admin\V2\AppProfile

createCluster

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.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::createClusterAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

createInstance

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.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::createInstanceAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

deleteAppProfile

Deletes an app profile from an instance.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::deleteAppProfileAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\DeleteAppProfileRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

deleteCluster

Deletes a cluster from an instance.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::deleteClusterAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\DeleteClusterRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

deleteInstance

Delete an instance from a project.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::deleteInstanceAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\DeleteInstanceRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

getAppProfile

Gets information about an app profile.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::getAppProfileAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\GetAppProfileRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Bigtable\Admin\V2\AppProfile

getCluster

Gets information about a cluster.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::getClusterAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\GetClusterRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Bigtable\Admin\V2\Cluster

getIamPolicy

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

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::getIamPolicyAsync() .

Parameters
NameDescription
request Google\Cloud\Iam\V1\GetIamPolicyRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Iam\V1\Policy

getInstance

Gets information about an instance.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::getInstanceAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\GetInstanceRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Bigtable\Admin\V2\Instance

listAppProfiles

Lists information about app profiles in an instance.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::listAppProfilesAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\ListAppProfilesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

listClusters

Lists information about clusters in an instance.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::listClustersAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\ListClustersRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Bigtable\Admin\V2\ListClustersResponse

listHotTablets

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

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::listHotTabletsAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\ListHotTabletsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse

listInstances

Lists information about instances in a project.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::listInstancesAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\ListInstancesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Bigtable\Admin\V2\ListInstancesResponse

partialUpdateCluster

Partially updates a cluster within a project. This method is the preferred way to update a Cluster.

To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the update_mask.

To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set a serve_node count via the update_mask.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::partialUpdateClusterAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

partialUpdateInstance

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.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::partialUpdateInstanceAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

setIamPolicy

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

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::setIamPolicyAsync() .

Parameters
NameDescription
request Google\Cloud\Iam\V1\SetIamPolicyRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Iam\V1\Policy

testIamPermissions

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

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::testIamPermissionsAsync() .

Parameters
NameDescription
request Google\Cloud\Iam\V1\TestIamPermissionsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Iam\V1\TestIamPermissionsResponse

updateAppProfile

Updates an app profile within an instance.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::updateAppProfileAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\UpdateAppProfileRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

updateCluster

Updates a cluster within an instance.

Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config. In order to update it, you must use PartialUpdateCluster.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::updateClusterAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\Cluster

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\OperationResponse

updateInstance

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.

The async variant is Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient::updateInstanceAsync() .

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\Instance

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Bigtable\Admin\V2\Instance

createAppProfileAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\CreateAppProfileRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

createClusterAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

createInstanceAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

deleteAppProfileAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\DeleteAppProfileRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

deleteClusterAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\DeleteClusterRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

deleteInstanceAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\DeleteInstanceRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getAppProfileAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\GetAppProfileRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getClusterAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\GetClusterRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getIamPolicyAsync

Parameters
NameDescription
request Google\Cloud\Iam\V1\GetIamPolicyRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getInstanceAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\GetInstanceRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listAppProfilesAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\ListAppProfilesRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listClustersAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\ListClustersRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listHotTabletsAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\ListHotTabletsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listInstancesAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\ListInstancesRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

partialUpdateClusterAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

partialUpdateInstanceAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

setIamPolicyAsync

Parameters
NameDescription
request Google\Cloud\Iam\V1\SetIamPolicyRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

testIamPermissionsAsync

Parameters
NameDescription
request Google\Cloud\Iam\V1\TestIamPermissionsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

updateAppProfileAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\UpdateAppProfileRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

updateClusterAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\Cluster
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

updateInstanceAsync

Parameters
NameDescription
request Google\Cloud\Bigtable\Admin\V2\Instance
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getOperationsClient

Return an OperationsClient object with the same endpoint as $this.

Returns
TypeDescription
Google\ApiCore\LongRunning\OperationsClient

resumeOperation

Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.

Parameters
NameDescription
operationName string

The name of the long running operation

methodName string

The name of the method used to start the operation

Returns
TypeDescription
Google\ApiCore\OperationResponse

static::appProfileName

Formats a string containing the fully-qualified path to represent a app_profile resource.

Parameters
NameDescription
project string
instance string
appProfile string
Returns
TypeDescription
stringThe formatted app_profile resource.

static::clusterName

Formats a string containing the fully-qualified path to represent a cluster resource.

Parameters
NameDescription
project string
instance string
cluster string
Returns
TypeDescription
stringThe formatted cluster resource.

static::cryptoKeyName

Formats a string containing the fully-qualified path to represent a crypto_key resource.

Parameters
NameDescription
project string
location string
keyRing string
cryptoKey string
Returns
TypeDescription
stringThe formatted crypto_key resource.

static::instanceName

Formats a string containing the fully-qualified path to represent a instance resource.

Parameters
NameDescription
project string
instance string
Returns
TypeDescription
stringThe formatted instance resource.

static::locationName

Formats a string containing the fully-qualified path to represent a location resource.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
stringThe formatted location resource.

static::projectName

Formats a string containing the fully-qualified path to represent a project resource.

Parameter
NameDescription
project string
Returns
TypeDescription
stringThe formatted project resource.

static::parseName

Parses a formatted name string and returns an associative array of the components in the name.

The following name formats are supported: Template: Pattern

  • appProfile: projects/{project}/instances/{instance}/appProfiles/{app_profile}
  • cluster: projects/{project}/instances/{instance}/clusters/{cluster}
  • cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
  • instance: projects/{project}/instances/{instance}
  • location: projects/{project}/locations/{location}
  • project: projects/{project}

The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.

Parameters
NameDescription
formattedName string

The formatted name string

template string

Optional name of template to match

Returns
TypeDescription
arrayAn associative array from name component IDs to component values.