華為云計(jì)算 云知識(shí) 查詢(xún)配額ShowQuota
查詢(xún)配額ShowQuota

 

功能介紹

查詢(xún)單租戶(hù)在VPC服務(wù)下的網(wǎng)絡(luò)資源配額,包括vpc配額、子網(wǎng)配額、安全組配額、安全組規(guī)則配額、 彈性公網(wǎng)IP 配額, vpn 配額等。

調(diào)試

您可以在API Explorer中調(diào)試該接口。

URI

GET /v1/{project_id}/quotas

樣例:
GET https://{Endpoint}/v1/{project_id}/quotas?type={type}
參數(shù)說(shuō)明請(qǐng)參見(jiàn)表1。
表1 參數(shù)說(shuō)明

名稱(chēng)

是否必選

參數(shù)類(lèi)型

說(shuō)明

project_id

String

項(xiàng)目ID,獲取項(xiàng)目ID請(qǐng)參見(jiàn)獲取項(xiàng)目ID。

type

String

  • 功能說(shuō)明:根據(jù)type過(guò)濾查詢(xún)指定類(lèi)型的配額
  • 取值范圍:
    • vpc 虛擬私有云
    • subnet 子網(wǎng)
    • securityGroup 安全組
    • securityGroupRule 安全組規(guī)則
    • publicIp 彈性 公網(wǎng)IP
    • vpn 虛擬專(zhuān)用網(wǎng)絡(luò)
    • vpngw VPN網(wǎng)關(guān)
    • vpcPeer 對(duì)等連接
    • loadbalancer 負(fù)載均衡
    • listener 監(jiān)聽(tīng)器
    • physicalConnect 物理專(zhuān)線(xiàn)
    • virtualInterface 虛擬接口
    • firewall 防火墻
    • shareBandwidthIP 單個(gè)共享帶寬的IP
    • shareBandwidth 共享帶寬
    • address_group 地址組
    • flow_log 流日志
    • vpcContainRoutetable 單VPC下的路由表數(shù)量
    • routetableContainRoutes 單路由表下的路由條目

請(qǐng)求參數(shù)

無(wú)

請(qǐng)求示例

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

響應(yīng)參數(shù)

表2 響應(yīng)參數(shù)

名稱(chēng)

參數(shù)類(lèi)型

說(shuō)明

quotas

quotas object

配額列表對(duì)象,請(qǐng)參見(jiàn)表3。

表3 quotas字段說(shuō)明

名稱(chēng)

參數(shù)類(lèi)型

說(shuō)明

resources

Array of resource objects

資源列表對(duì)象,請(qǐng)參見(jiàn)表4。

表4 resource字段說(shuō)明

名稱(chēng)

參數(shù)類(lèi)型

說(shuō)明

type

String

  • 功能說(shuō)明:根據(jù)type過(guò)濾查詢(xún)指定類(lèi)型的配額
  • 取值范圍:
    • vpc 虛擬 私有云
    • subnet 子網(wǎng)
    • securityGroup 安全組
    • securityGroupRule 安全組規(guī)則
    • publicIp 彈性公網(wǎng)IP
    • vpn 虛擬專(zhuān)用網(wǎng)絡(luò)
    • vpngw VPN網(wǎng)關(guān)
    • vpcPeer 對(duì)等連接
    • loadbalancer 負(fù)載均衡
    • listener 監(jiān)聽(tīng)器
    • physicalConnect 物理專(zhuān)線(xiàn)
    • virtualInterface 虛擬接口
    • firewall 防火墻
    • shareBandwidthIP 單個(gè)共享帶寬的IP
    • shareBandwidth 共享帶寬
    • address_group 地址組
    • flow_log 流日志
    • vpcContainRoutetable 單VPC下的路由表數(shù)量
    • routetableContainRoutes 單路由表下的路由條目

used

Integer

  • 功能說(shuō)明:已創(chuàng)建的資源個(gè)數(shù)
  • 取值范圍:0~quota數(shù)

quota

Integer

  • 功能說(shuō)明:資源的最大配額數(shù)
  • 取值范圍:各類(lèi)型資源默認(rèn)配額數(shù)~Integer最大值

min

Integer

允許修改的配額最小值

通過(guò)接口查詢(xún)單租戶(hù)在VPC服務(wù)下的網(wǎng)絡(luò)資源配額,返回值“-1”,表示配額數(shù)量不限制。

響應(yīng)示例

{
    "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 
             }
        ]
    }
}

狀態(tài)碼

請(qǐng)參見(jiàn)狀態(tài)碼。

錯(cuò)誤碼

請(qǐng)參考錯(cuò)誤碼