Obtain Training Quotas
Function
This API is used to obtain the training resource quota of a user in ModelArts.
This API is used when you need to know the available training resource quota. Before using this API, ensure that you have logged in and have the permission to view the quota. The response body contains the number of created training jobs and the number of remaining training jobs that can be created. If you do not have the required permission or the quota information is empty, the API will return an error message or an empty list.
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, no identity policy-based permission required for calling this API.
URI
GET /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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| user_id | No | String | Definition: User ID. Constraints: N/A Range: N/A Default Value: N/A |
| resource | No | String | Definition: Resource type of the quota. Constraints: The supported parameter is job-num, which indicates job quotas. Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| quotas | Array of TrainingQuotaResponse objects | Definition: Quota group of a training job. |
Example Requests
GET https://{endpoint}/v2/{project_id}/training-quotas?user_id=fa412c98-6d94-42a2-891a-99cd1da93916&resource=job-num Example Responses
Status code: 200
Training job quota response body
{
"quotas" : [ {
"resource" : "job-num",
"quota" : 10000,
"used" : 25
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Training job quota response body |
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