All Products
Search
Document Center

Elastic Compute Service:RenewElasticityAssurances

Last Updated:Nov 14, 2024

Renews one or more elasticity assurances that you purchased. When you call this operation, you can specify parameters, such as PrivatePoolOptionsId and Period, in the request.

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:RenewElasticityAssurancescreate
*ElasticityAssurance
acs:ecs:{#regionId}:{#accountId}:elasticityassurance/{#ElasticityAssuranceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the elasticity assurance.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
PrivatePoolOptions.IdarrayYes

The IDs of elasticity assurances.

Limits: You can renew up to 20 elasticity assurances at a time.

You can call the DescribeElasticityAssurances operation to query the elasticity assurances that you purchased.

stringYes

The ID of the elasticity assurance.

eap-bp67acfmxazb4****
PeriodintegerNo

The renewal duration. The unit of the renewal duration is determined by the PeriodUnit value. Valid values:

  • Valid values if you set PeriodUnit to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
  • Valid values if you set PeriodUnit to Year: 1, 2, and 3.

Default value: 1.

1
PeriodUnitstringNo

The unit of the renewal duration. Valid values:

  • Month
  • Year

Default value: Year.

Year
AutoPaybooleanNo

Specifies whether to enable automatic payment. Valid values:

  • true
  • false

Default value: true.

true
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests.

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.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
OrderIdstring

The ID of the renewal order.

182372800****
PrivatePoolOptionsIdSetarray

The IDs of the elasticity assurances.

PrivatePoolOptionsIdstring

The ID of the elasticity assurance.

eap-bp67acfmxazb4****

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "OrderId": "182372800****",
  "PrivatePoolOptionsIdSet": {
    "PrivatePoolOptionsId": [
      "eap-bp67acfmxazb4****"
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidPeriodUnit.ValueNotSupportedThe specified parameter PeriodUnit is not valid.The specified PeriodUnit parameter is invalid.
400InvalidChargeType.ValueNotSupportedChargeType is not valid.This billing method is not supported. Select another billing method.
400MissingParameter.PrivatePoolOptions.IdThe specified parameter PrivatePoolOptions.Id does not exist.-
400InvalidParameter.PeriodUnitThe specified PeriodUnit is invalid.-
400InvalidParameter.PeriodThe specified parameter Period or PeriodUnit is invalid.-
400InvalidParameter.PrivatePoolOptionsIdThe specified parameter PrivatePoolOptions.Id is invalid.-
403InvalidParameter.ResourceOwnerAccountResourceOwnerAccount is Invalid.The specified ResourceOwnerAccount parameter is invalid.
403Account.ArrearageYour account has been in arrears.Your account does not have enough balance. Please add funds to your account.
403ChargeTypeViolationThe operation is not permitted due to charge type of the instance.The operation is not supported while the instance is using the current billing method.
500InternalErrorThe request processing has failed due to some unknown error.An internal error has occurred. Try again later.
500InternalError%sAn internal error has occurred.
500IncorrectPrivatePoolStatusThe current status of the private pool does not support this operation.The specified private pool state does not support the operation.
500InvalidPrivatePoolId.NotFoundThe specified private pool does not exist.-

For a list of error codes, visit the Service error codes.