All Products
Search
Document Center

Enterprise Distributed Application Service:GetScalingRules

Last Updated:Mar 01, 2024

Queries scaling rules.

Debugging

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

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

Request syntax

GET /pop/v5/app/scalingRules

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The ID of the application.

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

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

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

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 parameters

ParameterTypeDescriptionExample
object

The content that is returned.

Codeinteger

The HTTP status code that is returned.

200
Messagestring

The message that is returned.

success
UpdateTimelong

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
RequestIdstring

The ID of the request.

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

The data that is returned.

OversoldFactorinteger

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
VpcIdstring

The ID of the virtual private cloud (VPC).

vpc-wz9b246z******
UpdateTimelong

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
ClusterTypeinteger

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
RuleListobject []

The array data of the scaling rule.

VpcIdstring

The ID of the VPC.

vpc-wz9b246z******
UpdateTimelong

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
CreateTimelong

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
Rtinteger

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

1
SpecIdstring

The ID of the specification.

03f493c0-xxxx-xxxx-xxxx-12e85cadeb41
MultiAzPolicystring

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
ResourceFromstring

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
Modestring

The type of the scaling rule. Valid values:

  • SCALE_IN: scale-in rules
  • SCALE_OUT: scale-out rules
SCALE_OUT
LoadNuminteger

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
TemplateVersioninteger

The version of the launch template.

1143542
Stepinteger

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

1
Condstring

The relationship among the conditions that trigger the scaling rule.

  • OR: one of the conditions
  • AND: all conditions
OR
Cpuinteger

The minimum CPU utilization that triggers the scaling rule.

1
GroupIdstring

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

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

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
AppIdstring

The ID of the application.

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

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
VSwitchIdsstring

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

vsw-mxxxxkxxxx4xxxxwbionj
MetricTypestring

The type of the metric.

HSF
TemplateIdstring

The ID of the launch template.

lt-bp1xxxxn73pxxxxf83l
Enableboolean

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

Sample success responses

JSONformat

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

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