Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
16 KiB
Querying Tenant Quotas
Function
This API is used to query tenant quotas.
URI
GET /v2/{project_id}/fgs/quotas
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Content-Type |
Yes |
String |
Message body type (format). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
quotas |
ListQuotasResult object |
Quota information. |
Parameter |
Type |
Description |
|---|---|---|
quota |
Integer |
Function quota. |
used |
Integer |
Used quota. |
type |
String |
Resource type. Enumeration values:
|
unit |
String |
Resource unit. For fgs_func_code_size, the unit is MB. In other scenarios, there is no unit. |
Status code: 400
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Query quotas.
GET /v2/{project_id}/fgs/quotas
Example Responses
Status code: 200
Query successful.
{
"quotas" : {
"resources" : [ {
"quota" : 60,
"used" : 3,
"type" : "fgs_func_scale_down_timeout"
}, {
"quota" : 100,
"used" : 22,
"type" : "fgs_func_occurs"
}, {
"quota" : 100,
"used" : 22,
"type" : "fgs_func_pat_idle_time"
}, {
"quota" : 100,
"used" : 22,
"type" : "fgs_func_num"
}, {
"quota" : 10240,
"used" : 22,
"type" : "fgs_func_code_size",
"unit" : "MB"
}, {
"quota" : 512,
"used" : 22,
"type" : "fgs_workflow_num"
} ]
}
}
Status Codes
Status Code |
Description |
|---|---|
200 |
Query successful. |
400 |
Bad request. |
401 |
Unauthorized. |
403 |
Forbidden. |
500 |
Internal server error. |
Error Codes
See Error Codes.