All Products
Search
Document Center

Enterprise Distributed Application Service:EnableApplicationScalingRule

Last Updated:Dec 22, 2025

Enables an auto scaling policy 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

PUT /pop/v1/eam/scale/enable_application_scaling_rule HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

No

The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see ListApplication.

78194c76-3dca-418e-a263-cccd1ab4****

ScalingRuleName

string

No

The name of the auto scaling policy.

cpu-trigger

Response elements

Element

Type

Description

Example

object

Code

integer

The HTTP status code.

200

Message

string

The returned message.

success

RequestId

string

The ID of the request.

a5281053-08e4-47a5-b2ab-5c0323de7b5a

AppScalingRule

object

The information about the auto scaling policy.

UpdateTime

integer

The time when the auto scaling policy was last modified.

23212323123

CreateTime

integer

The time when the auto scaling policy was created.

23212323123

AppId

string

The ID of the application to which the auto scaling policy belongs.

78194c76-3dca-418e-a263-cccd1ab4****

LastDisableTime

integer

The time when the auto scaling policy was last disabled.

23212323123

MaxReplicas

integer

This parameter is deprecated.

1

ScaleRuleEnabled

boolean

Indicates whether the auto scaling policy is enabled. Valid values:

  • true: The auto scaling policy is enabled.

  • false: The auto scaling policy is disabled.

true

ScaleRuleType

string

The type of the auto scaling policy. The value is fixed to trigger.

trigger

MinReplicas

integer

This parameter is deprecated.

1

ScaleRuleName

string

The name of the auto scaling policy.

cpu-trigger

Metric

object

This parameter is deprecated.

MinReplicas

integer

This parameter is deprecated.

1

MaxReplicas

integer

This parameter is deprecated.

1

Metrics

array<object>

This parameter is deprecated.

object

MetricTargetAverageUtilization

integer

This parameter is deprecated.

12

MetricType

string

This parameter is deprecated.

cpu

Trigger

object

The configurations of the trigger.

MinReplicas

integer

The minimum number of replicas. The lower limit is 0.

1

MaxReplicas

integer

The maximum number of replicas. The upper limit is 1000.

122

Triggers

array<object>

The list of triggers.

object

Type

string

The type of the trigger. Valid values: cron and app_metric.

cron

MetaData

string

The metadata of the trigger.

{"dryRun":true}

Name

string

The name of the trigger.

cpu

Examples

Success response

JSON format

{
  "Code": 200,
  "Message": "success",
  "RequestId": "a5281053-08e4-47a5-b2ab-5c0323de7b5a",
  "AppScalingRule": {
    "UpdateTime": 23212323123,
    "CreateTime": 23212323123,
    "AppId": "78194c76-3dca-418e-a263-cccd1ab4****",
    "LastDisableTime": 23212323123,
    "MaxReplicas": 1,
    "ScaleRuleEnabled": true,
    "ScaleRuleType": "trigger",
    "MinReplicas": 1,
    "ScaleRuleName": "cpu-trigger",
    "Metric": {
      "MinReplicas": 1,
      "MaxReplicas": 1,
      "Metrics": [
        {
          "MetricTargetAverageUtilization": 12,
          "MetricType": "cpu"
        }
      ]
    },
    "Trigger": {
      "MinReplicas": 1,
      "MaxReplicas": 122,
      "Triggers": [
        {
          "Type": "cron",
          "MetaData": "{\"dryRun\":true}",
          "Name": "cpu"
        }
      ]
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.