Creates an ApsaraDB for Cassandra instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateCluster |
The operation that you want to perform. Set the value to CreateCluster. |
ClientToken | String | Yes | ETnLKlblzczshOTUbOCzxxxxxxxxxx |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token is case-sensitive and can contain only ASCII characters. It cannot exceed 64 ASCII characters in length. |
DiskSize | Integer | Yes | 160 |
The storage size of the disk per node. Unit: GB. |
DiskType | String | Yes | cloud_ssd |
The storage type of the disk. Examples of valid values:
|
InstanceType | String | Yes | cassandra.c.xlarge |
The cluster instance type. Some examples of valid values:
|
MajorVersion | String | Yes | 3.11 |
The major version number. |
NodeCount | Integer | Yes | 3 |
The number of nodes. |
PayType | String | Yes | Subscription |
The billing method of the cluster. Valid values:
Note Pay-as-you-go instances never expire.
|
RegionId | String | Yes | cn-hangzhou |
The region ID. You can call the DescribeRegions operation to query available region IDs. |
VpcId | String | Yes | vpc-bp1oxxxxxxxxxxgzv26cd |
The ID of the virtual private cloud (VPC) network. |
VswitchId | String | Yes | vsw-oqscxxxxxxxxxxxxx5e8c |
The ID of the vSwitch. |
ZoneId | String | Yes | cn-hangzhou-h |
The zone ID of the instance that you want to create. You can call the DescribeRegions operation to query zones. |
PeriodUnit | String | No | Year |
The unit of the subscription period. Valid values:
Note You must specify this parameter if the billing method is Subscription.
|
Period | Integer | No | 12 |
The subscription period. You must specify this parameter if the value of the PayType parameter is Subscription. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. Note This parameter is invalid if the billing method is PayAsYouGo.
|
AutoRenew | Boolean | No | true |
Specifies whether to enable auto-renewal. Valid values:
Default value: false. |
AutoRenewPeriod | Integer | No | 3 |
The period of the auto-renewal. Unit: months. Valid values:
Take note of the following item: This parameter is required when the AutoRenew parameter is set to true. |
ClusterName | String | No | apitest |
The name of the cluster. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. |
DataCenterName | String | No | apitest |
The name of the data center. |
Password | String | No | Alibaba****! @# |
The password. The password must be 8 to 32 characters in length. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The special character is ! @#$%^&*()_+-= |
ResourceGroupId | String | No | rg-xxxxxx |
The ID of the resource group. If this parameter is left empty, the default resource group is used. You can view the resource group ID in the resource group console. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ClusterId | String | cds-bp1hy2ip****z46g |
The ID of the instance. |
RequestId | String | 3E19E345-101D-4014-946C-A2055AEE1F26 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=CreateCluster
&ClientToken=ETnLKlblzczshOTUbOCzxxxxxxxxxx
&DiskSize=160
&DiskType=cloud_ssd
&InstanceType=cassandra.c.xlarge
&MajorVersion=3.11
&NodeCount=3
&PayType=Subscription
&RegionId=cn-hangzhou
&VpcId=vpc-bp1oxxxxxxxxxxgzv26cd
&VswitchId=vsw-oqscxxxxxxxxxxxxx5e8c
&ZoneId=cn-hangzhou-h
&<Common request parameters>
Sample success responses
XML
format
<CreateClusterResponse>
<ClusterId>hb-bp16o0pd5****582s</ClusterId>
<RequestId>728C7EAF-4844-4D42-9BBE-DFFFBB77CF33</RequestId>
</CreateClusterResponse>
JSON
format
{
"ClusterId":"hb-bp16o0pd5****582s",
"RequestId":"728C7EAF-4844-4D42-9BBE-DFFFBB77CF33"
}
Error codes
For a list of error codes, visit the API Error Center.