Querying Instances in an AS Group

Function

This API is used to query instances in an AS group based on search criteria. The results are displayed by page.

URI

GET /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/list

You can type the question mark (?) and ampersand (&) at the end of the URI to define multiple search criteria. Instances in an AS group can be searched by all optional parameters in the following table. For details, see the example request.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

scaling_group_id

Yes

String

Specifies the AS group ID.

life_cycle_state

No

String

Specifies the instance lifecycle status in the AS group.

  • INSERVICE: The instance is enabled.
  • PENDING: The instance is being added to the AS group.
  • REMOVING: The instance is being removed from the AS group.

health_status

No

String

Specifies the instance health status.

  • INITIALIZING: The instance is initializing.
  • NORMAL: The instance is normal.
  • ERROR: The instance is abnormal.

protect_from_scaling_down

No

String

Specifies the instance protection status.

  • true: Instance protection is enabled.
  • false: Instance protection is disabled.

start_number

No

Integer

Specifies the start line number. The default value is 0. The minimum parameter value is 0.

limit

No

Integer

Specifies the number of query records. The default value is 20. The value ranges from 0 to 100.

Request Message

Response Message

Returned Values

Error Codes

See Error Codes.