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.

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.

DBClusterVersion String Yes 3.0

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

DBClusterCategory String Yes Cluster

The edition of the cluster.

  • Valid values when the cluster is in reserved mode:
    • Basic
    • Cluster
  • When the cluster is in elastic mode, set the value to MixedStorage.

DBClusterClass String No C8

The specification of the cluster. This parameter is required in reserved mode. Valid values:

  • Basic Edition: T8, T16, T32, and T52
  • Cluster Edition: C8 and C32
DBNodeGroupCount String No 2

The number of node groups. This parameter is required in reserved mode. Valid values:

  • T8, T16, T32, and T52: 1
  • C8 and C32: 1 to 128
DBNodeStorage String No 200

The storage space of the node. This parameter is required in reserved mode. Unit: GB. Valid values:

  • T8: 100 to 500
  • T16 and T32: 100 to 2000
  • T52: 100 to 4000
  • C8: 100 to 1000
  • C32: 100 to 8000
Note The storage space less than 1,000 GB increases in increments of 100 GB. The storage space greater than 1,000 GB increases in increments of 1,000 GB.
DBClusterNetworkType String Yes VPC

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

DBClusterDescription String No test

The description of the cluster.

PayType String Yes Postpaid

The billing method of the cluster. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
Period String No Year

The subscription period for the cluster. This parameter is required if the PayType parameter is set to Prepaid. Valid values:

  • Year: subscription on a yearly basis
  • Month: subscription on a monthly basis
UsedTime String No 1
  • Valid values when the Period parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
  • Valid values when the Period parameter is set to Year: 1, 2, and 3.
VPCId String No vpc-xxxxxxxx

The ID of the VPC.

Note If you leave this parameter empty, the default VPC or vSwitch of the specified region is used. If the region does not have a default VPC, a VPC is created.
VSwitchId String No vsw-xxxxxxxx

The ID of the vSwitch.

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.

ExecutorCount String No None

N/A

ResourceGroupId String No rg-xxxxxxxx

The ID of the resource group.

Mode String Yes Reserver

The mode of the cluster. Valid values:

  • Reserver: the reserved mode
  • Flexible: the elastic mode
StorageResource String No None

N/A

StorageType String No None

N/A

ComputeResource String No 32Core128GB

The computing resource of the cluster. This parameter is required in elastic mode.

RestoreType String No None

N/A

SourceDBInstanceName String No None

N/A

BackupSetID String No None

N/A

RestoreTime String No None

N/A

Response parameters

Parameter Type Example Description
RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

The ID of the request.

ResourceGroupId String rg-xxxxxxxx

The ID of the resource group.

DBClusterId String am-bpxxxxxxxx47

The ID of the cluster.

OrderId String 20235327xxxxx

The ID of the order.

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

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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.