All Products
Search
Document Center

Enterprise Distributed Application Service:ModifyScalingRule

Last Updated:Jan 08, 2024

Modifies the scaling rule for an application.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Debug

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
edas:ManageApplicationWrite
  • Application
    acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}/application/{#AppId}
    none
none

Request syntax

POST /pop/v5/app/scaling_rules

PUT /pop/v5/app/scaling_rules

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The ID of the application.

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

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

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

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

  • OR: one of the conditions
  • AND: all conditions
"OR"
InEnablebooleanNo

Specifies whether to allow scale-ins.

  • true: allows scale-ins.
  • false: does not allow scale-ins.
true
InCpuintegerNo

The CPU utilization that triggers a scale-in.

50
InDurationintegerNo

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

50
InInstanceNumintegerNo

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

3
InLoadintegerNo

The system load that triggers a scale-in.

50
InRTintegerNo

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

50
InStepintegerNo

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

1
OutConditionstringNo

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

  • OR: one of the conditions
  • AND: all conditions
"OR"
OutCPUintegerNo

The CPU utilization that triggers a scale-out.

50
OutDurationintegerNo

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

50
OutEnablebooleanNo

Specifies whether to allow scale-outs.

true
OutInstanceNumintegerNo

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

10
OutLoadintegerNo

The system load that triggers a scale-out.

50
OutRTintegerNo

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

0
OutStepintegerNo

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

0
ResourceFromstringNo

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"
MultiAzPolicystringNo

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"
VpcIdstringNo

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*****"
VSwitchIdsstringNo

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

"vsw-bp1ldxs3d4fd*****"
ScalingPolicystringNo

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"
TemplateInstanceIdstringNo

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"
TemplateInstanceNamestringNo

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"
PasswordstringNo

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*****"
KeyPairNamestringNo

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"
AcceptEULAbooleanNo

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

true
TemplateIdstringNo

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*****"
TemplateVersionintegerNo

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 parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code that is returned.

200
Messagestring

The message that is returned.

success
RequestIdstring

The ID of the request.

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

Examples

Sample success responses

JSONformat

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

Error codes

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