Help Center/ Enterprise Switch/ API Reference/ Enterprise Switch/ Querying the Enterprise Switch Quota
Updated on 2025-12-04 GMT+08:00

Querying the Enterprise Switch Quota

Function

This API is used to query the enterprise switch quota of a tenant.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

esw:quota:list

List

-

-

-

-

URI

GET /v3/{project_id}/l2cg/quotas

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

  • Definition: ID of the project to which the enterprise switch belongs.

  • Constraints: N/A

  • Range: N/A

  • Default value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

quotas

Quotas object

  • Definition: Response body for querying the quotas.

  • Constraints: N/A

  • Range: N/A

  • Default value: N/A

request_id

String

  • Definition: Unique request ID.

  • Constraints: The value is in the UUID format.

  • Range: N/A

  • Default value: N/A

Table 3 Quotas

Parameter

Type

Description

resources

Array of QuotaObject objects

  • Definition: The quota information list.

  • Constraints: N/A

  • Range: instance

  • Default value: N/A

Table 4 QuotaObject

Parameter

Type

Description

type

String

  • Definition: The quota type.

  • Constraints: N/A

  • Range: instance

  • Default value: N/A

quota

Integer

  • Definition: The total quota.

  • Constraints: N/A

  • Range: N/A

  • Default value: N/A

used

Integer

  • Definition: The used quota.

  • Constraints: N/A

  • Range: N/A

  • Default value: N/A

min

Integer

  • Definition: The minimum quota.

  • Constraints: N/A

  • Range: N/A

  • Default value: N/A

max

Integer

  • Definition: The maximum quota.

  • Constraints: N/A

  • Range: N/A

  • Default value: N/A

Example Requests

GET https://{{endpoint}}/v3/060576782980d5762f9ec014dd2f1148/l2cg/quotas

Example Responses

Status code: 200

The GET operation is successful. For more status codes, see Status Codes.

{
  "request_id" : "e8592c6d29418fe3358ad2bfc3ad024f",
  "quotas" : {
    "resources" : [ {
      "type" : "instance",
      "min" : 1,
      "max" : 1000,
      "quota" : 21,
      "used" : 6
    } ]
  }
}

Status Codes

Status Code

Description

200

The GET operation is successful. For more status codes, see Status Codes.

Error Codes

See Error Codes.