Obtaining Lite Server Job Template Details
Function
This API is used to obtain the details of a specified Lite Server job template. It is used when you need to view the detailed configurations of a specified job template to learn about the parameter settings and usage description. After the query, the API returns the details of the specified template, including the template ID, name, description, and configuration parameters. If the target template does not exist, the API returns 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, no identity policy-based permission required for calling this API.
URI
GET /v1/{project_id}/dev-servers/jobs/templates/{id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
Yes |
String |
Definition: Lite Server task template ID. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
|
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
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Template ID. |
|
name |
String |
Template name. |
|
description |
String |
Template description. |
|
cmd |
String |
Image execution command. |
|
swr_path |
String |
Task image. |
|
resources |
String |
Task specifications. |
|
volumes |
String |
Volume. |
|
volumes_mount |
String |
Volume mounting. |
|
flavor_type |
String |
Definition: Flavor type. Range: ASCEND_SNT9B, ASCEND_SNT9C, and ASCEND_GENERIC. |
|
timeout |
String |
Timeout interval of a task. |
|
check_interval |
String |
Task polling period. |
|
type |
String |
Definition: Task type. Range: LOG_COLLECT, COMMON, and others. |
|
status |
String |
Definition: Template status. Range: ACTIVE. |
|
params |
Array of TemplateParam objects |
Other template parameters. |
Example Requests
GET https://{endpoint}/v1/{project_id}/dev-servers/jobs/templates/{id}
{ }
Example Responses
Status code: 200
OK
{
"id" : "2b087a09-e90d-414c-9b15-ffec45e400e9",
"cmd" : "/root/script/start_system_config.sh",
"swr_path" : "swr.cn-north-7.myhuaweicloud.com/atelier/aiserver_service_aarch64:ai_server-py_3.11-hce_2.0.2506-aarch64-20251020164959-113183f",
"resources" : "{\"limits\":{\"cpu\":\"250m\",\"memory\":\"512Mi\"},\"requests\":{\"cpu\":\"250m\",\"memory\":\"512Mi\"}}",
"volumes" : "[{\"hostPath\":{\"path\":\"/tmp\"},\"name\":\"tmp\"}]",
"volumes_mount" : "[{\"mountPath\":\"/tmp\",\"name\":\"tmp\"}]",
"flavor_type" : "ASCEND_GENERIC",
"timeout" : "300",
"check_interval" : "10",
"type" : "ASCEND_SYSTEM_CONFIG",
"status" : "ACTIVE",
"params" : [ {
"description" : "Configure the RoCE network uplink ports properly and set up the parameter plane network with correct IP addresses, subnet masks, and gateways.",
"name" : "JOB_ITEM_RDMA_CONFIG",
"regex" : "^[A-Za-z0-9-_]{1,128}$",
"value" : "Parameter Plane Network Configuration",
"visible" : "true"
}, {
"description" : "Detect and fix security vulnerabilities in the HCE2.0 system.",
"name" : "JOB_ITEM_SYSTEM_FIX",
"regex" : "^[A-Za-z0-9-_]{1,128}$",
"value" : "System Bug Fixes",
"visible" : "true"
}, {
"description" : "Timeout of RDMA_CONFIG job item",
"name" : "TIMEOUT_RDMA_CONFIG",
"regex" : "^[A-Za-z0-9-_]{1,128}$",
"value" : "300",
"visible" : "false"
}, {
"description" : "Timeout of SYSTEM_FIX job item",
"name" : "TIMEOUT_SYSTEM_FIX",
"regex" : "^[A-Za-z0-9-_]{1,128}$",
"value" : "300",
"visible" : "false"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
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