1
0
forked from docs/doc-exports
doc-exports/docs/vpn/api-ref/vpn_api_0038.html
Hongwei, King Wang 32c06a10a2 vpn_api
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
Co-committed-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
2024-08-15 14:18:28 +00:00

15 KiB

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
                }
            ]
        },
        "request_id": "9aeb7f73-e1b6-42eb-96ad-b68aef8186e3"
    }

Status Codes

For details, see Status Codes.