All Products
Search
Document Center

ApsaraDB for ClickHouse:CreateDBInstance

Last Updated:Aug 07, 2026

Creates an ApsaraDB for ClickHouse cluster.

Operation description

Before you call this operation, make sure that you fully understand the billing methods and pricing 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 operation to query the region ID.

cn-hangzhou

ZoneId

string

No

The zone ID. You can call the DescribeRegions operation to query the zone ID.

cn-hangzhou-h

DBClusterVersion

string

Yes

The kernel 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 edition.

  • HighAvailability: double-replica edition.

Valid values:

  • Basic :

    Basic

  • HighAvailability :

    HighAvailability

Basic

DBClusterClass

string

Yes

The cluster specifications.

  • Single-replica edition. Valid values:
    • 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.

  • Double-replica edition. Valid values:
    • 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.

  • Single-replica edition. Valid values:
    • 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.

  • Double-replica edition. Valid values:
    • 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.

  • Single-replica edition: valid values: 1 to 48.

  • Double-replica edition: valid values: 1 to 24.

1

DBNodeStorage

string

Yes

The storage capacity per node. Valid values: 100 to 32000. Unit: GB.

Note

The step size is 100 GB.

100

DBClusterNetworkType

string

Yes

The network type. 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 type of the subscription cluster. Valid values:

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

  • Year: subscription on a yearly basis.

  • Month: subscription on a monthly basis.

Month

UsedTime

string

No

The subscription duration of the subscription cluster.

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

  • If Period is set to Year, valid values: 1 to 3 (integer).

  • If Period is set to Month, valid values: 1 to 9 (integer).

1

VPCId

string

Yes

VPC ID.

vpc-bp175iuvg8nxqraf2****

VSwitchId

string

Yes

The vSwitch ID.

vsw-bp1gzt31twhlo0sa5****

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. The value is a string that contains up to 64 ASCII characters.

AB

DbNodeStorageType

string

Yes

The storage type. Valid values:

  • CloudESSD: PL1 ESSD.

  • CloudESSD_PL2: PL2 ESSD.

  • CloudESSD_PL3: PL3 ESSD.

  • CloudEfficiency: ultra cloud disk.

CloudESSD_PL2

EncryptionKey

string

No

The ID of the key used for cloud disk encryption. This parameter is required when EncryptionType is set to CloudDisk.

You can view the key ID in the Key Management Service (KMS) console or create a key.

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 the value to CloudDisk.

Note

If this parameter is not specified, data is not encrypted.

CloudDisk

BackupSetID

string

No

The backup set ID. You can call the DescribeBackups operation to query the backup set ID.

Note

This parameter is required when you restore data for an ApsaraDB for ClickHouse cluster.

b-12af23adsf

SourceDBClusterId

string

No

The source cluster ID. You can call the DescribeDBClusters operation to query the cluster ID.

Note

This parameter is required when you restore data for an ApsaraDB for ClickHouse cluster.

cc-bp1lxbo89u950****

ResourceGroupId

string

No

The ID of the resource group to which the cluster belongs.

rg-4690g37929****

ZoneIdBak

string

No

The secondary zone.

cn-hangzhou-k

VSwitchBak

string

No

The secondary vSwitch.

vsw-bp1gzt31twhlo0sa5****

ZondIdBak2

string

No

The secondary zone 2.

cn-hangzhou-j

VSwitchBak2

string

No

The secondary vSwitch 2.

vsw-bp1gzt31twhlo0sa5****

AutoRenew

boolean

No

Specifies whether to enable auto-renewal.

Note

This parameter takes effect only when PayType is set to Prepaid.

false

Tags

array<object>

No

The tag information.

object

No

The tag information.

key

string

No

The tag key.

user123

value

string

No

The tag value.

Example string

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

F5178C10-1407-4987-9133-DE4DC9119F75

DBClusterId

string

The cluster ID.

cc-bp1qx68m06981****

OrderId

string

The order ID.

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.