All Products
Search
Document Center

Elastic Compute Service:RenewDedicatedHosts

Last Updated:Nov 14, 2024

Renews one or more subscription dedicated hosts.

Operation description

Usage notes

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:RenewDedicatedHostsupdate
*DedicatedHost
acs:ecs:{#regionId}:{#accountId}:ddh/{#ddhId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DedicatedHostIdsstringYes

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-xxxxxxxxx", "dh-yyyyyyyyy", … "dh-zzzzzzzzz"]. Separate the IDs with commas (,).

dh-bp199lyny9b3****
RegionIdstringYes

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

cn-hangzhou
PeriodintegerYes

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.
1
PeriodUnitstringNo

The unit of the renewal period. Valid values:

  • Month
  • Year

Default value: Month.

Month
ClientTokenstringNo

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

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

2A4EA075-CB5B-41B7-B0EB-70D339F6****

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400IdempotenceParamNotMatchRequest 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.
400InvalidClientToken.ValueNotSupportedThe ClientToken provided is invalid.The specified ClientToken parameter is invalid.
400InvalidPeriodThe specified period is not valid.The specified period is invalid.
400InvalidPeriodUnit.ValueNotSupportedThe specified parameter PeriodUnit is not valid.The specified PeriodUnit parameter is invalid.
400ChargeTypeViolationPay-As-You-Go dedicated host do not support this operation.-
400InvalidDedicatedHostId.NotFoundThe specified DedicatedHostId does not exist.-
400InvalidStatus.UpgradingThe dedicated host is upgrading, please try it later.The specified dedicated host is being upgraded. Try again later.
400LastOrderProcessingThe previous order is still processing, please try again later.The order is being processed. Try again later.
403IncorrectHostStatusThe current status of the resource does not support this operation.The resource is in a state that does not support the current operation.
403LastTokenProcessingThe last token request is processing.A token request is being processed. Try again later.
500InternalErrorThe 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.

Change history

Change timeSummary of changesOperation
No change history