Updated on 2024-03-14 GMT+08:00

Querying Tenant Quotas

Function

This API is used to query tenant quotas.

URI

GET /v2/{project_id}/fgs/quotas

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

Request Parameters

Table 2 Request header 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

Table 3 Response body parameters

Parameter

Type

Description

quotas

ListQuotasResult object

Quota information.

Table 4 ListQuotasResult

Parameter

Type

Description

resources

Array of Resources objects

Quota list.

Table 5 Resources

Parameter

Type

Description

quota

Integer

Function quota.

used

Integer

Used quota.

type

String

Resource type.

Enumeration values:

  • fgs_func_scale_down_timeout

  • fgs_func_occurs

  • fgs_func_pat_idle_time

  • fgs_func_num

  • fgs_func_code_size

  • fgs_workflow_num

unit

String

Resource unit. For fgs_func_code_size, the unit is MB. In other scenarios, there is no unit.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 9 Response body parameters

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.