Verifying the Training Job Name
Function
This API is used to check whether the name of the training job created on ModelArts is duplicate.
It is used when you need to ensure that the name of a training job to be created does not exist.
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:checkName
Read
workspace *
-
modelarts:trainJob:create
-
URI
GET /v2/{project_id}/training-job-names
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: The value can contain 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| job_name | Yes | String | Definition: Training job name. Constraints: The value can contain 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Range: N/A Default Value: N/A |
| workspace_id | No | String | Definition: Workspace ID. For details about how to obtain the value, see Obtaining Workspaces. If no workspaces are available, the default value is 0. If a workspace is created and used, use the actual value. Constraints: N/A Range: N/A Default Value: 0 |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| is_duplicate | Boolean | Whether the training job name is duplicate. true indicates that the name already exists, and false indicates that the name does not exist. |
Example Requests
GET https://{endpoint}/v2/{project_id}/training-job-names?job_name=job-d3cf&workspace_id=0 Example Responses
Status code: 200
{
"is_duplicate" : false
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
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