更新时间:2025-08-18 GMT+08:00

查询租户配额

功能介绍

查询该租户下,所有资源的配额信息,包括已使用配额。

URI

GET /v1/{project_id}/cloudservers/limits

参数说明请参见表1
表1 参数说明

参数

是否必选

描述

project_id

项目ID。

获取方法请参见获取项目ID

请求消息

响应消息

响应参数如表2所示。
表2 响应参数

参数

参数类型

描述

absolute

Object

参数解释:

租户配额信息,详情请参见表3

取值范围:

不涉及

表3 absolute数据结构说明

参数

参数类型

描述

maxTotalInstances

Integer

参数解释:

云服务器最大申请数量。

取值范围:

不涉及

maxTotalCores

Integer

参数解释:

当前租户所有的CPU核数最大申请数量。

取值范围:

不涉及

maxTotalRAMSize

Integer

参数解释:

内存最大申请容量(单位:MiB)。

取值范围:

不涉及

maxTotalKeypairs

Integer

参数解释:

可以申请的SSH密钥对最大数量。

取值范围:

不涉及

maxServerMeta

Integer

参数解释:

可输入元数据的最大长度。

取值范围:

不涉及

maxPersonality

Integer

参数解释:

可注入文件的最大个数。

取值范围:

不涉及

maxPersonalitySize

Integer

参数解释:

注入文件内容的最大长度(单位:Byte)。

取值范围:

不涉及

maxServerGroups

Integer

参数解释:

服务器组的最大个数。

取值范围:

不涉及

maxServerGroupMembers

Integer

参数解释:

服务器组中的最大弹性云服务器数。

取值范围:

不涉及

totalServerGroupsUsed

Integer

参数解释:

已使用的服务器组个数。

取值范围:

不涉及

maxSecurityGroups

Integer

参数解释:

安全组最大使用个数。

说明:

具体配额限制请以VPC配额限制为准。

取值范围:

不涉及

maxSecurityGroupRules

Integer

参数解释:

安全组中安全组规则最大的配置个数。

说明:

具体配额限制请以VPC配额限制为准。

取值范围:

不涉及

maxTotalFloatingIps

Integer

参数解释:

最大的浮动IP使用个数。

取值范围:

不涉及

maxImageMeta

Integer

参数解释:

镜像元数据最大的长度。

取值范围:

不涉及

totalInstancesUsed

Integer

参数解释:

当前云服务器使用个数。

取值范围:

不涉及

totalCoresUsed

Integer

参数解释:

当前已使用CPU核数。

取值范围:

不涉及

totalRAMUsed

Integer

参数解释:

当前内存使用容量(单位:MiB)。

取值范围:

不涉及

totalSecurityGroupsUsed

Integer

参数解释:

当前安全组使用个数。

取值范围:

不涉及

totalFloatingIpsUsed

Integer

参数解释:

当前浮动IP使用个数。

取值范围:

不涉及

请求示例

查询该租户下所有资源的配额信息。

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

响应示例

响应示例
{
    "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,
        "maxServerGroups":10,
        "maxServerGroupMembers":16,
        "totalServerGroupsUsed":2
    }
}

返回值

请参考通用请求返回值

错误码

请参考错误码