Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

Querying Quota Information

Updated on 2024-01-31 GMT+08:00

Function

This API is used to query quota information.

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/billing/quotas

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

User project ID

Minimum: 1

Maximum: 128

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps.

Default: 0

Minimum: 1

Maximum: 256

version

No

String

HSS edition. Its value can be:

  • hss.version.null

  • hss.version.basic: basic edition

  • hss.version.advanced: professional edition

  • hss.version.enterprise: enterprise edition

  • hss.version.premium: premium edition

  • hss.version.wtp: WTP edition

  • hss.version.container.enterprise: container edition

Minimum: 1

Maximum: 64

charging_mode

No

String

Billing mode. Its value can be:

  • packet_cycle: yearly/monthly

  • on_demand: pay-per-use

Minimum: 1

Maximum: 32

Request Parameters

Table 3 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 a token.

Minimum: 32

Maximum: 4096

region

No

String

region id

Minimum: 0

Maximum: 128

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

data_list

Array of ResourceQuotasInfo objects

Quota statistics list

Array Length: 0 - 200

Table 5 ResourceQuotasInfo

Parameter

Type

Description

version

String

HSS edition. Its value can be:

  • hss.version.null

  • hss.version.basic: basic edition

  • hss.version.advanced: professional edition

  • hss.version.enterprise: enterprise edition

  • hss.version.premium: premium edition

  • hss.version.wtp: WTP edition

  • hss.version.container.enterprise: container edition

Minimum: 1

Maximum: 64

total_num

Integer

Total quotas

Minimum: 0

Maximum: 2000000

used_num

Integer

Used quotas

Minimum: 0

Maximum: 2000000

available_num

Integer

Total quotas

Minimum: 0

Maximum: 2000000

available_resources_list

Array of AvailableResourceIdsInfo objects

Available resource list

Array Length: 0 - 200

Table 6 AvailableResourceIdsInfo

Parameter

Type

Description

resource_id

String

Resource ID

Minimum: 1

Maximum: 256

current_time

String

Current time

Minimum: 1

Maximum: 64

shared_quota

String

Whether quotas are shared. Its value can be:

  • shared

  • unshared

Minimum: 1

Maximum: 64

Example Requests

This API is used to query quotas of the basic edition in all enterprise projects.

GET https://{endpoint}/v5/{project_id}/billing/quotas?version=hss.version.basic&enterprise_project_id=all_granted_eps

Example Responses

Status code: 200

Quota statistics list

{
  "data_list" : [ {
    "available_num" : 1,
    "available_resources_list" : [ {
      "current_time" : "2022-09-17T17:00:24Z",
      "resource_id" : "9ecb83a7-8b03-4e37-a26d-c3e90ca97eea",
      "shared_quota" : "shared"
    } ],
    "total_num" : 2,
    "used_num" : 1,
    "version" : "hss.version.basic"
  } ]
}

Status Codes

Status Code

Description

200

Quota statistics list

Error Codes

See Error Codes.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback