19 KiB
- original_name
vpc_quota_0001.html
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 <vpc_quota_0001__table38014313>
describes the parameters.
Name | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Specifies the project ID. |
type | No | String |
|
Request Message
Request parameter
Table 2 Request header parameter Parameter Mandatory Type Description X-Auth-Token Yes String Specifies the user token. The token can be obtained by calling the IAM API used for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Example request
GET https://{Endpoint}/v1/{project_id}/quotas
Response Message
Response parameter
Table 3 Response parameter Name Type Description quotas quotas <vpc_quota_0001__table11308015155544>
objectSpecifies the quota object. For details, see Table 4 <vpc_quota_0001__table11308015155544>
.Table 4 Description of the quotas field Name Type Description resources Array of resource <vpc_quota_0001__table8208684>
objectsSpecifies the resource objects. For details, see Table 5 <vpc_quota_0001__table8208684>
.Table 5 Description of the resource field Name Type Description type String - Specifies the resource type.
- Values:
- vpc: VPC
- subnet: Subnet
- securityGroup: Security group
- securityGroupRule: Security group rule
- publicIp: EIP
- vpn: VPN
- vpngw: VPN gateway
- vpcPeer: VPC peering connection
- loadbalancer: Load balancer
- listener: Listener
- physicalConnect: Direct Connect connection
- virtualInterface: Virtual interface
- firewall: Firewall
- shareBandwidthIP: IP address added to a shared bandwidth
- shareBandwidth: Shared bandwidth
- address_group: IP address group
- 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.
The default quota values can be changed. Configure the quota values in the underlying system in advance.
Default quota values:
- vpc: 150
- subnet: 400
- securityGroup: 100
- securityGroupRule: 5000
- publicIp: 10
- vpn: 5
- vpcPeer: 50
- loadbalancer: 10
- listener: 10
- firewall: 200
- shareBandwidthIP: 20
- shareBandwidth: 5
- address_group: 50
- vpcContainRoutetable: 1
- routetableContainRoutes: 200
min Integer Specifies the minimum quota value allowed. Note
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": "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 Code
See Status Codes <vpc_api_0002>
.
Error Code
See Error Codes <vpc_api_0003>
.