Specifies whether instances can be created on a specified host of 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 No ModifyDedicatedHostAttribute

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

DedicatedHostId String Yes dhg-h5i4p331f509****

The ID of the host in the dedicated cluster. You can call the DescribeDedicatedHosts operation to query the host ID.

RegionId String No cn-hangzhou

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

HostName String No ch-bp15xfnp706tl****

The name of the host. You can call the DescribeDedicatedHosts operation to query the name of the host.

AllocationStatus String No 1

Specifies whether instances can be created on the host. Valid values:

  • Allocatable: Instances can be created on the host.
  • Suspended: Instances cannot be created on the host.

Response parameters

Parameter Type Example Description
RequestId String D6E068C3-25BC-455A-85FE-45F0B22ESFS

The ID of the request.

Examples

Sample requests

http(s)://cddc.aliyuncs.com/?Action=ModifyDedicatedHostAttribute
DedicatedHostId=dhg-h5i4p331f509****
&RegionId=cn-hangzhou
&HostName=ch-bp15xfnp706tl****
&AllocationStatus=1
&<Common request parameters>

Sample success responses

XML format

<ModifyDedicatedHostAttributeReponse>
  <RequestId>D6E068C3-25BC-455A-85FE-45F0B22ESFS</RequestId>
</ModifyDedicatedHostAttributeReponse>

JSON format

{"RequestId":"D6E068C3-25BC-455A-85FE-45F0B22ESFS"}

Error codes

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