doc-exports/docs/vpc/api-ref/vpc_quota_0001.html
Qin Ying, Fan 7e6f07b803 VPC API 20240320 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2024-09-05 12:25:23 +00:00

19 KiB

Querying Quotas

Function

This API 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:
GET https://{Endpoint}/v1/{project_id}/quotas?type={type}
Table 1 describes the parameters.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

type

No

String

  • Specifies the resource type.
  • Values:
    • vpc: VPC
    • subnet: Subnet
    • securityGroup: Security group
    • securityGroupRule: Security group rule
    • publicIp: EIP
    • vpn: VPN
    • vpcPeer: VPC peering connection
    • loadbalancer: Load balancer
    • listener: Load balancer listener
    • physicalConnect: Direct Connect connection
    • virtualInterface: Virtual interface
    • firewall: Firewall
    • shareBandwidthIP: IP address added to a shared bandwidth
    • shareBandwidth: Shared bandwidth
    • flow_log: VPC fow log
    • vpcContainRoutetable: Number of route tables associated with a VPC
    • routetableContainRoutes: Number of routes in a route table

Request Parameters

None

Example Request

GET https://{Endpoint}/v1/{project_id}/quotas

Response Parameters

Table 2 Response parameter

Parameter

Type

Description

quotas

quotas object

Specifies the quota object. For details, see Table 3.

Table 3 Description of the quotas field

Parameter

Type

Description

resources

Array of resource objects

Specifies the resource objects. For details, see Table 4.

Table 4 Description of the resource field

Parameter

Type

Description

type

String

  • Specifies the resource type.
  • Values:
    • vpc: VPC
    • subnet: Subnet
    • securityGroup: Security group
    • securityGroupRule: Security group rule
    • publicIp: EIP
    • vpn: VPN
    • vpcPeer: VPC peering connection
    • loadbalancer: Load balancer
    • listener: Load balancer listener
    • physicalConnect: Direct Connect connection
    • virtualInterface: Virtual interface
    • firewall: Firewall
    • shareBandwidthIP: IP address added to a shared bandwidth
    • shareBandwidth: Shared bandwidth
    • flow_log: VPC fow log
    • vpcContainRoutetable: Number of route tables associated with a VPC
    • routetableContainRoutes: Number of routes in a route table

used

Integer

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

quota

Integer

  • Specifies the maximum quota values for the resources.
  • The value ranges from the default quota value to the maximum quota value.

min

Integer

Specifies the minimum quota value allowed.

If value -1 is returned when you use an API to query your VPC quota, this indicates that the VPC quota is not limited.

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": "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
            },
            {
                "type": "flow_log",
                "used": 0,
                "quota": 10,
                "min": 0
            },
            {
                "type": "vpcContainRoutetable",
                "used": 0,
                "quota": 1,
                "min": 0
            },
            {
                "type": "routetableContainRoutes",
                "used": 0,
                "quota": 200,
                "min": 0
            }
        ]
    }
}

Status Code

See Status Codes.

Error Code

See Error Codes.