Modifying Workspace Quota
Function
This API is used to modify a workspace quota.
URI
PUT /v1/{project_id}/workspaces/{workspace_id}/quotas
Table 1 describes the required parameters.
|
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
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
quotas |
Yes |
quota array |
Workspace quota data. For details, see Table 3. Only the quota items to be modified are included. Do not include the quota items that are not modified. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
resource |
Yes |
String |
Resource ID. The value can be obtained from the return value of Querying a Workspace Quota. |
|
quota |
Yes |
Long |
Target quota to be modified. The quota value is a positive integer or -1. The value -1 indicates that the quota is not limited. The quota cannot exceed the maximum and minimum value. |
Response Body
Table 4 describes the response parameters.
|
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. The array contains the latest data of the modified quota items in this workspace. |
|
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 |
|
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 |
Samples
- Sample request
PUT https://{endpoint}/v1/{project_id}/workspaces/ccd05d1a553b4e188ea878e7dcb85e47/quotas { "quotas": [ { "resource": "exemlProject.gpu_duration", "quota": 10 } ] }
- 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 } ] } - Failed sample response
{ "error_msg": "Error message.", "error_code": "ModelArts.0104", "request_id": "ae47870afd7545fab400e76f8a29578d" }
Status Code
For details about the status code, see Table 1.
Last Article: Querying a Workspace Quota
Next Article: Permissions Policies and Supported Actions
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.