Querying a Resource Quota

Function

This API is used to query a resource quota.

URI

GET /v2/{project_id}/fgs/quotas

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

quotas

Quotas object

Quota information.

Table 3 Quotas

Parameter

Type

Description

resources

Array of Resources objects

List of quotas.

Table 4 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. If the resource type is fgs_func_code_size, the unit is MB. For other resource types, there is no unit.

Example Requests

PUT https://{functiongraph_endpoint}/v2/7aad83af3e8d42e99ac194e8419e2c9b/fgs/quotas

Example Responses

Status code: 200

ok

{
  "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

ok

Error Codes

See Error Codes.