RenewDedicatedHosts

更新时间:
复制 MD 格式

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.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:RenewDedicatedHosts

update

*DedicatedHost

acs:ecs:{#regionId}:{#accountId}:ddh/{#ddhId}

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

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:

  • 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

PeriodUnit

string

No

The unit of the renewal period. Valid values:

  • Month

  • Year

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 elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

OrderId

string

The ID of the order.

23841229****

Examples

Success response

JSON format

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

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.
500 InternalError The request processing has failed due to some unknown error.
403 ChargeTypeViolation Pay-As-You-Go dedicated host do not support this operation.
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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.