All Products
Search
Document Center

Elastic Compute Service:ModifyElasticityAssurance

Last Updated:Apr 25, 2025

Modifies information about an elasticity assurance, including the name, description, and capacity. Only capacity scale-in is supported .

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:ModifyElasticityAssuranceupdate
*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.IdstringYes

The ID of the elasticity assurance.

eap-bp67acfmxazb4****
PrivatePoolOptions.NamestringNo

The name of the elasticity assurance. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain digits, colons (:), underscores (_), and hyphens (-).

eapTestName
DescriptionstringNo

The description of the elasticity assurance. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

This is description.
InstanceAmountintegerNo

The total number of instances for which you want to reserve capacity. Valid values: the number of created instances to 1000. This parameter is mutually exclusive with other parameters in the same request.

10
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
RecurrenceRulesarray<object>No

The assurance schedules based on which the capacity reservation takes effect.

Note Time-segmented elasticity assurances are available only in specific regions and to specific users. To use time-segmented elasticity assurances, submit a ticket.
objectNo

The assurance schedule based on which the capacity reservation takes effect.

Note
  • Make sure that the validity period of the elasticity assurance remains unchanged. For information about the modification examples, see the Modify the assurance schedule section of the "Time-segmented elasticity assurances" topic.

  • Modification to the assurance schedule takes effect on the next day.

RecurrenceTypestringNo

The type of the assurance schedule. Valid values:

  • Daily
  • Weekly
  • Monthly
Note You must specify both RecurrenceType and RecurrenceValue.
Daily
RecurrenceValuestringNo

The days of the week or month on which the capacity reservation takes effect or the interval, in number of days, at which the capacity reservation takes effect.

  • If you set RecurrenceType to Daily, you can specify only one value for this parameter. Valid values: 1 to 31. The value specifies that the capacity reservation takes effect every few days.
  • If you set RecurrenceType to Weekly, you can specify multiple values for this parameter. Separate the values with commas (,). Valid values: 0, 1, 2, 3, 4, 5, and 6, which specify Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday, respectively. Example: 1,2, which specifies that the capacity reservation takes effect on Monday and Tuesday.
  • If you set RecurrenceType to Monthly, you can specify two values in the A-B format for this parameter. Valid values of A and B: 1 to 31. B must be greater than or equal to A. Example: 1-5, which specifies that the capacity reservation takes effect every day from the first day up to the fifth day of each month.
Note You must specify both RecurrenceType and RecurrenceValue.
5
StartHourintegerNo

The start time of the assurance period for the capacity reservation. Specify an on-the-hour point in time.

Note You must specify both StartHour and EndHour. EndHour must be at least four hours later than StartHour.
4
EndHourintegerNo

The end time of the assurance period for the capacity reservation. Specify an on-the-hour point in time.

10

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

8455DD10-84F8-43C9-8365-5F448EB169B6

Examples

Sample success responses

JSONformat

{
  "RequestId": "8455DD10-84F8-43C9-8365-5F448EB169B6"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidRecurrenceRules.CountLimitExceededThe count of RecurrenceRules exceeds the limit.The number of parameter RecurrenceRules exceeds the limit value.
400InvalidRecurrenceRules.UnsupportedThe specified parameter RecurrenceRules does not support for this resource package.The resource bundle does not support the specified parameter RecurrenceRules.
400InvalidRecurrenceRulesStartHourEndHour.TooShortThe recurrence hour between RecurrenceRules.StartHour and RecurrenceRules.EndHour is too short.The effective time between parameter RecurrenceRules.StartHour and RecurrenceRules.EndHour is less than the minimum requirement.
400InvalidParameter.RecurrenceRulesStartHourEndHourThe specified parameter RecurrenceRules.StartHour or RecurrenceRules.EndHour is invalid.The parameter RecurrenceRules.StartHour or RecurrenceRules.EndHour specified for the RecurrenceRules does not conform to the specification.
400InvalidParameter.RecurrenceRulesRecurrenceValueMonthlyThe specified parameter RecurrenceRules.RecurrenceValue for Monthly is invalid.The parameter RecurrenceRules.RecurrenceValue specified for the RecurrenceRules.RecurrenceType = Monthly does not conform to the specification.
400InvalidParameter.RecurrenceRulesRecurrenceValueWeeklyThe specified parameter RecurrenceRules.RecurrenceValue for Weekly is invalid.The parameter RecurrenceRules.RecurrenceType specified for RecurrenceRules.RecurrenceValue = Weekly is out of specification.
400InvalidParameter.RecurrenceRulesRecurrenceValueDailyThe specified parameter RecurrenceRules.RecurrenceValue for Daily is invalid.The parameter RecurrenceRules.RecurrenceType specified for RecurrenceRules.RecurrenceValue = Daily does not conform to the specification.
400InvalidParameter.RecurrenceRulesRecurrenceTypeThe specified parameter RecurrenceRules.RecurrenceType is invalid.The specified parameter RecurrenceRules.RecurrenceType does not conform to specification.
400InvalidInstanceAmount.ValueNotSupportedThe specified parameter InstanceAmount is not valid.The specified parameter InstanceAmount is invalid.
400InvalidDescription.ValueNotSupportedThe specified Description is invalid.-
400InvalidEndTime.ValueNotSupportedThe specified EndTime is invalid.-
400InvalidStartTime.ValueNotSupportedThe specified StartTime is invalid.-
400InvalidParameter.PrivatePoolOptions.NameThe parameter PrivatePoolOptions.Name is invalid.The specified parameter PrivatePoolOptions.Name is invalid.
400InvalidParameter.ClientTokenThe parameter ClientToken is invalid.The specified parameter ClientToken is invalid.
400InvalidParameter.DescriptionThe parameter Description is invalid.The specified parameter Description is invalid.
401InvalidUser.UnauthorizedThe user is not authorized.The account you are currently using does not have permission.
403InvalidOperation.ModifyTotalActiveTimeUnsupportedNot support to modify the total active time of resource package.Not support to modify the total active time of resource package.
403IncorrectPrivatePoolStatusThe current status of the private pool does not support this operation.The specified private pool state does not support the operation.
403OperationDenied.NoStockThe requested resource is sold out in the specified zone; try other types of resources or other regions and zones.The requested resources are insufficient.
403InvalidPrivatePoolOptionsName.ValueNotSupportedThe specified PrivatePoolOptions.Name is invalid.-
403InvalidPlatform.ValueNotSupportedThe specified Platform is invalid.-
403OperationDenied.PlatformNotSupportedThe specified private pool does not support this operation.-
403OperationDenied.EndTimeTypeNotSupportedThe specified private pool does not support this operation.-
403OperationDenied.StartTimeNotSupportedThe specified private pool does not support this operation.-
403OperationDenied.InstanceAmountNotSupportedThe specified private pool does not support this operation.-
403InvalidInstanceAmount.ValueNotSupportedThe specified InstanceAmount is invalid.-
403InvalidPrivatePoolOptions.IdThe specified private pool does not support this operation.-
403InvalidPrivatePoolOptions.IdThe specified PrivatePoolOptions.Id is invalid.The specified private pool is invalid
403InvalidInstanceAmount.LessThanUsedAmountThe specified parameter InstanceAmount is less than UsedAmount.The specified parameter InstanceAmount is less than the used capacity.
403InvalidOperation.InstanceAmountAndOtherAttributesUnsupportedModify InstanceAmount and other attributes simultaneously is not supported.Cannot modify InstanceAmount and other properties simultaneously.
404InvalidPrivatePoolId.NotFoundThe specified private pool does not exist.The specified private pool does not exist
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
2025-02-19API Description Update. The Error code has changed. The request parameters of the API has changedView Change Details
2024-09-27The Error code has changed. The request parameters of the API has changedView Change Details
2023-12-06The Error code has changedView Change Details