All Products
Search
Document Center

Enterprise Distributed Application Service:ModifyScalingRule

Last Updated:Dec 22, 2025

Modifies the scaling rule for an application.

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

edas:ManageApplication

update

*Application

acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}/application/{#AppId}

None None

Request syntax

POST /pop/v5/app/scaling_rules HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The ID of the application.

74ee****-db65-4322-a1f6-bcb60e5b****

GroupId

string

Yes

The ID of the instance group to which the application is deployed.

8123db90-880f-486f-****-************

InCondition

string

No

The relationship among the conditions that trigger a scale-in.

  • OR: one of the conditions

  • AND: all conditions

"OR"

InEnable

boolean

No

Specifies whether to allow scale-ins.

  • true: allows scale-ins.

  • false: does not allow scale-ins.

true

InCpu

integer

No

The CPU utilization that triggers a scale-in.

50

InDuration

integer

No

The duration in which the metric threshold is exceeded. Unit: minutes.

50

InInstanceNum

integer

No

The minimum number of instances that must be retained in each group when a scale-in is performed.

3

InLoad

integer

No

The system load that triggers a scale-in.

50

InRT

integer

No

The minimum service latency that triggers a scale-in. The lower limit is 0. Unit: milliseconds.

50

InStep

integer

No

The number of instances that are removed during each scale-in.

1

OutCondition

string

No

The relationship among the conditions that trigger a scale-out.

  • OR: one of the conditions

  • AND: all conditions

"OR"

OutCPU

integer

No

The CPU utilization that triggers a scale-out.

50

OutDuration

integer

No

The duration in which the metric threshold is exceeded. Unit: minutes.

50

OutEnable

boolean

No

Specifies whether to allow scale-outs.

true

OutInstanceNum

integer

No

The maximum number of instances in each group when a scale-out is performed.

10

OutLoad

integer

No

The system load that triggers a scale-out.

50

OutRT

integer

No

The minimum service latency that triggers a scale-out. The lower limit is 0. Unit: milliseconds.

0

OutStep

integer

No

The number of instances that are added during each scale-out.

0

ResourceFrom

string

No

The source of the instance to be added during a scale-out. Valid values:

  • NEW: elastic resources

  • AVAILABLE: existing resources If you prefer existing resources to elastic resources, set this parameter to AVAILABLE_FIRST.

If you set this parameter to NEW or AVAILABLE_FIRST, you must specify the auto-scaling parameters. If you set this parameter to NEW, instances are created based on a launch template or the specifications of an existing instance.

"AVAILABLE"

MultiAzPolicy

string

No

The multi-zone scaling policy. Valid values:

  • PRIORITY: The vSwitch that is first selected has the highest priority.

  • BALANCE: This policy evenly distributes instances across zones in which the vSwitches reside.

"PRIORITY"

VpcId

string

No

The ID of the virtual private cloud (VPC) that is associated with the instances created based on a launch template or the specifications of an existing instance.

"vpc-bp1j55oz3bg*****"

VSwitchIds

string

No

The IDs of the vSwitches that are associated with the VPC. Separate multiple IDs with commas (,).

"vsw-bp1ldxs3d4fd*****"

ScalingPolicy

string

No

The instance handling mode during a scale-in. Valid values:

  • release: When a scale-in is performed, instances that are no longer used are released.

  • recycle: When a scale-in is performed, instances that are no longer used are stopped and reclaimed.

"release"

TemplateInstanceId

string

No

The ID of the instance whose specifications are used to create instances during a scale-out. This parameter is valid only when you set the OutEnable parameter to true.

"1"

TemplateInstanceName

string

No

The name of the instance whose specifications are used to create instances during a scale-out. This parameter takes effect only if you specify the TemplateInstanceId parameter.

"tpl-tdy218"

Password

string

No

The password that is used to log on to the instance. This parameter takes effect only if you choose to create instances based on the specifications of an existing instance during a scale-out.

"Pwd*****"

KeyPairName

string

No

The key pair that is used to log on to the instance. This parameter takes effect only if you choose to create instances based on the specifications of an existing instance during a scale-out.

"tdy218"

AcceptEULA

boolean

No

Set the value to true if scale-outs are allowed.

true

TemplateId

string

No

The ID of the launch template that is used to create instances during a scale-out. This parameter takes effect only if you set the OutEnable parameter to true. This parameter takes precedence over the TemplateInstanceId parameter.

"lt-wz9hkhn8wp*****"

TemplateVersion

integer

No

The version of the launch template that is used to create instances during a scale-out. This parameter takes effect only if you set the OutEnable parameter to true. To use the default template version, set this parameter to -1. Otherwise, set this parameter to the version that you want to use.

-1

Response elements

Element

Type

Description

Example

object

Code

integer

The HTTP status code that is returned.

200

Message

string

The message that is returned.

success

RequestId

string

The ID of the request.

CB36E997-FE54-476C-8C0D-********

Examples

Success response

JSON format

{
  "Code": 200,
  "Message": "success",
  "RequestId": "CB36E997-FE54-476C-8C0D-********"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.