Modifying a Workspace Quota
Function
This API is used to modify a workspace quota.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
PUT /v1/{project_id}/workspaces/{workspace_id}/quotas
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
workspace_id |
Yes |
String |
Workspace ID For details about how to obtain the value, see Querying the Workspace List. If no workspace is created, the default value is 0. If a workspace is created and used, the actual value prevails. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
quotas |
Yes |
Array of quotas objects |
Workspace quota |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource |
Yes |
String |
Resource ID |
quota |
Yes |
Integer |
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. You can call the API for querying the workspace quota to query the maximum quota. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
quotas |
Array of WorkspaceQuotasUpdateResponse objects |
Workspace quota |
Parameter |
Type |
Description |
---|---|---|
max_quota |
Integer |
Maximum quota |
update_time |
Integer |
Last modification time, in UTC format If the resource quota has not been modified, the default value is the time when a workspace was created. |
resource |
String |
Unique resource ID |
quota |
Integer |
Existing quota. Value -1 indicates that the quota is not limited. |
min_quota |
Integer |
Minimum quota |
name_cn |
String |
Quota name (Chinese) |
unit_cn |
String |
Quantity unit (Chinese) |
name_en |
String |
Name of a quota, in English. |
unit_en |
String |
Quota unit, in English |
Example Requests
PUT https://{endpoint}/v1/{project_id}/workspaces/ccd05d1a553b4e188ea878e7dcb85e47/quotas { "quotas" : [ { "resource" : "exemlProject.gpu_duration", "quota" : 10 } ] }
Example Responses
Status code: 200
Response parameter indicating that a workspace quota is modified
{ "quotas" : [ { "max_quota" : 60000, "update_time" : 1574339372000, "resource" : "exemlProject.gpu_duration", "quota" : 20, "min_quota" : -1, "name_cn" : "ExeML Training Duration (Image Classification, Object Detection, and Sound Classification)", "unit_cn" : "Minute", "name_en" : "ExeML training duration (image classification, object detection, and sound classification)", "unit_en" : "minute" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Response parameter indicating that a workspace quota is modified |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot