Updated on 2023-12-07 GMT+08:00

Querying Resource Quotas

Function

This API is used to query the usage of resources, for example, how many connections and virtual interfaces have been created.

Calling Method

For details, see Calling APIs.

URI

GET /v3/{project_id}/dcaas/quotas

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

type

No

Array

Specifies the resource quotas.

  • physicalConnect: quota and usage of the connection
  • virtualInterface: quota and usage of the virtual-interface

Request Parameters

None

Response Parameters

Status code: 201

Table 3 Response body parameters

Parameter

Type

Description

quotas

quotas object

Provides used quota details.

Table 4 quotas

Parameter

Type

Description

resources

Array of Info objects

Lists the used quotas of resources.

Table 5 Info

Parameter

Type

Description

type

String

Specifies the quota type.

quota

Long

Specifies the available quota. The value -1 indicates that there is no quota limit.

used

Long

Specifies the used quotas.

unit

String

Specifies the measurement unit of resource usage.

Example Requests

Querying quotas

GET https://{dc_endpoint}/v3/08d5a9564a704afda6039ae2babbef3c/dcaas/quotas

Example Responses

Status code: 201

Quotas are queried.

{
  "quotas" : {
    "resources" : [ {
      "type" : "direct_connnect",
      "quota" : 1,
      "used" : 0,
      "unit" : "count"
    } ]
  }
}

Status Codes

Status Code

Description

201

Quotas are queried.

Error Codes

See Error Codes.