• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. APIs
  5. Quota
  6. Querying Quotas

Querying Quotas

Function

This interface is used to query network resource quotas of a tenant. The network resources include VPCs, subnets, security groups, security group rules, EIPs, and VPNs.

URI

GET /v1/{project_id}/quotas

Example:
/v1/{project_id}/quotas?type=vpc
Table 1 Parameter description

Name

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

type

No

String

Specifies the resource type.

The value can be vpc, subnet, securityGroup, securityGroupRule, publicIp, vpn, vpngw, physicalConnect, virtualInterface, vpcPeer, firewall, shareBandwidth, shareBandwidthIP, loadbalancer, or listener.

Request Message

  • Request parameter
    None
  • Example request
    None

Response Message

  • Response parameter
    Table 2 Response parameter

    Name

    Type

    Description

    quotas

    List data structure

    Specifies the quota list.

    Table 3 Description of the quotas field

    Name

    Type

    Description

    resources

    List data structure

    Specifies the resource list.

    Table 4 Description of the resources field

    Name

    Type

    Description

    type

    String

    • Specifies the resource type.
    • The value can be vpc, subnet, securityGroup, securityGroupRule, publicIp, vpn, vpngw, physicalConnect, virtualInterface, vpcPeer, firewall, shareBandwidth, or shareBandwidthIP.

    used

    int

    • Specifies the number of created network resources.
    • The value ranges from 0 to the value of quota.

    quota

    int

    • Specifies the maximum quota values for the resources.
    • The value ranges from the default quota value to the maximum quota value.
    • The default resource quota values can be changed. You must configure the quota values in the underlying system in advance. The default quota values of network resources are as follows:

      VPC: 5

      Subnet: 100

      Security group: 100

      Security group rule: 5000

      EIP: 10

      VPN: 5

      VPN gateway: 2

      Direct Connect connection: 10

      Virtual interface: 50

      VPC peering connection: 50

      Firewall: 200

      Shared bandwidth: 5

      IP address with shared bandwidth: 20

    min

    int

    Specifies the minimum quota value allowed.

  • Example response
    {
        "quotas": {
            "resources": [
                {
                    "type": "vpc",
                    "used": 4,
                    "quota": 150,
                    "min": 0
                },
                {
                    "type": "subnet",
                    "used": 5,
                    "quota": 400,
                    "min": 0
                },
                {
                    "type": "securityGroup",
                    "used": 1,
                    "quota": 100,
                    "min": 0
                },
                {
                    "type": "securityGroupRule",
                    "used": 6,
                    "quota": 5000,
                    "min": 0
                },
                {
                    "type": "publicIp",
                    "used": 2,
                    "quota": 10,
                    "min": 0
                },
                {
                    "type": "vpn",
                    "used": 0,
                    "quota": 5,
                    "min": 0
                },
                {
                    "type": "vpngw",
                    "used": 0,
                    "quota": 2,
                    "min": 0
                },
                {
                    "type": "vpcPeer",
                    "used": 0,
                    "quota": 50,
                    "min": 0
                },
                {
                    "type":"physicalConnect",
                    "used":0,
                    "quota":10,
                    "min":0
                },
                {
                    "type":"virtualInterface",
                    "used":0,
                    "quota":50,
                    "min":0
                },
                {
                    "type": "firewall",
                    "used": 0,
                    "quota": 200,
                    "min": 0
                },
                {
                    "type": "shareBandwidth",
                    "used": 0,
                    "quota": 5,
                    "min": 0
                },
                {
                    "type": "shareBandwidthIP",
                    "used": 0,
                    "quota": 20,
                    "min": 0
                },
                {
                    "type": "loadbalancer",
                    "used": 0,
                    "quota": 10,
                    "min": 0
                },
                {
                    "type": "listener",
                    "used": 0,
                    "quota": 10,
                    "min": 0
                }
            ]
        }
    }

Status Codes

For details, see section Status Codes.