更新时间:2022-08-16 GMT+08:00
查询项目配额
功能介绍
该接口可以用于查询项目配额。
URI
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
待查询的项目ID。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
此token可以如下任意一个:
|
响应参数
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
object |
账号配额信息。 |
请求示例
GET https://sample.domain.com/v3.0/OS-QUOTA/projects/{project_id}
响应示例
状态码为 200 时:
请求成功。
{
"quotas" : {
"resources" : [
{
"max" : 50,
"min" : 0,
"quota" : 10,
"type" : "project",
"used" : 4
}
]
}
}
状态码为 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 |
请求成功。 |
|
401 |
认证失败。 |
|
403 |
没有操作权限。 |
|
404 |
未找到相应的资源。 |
|
500 |
内部服务错误。 |
父主题: 项目管理