Renews one or more subscription dedicated hosts.

Description

When you renew subscription dedicated hosts, vouchers are used first by default. Make sure that your account supports credit card payments or balance payments.

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 Yes RenewDedicatedHosts

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

DedicatedHostIds String Yes dh-bp199lyny9b3****

The list of dedicated host IDs. You can specify the IDs of up to 100 subscription dedicated hosts. Specify the dedicated host IDs in a JSON array. Example: ["dh-xxxxxxxxx", "dh-yyyyyyyyy", … "dh-zzzzzzzzz"]. Separate the IDs with commas (,).

RegionId String Yes cn-hangzhou

The region ID of the dedicated host. You can call the DescribeRegions operation to query the most recent list of regions.

Period Integer Yes 1

The renewal duration. Valid values:

  • Valid values when the PeriodUnit parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
  • Valid values when the PeriodUnit parameter is set to Year: 1, 2, 3, 4, and 5.
PeriodUnit String No Month

The unit of the renewal duration. Valid values:

  • Month
  • Year

Default value: Month.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request. You can use the client to generate a client token. Make sure that a unique client token is used for different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

Response parameters

Parameter Type Example Description
RequestId String 2A4EA075-CB5B-41B7-B0EB-70D339F6****

The ID of the request.

Examples

Sample requests

http(s)://ecs.aliyuncs.com/?Action=RenewDedicatedHosts
&DedicatedHostIds=dh-bp199lyny9b3****
&Period=1
&PeriodUnit=Month
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<RenewDedicatedHostsResponse>
    <RequestId>2A4EA075-CB5B-41B7-B0EB-70D339F6****</RequestId>
</RenewDedicatedHostsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "2A4EA075-CB5B-41B7-B0EB-70D339F6****"
}

Error codes

HttpCode Error code Error message Description
400 IdempotenceParamNotMatch Request uses a client token in a previous request but is not identical to that request. The error message returned because this request and the previous request contain the same client token but different parameters.
400 InvalidClientToken.ValueNotSupported The ClientToken provided is invalid. The error message returned because the specified ClientToken parameter is invalid.
400 InvalidPeriod The specified period is not valid. The error message returned because the specified Period parameter is invalid.
400 InvalidPeriodUnit.ValueNotSupported The specified parameter PeriodUnit is not valid. The error message returned because the specified PeriodUnit parameter is invalid.
400 InvalidDedicatedHostId.NotFound The specified DedicatedHostId does not exist. The error message returned because the specified dedicated host does not exist.
400 InvalidStatus.Upgrading The dedicated host is upgrading, please try it later. The error message returned because the specified dedicated host is being upgraded. Try again later.
400 LastOrderProcessing The previous order is still processing, please try again later. The error message returned because the order is being processed. Try again later.
500 InternalError The request processing has failed due to some unknown error. The error message returned because an internal error occurred. Try again later.
403 IncorrectHostStatus The current status of the resource does not support this operation. The error message returned because the operation is not supported while the resource is in the current state.
403 LastTokenProcessing The last token request is processing. The error message returned because a token request is being processed. Try again later.

For a list of error codes, see Service error codes.