Renews one or more subscription dedicated hosts.
Operation description
Valid vouchers can be applied when you renew the subscription plan dedicated hosts. In order to use vouchers, make sure that your account supports the credit card payment method.
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:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is 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 |
---|---|---|---|---|
ecs:RenewDedicatedHosts | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DedicatedHostIds | string | Yes | The IDs of dedicated hosts. You can specify the IDs of up to 100 subscription dedicated hosts. Specify the dedicated host IDs in a JSON array. Example: | dh-bp199lyny9b3**** |
RegionId | string | Yes | The region ID of the dedicated host. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
Period | integer | Yes | The renewal duration. Valid values:
| 1 |
PeriodUnit | string | No | The unit of the renewal period. Valid values:
Default value: Month. | Month |
ClientToken | string | No | 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 each request. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence? | 123e4567-e89b-12d3-a456-426655440000 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "2A4EA075-CB5B-41B7-B0EB-70D339F6****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IdempotenceParamNotMatch | Request uses a client token in a previous request but is not identical to that request. | This request and the previous request contain the same client token but different other parameters. |
400 | InvalidClientToken.ValueNotSupported | The ClientToken provided is invalid. | The specified ClientToken parameter is invalid. |
400 | InvalidPeriod | The specified period is not valid. | The specified period is invalid. |
400 | InvalidPeriodUnit.ValueNotSupported | The specified parameter PeriodUnit is not valid. | The specified PeriodUnit parameter is invalid. |
400 | ChargeTypeViolation | Pay-As-You-Go dedicated host do not support this operation. | - |
400 | InvalidDedicatedHostId.NotFound | The specified DedicatedHostId does not exist. | - |
400 | InvalidStatus.Upgrading | The dedicated host is upgrading, please try it later. | The specified dedicated host is being upgraded. Try again later. |
400 | LastOrderProcessing | The previous order is still processing, please try again later. | The order is being processed. Try again later. |
403 | IncorrectHostStatus | The current status of the resource does not support this operation. | The resource is in a state that does not support the current operation. |
403 | LastTokenProcessing | The last token request is processing. | A token request is being processed. Try again later. |
500 | InternalError | The request processing has failed due to some unknown error. | An internal error has occurred. Try again later. |
For a list of error codes, visit the Service error codes.