Creates one or more hosts in a dedicated cluster.


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 CreateDedicatedHost

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

RegionId String No cn-hangzhou

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

DedicatedHostGroupId String Yes dhg-6w7q18iwt5jo****

The ID of the dedicated cluster. You can view the ID of the dedicated cluster on the Dedicated Clusters page in the ApsaraDB MyBase console.

HostName String No test

The name of the host. 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.

ZoneId String Yes cn-hangzhou-i

The ID of the zone. You can call the DescribeRegions operation to query the zone ID. For more information, see DescribeRegions.

VSwitchId String Yes vsw-bp133c8ifzxd3iv6q****

The ID of the vSwitch to which to connect the host. You can view the ID of the vSwitch in the Virtual Private Cloud (VPC) console.

HostClass String Yes rds.g6.4xlarge

The instance type of the host. For more information about the supported instance types of hosts, see Host specification details.

PayType String Yes Prepaid

The billing method of the host. Set the value to PrePaid.

Period String No Month

The unit of the subscription duration. Valid values:

  • Year
  • Month
UsedTime String No 1

The subscription duration of the host.

  • Valid values when Period is set to Year: 1 to 5.
  • Valid values when Period is set to Month: 1 to 9.
ClientToken String Yes ETnLKlblzczshOTUbOCzSBZH8****

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.

AutoRenew String No false

Specifies whether to enable the auto-renewal feature. Valid values:

  • true: enables auto-renewal.
  • false: disables auto-renewal.
Note If you leave this parameter empty, the default value false is used.
ImageCategory String No AliLinux

The image of the host. Valid values:

  • WindowsWithMssqlEntAlwaysonLicense: SQL Server Cluster Edition
  • WindowsWithMssqlStdLicense: SQL Server Standard Edition
  • WindowsWithMssqlEntLicense: SQL Server Enterprise Edition
  • WindowsWithMssqlWebLicense: SQL Server Web Edition
  • AliLinux: other images
OsPassword String No Test123456

The password of the host.

This parameter is available only when the database engine is Tair-PMem. The password must meet the following requirements:

  • The password is 8 to 30 characters in length.
  • The password contains at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters.
  • Special characters include ( ) ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; ' < > , . ? /

Response parameters

Parameter Type Example Description
OrderId Long 102565235

The ID of the order.

RequestId String C860658E-68A6-46C1-AF6E-3AE7C4D32375

The ID of the request.

DedicateHostList Array of DedicateHostList

The hosts in the dedicated cluster.

DedicatedHostId String ch-bp108dki3wdl6****

The ID of the host in the dedicated cluster.


Sample requests

&DedicatedHostGroupId= dhg-6w7q18iwt5jo****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK

        <DedicatedHostId> ch-bp108dki3wdl6****</DedicatedHostId>

JSON format

HTTP/1.1 200 OK

  "OrderId" : 102565235,
  "RequestId" : "C860658E-68A6-46C1-AF6E-3AE7C4D32375",
  "DedicateHostList" : [ {
    "DedicatedHostId" : " ch-bp108dki3wdl6****"
  } ]

Error codes

HTTP status code Error code Error message Description
400 InvalidAccountPassword.Format The account password format is invalid. The error message returned because the specified OsPassword parameter is invalid.
400 InsufficientResourceCapacity No host is available for the requested instance. The error message returned because no hosts are created due to insufficient resources in the dedicated cluster.

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