华为云计算 云知识 查询配额ShowQuota
查询配额ShowQuota

 

功能介绍

查询单租户在VPC服务下的网络资源配额,包括vpc配额、子网配额、安全组配额、安全组规则配额、 弹性公网IP 配额,vpn配额等。

调试

您可以在API Explorer中调试该接口。

URI

GET /v1/{project_id}/quotas

样例:
GET https://{Endpoint}/v1/{project_id}/quotas?type={type}
参数说明请参见表1。
表1 参数说明

名称

是否必选

参数类型

说明

project_id

String

项目ID,获取项目ID请参见获取项目ID

type

String

  • 功能说明:根据type过滤查询指定类型的配额
  • 取值范围:
    • vpc 虚拟私有云
    • subnet 子网
    • securityGroup 安全组
    • securityGroupRule 安全组规则
    • publicIp 弹性 公网IP
    • vpn 虚拟专用网络
    • vpngw VPN网关
    • vpcPeer 对等连接
    • loadbalancer 负载均衡
    • listener 监听器
    • physicalConnect 物理专线
    • virtualInterface 虚拟接口
    • firewall 防火墙
    • shareBandwidthIP 单个共享带宽的IP
    • shareBandwidth 共享带宽
    • address_group 地址组
    • flow_log 流日志
    • vpcContainRoutetable 单VPC下的路由表数量
    • routetableContainRoutes 单路由表下的路由条目

请求参数

请求示例

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

响应参数

表2 响应参数

名称

参数类型

说明

quotas

quotas object

配额列表对象,请参见表3。

表3 quotas字段说明

名称

参数类型

说明

resources

Array of resource objects

资源列表对象,请参见表4。

表4 resource字段说明

名称

参数类型

说明

type

String

  • 功能说明:根据type过滤查询指定类型的配额
  • 取值范围:
    • vpc 虚拟 私有云
    • subnet 子网
    • securityGroup 安全组
    • securityGroupRule 安全组规则
    • publicIp 弹性公网IP
    • vpn 虚拟专用网络
    • vpngw VPN网关
    • vpcPeer 对等连接
    • loadbalancer 负载均衡
    • listener 监听器
    • physicalConnect 物理专线
    • virtualInterface 虚拟接口
    • firewall 防火墙
    • shareBandwidthIP 单个共享带宽的IP
    • shareBandwidth 共享带宽
    • address_group 地址组
    • flow_log 流日志
    • vpcContainRoutetable 单VPC下的路由表数量
    • routetableContainRoutes 单路由表下的路由条目

used

Integer

  • 功能说明:已创建的资源个数
  • 取值范围:0~quota数

quota

Integer

  • 功能说明:资源的最大配额数
  • 取值范围:各类型资源默认配额数~Integer最大值

min

Integer

允许修改的配额最小值

通过接口查询单租户在VPC服务下的网络资源配额,返回值“-1”,表示配额数量不限制。

响应示例

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

状态码

请参见状态码

错误码

请参考错误码

 

上一篇:删除指定的镜像成员(OpenStack原生)GlanceDeleteImageMember 下一篇:昇腾AI处理器及软件栈基础