Modifying the Training Quota
Function
This API is used to modify the training resource quota of a user in ModelArts.
This API is applicable to the following scenario: When an administrator needs to adjust the training resource quota of a user (such as the job quantity quota, automatic aging switch, and quota alarm notification), the administrator can use this API to modify the quota. Before using this API, ensure that you have logged in to the system and have the permission to modify quotas. After the modification is successful, the training resource quota of the user is updated. If you do not have the permission or the quota information is invalid, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
modelarts:trainJob:updateQuotas
Write
-
g:EnterpriseProjectId
modelarts:trainJob:update
-
URI
PUT /v2/{project_id}/training-quotas
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| user_id | Yes | String | Definition: User ID. Constraints: N/A Range: N/A Default Value: N/A |
| quotas | Yes | Array of ModifyTrainingQuotaItem objects | Definition: Quota group of a training job. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| user_id | String | Definition: User ID. Range: N/A |
| quotas | Array of ModifyTrainingQuotaItem objects | Definition: Quota group of a training job. |
Example Requests
Change the job quantity quota of the user whose ID is fa412c98-6d94-42a2-891a-99cd1da93916.
PUT https://{endpoint}/v2/{project_id}/training-quotas
{
"user_id" : "fa412c98-6d94-42a2-891a-99cd1da93916",
"quotas" : [ {
"resource" : "job-num",
"quota" : 20000
} ]
} Example Responses
Status code: 200
{
"user_id" : "fa412c98-6d94-42a2-891a-99cd1da93916",
"quotas" : [ {
"resource" : "job-num",
"quota" : 20000
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Response body for modifying the training quota. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank 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