All Products
Search
Document Center

ApsaraDB for ClickHouse:CreateDBInstance

Last Updated:Apr 08, 2026

Create an Alibaba Cloud ClickHouse cluster.

Operation description

Before you call this API, make sure that you understand the billing method and price of ApsaraDB for ClickHouse.

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

clickhouse:CreateDBInstance

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID. You can call the DescribeRegions API to query the latest region list.

cn-hangzhou

ZoneId

string

No

The availability zone ID. You can call the DescribeRegions API to query the latest availability zone list.

cn-hangzhou-h

DBClusterVersion

string

Yes

The engine version. Valid values:

  • 21.8.10.19

  • 22.8.5.29

Valid values:

  • 22.8.5.29 :

    22.8.5.29

  • 21.8.10.19 :

    21.8.10.19

22.8.5.29

DBClusterCategory

string

Yes

The replica configuration. Valid values:

  • Basic: single-replica

  • HighAvailability: high availability (dual-replica)

Valid values:

  • Basic :

    Basic

  • HighAvailability :

    HighAvailability

Basic

DBClusterClass

string

Yes

The instance type.

  • For single-replica clusters, valid values are:
    • LS20: Large-storage, 20 cores, 88 GB

    • LS40: Large-storage, 40 cores, 176 GB

    • LS80: Large-storage, 80 cores, 352 GB

    • S8: Standard, 8 cores, 32 GB

    • S16: Standard, 16 cores, 64 GB

    • S32: Standard, 32 cores, 128 GB

    • S64: Standard, 64 cores, 256 GB

    • S80: Standard, 80 cores, 384 GB

    • S104: Standard, 104 cores, 384 GB

  • For high availability clusters, valid values are:
    • LC20: Large-storage, 20 cores, 88 GB

    • LC40: Large-storage, 40 cores, 176 GB

    • LC80: Large-storage, 80 cores, 352 GB

    • C8: Standard, 8 cores, 32 GB

    • C16: Standard, 16 cores, 64 GB

    • C32: Standard, 32 cores, 128 GB

    • C64: Standard, 64 cores, 256 GB

    • C80: Standard, 80 cores, 384 GB

    • C104: Standard, 104 cores, 384 GB

  • For single-replica clusters, valid values are:
    • S8: 8 cores, 32 GB

    • S16: 16 cores, 64 GB

    • S32: 32 cores, 128 GB

    • S64: 64 cores, 256 GB

    • S104: 104 cores, 384 GB

  • For high availability clusters, valid values are:
    • C8: 8 cores, 32 GB

    • C16: 16 cores, 64 GB

    • C32: 32 cores, 128 GB

    • C64: 64 cores, 256 GB

    • C104: 104 cores, 384 GB

S8

DBNodeGroupCount

string

Yes

The number of nodes.

  • For single-replica clusters, the valid range is 1–48.

  • For high availability clusters, the valid range is 1–24.

1

DBNodeStorage

string

Yes

The storage capacity per node, in GB. The valid range is 100–32,000.

Note

The value must be a multiple of 100.

100

DBClusterNetworkType

string

Yes

The network type. Currently, only VPC is supported.

VPC

DBClusterDescription

string

No

The cluster description.

test

PayType

string

Yes

The billing method. Valid values:

  • Postpaid: pay-as-you-go

  • Prepaid: subscription

Valid values:

  • Prepaid :

    Prepaid

  • Postpaid :

    Postpaid

Prepaid

Period

string

No

The subscription duration unit.

Important This parameter is required only when PayType is set to Prepaid.

  • Year: Measured in years.

  • Month: Measured in months.

Month

UsedTime

string

No

The subscription duration.

Important This parameter is required only when PayType is set to Prepaid.

  • If Period is Year, the valid range is 1–3.

  • If Period is Month, the valid range is 1–9.

1

VPCId

string

Yes

The VPC ID.

vpc-bp175iuvg8nxqraf2****

VSwitchId

string

Yes

The VSwitch ID.

vsw-bp1gzt31twhlo0sa5****

ClientToken

string

No

A client token used to ensure request idempotence. The value must be a string of no more than 64 ASCII characters.

AB

DbNodeStorageType

string

Yes

The storage type. Valid values:

  • CloudESSD: ESSD PL1 cloud disk

  • CloudESSD_PL2: ESSD PL2 cloud disk

  • CloudESSD_PL3: ESSD PL3 cloud disk

  • CloudEfficiency: Ultra Disk

CloudESSD_PL2

EncryptionKey

string

No

This parameter is required when EncryptionType is set to CloudDisk.

The ID of the cloud disk encryption key. You can create and manage keys in the Key Management Service console.

Note

If EncryptionType is not specified, you do not need to specify this parameter.

0d2470df-da7b-4786-b981-9a164dae****

EncryptionType

string

No

The encryption type. Only cloud disk encryption is supported. Set this value to CloudDisk.

Note

If you do not specify this parameter, encryption is disabled.

CloudDisk

BackupSetID

string

No

The ID of the backup set. You can call the DescribeBackups API to query backup set IDs.

Note

This parameter is required when restoring data to an ApsaraDB for ClickHouse cluster.

b-12af23adsf

SourceDBClusterId

string

No

The ID of the source cluster. You can call the DescribeDBClusters API to query cluster IDs.

Note

This parameter is required when restoring data to an ApsaraDB for ClickHouse cluster.

cc-bp1lxbo89u950****

ResourceGroupId

string

No

The ID of the resource group that contains the cluster.

rg-4690g37929****

ZoneIdBak

string

No

The ID of the secondary availability zone.

cn-hangzhou-k

VSwitchBak

string

No

The ID of the secondary VSwitch.

vsw-bp1gzt31twhlo0sa5****

ZondIdBak2

string

No

The ID of the second standby availability zone.

cn-hangzhou-j

VSwitchBak2

string

No

The ID of the second standby VSwitch.

vsw-bp1gzt31twhlo0sa5****

AutoRenew

boolean

No

Specifies whether to enable auto-renewal.

Note

This parameter applies only when PayType is set to Prepaid.

false

Tags

array<object>

No

The tags to add to the cluster.

object

No

A tag.

key

string

No

The tag key.

user123

value

string

No

The tag value.

示例字符串

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The unique ID of the request.

F5178C10-1407-4987-9133-DE4DC9119F75

DBClusterId

string

The ID of the cluster.

cc-bp1qx68m06981****

OrderId

string

The ID of the order.

21137950671****

Examples

Success response

JSON format

{
  "RequestId": "F5178C10-1407-4987-9133-DE4DC9119F75",
  "DBClusterId": "cc-bp1qx68m06981****",
  "OrderId": "21137950671****"
}

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError An error occurred while processing your request. An error occurred while processing your request.
503 ServiceUnavailable An error occurred while processing your request. An error occurred while processing your request.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.