查询账号配额
调试
您可以在API Explorer中调试该接口。
URI
GET /v3.0/OS-QUOTA/domains/{domain_id}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
domain_id |
是 |
String |
待查询的账号ID,获取方式请参见:获取账号、IAM用户、项目、用户组、区域、委托的名称和ID |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
type |
否 |
String |
查询配额的类型,如果不填写此参数,则返回所有类型配额。取值范围如下:
|
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
IAM用户的token。(无需特殊权限。) |
响应参数
状态码为 200 时:
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
Object |
账号配额信息。 |
请求示例
查询账号配额。
GET https://iam.myhuaweicloud.com/v3.0/OS-QUOTA/domains/{domain_id}
响应示例
状态码为 200 时:
请求成功。
{
"quotas" : {
"resources" : [
{
"max" : 1000,
"min" : 50,
"quota" : 50,
"type" : "user",
"used" : 10
},
{
"max" : 300,
"min" : 10,
"quota" : 20,
"type" : "group",
"used" : 8
},
{
"max" : 20,
"min" : 10,
"quota" : 10,
"type" : "idp",
"used" : 9
},
{
"max" : 300,
"min" : 10,
"quota" : 50,
"type" : "agency",
"used" : 12
},
{
"max" : 300,
"min" : 128,
"quota" : 200,
"type" : "policy",
"used" : 8
},
{
"max" : 500,
"min" : 50,
"quota" : 200,
"type" : "assigment_group_mp",
"used" : 8
},
{
"max" : 500,
"min" : 50,
"quota" : 200,
"type" : "assigment_agency_mp",
"used" : 8
},
{
"max" : 5000,
"min" : 50,
"quota" : 500,
"type" : "assigment_group_ep",
"used" : 8
},
{
"max" : 5000,
"min" : 50,
"quota" : 500,
"type" : "assigment_user_ep",
"used" : 8
},
{
"max" : 100,
"min" : 10,
"quota" : 10,
"type" : "mapping",
"used" : null
}
]
}
}
状态码为 400 时:
参数无效。
{
"error_msg" : "Request parameter %(key)s is invalid.",
"error_code" : "IAM.0007"
}
状态码为 403 时:
没有操作权限。
- 示例 1
{
"error_msg" : "You are not authorized to perform the requested action.",
"error_code" : "IAM.0002"
}
- 示例 2
{
"error_msg" : "Policy doesn't allow %(actions)s to be performed.",
"error_code" : "IAM.0003"
}
状态码为 404 时:
未找到相应的资源。
{
"error_msg" : "Could not find %(target)s: %(target_id)s.",
"error_code" : "IAM.0004"
}
状态码为 500 时:
内部服务错误。
{
"error_msg" : "An unexpected error prevented the server from fulfilling your request.",
"error_code" : "IAM.0006"
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
请求成功。 |
|
400 |
参数无效。 |
|
401 |
认证失败。 |
|
403 |
没有操作权限。 |
|
404 |
未找到相应的资源。 |
|
500 |
内部服务错误。 |
错误码
请参见错误码。