You can call this operation to create a Cassandra instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 value is case-sensitive and can be up to 64 ASCII characters in length.

DiskSize Integer Yes 160

The size of the disk per node. Unit: GB.

DiskType String Yes cloud_ssd

The type of the disk. Valid values:

  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD (ESSD)
  • cloud_efficiency: ultra disk
  • local_ssd_pro: local SSD
InstanceType String Yes cassandra.c.xlarge

The instance type. Examples of valid values:

  • cassandra.c.large: 2 cores, 4 GB
  • cassandra.c.xlarge: 4 cores, 8 GB
  • cassandra.c.2xlarge: 8 cores, 16 GB
MajorVersion String Yes 3.11

The major version number.

NodeCount Integer Yes 3

The number of nodes.

PayType String Yes Subscription

The billing method. Valid values:

  • Subscription
  • PayAsYouGo
Note Pay-as-you-go instances never expire.
RegionId String Yes cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

VpcId String Yes vpc-bp1oxxxxxxxxxxgzv26cd

The ID of the VPC.

VswitchId String Yes vsw-oqscxxxxxxxxxxxxx5e8c

The ID of the VSwitch.

ZoneId String Yes cn-hangzhou-h

The ID of the zone in which the instance is created. You can call the DescribeRegions operation to query the most recent zone list.

PeriodUnit String No Year

The unit of the subscription period. Valid values:

  • Year
  • Month
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:

  • true
  • false

Default value: false

AutoRenewPeriod Integer No 3

The period of the auto renewal. Unit: months. Valid values:

  • 1
  • 2
  • 3
  • 6
  • 12

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 cluster 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. Special characters include ! @ # $ % ^ & * ( ) _ + - =

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=hbase.n2.4xlarge
&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.