clusters
Creates, updates, deletes, gets or lists a clusters
resource.
Overview
Name | clusters |
Type | Resource |
Id | google.bigtableadmin.clusters |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The unique name of the cluster. Values are of the form projects/{project}/instances/{instance}/clusters/a-z* . |
clusterConfig | object | Configuration for a cluster. |
defaultStorageType | string | Immutable. The type of storage used by this cluster to serve its parent instance's tables, unless explicitly overridden. |
encryptionConfig | object | Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected cluster. |
location | string | 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} . |
serveNodes | integer | The number of nodes in the cluster. If no value is set, Cloud Bigtable automatically allocates nodes based on your data footprint and optimized for 50% storage utilization. |
state | string | Output only. The current state of the cluster. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | clustersId, instancesId, projectsId | Gets information about a cluster. |
list | SELECT | instancesId, projectsId | Lists information about clusters in an instance. |
create | INSERT | instancesId, projectsId | 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. |
delete | DELETE | clustersId, instancesId, projectsId | Deletes a cluster from an instance. |
update | REPLACE | clustersId, instancesId, projectsId | 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. |
partial_update_cluster | EXEC | clustersId, instancesId, projectsId | 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. |
SELECT
examples
Lists information about clusters in an instance.
SELECT
name,
clusterConfig,
defaultStorageType,
encryptionConfig,
location,
serveNodes,
state
FROM google.bigtableadmin.clusters
WHERE instancesId = '{{ instancesId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new clusters
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.bigtableadmin.clusters (
instancesId,
projectsId,
name,
location,
serveNodes,
clusterConfig,
defaultStorageType,
encryptionConfig
)
SELECT
'{{ instancesId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ location }}',
'{{ serveNodes }}',
'{{ clusterConfig }}',
'{{ defaultStorageType }}',
'{{ encryptionConfig }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: location
value: string
- name: state
value: string
- name: serveNodes
value: integer
- name: clusterConfig
value:
- name: clusterAutoscalingConfig
value:
- name: autoscalingLimits
value:
- name: minServeNodes
value: integer
- name: maxServeNodes
value: integer
- name: autoscalingTargets
value:
- name: cpuUtilizationPercent
value: integer
- name: storageUtilizationGibPerNode
value: integer
- name: defaultStorageType
value: string
- name: encryptionConfig
value:
- name: kmsKeyName
value: string
REPLACE
example
Replaces all fields in the specified clusters
resource.
/*+ update */
REPLACE google.bigtableadmin.clusters
SET
name = '{{ name }}',
location = '{{ location }}',
serveNodes = '{{ serveNodes }}',
clusterConfig = '{{ clusterConfig }}',
defaultStorageType = '{{ defaultStorageType }}',
encryptionConfig = '{{ encryptionConfig }}'
WHERE
clustersId = '{{ clustersId }}'
AND instancesId = '{{ instancesId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified clusters
resource.
/*+ delete */
DELETE FROM google.bigtableadmin.clusters
WHERE clustersId = '{{ clustersId }}'
AND instancesId = '{{ instancesId }}'
AND projectsId = '{{ projectsId }}';