CreateDBInstance

更新时间:
复制 MD 格式

To create a ClickHouse Enterprise Edition cluster, call the `CreateDBInstance` API.

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

ClientToken

string

No

A client-provided token to ensure request idempotence. It must be unique across requests, contain only ASCII characters, and not exceed 64 characters in length.

AB

RegionId

string

Yes

The region ID.

cn-hangzhou

ZoneId

string

No

The zone ID.

cn-hangzhou-h

VpcId

string

No

The VPC ID.

vpc-uf6xmupdn7v6ui9f****

VswitchId

string

No

The vSwitch ID.

vsw-uf632qye9oqt4x4sr****

DBInstanceDescription

string

No

The description of the instance.

Cluster test

EngineVersion

string

No

The engine version.

23.8

ScaleMin

string

No

This parameter is deprecated. Use the NodeCount, NodeScaleMin, and NodeScaleMax parameters to configure elastic scaling.

8

ScaleMax

string

No

This parameter is deprecated. Use the NodeCount, NodeScaleMin, and NodeScaleMax parameters to configure elastic scaling.

32

Engine

string

No

The engine type.

clickhouse

MultiZone

array<object>

No

The multi-zone configuration.

object

No

The configuration for a single zone.

ZoneId

string

No

The zone ID.

cn-hangzhou-h

VSwitchIds

array

No

The vSwitch IDs.

string

No

The vSwitch ID.

vsw-8vb05l07h3sdayqhe****

DeploySchema

string

No

The deployment mode of the instance.

multi_az

SourceDBInstanceId

string

No

The ID of the source instance. This parameter is required when restoring from a backup.

cc-2ze1*********

BackupSetId

string

No

The backup set ID.

1

ResourceGroupId

string

No

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

rg-*****

NodeScaleMax

integer

No

The maximum number of nodes for serverless elastic scaling. Valid values: 4 to 32. The value must be greater than the NodeScaleMin parameter.

4

NodeScaleMin

integer

No

The minimum number of nodes for serverless elastic scaling. Valid values: 4 to 32.

32

NodeCount

integer

No

The number of nodes. Valid values: 2 to 16. This parameter is required when you configure an elastic scaling range by using the NodeScaleMin and NodeScaleMax parameters.

2

DBTimeZone

string

No

The time zone of the database, which must be an IANA time zone identifier.

Asia/Shanghai

Category

string

No

The edition of the instance. Valid value:

  • enterprise: Enterprise Edition

enterprise

Tags

array<object>

No

The tags to add to the instance.

object

No

A tag.

Key

string

No

The key of the tag.

user_123

Value

string

No

The value of the tag.

example string

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

F5178C10-1407-4987-9133-DE4DC9119F75

Data

object

The data returned.

DBInstanceId

string

The cluster ID.

cc-bp100p4q1g9z3****

OrderId

integer

The order ID.

21154955706****

ConnectionString

string

The endpoint.

cc-bp100p4q1g9z3****-clickhouse.clickhouseserver.rds.aliyuncs.com

Examples

Success response

JSON format

{
  "RequestId": "F5178C10-1407-4987-9133-DE4DC9119F75",
  "Data": {
    "DBInstanceId": "cc-bp100p4q1g9z3****",
    "OrderId": 0,
    "ConnectionString": "cc-bp100p4q1g9z3****-clickhouse.clickhouseserver.rds.aliyuncs.com"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 IdempotentParameterMismatch The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.