All Products
Search
Document Center

Elastic Compute Service:ModifyElasticityAssurance

Última atualização: Aug 28, 2026

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

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:ModifyElasticityAssurance

update

*ElasticityAssurance

acs:ecs:{#regionId}:{#accountId}:elasticityassurance/{#ElasticityAssuranceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

PrivatePoolOptions.Id

string

Yes

The ID of the elasticity assurance.

eap-bp67acfmxazb4****

PrivatePoolOptions.Name

string

No

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

Description

string

No

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.

InstanceAmount

integer

No

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

ClientToken

string

No

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

RecurrenceRules

array<object>

No

The assurance schedules of the time-segmented elasticity assurance.

Note

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

object

No

The assurance schedule of the time-segmented elasticity assurance.

Note

The modified assurance schedule takes effect the next day after the modification.

RecurrenceType

string

No

The type of the assurance schedule. Valid values:

  • Daily

  • Weekly

  • Monthly

Note

If you specify this parameter, you must specify RecurrenceType and RecurrenceValue.

Daily

RecurrenceValue

string

No

The days of the week or month on which the capacity reservation of the time-segmented elasticity assurance 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. 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. 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. 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

If this parameter is specified, you must specify RecurrenceType and RecurrenceValue.

5

StartHour

integer

No

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

Note

You must specify both StartHour and EndHour. The EndHour value must be at least 4 hours later than the StartHour value.

4

EndHour

integer

No

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

10

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidRecurrenceRules.CountLimitExceeded The count of RecurrenceRules exceeds the limit. The number of parameter RecurrenceRules exceeds the limit value.
400 InvalidRecurrenceRules.Unsupported The specified parameter RecurrenceRules does not support for this resource package. The resource bundle does not support the specified parameter RecurrenceRules.
400 InvalidRecurrenceRulesStartHourEndHour.TooShort The 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.
400 InvalidParameter.RecurrenceRulesStartHourEndHour The 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.
400 InvalidParameter.RecurrenceRulesRecurrenceValueMonthly The specified parameter RecurrenceRules.RecurrenceValue for Monthly is invalid. The parameter RecurrenceRules.RecurrenceValue specified for the RecurrenceRules.RecurrenceType = Monthly does not conform to the specification.
400 InvalidParameter.RecurrenceRulesRecurrenceValueWeekly The specified parameter RecurrenceRules.RecurrenceValue for Weekly is invalid. The parameter RecurrenceRules.RecurrenceType specified for RecurrenceRules.RecurrenceValue = Weekly is out of specification.
400 InvalidParameter.RecurrenceRulesRecurrenceValueDaily The specified parameter RecurrenceRules.RecurrenceValue for Daily is invalid. The parameter RecurrenceRules.RecurrenceType specified for RecurrenceRules.RecurrenceValue = Daily does not conform to the specification.
400 InvalidParameter.RecurrenceRulesRecurrenceType The specified parameter RecurrenceRules.RecurrenceType is invalid. The specified parameter RecurrenceRules.RecurrenceType does not conform to specification.
400 InvalidInstanceAmount.ValueNotSupported The specified parameter InstanceAmount is not valid.
400 InvalidDescription.ValueNotSupported The specified Description is invalid.
400 InvalidEndTime.ValueNotSupported The specified EndTime is invalid.
400 InvalidStartTime.ValueNotSupported The specified StartTime is invalid.
400 InvalidParameter.PrivatePoolOptions.Name The parameter PrivatePoolOptions.Name is invalid. The specified parameter PrivatePoolOptions.Name is invalid.
400 InvalidParameter.ClientToken The parameter ClientToken is invalid. The specified parameter ClientToken is invalid.
400 InvalidParameter.Description The parameter Description is invalid. The specified parameter Description is invalid.
401 InvalidUser.Unauthorized The user is not authorized. The account you are currently using does not have permission.
500 InternalError The request processing has failed due to some unknown error.
403 InvalidOperation.ModifyTotalActiveTimeUnsupported Not support to modify the total active time of resource package. Not support to modify the total active time of resource package.
403 IncorrectPrivatePoolStatus The current status of the private pool does not support this operation. The specified private pool state does not support the operation.
403 OperationDenied.NoStock The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. The requested resources are insufficient.
403 InvalidPrivatePoolOptionsName.ValueNotSupported The specified PrivatePoolOptions.Name is invalid.
403 InvalidPlatform.ValueNotSupported The specified Platform is invalid.
403 OperationDenied.PlatformNotSupported The specified private pool does not support this operation.
403 OperationDenied.EndTimeTypeNotSupported The specified private pool does not support this operation.
403 OperationDenied.StartTimeNotSupported The specified private pool does not support this operation.
403 OperationDenied.InstanceAmountNotSupported The specified private pool does not support this operation.
403 InvalidInstanceAmount.ValueNotSupported The specified InstanceAmount is invalid.
403 InvalidPrivatePoolOptions.Id The specified private pool does not support this operation.
403 InvalidInstanceAmount.LessThanUsedAmount The specified parameter InstanceAmount is less than UsedAmount. The specified parameter InstanceAmount is less than the used capacity.
403 InvalidOperation.InstanceAmountAndOtherAttributesUnsupported Modify InstanceAmount and other attributes simultaneously is not supported. Cannot modify InstanceAmount and other properties simultaneously.
403 QuotaExceed.ElasticityAssuranceCapacity ElasticityAssurance Capacity quota exceeded. ElasticityAssurance Capacity quota exceeded.
404 InvalidPrivatePoolId.NotFound The specified private pool does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.