Querying AS Policies (V2)

Function

This API is used to query all AS policies for a tenant based on search criteria. The results are displayed by page.

The bandwidth scaling policy configured for a released EIP still occupies the quota of bandwidth scaling policy. The policy is only visible to the account and its IAM users with the global permissions.

URI

GET /autoscaling-api/v2/{project_id}/scaling_policy

You can type the question mark (?) and ampersand (&) at the end of the URI to define multiple search criteria. AS policies 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_resource_id

No

String

Specifies the scaling resource ID.

scaling_resource_type

No

String

Specifies the scaling resource type.

  • AS group: SCALING_GROUP
  • Bandwidth: BANDWIDTH

scaling_policy_name

No

String

Specifies the AS policy name.

Supports fuzzy search.

scaling_policy_id

No

String

Specifies the AS policy ID.

scaling_policy_type

No

String

Specifies the AS policy type.

  • ALARM: alarm policy
  • SCHEDULED: scheduled policy
  • RECURRENCE: periodic policy

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.

sort_by

No

String

Specifies the sorting method.

  • POLICY_NAME: AS policies are sorted by name.
  • TRIGGER_CONDITION: AS policies are sorted by trigger condition. For example, in ascending order, alarm policies are first, and others are sorted in ascending order based on the latest triggering time.
  • CREATE_TIME: AS policies are sorted based on the creation time.

order

No

String

Specifies the sorting order.

  • ASC: ascending order
  • DESC: descending order

enterprise_project_id

No

String

Specifies the enterprise project ID. If all_granted_eps is transferred, this API will query AS groups in the enterprise projects that you have permissions to.

alarm_id

No

String

Specifies the alarm rule ID.

Request Message

Response Message

Returned Values

Error Codes

See Error Codes.