Modifies the configuration of a dedicated cluster.

For more information, see Manage clusters.

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 ModifyDedicatedHostGroupAttribute

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

DedicatedHostGroupId String Yes dhg-h5i4p331f509****

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

RegionId String Yes cn-hangzhou

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

DedicatedHostGroupDesc String No test

The name of the dedicated cluster.

CpuAllocationRatio Integer No 100

The CPU overcommitment ratio of the dedicated cluster. If you set this parameter to 300, the CPU resources that can be allocated are three times as many as the CPU resources that are provided. This maximizes 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. Valid values: 0 to 90. Default value: 90.

DiskAllocationRatio Integer No 100

The storage overcommitment ratio of the dedicated cluster. 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 evenly allocates resources to hosts in the dedicated cluster. The system preferentially allocates resources to the hosts that have no resources or a few resources. This maximizes system stability.
  • Intensively: The system preferentially allocates resources to the hosts that are created earlier than the other hosts and have more resources than the other hosts in the dedicated cluster. 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 String No 0

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

  • 0 (default): disables the feature.
  • 1: enables the feature.

Response parameters

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

The ID of the request.

Examples

Sample requests

http(s)://cddc.aliyuncs.com/?Action=ModifyDedicatedHostGroupAttribute
&DedicatedHostGroupId=dhg-h5i4p331f509****
&RegionId=cn-hangzhou
&DedicatedHostGroupDesc=test
&CpuAllocationRatio=100
&MemAllocationRatio=90
&DiskAllocationRatio=100
&AllocationPolicy=Evenly
&HostReplacePolicy=Auto
&OpenPermission=0
&<Common request parameters>

Sample success responses

XML format

<ModifyDedicatedHostGroupAttributeReponse>
  <RequestId>D6E068C3-25BC-455A-85FE-45F0B22EEDAS</RequestId>
</ModifyDedicatedHostGroupAttributeReponse>

JSON format

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

Error codes

HttpCode Error code Error message Description
403 Forbidden.RAM User not authorized to operate on the specified resource, or this API does not support RAM. The error message returned because the specified operation is forbidden.

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