Updated on 2024-04-03 GMT+08:00

Querying Quotas

Function

This API is used to query VPN resource quotas of a tenant, including VPN gateways, customer gateways, and VPN connections.

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/vpn/quotas
Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID.

Request

  • Request parameters

    None

  • Example request
    GET https://{Endpoint}/v5/{project_id}/vpn/quotas

Response

  • Response parameters

    Returned status code 200: successful query

    Table 2 Parameters in the response body

    Parameter

    Type

    Description

    quotas

    Quotas object

    Specifies the quotas object.

    request_id

    String

    Specifies a request ID.

    Table 3 Quotas

    Parameter

    Type

    Description

    resources

    Array of QuotaInfo objects

    Specifies the resources object.

    Table 4 QuotaInfo

    Parameter

    Type

    Description

    type

    String

    • Specifies a resource type.
    • Value range:
      • customer_gateway: customer gateway
      • vpn_connection: Enterprise Edition VPN connection
      • vpn_gateway: Enterprise Edition VPN gateway

    quota

    Integer

    Specifies the quota upper limit.

    used

    Integer

    Specifies the number of resources in use.

  • Example response
    {
        "quotas": {
            "resources": [
                {
                    "type": "customer_gateway",
                    "quota": 100,
                    "used": 13
                },
                {
                    "type": "vpn_connection",
                    "quota": 5000,
                    "used": 306
                },
                {
                    "type": "vpn_gateway",
                    "quota": 50,
                    "used": 23
                },
                {
                    "type": "vpngw",
                    "quota": 5,
                    "used": 4
                },
                {
                    "type": "vpn",
                    "quota": 30,
                    "used": 4
                }
            ]
        },
        "request_id": "9aeb7f73-e1b6-42eb-96ad-b68aef8186e3"
    }

Status Codes

For details, see Status Codes.