Updated on 2023-11-23 GMT+08:00

Querying IEF Resource Quotas

Function

This API is used to query IEF resource quotas.

URI

GET /v2/{project_id}/edgemgr/quotas

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

types

No

String

Resource type, including:

  • edge_node: edge node

  • node_cert: edge node certificate

  • edge_group: edge node group

  • group_cert: certificate of the edge node group

  • application: application template

  • deployment: containerized application

  • device_template: end device template

  • device: end device

  • app_version: application template version

  • tag: tag

  • configmap: configuration item

  • secret: key

  • ief_instance: platinum edition

  • service: service mesh

  • gateway: service gateway

Request

Table 3 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). The default value is application/json.

X-Auth-Token

Yes

String

User token. The token 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.

Response

Status code: 200

Table 4 Parameters in the response body

Parameter

Type

Description

quotas

QuotaResourceList object

Resource quotas.

Table 5 QuotaResourceList

Parameter

Type

Description

resources

Array of QuotaResource objects

Resource list.

Table 6 QuotaResource

Parameter

Type

Description

used

Integer

Number of created resources.

min

Integer

Minimum number of resources that can be created.

max

Integer

Maximum number of resources that can be created.

quota

Integer

Resource quota limit.

project_id

String

Project ID.

type

String

Resource type, including:

  • edge_node: edge node

  • node_cert: edge node certificate

  • edge_group: edge node group

  • group_cert: edge node group certificate

  • application: application template

  • deployment: containerized application

  • device_template: end device template

  • device: end device

  • app_version: application template version

  • tag: tag

  • configmap: configuration item

  • secret: key

  • ief_instance: platinum edition

  • service: service mesh

  • gateway: service gateway

Example Request

None

Example Response

Status code: 200

Query succeeded.

{
  "quotas" : {
    "resources" : [ {
      "used" : 7,
      "min" : -1,
      "max" : 1000000,
      "quota" : 50,
      "project_id" : "xxx",
      "type" : "edge_node"
    } ]
  }
}

Status Codes

Status Code

Description

200

Query succeeded.

Error Codes

For details, see Error Codes.