更新时间:2024-03-22 GMT+08:00
分享

查询租户配额

功能介绍

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

调试

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

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

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

maxTotalSpotInstances

Integer

竞价实例的最大申请数量。

竞价实例即采用竞价计费模式的实例,详细内容,请参见竞价计费(竞价模式)

maxTotalSpotCores

Integer

竞价实例的CPU核数最大申请数量。

maxTotalSpotRAMSize

Integer

竞价实例的内存最大申请容量(单位:MB)。

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

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

totalSpotInstancesUsed

Integer

当前竞价实例的使用个数。

totalSpotCoresUsed

Integer

当前竞价实例已使用的CPU核数。

totalSpotRAMUsed

Integer

当前竞价实例的内存使用容量(单位:MB)。

totalSecurityGroupsUsed

Integer

当前安全组使用个数。

totalFloatingIpsUsed

Integer

当前浮动IP使用个数。

limit_by_flavor

Array of objects

该属性当前未使用,返回值为[]。

请求示例

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

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,
        "maxTotalSpotInstances":20,
        "maxTotalSpotCores":320,
        "maxTotalSpotRAMSize":655360,
        "totalSpotInstancesUsed":0,
        "totalSpotCoresUsed":0,
        "totalSpotRAMUsed":0,
        "limit_by_flavor":[],
        "maxServerGroups":10,
        "maxServerGroupMembers":16,
        "totalServerGroupsUsed":2
    }
}

返回值

请参考通用请求返回值

错误码

请参考错误码

分享:

    相关文档

    相关产品