Skip to main content

instances

Creates, updates, deletes, gets or lists a instances resource.

Overview

Nameinstances
TypeResource
Idgoogle.bigtableadmin.instances

Fields

NameDatatypeDescription
namestringThe unique name of the instance. Values are of the form projects/{project}/instances/a-z+[a-z0-9].
createTimestringOutput only. A commit timestamp representing when this Instance was created. For instances created before this field was added (August 2021), this value is seconds: 0, nanos: 1.
displayNamestringRequired. 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.
labelsobjectLabels 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}{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.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
statestringOutput only. The current state of the instance.
typestringThe type of the instance. Defaults to PRODUCTION.

Methods

NameAccessible byRequired ParamsDescription
getSELECTinstancesId, projectsIdGets information about an instance.
listSELECTprojectsIdLists information about instances in a project.
createINSERTprojectsIdCreate 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.
deleteDELETEinstancesId, projectsIdDelete an instance from a project.
updateREPLACEinstancesId, projectsIdUpdates 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.
partial_update_instanceEXECinstancesId, projectsIdPartially updates an instance within a project. This method can modify all fields of an Instance and is the preferred way to update an Instance.

SELECT examples

Lists information about instances in a project.

SELECT
name,
createTime,
displayName,
labels,
satisfiesPzi,
satisfiesPzs,
state,
type
FROM google.bigtableadmin.instances
WHERE projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new instances resource.

/*+ create */
INSERT INTO google.bigtableadmin.instances (
projectsId,
parent,
instanceId,
instance,
clusters
)
SELECT
'{{ projectsId }}',
'{{ parent }}',
'{{ instanceId }}',
'{{ instance }}',
'{{ clusters }}'
;

REPLACE example

Replaces all fields in the specified instances resource.

/*+ update */
REPLACE google.bigtableadmin.instances
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
type = '{{ type }}',
labels = '{{ labels }}'
WHERE
instancesId = '{{ instancesId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified instances resource.

/*+ delete */
DELETE FROM google.bigtableadmin.instances
WHERE instancesId = '{{ instancesId }}'
AND projectsId = '{{ projectsId }}';