All Products
Search
Document Center

Enterprise Distributed Application Service:GetScalingRules

Last Updated:Dec 22, 2025

Queries scaling rules.

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

get

*Application

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

None None

Request syntax

GET /pop/v5/app/scalingRules HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The ID of the application.

33e39be9-3e5f-*********

GroupId

string

Yes

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

d8bb9d60-9**************

Mode

string

No

The type of the scaling rule. You can leave this parameter empty. Valid values:

  • SCALE_IN: scale-in rules

  • SCALE_OUT: scale-out rules

SCALE_IN

Response elements

Element

Type

Description

Example

object

The content that is returned.

Code

integer

The HTTP status code that is returned.

200

Message

string

The message that is returned.

success

UpdateTime

integer

The time when the scaling rule was last updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1574251601785

RequestId

string

The ID of the request.

D16979DC-4D42-***********

Data

object

The data that is returned.

OversoldFactor

integer

The overcommit ratio supported by a Docker cluster. Valid values:

  • 1: 1:1, which means that resources are not overcommitted.

  • 2: 1:2, which means that resources are overcommitted by 1:2.

  • 4: 1:4, which means that resources are overcommitted by 1:4.

  • 8: 1:8, which means that resources are overcommitted by 1:8.

1

VpcId

string

The ID of the virtual private cloud (VPC).

vpc-wz9b246z******

UpdateTime

integer

The time when the scaling rule was last updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1574251601785

ClusterType

integer

The type of the cluster. Valid values:

  • 0: regular Docker cluster

  • 1: Swarm cluster (deprecated)

  • 2: Elastic Compute Service (ECS) cluster

  • 3: self-managed Kubernetes cluster in EDAS

  • 4: cluster in which Pandora automatically registers applications

  • 5: Container Service for Kubernetes (ACK) clusters

2

RuleList

object

Rule

array<object>

The array data of the scaling rule.

object

The object data of the scaling rule.

VpcId

string

The ID of the VPC.

vpc-wz9b246z******

UpdateTime

integer

The time when the scaling rule was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1574251601785

CreateTime

integer

The time when the scaling rule was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1574251601801

Rt

integer

The service latency that triggers the scaling rule. Unit: milliseconds.

1

SpecId

string

The ID of the specification.

03f493c0-xxxx-xxxx-xxxx-12e85cadeb41

MultiAzPolicy

string

The policy of auto scaling across multiple zones. 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

ResourceFrom

string

The source of the instance that you want to add during a scale-out. Valid values:

  • NEW: Elastic resources are used.

  • AVAILABLE: The existing resources are used.

  • AVAILABLE_FIRST: The existing resources are used first.

AVAILABLE

Mode

string

The type of the scaling rule. Valid values:

  • SCALE_IN: scale-in rules

  • SCALE_OUT: scale-out rules

SCALE_OUT

LoadNum

integer

The system load that triggers the scaling rule. The system load is evaluated based on the number of processes that are being executed by CPUs and the number of processes that wait to be executed by CPUs.

1

TemplateVersion

integer

The version of the launch template.

1143542

Step

integer

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

1

Cond

string

The relationship among the conditions that trigger the scaling rule.

  • OR: one of the conditions

  • AND: all conditions

OR

Cpu

integer

The minimum CPU utilization that triggers the scaling rule.

1

GroupId

string

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

d8bb9d60-91b5-4cdf-****-************

InstNum

integer

The maximum number of instances in the group when a scale-out is performed, or the minimum number of instances in the group when a scale-in is performed.

2

AppId

string

The ID of the application.

33e39be9-3e5f-*********

Duration

integer

The duration of the scaling rule. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1574251601

VSwitchIds

string

The IDs of the vSwitches. The IDs of multiple vSwitches are separated by commas (,).

vsw-mxxxxkxxxx4xxxxwbionj

MetricType

string

The type of the metric.

HSF

TemplateId

string

The ID of the launch template.

lt-bp1xxxxn73pxxxxf83l

Enable

boolean

Indicates whether scale-ins or scale-outs are allowed. Valid values:

  • true: Scale-ins or scale-outs are allowed.

  • false: Scale-ins or scale-outs are disallowed.

true

Examples

Success response

JSON format

{
  "Code": 200,
  "Message": "success",
  "UpdateTime": 1574251601785,
  "RequestId": "D16979DC-4D42-***********",
  "Data": {
    "OversoldFactor": 1,
    "VpcId": "vpc-wz9b246z******",
    "UpdateTime": 1574251601785,
    "ClusterType": 2,
    "RuleList": {
      "Rule": [
        {
          "VpcId": "vpc-wz9b246z******",
          "UpdateTime": 1574251601785,
          "CreateTime": 1574251601801,
          "Rt": 1,
          "SpecId": "03f493c0-xxxx-xxxx-xxxx-12e85cadeb41",
          "MultiAzPolicy": "PRIORITY",
          "ResourceFrom": "AVAILABLE",
          "Mode": "SCALE_OUT",
          "LoadNum": 1,
          "TemplateVersion": 1143542,
          "Step": 1,
          "Cond": "OR",
          "Cpu": 1,
          "GroupId": "d8bb9d60-91b5-4cdf-****-************",
          "InstNum": 2,
          "AppId": "33e39be9-3e5f-*********",
          "Duration": 1574251601,
          "VSwitchIds": "vsw-mxxxxkxxxx4xxxxwbionj",
          "MetricType": "HSF",
          "TemplateId": "lt-bp1xxxxn73pxxxxf83l",
          "Enable": true
        }
      ]
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.