Help Center> ModelArts> API Reference> Workspace Management> Querying a Workspace Quota

Querying a Workspace Quota

Function

This API is used to query a workspace quota.

URI

GET /v1/{project_id}/workspaces/{workspace_id}/quotas

Table 1 describes the required parameters.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

workspace_id

Yes

String

Workspace ID

Request Body

None

Response Body

Table 2 describes the response parameters.

Table 2 Parameter description

Parameter

Type

Description

error_msg

String

Error message of a failed API call.

This parameter is not included when the API call succeeds.

error_code

String

Error code of a failed API call. For details, see Error Code.

This parameter is not included when the API call succeeds.

request_id

String

request_id information of a failed API call.

This parameter is not included when the API call succeeds.

quotas

quota array

Workspace quota data. For details, see Table 3.

Table 3 quotas parameters

Parameter

Type

Description

name_en

String

Name of a quota, in English

name_cn

String

Name of a quota, in Chinese

resource

String

Unique resource ID

quota

Long

Existing quota. The value -1 indicates that the quota is not limited.

min_quota

Long

Minimum quota

max_quota

Long

Maximum quota

unit_en

String

Quota unit, in English

unit_cn

String

Quota unit, in Chinese

update_time

Long

Last modification time, in UTC format. If the resource quota has not been modified, the default value is the time when a workspace is created.

used_quota

Long

Used quota If the value of quota is -1 (indicating that the quota is not limited), the value of used_quota is null.

Samples

  • Sample request
    GET  https://{endpoint}/v1/{project_id}/workspaces/ccd05d1a553b4e188ea878e7dcb85e47/quotas
  • Successful sample response
    {
      "quotas": [
       {
         "name_en": "ExeMLtraining duration (image classification, object detection, and soundclassification)",
         "name_cn": "ExeML training duration (image classification, object detection, and sound classification)",
         "resource": "exemlProject.gpu_duration",
         "quota": 10,
         "min_quota": -1,
         "max_quota": 60000,
         "unit_en": "minute",
    "unit_cn": "Minutes",
         "update_time": 1470000020000,
         "used_quota": 5
       }
      ]
    }
  • Failed sample response
    {
      "error_msg": "Error message.",
      "error_code": "ModelArts.0104",
      "request_id": "44e3a486991743a19af9e7783b47f41e"
    }

Status Code

For details about the status code, see Table 1.