Cluster
Provides a Cassandra cluster resource supports replica set clusters only. The Cassandra provides stable, reliable, and automatic scalable database services. It offers a full range of database solutions, such as disaster recovery, backup, recovery, monitoring, and alarms. You can see detail product introduction here.
NOTE: Available in 1.88.0+.
NOTE: The following regions support create Vpc network Cassandra cluster. The official website mark more regions. Or you can call DescribeRegions.
NOTE: Create Cassandra cluster or change cluster type and storage would cost 30 minutes. Please make full preparation.
Example Usage
Create a cassandra cluster
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var @default = new AliCloud.Cassandra.Cluster("default", new AliCloud.Cassandra.ClusterArgs
{
AutoRenew = false,
ClusterName = "cassandra-cluster-name-tf",
DataCenterName = "dc-1",
DiskSize = 160,
DiskType = "cloud_ssd",
InstanceType = "cassandra.c.large",
IpWhite = "127.0.0.1",
MaintainEndTime = "20:00Z",
MaintainStartTime = "18:00Z",
MajorVersion = "3.11",
NodeCount = 2,
PayType = "PayAsYouGo",
VswitchId = "vsw-xxxx",
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.cassandra.Cluster("default",
auto_renew="false",
cluster_name="cassandra-cluster-name-tf",
data_center_name="dc-1",
disk_size="160",
disk_type="cloud_ssd",
instance_type="cassandra.c.large",
ip_white="127.0.0.1",
maintain_end_time="20:00Z",
maintain_start_time="18:00Z",
major_version="3.11",
node_count="2",
pay_type="PayAsYouGo",
vswitch_id="vsw-xxxx")import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultCluster = new alicloud.cassandra.Cluster("default", {
autoRenew: false,
clusterName: "cassandra-cluster-name-tf",
dataCenterName: "dc-1",
diskSize: 160,
diskType: "cloud_ssd",
instanceType: "cassandra.c.large",
ipWhite: "127.0.0.1",
maintainEndTime: "20:00Z",
maintainStartTime: "18:00Z",
majorVersion: "3.11",
nodeCount: 2,
payType: "PayAsYouGo",
vswitchId: "vsw-xxxx",
});Create a Cluster Resource
new Cluster(name: string, args: ClusterArgs, opts?: CustomResourceOptions);def Cluster(resource_name, opts=None, auto_renew=None, auto_renew_period=None, cluster_name=None, data_center_name=None, disk_size=None, disk_type=None, enable_public=None, instance_type=None, ip_white=None, maintain_end_time=None, maintain_start_time=None, major_version=None, node_count=None, password=None, pay_type=None, period=None, period_unit=None, security_groups=None, tags=None, vswitch_id=None, zone_id=None, __props__=None);func NewCluster(ctx *Context, name string, args ClusterArgs, opts ...ResourceOption) (*Cluster, error)public Cluster(string name, ClusterArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Cluster Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Cluster resource accepts the following input properties:
- Instance
Type string Instance specification. See Instance specifications. Or you can call describeInstanceType api.
- Major
Version string Cassandra major version. Now only support version
3.11.- Node
Count int The node count of Cassandra dataCenter-1 default to 2.
- Pay
Type string The pay type of Cassandra dataCenter-1. Valid values are
Subscription,PayAsYouGo,System default toPayAsYouGo.- Vswitch
Id string The vswitch_id of dataCenter-1, can not empty.
- Auto
Renew bool Auto renew of dataCenter-1,
trueorfalse. System default tofalse, valid when pay_type = PrePaid.- Auto
Renew intPeriod Period of dataCenter-1 auto renew, if auto renew is
true, one of1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 60, valid when pay_type = Subscription. Unit: month.- Cluster
Name string Cassandra cluster name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- Data
Center stringName Cassandra dataCenter-1 name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- Disk
Size int User-defined Cassandra dataCenter-1 one node’s storage space.Unit: GB. Value range: - Custom storage space; value range: [160, 2000]. - 80-GB increments.
- Disk
Type string The disk type of Cassandra dataCenter-1. Valid values are
cloud_ssd,cloud_efficiency,local_hdd_pro,local_ssd_pro, local_disk size is fixed.- Enable
Public bool - Ip
White string Set the instance’s IP whitelist in VPC network.
- Maintain
End stringTime The end time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- Maintain
Start stringTime The start time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- Password string
- Period int
- Period
Unit string - Security
Groups List<string> A list of security group ids to associate with.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Zone
Id string The Zone to launch the Cassandra cluster. If vswitch_id is not empty, this zone_id can be “” or consistent.
- Instance
Type string Instance specification. See Instance specifications. Or you can call describeInstanceType api.
- Major
Version string Cassandra major version. Now only support version
3.11.- Node
Count int The node count of Cassandra dataCenter-1 default to 2.
- Pay
Type string The pay type of Cassandra dataCenter-1. Valid values are
Subscription,PayAsYouGo,System default toPayAsYouGo.- Vswitch
Id string The vswitch_id of dataCenter-1, can not empty.
- Auto
Renew bool Auto renew of dataCenter-1,
trueorfalse. System default tofalse, valid when pay_type = PrePaid.- Auto
Renew intPeriod Period of dataCenter-1 auto renew, if auto renew is
true, one of1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 60, valid when pay_type = Subscription. Unit: month.- Cluster
Name string Cassandra cluster name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- Data
Center stringName Cassandra dataCenter-1 name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- Disk
Size int User-defined Cassandra dataCenter-1 one node’s storage space.Unit: GB. Value range: - Custom storage space; value range: [160, 2000]. - 80-GB increments.
- Disk
Type string The disk type of Cassandra dataCenter-1. Valid values are
cloud_ssd,cloud_efficiency,local_hdd_pro,local_ssd_pro, local_disk size is fixed.- Enable
Public bool - Ip
White string Set the instance’s IP whitelist in VPC network.
- Maintain
End stringTime The end time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- Maintain
Start stringTime The start time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- Password string
- Period int
- Period
Unit string - Security
Groups []string A list of security group ids to associate with.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Zone
Id string The Zone to launch the Cassandra cluster. If vswitch_id is not empty, this zone_id can be “” or consistent.
- instance
Type string Instance specification. See Instance specifications. Or you can call describeInstanceType api.
- major
Version string Cassandra major version. Now only support version
3.11.- node
Count number The node count of Cassandra dataCenter-1 default to 2.
- pay
Type string The pay type of Cassandra dataCenter-1. Valid values are
Subscription,PayAsYouGo,System default toPayAsYouGo.- vswitch
Id string The vswitch_id of dataCenter-1, can not empty.
- auto
Renew boolean Auto renew of dataCenter-1,
trueorfalse. System default tofalse, valid when pay_type = PrePaid.- auto
Renew numberPeriod Period of dataCenter-1 auto renew, if auto renew is
true, one of1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 60, valid when pay_type = Subscription. Unit: month.- cluster
Name string Cassandra cluster name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- data
Center stringName Cassandra dataCenter-1 name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- disk
Size number User-defined Cassandra dataCenter-1 one node’s storage space.Unit: GB. Value range: - Custom storage space; value range: [160, 2000]. - 80-GB increments.
- disk
Type string The disk type of Cassandra dataCenter-1. Valid values are
cloud_ssd,cloud_efficiency,local_hdd_pro,local_ssd_pro, local_disk size is fixed.- enable
Public boolean - ip
White string Set the instance’s IP whitelist in VPC network.
- maintain
End stringTime The end time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- maintain
Start stringTime The start time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- password string
- period number
- period
Unit string - security
Groups string[] A list of security group ids to associate with.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- zone
Id string The Zone to launch the Cassandra cluster. If vswitch_id is not empty, this zone_id can be “” or consistent.
- instance_
type str Instance specification. See Instance specifications. Or you can call describeInstanceType api.
- major_
version str Cassandra major version. Now only support version
3.11.- node_
count float The node count of Cassandra dataCenter-1 default to 2.
- pay_
type str The pay type of Cassandra dataCenter-1. Valid values are
Subscription,PayAsYouGo,System default toPayAsYouGo.- vswitch_
id str The vswitch_id of dataCenter-1, can not empty.
- auto_
renew bool Auto renew of dataCenter-1,
trueorfalse. System default tofalse, valid when pay_type = PrePaid.- auto_
renew_ floatperiod Period of dataCenter-1 auto renew, if auto renew is
true, one of1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 60, valid when pay_type = Subscription. Unit: month.- cluster_
name str Cassandra cluster name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- data_
center_ strname Cassandra dataCenter-1 name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- disk_
size float User-defined Cassandra dataCenter-1 one node’s storage space.Unit: GB. Value range: - Custom storage space; value range: [160, 2000]. - 80-GB increments.
- disk_
type str The disk type of Cassandra dataCenter-1. Valid values are
cloud_ssd,cloud_efficiency,local_hdd_pro,local_ssd_pro, local_disk size is fixed.- enable_
public bool - ip_
white str Set the instance’s IP whitelist in VPC network.
- maintain_
end_ strtime The end time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- maintain_
start_ strtime The start time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- password str
- period float
- period_
unit str - security_
groups List[str] A list of security group ids to associate with.
- Dict[str, Any]
A mapping of tags to assign to the resource.
- zone_
id str The Zone to launch the Cassandra cluster. If vswitch_id is not empty, this zone_id can be “” or consistent.
Outputs
All input properties are implicitly available as output properties. Additionally, the Cluster resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Public
Points List<string> - Status string
Look up an Existing Cluster Resource
Get an existing Cluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ClusterState, opts?: CustomResourceOptions): Clusterstatic get(resource_name, id, opts=None, auto_renew=None, auto_renew_period=None, cluster_name=None, data_center_name=None, disk_size=None, disk_type=None, enable_public=None, instance_type=None, ip_white=None, maintain_end_time=None, maintain_start_time=None, major_version=None, node_count=None, password=None, pay_type=None, period=None, period_unit=None, public_points=None, security_groups=None, status=None, tags=None, vswitch_id=None, zone_id=None, __props__=None);func GetCluster(ctx *Context, name string, id IDInput, state *ClusterState, opts ...ResourceOption) (*Cluster, error)public static Cluster Get(string name, Input<string> id, ClusterState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Auto
Renew bool Auto renew of dataCenter-1,
trueorfalse. System default tofalse, valid when pay_type = PrePaid.- Auto
Renew intPeriod Period of dataCenter-1 auto renew, if auto renew is
true, one of1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 60, valid when pay_type = Subscription. Unit: month.- Cluster
Name string Cassandra cluster name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- Data
Center stringName Cassandra dataCenter-1 name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- Disk
Size int User-defined Cassandra dataCenter-1 one node’s storage space.Unit: GB. Value range: - Custom storage space; value range: [160, 2000]. - 80-GB increments.
- Disk
Type string The disk type of Cassandra dataCenter-1. Valid values are
cloud_ssd,cloud_efficiency,local_hdd_pro,local_ssd_pro, local_disk size is fixed.- Enable
Public bool - Instance
Type string Instance specification. See Instance specifications. Or you can call describeInstanceType api.
- Ip
White string Set the instance’s IP whitelist in VPC network.
- Maintain
End stringTime The end time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- Maintain
Start stringTime The start time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- Major
Version string Cassandra major version. Now only support version
3.11.- Node
Count int The node count of Cassandra dataCenter-1 default to 2.
- Password string
- Pay
Type string The pay type of Cassandra dataCenter-1. Valid values are
Subscription,PayAsYouGo,System default toPayAsYouGo.- Period int
- Period
Unit string - Public
Points List<string> - Security
Groups List<string> A list of security group ids to associate with.
- Status string
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Vswitch
Id string The vswitch_id of dataCenter-1, can not empty.
- Zone
Id string The Zone to launch the Cassandra cluster. If vswitch_id is not empty, this zone_id can be “” or consistent.
- Auto
Renew bool Auto renew of dataCenter-1,
trueorfalse. System default tofalse, valid when pay_type = PrePaid.- Auto
Renew intPeriod Period of dataCenter-1 auto renew, if auto renew is
true, one of1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 60, valid when pay_type = Subscription. Unit: month.- Cluster
Name string Cassandra cluster name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- Data
Center stringName Cassandra dataCenter-1 name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- Disk
Size int User-defined Cassandra dataCenter-1 one node’s storage space.Unit: GB. Value range: - Custom storage space; value range: [160, 2000]. - 80-GB increments.
- Disk
Type string The disk type of Cassandra dataCenter-1. Valid values are
cloud_ssd,cloud_efficiency,local_hdd_pro,local_ssd_pro, local_disk size is fixed.- Enable
Public bool - Instance
Type string Instance specification. See Instance specifications. Or you can call describeInstanceType api.
- Ip
White string Set the instance’s IP whitelist in VPC network.
- Maintain
End stringTime The end time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- Maintain
Start stringTime The start time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- Major
Version string Cassandra major version. Now only support version
3.11.- Node
Count int The node count of Cassandra dataCenter-1 default to 2.
- Password string
- Pay
Type string The pay type of Cassandra dataCenter-1. Valid values are
Subscription,PayAsYouGo,System default toPayAsYouGo.- Period int
- Period
Unit string - Public
Points []string - Security
Groups []string A list of security group ids to associate with.
- Status string
- map[string]interface{}
A mapping of tags to assign to the resource.
- Vswitch
Id string The vswitch_id of dataCenter-1, can not empty.
- Zone
Id string The Zone to launch the Cassandra cluster. If vswitch_id is not empty, this zone_id can be “” or consistent.
- auto
Renew boolean Auto renew of dataCenter-1,
trueorfalse. System default tofalse, valid when pay_type = PrePaid.- auto
Renew numberPeriod Period of dataCenter-1 auto renew, if auto renew is
true, one of1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 60, valid when pay_type = Subscription. Unit: month.- cluster
Name string Cassandra cluster name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- data
Center stringName Cassandra dataCenter-1 name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- disk
Size number User-defined Cassandra dataCenter-1 one node’s storage space.Unit: GB. Value range: - Custom storage space; value range: [160, 2000]. - 80-GB increments.
- disk
Type string The disk type of Cassandra dataCenter-1. Valid values are
cloud_ssd,cloud_efficiency,local_hdd_pro,local_ssd_pro, local_disk size is fixed.- enable
Public boolean - instance
Type string Instance specification. See Instance specifications. Or you can call describeInstanceType api.
- ip
White string Set the instance’s IP whitelist in VPC network.
- maintain
End stringTime The end time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- maintain
Start stringTime The start time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- major
Version string Cassandra major version. Now only support version
3.11.- node
Count number The node count of Cassandra dataCenter-1 default to 2.
- password string
- pay
Type string The pay type of Cassandra dataCenter-1. Valid values are
Subscription,PayAsYouGo,System default toPayAsYouGo.- period number
- period
Unit string - public
Points string[] - security
Groups string[] A list of security group ids to associate with.
- status string
- {[key: string]: any}
A mapping of tags to assign to the resource.
- vswitch
Id string The vswitch_id of dataCenter-1, can not empty.
- zone
Id string The Zone to launch the Cassandra cluster. If vswitch_id is not empty, this zone_id can be “” or consistent.
- auto_
renew bool Auto renew of dataCenter-1,
trueorfalse. System default tofalse, valid when pay_type = PrePaid.- auto_
renew_ floatperiod Period of dataCenter-1 auto renew, if auto renew is
true, one of1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 60, valid when pay_type = Subscription. Unit: month.- cluster_
name str Cassandra cluster name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- data_
center_ strname Cassandra dataCenter-1 name. Length must be 2~128 characters long. Only Chinese characters, English letters, numbers, period
., underline_, or dash-are permitted.- disk_
size float User-defined Cassandra dataCenter-1 one node’s storage space.Unit: GB. Value range: - Custom storage space; value range: [160, 2000]. - 80-GB increments.
- disk_
type str The disk type of Cassandra dataCenter-1. Valid values are
cloud_ssd,cloud_efficiency,local_hdd_pro,local_ssd_pro, local_disk size is fixed.- enable_
public bool - instance_
type str Instance specification. See Instance specifications. Or you can call describeInstanceType api.
- ip_
white str Set the instance’s IP whitelist in VPC network.
- maintain_
end_ strtime The end time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- maintain_
start_ strtime The start time of the operation and maintenance time period of the cluster, in the format of HH:mmZ (UTC time).
- major_
version str Cassandra major version. Now only support version
3.11.- node_
count float The node count of Cassandra dataCenter-1 default to 2.
- password str
- pay_
type str The pay type of Cassandra dataCenter-1. Valid values are
Subscription,PayAsYouGo,System default toPayAsYouGo.- period float
- period_
unit str - public_
points List[str] - security_
groups List[str] A list of security group ids to associate with.
- status str
- Dict[str, Any]
A mapping of tags to assign to the resource.
- vswitch_
id str The vswitch_id of dataCenter-1, can not empty.
- zone_
id str The Zone to launch the Cassandra cluster. If vswitch_id is not empty, this zone_id can be “” or consistent.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.