Creates a dedicated cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateDedicatedHostGroup

The operation that you want to perform. Set the value to CreateDedicatedHostGroup.

ClientToken String Yes ETnLKlblzczshOTUbOCz*******

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value. You must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Engine String Yes MySQL

The database engine of the dedicated cluster. Valid values:

  • MySQL
  • SQL Server
  • PostgreSQL
  • Redis
  • MongoDB
RegionId String Yes cn-hangzhou

The region ID of the dedicated cluster. You can call the DescribeRegions operation to query the region ID.

VPCId String Yes vpc-bp1o*******

The virtual private cloud (VPC) ID of the dedicated cluster. You can call the DescribeDedicatedHosts operation to query the VPC ID.

CpuAllocationRatio Integer No 200

The CPU overcommitment ratio of the dedicated cluster. You can call the DescribeDedicatedHosts operation to query the CPU overcommitment ratio. If you set this parameter to 200, the CPU resources that can be allocated are twice as many as the CPU resources that are provided. This maximizes the CPU utilization. Valid values: 100 to 300. Default value: 200.

MemAllocationRatio Integer No 90

The maximum memory usage of each host in the dedicated cluster. You call the DescribeDedicatedHosts operation to query the maximum memory usage. Valid values: 0 to 90. Default value: 90.

DiskAllocationRatio Integer No 200

The storage overcommitment ratio of the dedicated cluster. You can call the DescribeDedicatedHosts operation to query the storage overcommitment ratio. Valid values: 100 to 300. Default value: 200.

AllocationPolicy String No Evenly

The policy that is used to allocate resources in the dedicated cluster. Valid values:

  • Evenly: This is the default value. The system preferentially creates new database instances on the hosts that have the smallest load so that the host load is balanced. This maximizes the system stability.
  • Intensively: The system preferentially creates new database instances on the hosts that have the deployed instances. This maximizes the resource usage.
HostReplacePolicy String No Auto

The policy based on which the system handles host failures. Valid values:

  • Auto (default): The system automatically replaces faulty hosts.
  • Manual: You must manually replace faulty hosts.
OpenPermission Integer No 0

Specifies whether to enable the feature that allows you to have host OS permissions. Valid values:

  • 0 (default): disables this feature.
  • 1: enables the feature.
DedicatedHostGroupDesc String No test1

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.

Response parameters

Parameter Type Example Description
DedicatedHostGroupId String dhg-7a9********

The ID of the dedicated cluster.

RequestId String C6592723-09E1-4248-A78E-12AB00D7A79D

The ID of the request.

Examples

Sample requests

http(s)://cddc.aliyuncs.com/?Action=CreateDedicatedHostGroup
&ClientToken=ETnLKlblzczshOTUbOCz*******
&Engine=MySQL
&RegionId=cn-hangzhou
&VPCId=vpc-bp1o*******
&CpuAllocationRatio=200
&MemAllocationRatio=90
&DiskAllocationRatio=200
&AllocationPolicy=Evenly
&HostReplacePolicy=Auto
&OpenPermission=0
&DedicatedHostGroupDesc=test1
&<Common request parameters>

Sample success responses

XML format

<CreateDedicatedHostGroupReponse>
  <RequestId>C6592723-09E1-4248-A78E-12AB00D7A79D</RequestId>
  <DedicatedHostGroupId>dhg-7a9********</DedicatedHostGroupId>
</CreateDedicatedHostGroupReponse>

JSON format

{"RequestId":"C6592723-09E1-4248-A78E-12AB00D7A79D",
"DedicatedHostGroupId":"dhg-7a9********"}

Error codes

HttpCode Error code Error message Description
404 ClustersTemplateNotFound Key account cluster is not supported for the region. The error message returned because dedicated clusters cannot be created in the specified region.
403 Permission.NotSupport You are not authorized to perform this action. The error message returned because you are not authorized to perform this operation.

For a list of error codes, visit the API Error Center.