Updated on 2026-10-13 GMT+08:00

Querying an AS Group

Function

This API is used to query details about a specified AS group by group ID.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

URI

GET /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Specifies the project ID. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

scaling_group_id

Yes

String

Definition

Specifies the AS group ID. For details about how to obtain it, see Querying AS Groups.

Constraints

N/A

Range

N/A

Default Value

N/A

Request

None

Example Request

This example queries the details about the AS group with ID d4e50321-3777-4135-97f8-9f5e9714a4b0.

GET https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_group/d4e50321-3777-4135-97f8-9f5e9714a4b0

Response

Table 2 Response parameters

Parameter

Type

Description

scaling_group

scaling_groups object

Definition

Specifies details about the AS group. For details, see Table 3.

Table 3 scaling_groups field description

Parameter

Type

Description

scaling_group_name

String

Definition

Specifies the AS group name.

Range

It contains 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

scaling_group_id

String

Definition

Specifies the AS group ID.

Range

N/A

scaling_group_status

String

Definition

Specifies the AS group status.

Range

  • INSERVICE: The AS group is normal.
  • PAUSED: The AS group is paused.
  • ERROR: The AS group is abnormal.
  • DELETING: The AS group is being deleted.
  • FREEZED: The AS group is frozen.

scaling_configuration_id

String

Definition

Specifies the AS configuration ID.

Range

N/A

scaling_configuration_name

String

Definition

Specifies the AS configuration name.

Range

The value can contain 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

current_instance_number

Integer

Definition

Specifies the number of current instances in the AS group.

Range

N/A

desire_instance_number

Integer

Definition

Specifies the expected number of instances in the AS group.

Range

N/A

min_instance_number

Integer

Definition

Specifies the minimum number of instances in the AS group.

Range

N/A

max_instance_number

Integer

Definition

Specifies the maximum number of instances in the AS group.

Range

An integer from 0 to 300

cool_down_time

Integer

Definition

Specifies the cooldown period, in seconds.

Range

0s to 86,400s

lb_listener_id

String

Definition

Specifies the ID of a typical ELB listener. ELB listener IDs are separated using a comma (,).

Range

N/A

lbaas_listeners

Array of lbaas_listeners objects

Definition

Specifies enhanced load balancers. For details, see Table 4.

available_zones

Array of strings

Definition

Specifies AZ information. The ECSs added in a scaling action will be created in a specified AZ. If you do not specify an AZ, the system automatically specifies one. For details, see Regions and Endpoints.

networks

Array of networks objects

Definition

Specifies network information. For details, see Table 5.

security_groups

Array of security_groups objects

Definition

Specifies security group information. For details, see Table 8.

create_time

String

Definition

Specifies the time when the AS group was created, in UTC format.

Range

N/A

vpc_id

String

Definition

Specifies the ID of the VPC that the AS group belongs to.

Range

N/A

detail

String

Definition

Specifies details about the AS group. If a scaling action fails, this parameter is used to record errors.

Range

N/A

is_scaling

Boolean

Definition

Specifies the scaling flag of the AS group.

Range

  • true: The AS group is performing a scaling action.
  • false: The AS group is not performing a scaling action.

health_periodic_audit_method

String

Definition

Specifies the health check method.

Range

ELB_AUDIT and NOVA_AUDIT

  • ELB_AUDIT: indicates the ELB health check, which takes effect in an AS group with a listener.
  • NOVA_AUDIT: indicates the ECS health check, which is the health check method that comes with AS.

health_periodic_audit_time

Integer

Definition

Specifies the health check interval, in minutes.

Range

The value can be 1, 5, 15, 60, or 180 minutes. If the value is set to 0, health check can be performed every 10 seconds.

health_periodic_audit_grace_period

Integer

Definition

Specifies the grace period for health check, in seconds.

Range

0s to 86,400s

instance_terminate_policy

String

Definition

Specifies the instance removal policy.

Range

  • OLD_CONFIG_OLD_INSTANCE (default): The earlier-created instances based on the earlier-created AS configurations are removed first.
  • OLD_CONFIG_NEW_INSTANCE: The later-created instances based on the earlier-created AS configurations are removed first.
  • OLD_INSTANCE: The earlier-created instances are removed first.
  • NEW_INSTANCE: The later-created instances are removed first.

delete_publicip

Boolean

Definition

Specifies whether to delete the EIP bound to an ECS when the ECS is deleted.

Range

  • true: The EIPs bound to ECSs will be deleted when the ECSs are removed.
  • false: The EIPs bound to ECSs will be unbound but will not be deleted when the ECSs are removed.

delete_volume

Boolean

Definition

Specifies whether to delete the data disks attached to an ECS when the ECS is deleted.

Range

  • true: The data disks attached to ECSs will be deleted when the ECSs are removed. If a data disk is billed on a yearly/monthly basis, it will not be deleted when an ECS is removed.
  • false: The data disks attached to the ECSs will be detached but will not be deleted when the ECSs are removed.

cloud_location_id

String

Definition

Specifies the cloud location that the AS group belongs to. This parameter is reserved.

Range

N/A

enterprise_project_id

String

Definition

Specifies the enterprise project ID.

Range

  • If the value is 0 or left blank, the AS group belongs to the default enterprise project.
  • If the value is a UUID, the AS group belongs to the enterprise project corresponding to the UUID.

activity_type

String

Definition

Specifies the type of the AS action.

Range

  • NORMAL: common scaling action
  • MANUAL_REMOVE: manually removing instances from an AS group
  • MANUAL_DELETE: manually removing and deleting instances from an AS group
  • MANUAL_ADD: manually adding instances to an AS group
  • ELB_CHECK_DELETE: removing and deleting instances from an AS group based on ELB health check results
  • AUDIT_CHECK_DELETE: removing and deleting instances from an AS group based on audits
  • DIFF: scaling action triggered by inconsistency between the number of expected instances and the actual number of instances
  • MODIFY_ELB: load balancer migration
  • ENTER_STANDBY: setting instances to standby mode
  • EXIT_STANDBY: canceling standby mode for instances

multi_az_priority_policy

String

Definition

Specifies the priority policy used to select target AZs when adjusting the number of instances in the AS group.

Range

  • EQUILIBRIUM_DISTRIBUTE (default): During a scaling action, the system preferentially distributes instances evenly across AZs listed in available_zones. If it fails in the target AZ, it selects another AZ based on the PICK_FIRST policy.
  • PICK_FIRST: During a scaling action, target AZs are determined in the order in the available_zones list.

description

String

Definition

Specifies the description of the AS group.

Range

1 to 256 characters, with no restrictions on character types

iam_agency_name

String

Definition

Specifies the agency name. An agency is created by a tenant administrator in Identity and Access Management (IAM) to provide temporary credentials for the ECS service to access other cloud services.

Range

1 to 64 characters, with no restrictions on character types

tags

Array of tags objects

Definition

Specifies the tags added for the AS group. For details, see Table 9.

Table 4 lbaas_listeners field description

Parameter

Type

Description

listener_id

String

Definition

Specifies the listener ID.

Range

N/A

pool_id

String

Definition

Specifies the backend server group ID. For details about how to obtain it, see Querying Backend Server Groups.

Range

N/A

protocol_port

Integer

Definition

Specifies the backend protocol port, that is, the port that backend ECSs listen on.

Range

[1, 65535]

weight

Integer

Definition

Specifies the weight, which determines the portion of requests a backend ECS processes when being compared to other backend ECSs added to the same listener.

Range

[0, 100]

protocol_version

String

Definition

Specifies the version of IP addresses used by the backend server group with load balancing configured.

Range

  • ipv4: IPv4 addresses are used.
  • ipv6: IPv6 addresses are used.
Table 5 networks field description

Parameter

Type

Description

id

String

Definition

Specifies the subnet ID.

Range

N/A

ipv6_enable

Boolean

Definition

Whether to enable IPv6.

Range

  • true: IPv6 is enabled for the NIC.
  • false: IPv6 is not enabled for the NIC.

ipv6_bandwidth

ipv6_bandwidth object

Definition

Specifies the IPv6 shared bandwidth. This parameter is left blank by default, indicating that no IPv6 shared bandwidth is bound.

allowed_address_pairs

Array of allowed_address_pairs objects

Definition

Specifies whether to enable source/destination check. For details, see Table 7.

Table 6 ipv6_bandwidth field description

Parameter

Type

Description

id

String

Definition

Specifies the ID of the IPv6 shared bandwidth.

Range

N/A

Table 7 allowed_address_pairs field description

Parameter

Type

Description

ip_address

String

Definition

Specifies whether to enable source/destination check for IP addresses. Source/destination check is enabled by default. This parameter cannot be left blank.

Range

  • To disable this function, set the value to 1.1.1.1/0.
  • To enable this function, set a value other than 1.1.1.1/0.
Table 8 security_groups field description

Parameter

Type

Description

id

String

Definition

Specifies the security group ID.

Range

N/A

Table 9 tags field description

Parameter

Mandatory

Type

Description

key

Yes

String

Definition

Specifies the tag key.

Range

  • It contains a maximum of 36 Unicode characters. The key cannot be left blank.
  • Keys must be unique within the same resource.
  • A tag key can contain only uppercase letters, lowercase letters, digits, underscores (_), and hyphens (-).

value

No

String

Definition

Specifies the tag value.

Range

  • A tag value contains a maximum of 43 Unicode characters and can be left blank.
  • A tag value can contain only uppercase letters, lowercase letters, digits, underscores (_), hyphens (-), and periods (.).

Example Response

{
    "scaling_group": {
      "networks": [
                {
                    "id": "a8327883-6b07-4497-9c61-68d03ee193a",
                    "ipv6_enable": true,
                    "ipv6_bandwidth": 
                        {         
                              "id": "076ee2ff-f23e-4338-b8ac-1bc7278532d5"
                        }
                }
        ],
        "available_zones": [
               "XXXa",
               "XXXb"
        ],
        "detail": null,
        "scaling_group_name": "api_gateway_modify",
        "scaling_group_id": "d4e50321-3777-4135-97f8-9f5e9714a4b0",
        "scaling_group_status": "INSERVICE",
        "scaling_configuration_id": "53579851-3841-418d-a97b-9cecdb663a90",
        "scaling_configuration_name": "press",
        "current_instance_number": 7,
        "desire_instance_number": 8,
        "min_instance_number": 0,
        "max_instance_number": 100,
        "cool_down_time": 900,
        "lb_listener_id": null,
        "security_groups": [
            {
                "id": "23b7b999-0a30-4b48-ae8f-ee201a88a6ab"
            }
        ],
        "create_time": "2015-09-01T08:36:10Z",
        "vpc_id": "3e22f934-800d-4bb4-a588-0b9a76108190",
        "health_periodic_audit_method": "NOVA_AUDIT",
        "health_periodic_audit_time": 5,
        "health_periodic_audit_grace_period": 600,
        "instance_terminate_policy": "OLD_CONFIG_OLD_INSTANCE",
        "is_scaling": true,
        "delete_publicip": false,
        "enterprise_project_id":"c92b1a5d-6f20-43f2-b1b7-7ce35e58e413",
        "activity_type":"MODIFY_ELB",
        "multi_az_priority_policy":"PICK_FIRST",        "iam_agency_name":"test",
        "tags":[{"key":"1"}]
    }
}

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The server failed to process the request.

    401 Unauthorized

    You must enter the username and password to access the requested page.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The server could not find the requested page.

    405 Method Not Allowed

    You are not allowed to use the method specified in the request.

    406 Not Acceptable

    The response generated by the server could not be accepted by the client.

    407 Proxy Authentication Required

    You must use the proxy server for authentication to process the request.

    408 Request Timeout

    The request timed out.

    409 Conflict

    The request could not be processed due to a conflict.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    501 Not Implemented

    Failed to complete the request because the server does not support the requested function.

    502 Bad Gateway

    Failed to complete the request because the request is invalid.

    503 Service Unavailable

    Failed to complete the request because the system is unavailable.

    504 Gateway Timeout

    A gateway timeout error occurred.

Error Codes

See Error Codes.