All Products
Search
Document Center

Elastic Compute Service:RenewElasticityAssurances

Last Updated:Apr 25, 2025

Renews elasticity assurances that you purchased.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
RegionIdstringNo

The region ID of the elasticity assurance.

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

cn-hangzhou
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
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
AutoPaybooleanNo

Specifies whether to enable automatic payment. Valid values:

  • true
  • false

Default value: true.

true
PrivatePoolOptions.IdarrayNo

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.

stringNo

The ID of the elasticity assurance.

eap-bp67acfmxazb4****
AutoRenewbooleanNo

Specifies whether to enable auto-renewal for the elasticity assurance. Valid values:

  • true
  • false

Default value: false.

true
AutoRenewPeriodintegerNo

The auto-renewal period. Unit: month. Valid values: 1, 2, 3, 6, 12, 24, and 36.

  • If you set PeriodUnit to Month, the default value is 1.
  • If you set PeriodUnit to Year, the default value is 12.
Note This parameter is required if you set AutoRenew to true.
1

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.The specified parameter PrivatePoolOptions.Id does not exist
400InvalidParameter.PeriodUnitThe specified PeriodUnit is invalid.The specified PeriodUnit is invalid
400InvalidParameter.PeriodThe specified parameter Period or PeriodUnit is invalid.The specified Period or PeriodUnit parameter does not meet the requirements.
400InvalidParameter.PrivatePoolOptionsIdThe specified parameter PrivatePoolOptions.Id is invalid.The specified parameter PrivatePoolOptions.Id is invalid
400InvalidAutoRenewPeriod.ValueNotSupportedThe specified autoRenewPeriod is invalid.The specified auto-renewal duration 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.
403InvalidOperation.PackageTypeUnsupportedNot support to renew this type of resource package.Not support to renew this type of resource package.
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.The specified private pool does not exist

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

Change history

Change timeSummary of changesOperation
2025-03-17The Error code has changedView Change Details
2025-02-19The Error code has changedView Change Details
2025-02-13The Error code has changed. The request parameters of the API has changedView Change Details