public final class CreateClusterRequest extends Object
A cluster represents the actual Cloud Bigtable service. Each cluster belongs to a single Cloud Bigtable instance. When your application sends requests to a Cloud Bigtable instance, those requests are actually handled by one of the clusters in the instance.
Each cluster is located in a single zone. An instance's clusters must be in unique zones that are within the same region. For example, if the first cluster is in us-east1-b, then us-east1-c is a valid zone for the second cluster. For a list of zones and regions where Cloud Bigtable is available, see Cloud Bigtable Locations.
Examples:
// Small production instance:
CreateClusterRequest clusterRequest = CreateClusterRequest.of("my-existing-instance", "my-cluster")
.setZone("us-east1-c")
.setServeNodes(3)
.setStorageType(StorageType.SSD);
| Modifier and Type | Method and Description |
|---|---|
static CreateClusterRequest |
of(String instanceId,
String clusterId)
Builds a new request to create a new cluster to the specified instance with the specified
cluster id.
|
CreateClusterRequest |
setKmsKeyName(String kmsKeyName)
Sets the Google Cloud Key Management Service (KMS) key for a CMEK-protected Bigtable.
|
CreateClusterRequest |
setScalingMode(ClusterAutoscalingConfig autoscalingConfig)
Sets the scaling mode to autoscaling by accepting an AutoscalingConfig where min nodes, max
nodes, CPU utilization percent target, and storage utilization gib per node are set.
|
CreateClusterRequest |
setScalingMode(StaticClusterSize staticClusterSize)
Sets the scaling node to manual and sets the number of nodes allocated to this cluster.
|
CreateClusterRequest |
setServeNodes(int numNodes)
Deprecated.
Please use CreateClusterRequest#setScalingMode instead
|
CreateClusterRequest |
setStorageType(StorageType storageType)
Sets the type of storage used by this cluster to serve its parent instance's tables.
|
CreateClusterRequest |
setZone(String zone)
Sets the zone where the new cluster will be located.
|
CreateClusterRequest |
toProto(String projectId)
Creates the request protobuf.
|
public static CreateClusterRequest of(String instanceId, String clusterId)
public CreateClusterRequest setZone(String zone)
@Deprecated public CreateClusterRequest setServeNodes(int numNodes)
public CreateClusterRequest setScalingMode(@Nonnull StaticClusterSize staticClusterSize)
public CreateClusterRequest setScalingMode(@Nonnull ClusterAutoscalingConfig autoscalingConfig)
public CreateClusterRequest setStorageType(@Nonnull StorageType storageType)
SSD.public CreateClusterRequest setKmsKeyName(@Nonnull String kmsKeyName)
@InternalApi public CreateClusterRequest toProto(String projectId)
Copyright © 2023 Google LLC. All rights reserved.