Creates an AnalyticDB for MySQL cluster.

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 CreateDBCluster

The operation that you want to perform.

Set the value to CreateDBCluster.

DBClusterCategory String Yes Cluster

The edition of the cluster. Valid values:

  • Cluster: reserved mode for Cluster Edition
  • MixedStorage: elastic mode for Cluster Edition
Note When DBClusterCategory is set to Cluster, you must set Mode to Reserver. When DBClusterCategory is set to MixedStorage, you must set Mode to Flexible. Otherwise, the cluster cannot be created.
DBClusterNetworkType String Yes VPC

The network type of the cluster. Set the value to VPC.

DBClusterVersion String Yes 3.0

The version of the cluster. Set the value to 3.0.

Mode String Yes Reserver

The mode of the cluster. Valid values:

  • Reserver: the reserved mode
  • Flexible: the elastic mode
Note If you do not specify this parameter, the cluster is in reserved mode.
PayType String Yes Postpaid

The billing method of the cluster. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
RegionId String Yes cn-hangzhou

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

ZoneId String No cn-hangzhou-h

The zone ID of the cluster. You can call the DescribeRegions operation to query the most recent zone list.

DBClusterDescription String No test

The description of the cluster.

DBNodeGroupCount String No 2

The number of node groups. Valid values: 1 to 200.

Note This parameter is required when Mode is set to Reserver.
DBClusterClass String No C8

The specification of the cluster. Valid values:

  • C8
  • C32
Note This parameter is required when Mode is set to Reserver.
DBNodeStorage String No 200

The storage space of the node. Unit: GB.

  • Valid values when DBClusterClass is set to C8: 100 to 1000
  • Valid values when DBClusterClass is set to C32: 100 to 8000
Note
  • This parameter is required when Mode is set to Reserver.
  • The storage space less than 1,000 GB increases in 100 GB increments. The storage space greater than 1,000 GB increases in 1,000 GB increments.
ComputeResource String No 32Core128GB

The computing resources of the cluster. You can call the DescribeAvailableResource operation to query the computing resources that are available within a specific region.

Note This parameter is required when Mode is set to Flexible.
Period String No Year

The subscription type of the subscription cluster. Valid values:

  • Year: subscription on a yearly basis
  • Month: subscription on a monthly basis
Note This parameter is required when PayType is set to Prepaid.
UsedTime String No 1

The subscription period of the subscription cluster.

  • Valid values when Period is set to Year: 1, 2, and 3.
  • Valid values when Period is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Note This parameter is required when PayType is set to Prepaid.
VPCId String No vpc-xxxxxxxx

The ID of the virtual private cloud (VPC).

VSwitchId String No vsw-xxxxxxxx

The ID of the vSwitch.

ResourceGroupId String No rg-xxxxxxxx

The ID of the resource group.

ClientToken String No 123e4567-e89b-12d3-a456-xxxxxxxx

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 make sure that it is unique among different requests. The token can contain only ASCII characters and can be up to 64 characters in length.

StorageResource String No None

N/A

StorageType String No None

N/A

RestoreType String No None

N/A

ExecutorCount String No None

N/A

SourceDBInstanceName String No None

N/A

BackupSetID String No None

N/A

RestoreTime String No None

N/A

ElasticIOResource String No 0

The elastic I/O unit (EIU). For more information, see EIUs.

Response parameters

Parameter Type Example Description
DBClusterId String am-bpxxxxxxxx47

The ID of the cluster.

OrderId String 20235327xxxxx

The ID of the order.

RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

The ID of the request.

ResourceGroupId String rg-xxxxxxxx

The ID of the resource group.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateDBCluster
&DBClusterCategory=Cluster
&DBClusterClass=C8
&DBClusterNetworkType=VPC
&DBClusterVersion=3.0
&DBNodeGroupCount=2
&DBNodeStorage=200
&Mode=Reserver
&PayType=Postpaid
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ResourceGroupId>rg-xxxxxxxx</ResourceGroupId>
<RequestId>1AD222E9-E606-4A42-BF6D-8A4442913CEF</RequestId>
<DBClusterId>am-bpxxxxxxxx47</DBClusterId>
<OrderId>20235327xxxxx</OrderId>

JSON format

{
    "ResourceGroupId": "rg-xxxxxxxx",
    "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
    "DBClusterId": "am-bpxxxxxxxx47",
    "OrderId": "20235327xxxxx"
}

Error codes

For a list of error codes, visit the API Error Center.