Querying AS Policy and Instance Quotas

Function

This interface is used to query the total quotas and used quotas of AS policies and instances of a specified AS group by group ID.

URI

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

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.

Request

None

Example Request

This example queries the total quotas and used quotas of the AS policies and instances in the AS group with ID e5d27f5c-dd76-4a61-b4bc-a67c5686719a.

GET https://{Endpoint}/autoscaling-api/v1/{project_id}/quotas/e5d27f5c-dd76-4a61-b4bc-a67c5686719a

Response

Table 2 Response parameters

Parameter

Type

Description

quotas

quotas object

Specifies quota details. For details, see Table 3.

Table 3 quotas field description

Parameter

Type

Description

resources

Array of resources objects

Specifies resources. For details, see Table 4.

Table 4 resources field description

Parameter

Type

Description

type

String

Specifies the quota type.

  • scaling_Policy: indicates AS policies.
  • scaling_Instance: indicates instances.

used

Integer

Specifies the used quota.

quota

Integer

Specifies the total quota.

max

Integer

Specifies the quota upper limit.

min

Integer

Specifies the quota lower limit.

Example Response

{
    "quotas": {
        "resources": [
            {
                "type": "scaling_Policy",
                "used": 2,
                "quota": 50,
                "max": 50,
                "min": 0
            },
            {
                "type": "scaling_Instance",
                "used": 0,
                "quota": 200,
                "max": 1000,
                "min": 0
            }
        ]
    }
}

Returned Values

Error Codes

See Error Codes.