You can call this operation to renew one or more Subscription-based DDHs. The credit balance is automatically deducted by default when you make a payment. Make sure that your payment method is valid.

Request parameters

Name Type Required Description
Action String Yes The operation that you want to perform. Set the value to RenewDedicatedHosts
DedicatedHostIds String Yes The list of DDH IDs. You can enter up to 100 Subscription-based DDH IDs in the list. Multiple DDH IDs are displayed as JSON arrays, such as [“dh- xxxxxxxxx”, “dh- yyyyyyyyy”, … “dh- zzzzzzzzz”]. IDs are separated by commas (,).
Period Integer Yes The renewal cycle. For valid values, see the description section in PeriodUnit.
PeriodUnit String No The unit of renewal. Valid values:
  • Week: Week. Valid values of the Period parameter: {1, 2, 3, 4}.
  • Month (default value): Month. Valid values of the Period parameter: { 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60}.
ClientToken String No

Guarantees the idempotence of the request.  The value is generated by a client and must be globally unique. Only ASCII characters are allowed. It can contain a maximum of 64 ASCII characters. For more information, see How to ensure idempotence.

Response parameters

All are common response parameters. See Common response parameters.

Samples

Sample requests
https://ecs.aliyuncs.com/?Action=RenewDedicatedHosts
&RegionId=cn-hangzhou
&DedicatedHostIds=dh-dedicatedhost1,dh-dedicatedhost2t2
&Period=1
&PeriodUnit=Month
&<Common Request Parameters>
Sample responses

XML format

<RenewDedicatedHostsResponse>
  <RequestId>2A4EA075-CB5B-41B7-B0EB-70D339F64DE7</RequestId>
</RenewDedicatedHostsResponse>
JSON format
{
    "RequestId":"2A4EA075-CB5B-41B7-B0EB-70D339F64DE7"
}

Error codes

Error code Error message HTTP status code Description
IdempotenceParamNotMatch Request uses a client token in a previous request but is not identical to that request. 400 The error message returned when you reuse the ClientToken parameter but the other parameters for this request have changed.
InvalidClientToken.ValueNotSupported The ClientToken provided is invalid. 400 The error message returned when the value of ClientToken is invalid. Only ASCII characters are valid.
Incorrecthoststatus The current status of the resource does not support this operation. 403 The error message returned when the DDH cannot be renewed based on its current status.
Invalidperiod The specified OwnerId is not valid. 400 The error message returned when the specified Peroid is invalid.
LastTokenProcessing The last token request is processing. 403 The error message returned when the system is still executing the last request. Call this operation later.
InvalidPeriodUnit.ValueNotSupported The specified parameter “Period” is not valid. 400 The error message returned when the specified PeriodUnit format is invalid.
InvalidDedicatedHostId.NotFound The specified DedicatedHostId does not exist. 400 The error message returned when the specified DDH ID does not exist.
InvalidStatus.Upgrading The dedicated host is upgrading, please try it later. 400 The error message returned when the specified DDH is upgrading. Call this operation later.