All Products
Search
Document Center

ApsaraDB for ClickHouse:CreateDBInstance

Last Updated:Nov 12, 2024

Creates an ApsaraDB for ClickHouse cluster.

Operation description

Before you call this operation, make sure that you are familiar with the billing methods and pricing of ApsaraDB for ClickHouse.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
clickhouse:CreateDBInstancecreate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ZoneIdstringNo

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

cn-hangzhou-h
DBClusterVersionstringYes

The kernel version. Valid values:

  • 21.8.10.19
  • 22.8.5.29
21.8.10.19
DBClusterCategorystringYes

The edition of the cluster. Valid values:

  • Basic: Single-replica Edition
  • HighAvailability: Double-replica Edition
Basic
DBClusterClassstringYes

The specifications of the cluster.

  • Valid values for a Single-replica Edition cluster:

    • S8: 8 cores and 32 GB of memory
    • S16: 16 cores and 64 GB of memory
    • S32: 32 cores and 128 GB of memory
    • S64: 64 cores and 256 GB of memory
    • S104: 104 cores and 384 GB of memory
  • Valid values for a Double-replica Edition cluster:

    • C8: 8 cores and 32 GB of memory
    • C16: 16 cores and 64 GB of memory
    • C32: 32 cores and 128 GB of memory
    • C64: 64 cores and 256 GB of memory
    • C104: 104 cores and 384 GB of memory
S8
DBNodeGroupCountstringYes

The number of nodes.

  • Valid values when the cluster is of Single-replica Edition: 1 to 48.
  • Valid values when the cluster is of Double-replica Edition: 1 to 24.
1
DBNodeStoragestringYes

The storage capacity of a single node. Valid values: 100 to 32000. Unit: GB.

Note This value is a multiple of 100.
100
DBClusterNetworkTypestringYes

The network type of the cluster. Only Virtual Private Cloud (VPC) is supported.

VPC
DBClusterDescriptionstringNo

The description of the cluster.

test
PayTypestringYes

The billing method of the cluster. Valid values:

  • Postpaid: The cluster uses the pay-as-you-go billing method.
  • Prepaid: The cluster uses the subscription billing method.
Prepaid
PeriodstringNo

The unit of the subscription duration for the cluster. Valid values:

Note This parameter is required only when PayType is set to Prepaid.
  • Year
  • Month
Month
UsedTimestringNo

The subscription duration of the subscription cluster.

Note This parameter is required only when PayType is set to Prepaid.
  • Valid values when Period is set to Year: 1 to 3 (integer)
  • Valid values when Period is set to Month: 1 to 9 (integer)
1
VPCIdstringYes

The VPC ID.

vpc-bp175iuvg8nxqraf2****
VSwitchIdstringYes

The vSwitch ID.

vsw-bp1gzt31twhlo0sa5****
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. The value is a string and can be up to 64 ASCII characters in length.

AB
DbNodeStorageTypestringYes

The storage type of the cluster. Valid values:

  • CloudESSD: The cluster uses an enhanced SSD (ESSD) of performance level 1 (PL1).
  • CloudESSD_PL2: The cluster uses an ESSD of PL2.
  • CloudESSD_PL3: The cluster uses an ESSD of PL3.
  • CloudEfficiency: The cluster uses an ultra disk.
CloudESSD_PL2
EncryptionKeystringNo

You must specify this parameter when EncryptionType is set to CloudDisk.

The ID of the key that is used to encrypt data on disks. You can obtain the ID of the key from the Key Management Service (KMS) console. You can also create a key.

Note If EncryptionType is empty, you do not need to specify this parameter.
0d2470df-da7b-4786-b981-9a164dae****
EncryptionTypestringNo

The encryption type. Set the value to CloudDisk, which indicates that only disk encryption is supported.

Note If this parameter is not specified, data is not encrypted.
CloudDisk
BackupSetIDstringNo

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

Note If you want to restore the data of an ApsaraDB for ClickHouse cluster, this parameter is required.
b-12af23adsf
SourceDBClusterIdstringNo

The ID of the source cluster. You can call the DescribeDBClusters operation to query backup set IDs.

Note If you want to restore the data of an ApsaraDB for ClickHouse cluster, this parameter is required.
cc-bp1lxbo89u950****
ResourceGroupIdstringNo

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

rg-4690g37929****
ZoneIdBakstringNo

The secondary zone.

cn-hangzhou-k
VSwitchBakstringNo

The vSwitch in the secondary zone for the VPC.

vsw-bp1gzt31twhlo0sa5****
ZondIdBak2stringNo

The secondary zone 2 of the instance.

cn-hangzhou-j
VSwitchBak2stringNo

The vSwitch in secondary zone 2 for the VPC.

vsw-bp1gzt31twhlo0sa5****
AutoRenewbooleanNo

Specifies whether to enable auto-renewal.

Note This parameter is valid only if the value of PayType is set to Prepaid.
false

Response parameters

ParameterTypeDescriptionExample
object

The results returned.

RequestIdstring

The request ID.

F5178C10-1407-4987-9133-DE4DC9119F75
DBClusterIdstring

The cluster ID.

cc-bp1qx68m06981****
OrderIdstring

The order ID.

21137950671****

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
500InternalErrorAn error occurred while processing your request.An error occurred while processing your request.
503ServiceUnavailableAn error occurred while processing your request.An error occurred while processing your request.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-23API Description Update. The Error code has changedView Change Details
2024-02-21The Error code has changed. The request parameters of the API has changedView Change Details
2024-02-04The Error code has changedView Change Details
2023-12-08The Error code has changed. The request parameters of the API has changedView Change Details
2023-03-20The Error code has changed. The request parameters of the API has changedView Change Details
2021-11-04The Error code has changed. The request parameters of the API has changedView Change Details
2021-11-04The Error code has changedView Change Details