華為云計(jì)算 云知識 查詢租戶配額ShowServerLimits
查詢租戶配額ShowServerLimits

 

功能介紹

查詢該租戶下,所有資源的配額信息,包括已使用配額。

調(diào)試

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

URI

GET /v1/{project_id}/cloudservers/limits

參數(shù)說明請參見表1。
表1 參數(shù)說明

參數(shù)

是否必選

描述

project_id

項(xiàng)目ID。

獲取方法請參見獲取項(xiàng)目ID。

請求消息

響應(yīng)消息

響應(yīng)參數(shù)如表2所示。
表2 響應(yīng)參數(shù)

參數(shù)

參數(shù)類型

描述

absolute

Object

租戶配額信息,詳情請參見表3。

表3 absolute數(shù)據(jù)結(jié)構(gòu)說明

參數(shù)

參數(shù)類型

描述

maxTotalInstances

Integer

云服務(wù)器 最大申請數(shù)量。

maxTotalCores

Integer

CPU核數(shù)最大申請數(shù)量。

maxTotal RAM Size

Integer

內(nèi)存最大申請容量(單位:MB)。

maxTotalSpotInstances

Integer

競價實(shí)例的最大申請數(shù)量。

maxTotalSpotCores

Integer

競價實(shí)例的CPU核數(shù)最大申請數(shù)量。

maxTotalSpotRAMSize

Integer

競價實(shí)例的內(nèi)存最大申請容量(單位:MB)。

maxTotalKeypairs

Integer

可以申請的SSH密鑰對最大數(shù)量。

maxServerMeta

Integer

可輸入元數(shù)據(jù)的最大長度。

maxPersonality

Integer

可注入文件的最大個數(shù)。

maxPersonalitySize

Integer

注入文件內(nèi)容的最大長度(單位:Byte)。

maxServerGroups

Integer

服務(wù)器組的最大個數(shù)。

maxServerGroupMembers

Integer

服務(wù)器組中的最大彈性云服務(wù)器數(shù)。

totalServerGroupsUsed

Integer

已使用的服務(wù)器組個數(shù)。

maxSecurityGroups

Integer

安全組最大使用個數(shù)。

說明:

具體配額限制請以VPC配額限制為準(zhǔn)。

maxSecurityGroupRules

Integer

安全組中安全組規(guī)則最大的配置個數(shù)。

說明:

具體配額限制請以VPC配額限制為準(zhǔn)。

maxTotalFloatingIps

Integer

最大的浮動IP使用個數(shù)。

maxImageMeta

Integer

鏡像 元數(shù)據(jù)最大的長度。

totalInstancesUsed

Integer

當(dāng)前云服務(wù)器使用個數(shù)。

totalCoresUsed

Integer

當(dāng)前已使用CPU核數(shù)。

totalRAMUsed

Integer

當(dāng)前內(nèi)存使用容量(單位:MB)。

totalSpotInstancesUsed

Integer

當(dāng)前競價實(shí)例的使用個數(shù)。

totalSpotCoresUsed

Integer

當(dāng)前競價實(shí)例已使用的CPU核數(shù)。

totalSpotRAMUsed

Integer

當(dāng)前競價實(shí)例的內(nèi)存使用容量(單位:MB)。

totalSecurityGroupsUsed

Integer

當(dāng)前安全組使用個數(shù)。

totalFloatingIpsUsed

Integer

當(dāng)前浮動IP使用個數(shù)。

limit_by_flavor

Array of objects

該屬性當(dāng)前未使用,返回值為[]。

請求示例

查詢該租戶下所有資源的配額信息。

GET https://{endpoint}/v1/{project_id}/cloudservers/limits

響應(yīng)示例

響應(yīng)示例
{
    "absolute":{
        "maxServerMeta":128,
        "maxPersonality":5,
        "maxImageMeta":128,
        "maxPersonalitySize":10240,
        "maxSecurityGroupRules":20,
        "maxTotalKeypairs":-1,
        "totalRAMUsed":75776,
        "totalInstancesUsed":21,
        "maxSecurityGroups":10,
        "totalFloatingIpsUsed":0,
        "maxTotalCores":20480,
        "totalSecurityGroupsUsed":1,
        "maxTotalFloatingIps":10,
        "maxTotalInstances":2048,
        "totalCoresUsed":40,
        "maxTotalRAMSize":25165824,
        "maxTotalSpotInstances":20,
        "maxTotalSpotCores":320,
        "maxTotalSpotRAMSize":655360,
        "totalSpotInstancesUsed":0,
        "totalSpotCoresUsed":0,
        "totalSpotRAMUsed":0,
        "limit_by_flavor":[],
        "maxServerGroups":10,
        "maxServerGroupMembers":16,
        "totalServerGroupsUsed":2
    }
}

返回值

請參考通用請求返回值

錯誤碼

請參考錯誤碼。