You can call this operation to create an Apsara PolarDB cluster.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String No CreateDBCluster The operation that you want to perform. Set the value to CreateDBCluster.
DBNodeClass String Yes polar.mysql.x2.medium

The specification of the node. For more information, see Specifications and pricing.

DBType String Yes MySQL

The engine of the database. Valid values:

  • MySQL
  • PostgreSQL
  • Oracle
DBVersion String Yes 5.6

The version of the database engine. Valid values:

  • MySQL: 5.6 or 8.0
  • PostgreSQL: 11
  • Oracle: 11
PayType String Yes Postpaid

The billing method. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
RegionId String Yes ch-hangzhou The region ID of the Apsara PolarDB cluster. It can be 1 to 50 characters in length.
Note You can call the DescribeRegions operation to query the available regions.
ZoneId String No cn-hangzhou-g

The ID of the zone.

Note You can call the DescribeRegions operation to query the available zones.
ClusterNetworkType String No VPC Only Virtual Private Cloud (VPC) is supported.
DBClusterDescription String No MySQL test The name of the cluster.
  • It must begin with a letter.
  • It can contain letters, digits, commas (,), and hyphens (-).
  • It cannot start with http:// or https.
  • It must be 2 to 256 characters in length.
AutoRenew Boolean No true

Specifies whether to enable auto-renewal.

  • true: enable
  • false: disable

Default value is false.

Note The parameter takes effect only when PayType is set to Prepaid.
Period String No Month If the PayType parameter is set to Prepaid, the parameter is required. Specifies monthly subscription or annual subscription.
  • Year: annual subscription
  • Month: monthly subscription
UsedTime String No 1
  • When Period is set to Month, Used Time can be [1-9].
  • When Period is set to Year, Used Time can be [1-3].
VPCId String No vpc-xxxxxxxxxx The ID of the VPC network.
VSwitchId String No vsw-xxxxxxxxxx The ID of the VSwitch.
CreationOption String No Normal The method for creating an Apsara PolarDB cluster. Valid values:

Default value is Normal.

Note
  • When DBType is MySQL and DBVersion is 5.6, this parameter can be specified as CloneFromRDS or MigrationFromRDS.
  • When DBType is MySQL and DBVersion is 8.0, this parameter can be specified as CreateGdnStandby.
SourceResourceId String No rm-bp1xxxxxxxxxx The ID of the source ApsaraDB for RDS instance or Apsara PolarDB cluster.
Note
  • The parameter takes effect only when DBType is MySQL and DBVersion is 5.6.
  • This parameter is required if CreationOption is not Normal.
CloneDataPoint String No LATEST The time point of data to be cloned. Valid values:
  • LATEST: clones data of the latest time point.
  • BackupID: clones historical backup data. Specify the ID of the backup set.
  • Timestamp: clones data of a historical time point. Specify the specific time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

    Default value is LATEST.

Note If CreationOption is CloneFromRDS, the value of this parameter must be LATEST.
ClientToken String No 6000170000591aed949d0f5xxxxxxxxxxxxxxxxxxx The client token is used to ensure the idempotence of requests. You can use the client to generate the value. The value must be unique among different requests. The token is case-sensitive. It can only contain ASCII characters and cannot exceed 64 characters in length.
ResourceGroupId String No rg-rexxxxxxxxxx The ID of the resource group.
SecurityIPList String No 10.xx.xx.10 The whitelist of the Apsara PolarDB cluster.
TDEStatus Boolean No true Specifies whether to enable Transparent Data Encryption (TDE). Valid values:
  • true: enable TDE
  • false: disable TDE (default)
Note
  • The parameter takes effect only when DBType is PostgreSQL or Oracle.
  • You cannot disable TDE after it is enabled.
GDNId String No gdn-bp1xxxxxxxxx The ID of the Global Database Network (GDN).
Note This parameter is required when the CreationOption is CreateGdnStandby.

Response parameters

Parameter Type Example Description
DBClusterId String pc-xxxxxxxxxxxxxxx The ID of the Apsara PolarDB cluster that you want to manage.
OrderId String 20235327xxxxx The ID of the order.
RequestId String E056BF3D-1E4F-4E39-B729-8491A74B301B The ID of the request.
ResourceGroupId String rg-rexxxxxxxxxx The ID of the resource group to which the VPC instance belongs.

Example

Sample requests

http(s)://[Endpoint]/? Action=CreateDBCluster
&DBNodeClass=polar.mysql.x2.medium
&DBType=MySQL
&DBVersion=5.6
&PayType=Postpaid
&RegionId=ch-hangzhou
&<Common request parameters>

Sample success response

XML format

<CreateDBClusterResponse>  
      <RequestId>E056BF3D-1E4F-4E39-B729-8491A74B301B</RequestId>
      <OrderId>20235327xxxxx</OrderId>
      <DBClusterId>pc-xxxxxxxxxxxxx</DBClusterId>
</CreateDBClusterResponse>

JSON format

{
  "RequestId": "E056BF3D-1E4F-4E39-B729-8491A74B301B",
  "OrderId": "20235327xxxxx",
  "DBClusterId": "pc-xxxxxxxxxxxxxxx"
}

Error codes

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