CreateDBCluster

更新时间:
复制 MD 格式

Create a Data Warehouse cluster.

Operation description

Considerations

  • After creating a cluster, you are charged based on the cluster specifications you selected. For more information on the billable items and pricing for the Data Warehouse Edition, see Billable items for Data Warehouse Edition and Pricing for Data Warehouse Edition.

  • The Data Warehouse Edition is no longer available for new purchases; you can purchase Enterprise Edition or Basic Edition instead. The Enterprise, Basic, and Lakehouse editions all share the same features. For more information, see product editions.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

adb:CreateDBCluster

create

DBCluster

acs:adb:{#regionId}:{#accountId}:dbcluster/*

  • adb:DiskEncryption
  • adb:EnableSSL
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

Note

You can call the DescribeRegions operation to query the IDs of available regions.

cn-hangzhou

ZoneId

string

No

The availability zone ID.

Note

You can call the DescribeRegions operation to query the IDs of available availability zones.

cn-hangzhou-h

DBClusterVersion

string

Yes

The version of the AnalyticDB for MySQL cluster. Set the value to 3.0.

3.0

DBClusterCategory

string

Yes

The cluster edition. Valid values:

  • Cluster: reserved cluster.

Note

Reserved clusters are available only in the Chinese mainland and Singapore regions. In the Singapore region, you can purchase reserved clusters only with the pay-as-you-go billing method.

  • MixedStorage: elastic cluster (new).

Note

If you set DBClusterCategory to Cluster, you must set the Mode parameter to Reserved. If you set DBClusterCategory to MixedStorage, you must set the Mode parameter to Flexible. Otherwise, cluster creation will fail.

Cluster

DBClusterClass

string

No

The cluster specification. Valid values:

  • C8

  • C32

Note

This parameter is required when Mode is set to Reserved (reserved mode).

C8

DBNodeGroupCount

string

No

The number of node groups. The value must be an integer from 1 to 200.

Note

This parameter is required when Mode is set to Reserved (reserved mode).

2

DBNodeStorage

string

No

The node storage capacity. Unit: GB. The valid values vary based on the cluster specification:

  • For the C8 specification, the value ranges from 100 to 1,000.

  • For the C32 specification, the value ranges from 100 to 8,000.

Note
  • This parameter is required when Mode is set to Reserved (reserved mode).

  • The value must be a multiple of 100 for storage sizes under 1,000 GB, and a multiple of 1,000 for storage sizes of 1,000 GB or more.

200

DBClusterNetworkType

string

Yes

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

VPC

DBClusterDescription

string

No

The description of the cluster.

  • The description cannot start with http:// or https://.

  • The description must be 2 to 256 characters long.

test

PayType

string

Yes

The billing method of the cluster. Valid values:

  • Postpaid: pay-as-you-go.

  • Prepaid: subscription.

Postpaid

Period

string

No

The subscription period unit. Valid values:

  • Year

  • Month

Note

This parameter is required when PayType is set to Prepaid (subscription).

Year

UsedTime

string

No

The subscription duration. Valid values:

  • If Period is set to Year, the value can be 1, 2, 3, or 5.

  • If Period is set to Month, the value can be an integer from 1 to 11.

Note
  • This parameter is required when PayType is set to Prepaid (subscription).

  • The longer the subscription duration, the greater the savings. For example, a one-year subscription is more cost-effective than a 10- or 11-month subscription.

1

VPCId

string

No

The Virtual Private Cloud (VPC) ID.

vpc-bp1at5ze0t5u3xtqn****

VSwitchId

string

No

The vSwitch ID.

vsw-bp1aadw9k19x6cis9****

ClientToken

string

No

A client-generated token to ensure request idempotence. The token must be unique across requests, case-sensitive, and up to 64 ASCII characters long.

123e4567-e89b-12d3-a456-t7241****

ExecutorCount

string

No

This parameter is reserved.

ResourceGroupId

string

No

The resource group ID.

rg-4690g37929****

Tag

array<object>

No

The list of tags.

object

No

Key

string

No

The tag key. You can use tags to filter clusters. You can specify up to 20 tags. N in Tag.N.Key must be a unique and consecutive integer that starts from 1. Tag.N.Key is paired with Tag.N.Value.

Note

The tag key can be up to 64 characters in length and cannot start with aliyun, acs:, http://, or https://.

tag1

Value

string

No

The tag value. You can use tags to filter clusters. You can specify up to 20 tags. N in Tag.N.Value must be a unique and consecutive integer that starts from 1. Tag.N.Value is paired with Tag.N.Key.

Note

The tag value can be up to 64 characters in length and cannot start with aliyun, acs:, http://, or https://.

test1

Mode

string

No

The cluster mode. Valid values:

  • Reserved: reserved mode.

  • Flexible: flexible mode.

Reserver

StorageResource

string

No

This parameter is reserved.

StorageType

string

No

This parameter is reserved.

ComputeResource

string

No

The compute resources for the cluster. Compute resources are used for data queries. A larger amount of compute resources can provide better query performance. Compute resources are available in cluster and single-node editions:

  • Cluster edition: includes specifications such as 16 cores/64 GB, 24 cores/96 GB, and 32 cores or more. The cluster edition supports resource pool isolation, scheduled scaling, and tiered storage of hot and cold data.

  • Single-node edition: includes specifications such as 8 cores/32 GB and 16 cores/64 GB. The single-node edition does not provide an SLA guarantee and has a long recovery time from failures (4 to 8 hours). We do not recommend that you use the single-node edition in production environments.

Note
  • You can call the DescribeAvailableResource operation to query the compute resources that are available in a specific region.

  • This parameter is required when Mode is set to Flexible (flexible mode).

32Core128GBNEW

RestoreType

string

No

This parameter is reserved.

SourceDBInstanceName

string

No

This parameter is reserved.

BackupSetID

string

No

This parameter is reserved.

RestoreTime

string

No

This parameter is reserved.

ElasticIOResource

string

No

The number of Elastic IO Units (EIUs). For more information, see EIU details.

0

DiskEncryption

boolean

No

Specifies whether to enable disk encryption. Valid values:

  • true: enables disk encryption.

  • false: disables disk encryption.

true

KmsId

string

No

The ID of the Key Management Service (KMS) key that is used for disk encryption. This parameter is valid only when DiskEncryption is set to true.

xxxxxxxx-xxxx-xxxx-xxxx-xxxx

EnableSSL

boolean

No

Specifies whether to enable SSL encryption. Valid values:

  • true: enables SSL encryption.

  • false: disables SSL encryption.

true

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

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

ResourceGroupId

string

The ID of the resource group.

rg-4690g37929****

DBClusterId

string

The ID of the DB cluster.

am-bp1r053byu48p****

OrderId

string

The ID of the order.

202353278****

Examples

Success response

JSON format

{
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
  "ResourceGroupId": "rg-4690g37929****",
  "DBClusterId": "am-bp1r053byu48p****",
  "OrderId": "202353278****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.