Obtaining Tags of a Training Job
Function
This API is used to obtain the tag information of an existing training job.
This API is used when you need to view the tags of a training job for classification, marking, or management. Before using this API, ensure that the training job exists and you have the required permission. After the query, you will obtain the details of all tags of a training job. If the training job does not exist or you do not have the required permission, 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:tag:list
List
-
-
-
-
URI
GET /v2/{project_id}/modelarts-training-job/{training_job_id}/tags
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: User project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A Default Value: N/A |
| training_job_id | Yes | String | Definition: Training job ID. For details, see Obtaining Training Jobs. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| tags | Array of TmsTagResp objects | Definition: TMS tag list. |
Example Requests
GET https://{endpoint}/v2/{project_id}/modelarts-training-job/{training_job_id}/tags Example Responses
Status code: 200
Queried.
{
"tags" : [ {
"key" : "111",
"value" : "v2"
}, {
"key" : "k2",
"value" : "v2"
}, {
"key" : "test",
"value" : "1122"
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Queried. |
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