You can call this operation to create 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 automatically 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 for this parameter when the cluster is in reserved mode:
    • Basic
    • Cluster
  • When the cluster is in elastic mode, set the value to

    MixedStorage.

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
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. This parameter is required in reserved mode. Valid values:

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

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

  • Basic Edition: T8, T16, T32, and T52
  • Cluster Edition: C8 and C32
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.
ComputeResource String No 32Core128GB

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

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 for this parameter when the Period parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
  • Valid values for this parameter when the Period parameter is set to Year: 1, 2, and 3.
VPCId String No vpc-xxxxxxxx

The ID of the 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 ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 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

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.