Querying AS Quotas

Function

This API is used to query the total quotas and used quotas of AS groups, AS configurations, bandwidth scaling policies, AS policies, and instances for a specified tenant.

URI

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

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Request

None

Example Request

This example queries the total quotas and used quotas of AS groups, AS configurations, bandwidth scaling policies, AS policies, and instances for a specified tenant.

GET https://{Endpoint}/autoscaling-api/v1/{project_id}/quotas

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_Group: AS group quota
  • scaling_Config: AS configuration quota
  • scaling_Policy: AS policy quota
  • scaling_Instance: instance quota
  • bandwidth_scaling_policy: bandwidth scaling policy quota.

used

Integer

Specifies the used amount of the quota.

When type is set to scaling_Policy or scaling_Instance, this parameter is reserved, and the system returns -1 as the parameter value. You can query the used quota of AS policies and AS instances in a specified AS group. For details, see Querying AS Policy and Instance Quotas.

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_Group",
                "used": 2,
                "quota": 25,
                "max": 50,
                "min": 0
            },
            {
                "type": "scaling_Config",
                "used": 3,
                "quota": 100,
                "max": 200,
                "min": 0
            },
            {
                "type": "scaling_Policy",
                "used": -1,
                "quota": 50,
                "max": 50,
                "min": 0
            },
            {
                "type": "scaling_Instance",
                "used": -1,
                "quota": 200,
                "max": 1000,
                "min": 0
            },
            {
                "type": "bandwidth_scaling_policy",
                "used": 1,
                "quota": 10,
                "max": 100,
                "min": 0
            }
        ]
    }
}

Returned Values

Error Codes

See Error Codes.