Creates hosts in a dedicated cluster.
Debugging
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:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| cddc:CreateDedicatedHost | create | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| DedicatedHostGroupId | string | Yes | The dedicated cluster ID. You can log on to the ApsaraDB for MyBase console and go to the Dedicated Clusters page to view the dedicated cluster ID. Note
The database engine of the host is the same as the database engine of the cluster.
| dhg-6w7q18iwt5jo**** |
| HostClass | string | Yes | The instance type of the host. For information about the host instance types supported by different database engines, see Instance types of hosts. | rds.g6.4xlarge |
| PayType | string | Yes | The billing method of the host. Set the value to prepaid. | prepaid |
| Period | string | No | The unit of the subscription duration. Valid values:
| Month |
| UsedTime | string | No | The subscription duration of the host.
| 1 |
| ClientToken | string | Yes | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. | ETnLKlblzczshOTUbOCzSBZH8**** |
| AutoRenew | string | No | Specifies whether to enable the auto-renewal feature. Valid values:
Note
If you do not specify this parameter, the default value false is used.
| false |
| ImageCategory | string | No | The image of the host. Valid values:
Note
When you create a host that runs SQL Server, you must specify a host image.
| AliLinux |
| OsPassword | string | No | The password of the host. You can specify a password only when you create a host in a Proprietary MyBase dedicated cluster.
| Test123456 |
| HostStorageType | string | No | The disk type of the host. This parameter takes effect only for dedicated clusters that run Tair. Valid values:
| cloud_essd0 |
| HostStorage | string | No | The disk storage of the host. This parameter takes effect only for dedicated clusters that run Tair. Unit: GB. Valid values:
| 512 |
| RegionId | string | Yes | The region ID of the dedicated cluster. | cn-hangzhou |
| ZoneId | string | Yes | The zone ID. You can call the DescribeRegions operation to query the most recent zone list. | cn-hangzhou-i |
| VSwitchId | string | Yes | The vSwitch ID. You can view the vSwitch ID in the Virtual Private Cloud (VPC) console. | vsw-bp133c8ifzxd3iv6q**** |
| ClusterType | string | No | The deployment type of the Self-managed MyBase cluster. Valid values: onACK and onECS. | onACK |
| ClusterAlias | string | No | The alias of the Self-managed MyBase cluster. | test-on-ack-cluster |
| VpcID | string | No | The VPC ID of the Self-managed MyBase cluster. | vpc-xxxxxx |
| ClusterServices | array | No | The services associated with the instances in the Self-managed MyBase on Elastic Compute Service (ECS) cluster. | |
| string | No | The services associated with the instances in the Self-managed MyBase on Elastic Compute Service (ECS) cluster. | "Orchestrator3.2.6,Promethus2.49.1,Grafana10.2.3" | |
| MyBaseEcsClass | object | No | The parameters of the instances in the Self-managed MyBase on Elastic Compute Service (ECS) cluster. | |
| ChargeType | string | No | The billing method. Valid values:
| PrePaid |
| EcsClassCode | string | No | The instance type. | ecs.g7.large |
| Amount | long | No | The number of hosts that you want to create. | 1 |
| Period | long | No | The subscription duration of the host. The Period parameter must be specified when ChargeType is set to PrePaid. | 1 |
| PeriodType | string | No | The unit of the subscription duration. Default value: Month. | Month |
| SystemDiskSize | long | No | The size of the system disk. Unit: GB. | 40 |
| SystemDiskCategory | string | No | The type of the system disk. | cloud_essd |
| DataDiskSize | long | No | The size of the data disk. Unit: GB. | 40 |
| DataDiskCategory | string | No | The type of the data disk. | cloud_essd |
| DataDiskCount | long | No | The number of data disks. | 2 |
| AutoRenew | boolean | No | Specifies whether to enable auto-renewal for the host. Default value: false. | false |
| Password | string | No | The password of the host. | *********** |
| KeyPairName | string | No | The name of the key pair. | test**** |
| SecurityGroupIds | array | No | The IDs of the security groups to which the instance belongs. | |
| string | No | The IDs of the security groups to which the instance belongs. | sg-uf64zn0tc9qakm2j**** | |
| Tags | array | No | The tags that you want to add to the host. | |
| string | No | The tags that you want to add to the host. | {\"key1\":\"value1\"} | |
| InternetMaxBandwidthOut | long | No | The maximum outbound public bandwidth. Unit: Mbit/s. Default value: 0. If you specify the parameter to a value greater than 0, a public IP address is automatically created. | 100 |
| InternetChargeType | string | No | The metering method for network usage. Valid values:
| PayByTraffic |
| DepolymentSetId | string | No | The deployment set ID. | **** |
Response parameters
Examples
Sample success responses
JSONformat
{
"OrderId": 102565235,
"RequestId": "C860658E-68A6-46C1-AF6E-3AE7C4D32375",
"ClusterName": "ca-2ze0x527ovq3y****",
"DedicateHostList": {
"DedicateHostList": [
{
"DedicatedHostId": " ch-bp108dki3wdl6****"
}
]
}
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParameter | The parameter is invalid. | The parameter is invalid. |
| 400 | COMMODITY.INVALID_COMPONENT | Invalid component. | - |
| 400 | InvalidAccountPassword.Format | The account password format is invalid. | The account password format is invalid. |
| 400 | InsufficientResourceCapacity | No host is available for the requested instance. | No host is available for the requested instance. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|
