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.

RegionId String Yes cn-hangzhou

The ID of the region in which you want to create the dedicated cluster. For more information, see Region IDs.

Engine String Yes MySQL

The database engine of the dedicated cluster. Valid values:

  • MySQL
  • SQL Server
  • PostgreSQL
CpuAllocationRatio Integer No 200%

The CPU overcommit ratio of the dedicated cluster.

Note Valid values: 100% to 300%. Default value: 200%. The default ratio specifies that the system can allocate twice the provided CPU resources. This maximizes CPU utilization.
MemAllocationRatio Integer No 100%

The maximum memory usage of each host in the dedicated cluster.

Note Valid values: 0% to 100%. Default value: 100%.
DiskAllocationRatio Integer No 200%

The storage overcommit ratio of the dedicated cluster.

Note Valid values: 100% to 300%. Default value: 200%. The default ratio specifies that the system can allocate twice the provided storage resources. This maximizes resource utilization.
AllocationPolicy String No Evenly

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

  • Evenly: The system preferentially creates instances on the hosts that have the smallest loads. This way, the loads on the hosts in the dedicated cluster can be balanced. This maximizes system stability.
  • Intensively: The system preferentially creates instances on the hosts that are created earlier than the other hosts and have fewer available resources than the other hosts in the dedicated cluster. This maximizes resource utilization.
VPCId String Yes vpc-t4n7v5m6icc0a4314****

The ID of the virtual private cloud (VPC) where the dedicated cluster resides. To view the ID of the VPC that you want to manage, log on to the VPC console and click VPCs in the left-side navigation pane.

HostReplacePolicy String No Auto

The policy that the system uses to handle host failures. Default value: Auto. Valid values:

  • Auto: The system automatically replaces faulty hosts.
  • Manual: You must manually replace faulty hosts.
Note You can select a policy based on your business requirements only if the dedicated cluster runs the MySQL database engine. For a dedicated cluster that runs another database engine, the default value Auto is used.
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, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

OpenPermission Integer No 1

Specifies whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Default value: 1. Valid values:

  • 0: no
  • 1: yes
Note You can enable this feature based on your business requirements only if you create a dedicated cluster that runs the MySQL, SQL Server, or PostgreSQL database engine. This feature is unavailable for dedicated clusters that run other database engines. For these dedicated clusters, the default value 0 is used.
DedicatedHostGroupDesc String No mysqlcluster

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

Response parameters

Parameter Type Example Description
RequestId String C6592723-09E1-4248-A78E-12AB00D7A79D

The ID of the request.

DedicatedHostGroupId String dhg-7a9********

The ID of the dedicated cluster.

Examples

Sample requests

http(s)://cddc.aliyuncs.com?Action=CreateDedicatedHostGroup
&ClientToken=ETnLKlblzczshOTUbOCz*******
&Engine=MySQL
&RegionId=cn-hangzhou
&VPCId=vpc-t4n7v5m6icc0a4314****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

HTTP status code Error code Error message Description
403 Permission.NotSupport You are not authorized to perform this action. The error message returned because you are not authorized to perform this operation.
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.

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