Queries the list of job templates.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListJobTemplates |
The operation that you want to perform. Set the value to ListJobTemplates. |
Name | String | No | jobtemplateName |
The name of the job template. You can call the ListJobTemplates operation to obtain the job template name. |
PageNumber | Integer | No | 1 |
The number of the page to return. Page numbers start from 1. Default value: 1 |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Maximum value: 50. Default value: 10 |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageSize | Integer | 1 |
The number of entries returned per page. |
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE7**** |
The ID of the request. |
PageNumber | Integer | 1 |
The number of the returned page. |
TotalCount | Integer | 1 |
The total number of returned entries. |
Templates | Array of JobTemplates |
The list of job templates. |
|
JobTemplates | |||
Task | Integer | 2 |
The number of tasks required by a single compute node. Valid values: 1 to 1000. |
Variables | String | [{Name:,Value:},{Name:,Value:}] |
The environment variables of the job. |
CommandLine | String | ./LammpsTest/lammps.pbs |
The command that was used to run the job. |
Queue | String | workq |
The queue of the job. |
Priority | Integer | 0 |
The priority of the job. Valid values: 0 to 9. A large value indicates a high priority. |
Mem | String | 1GB |
The maximum memory usage of a single compute node. The unit can be GB, MB, or KB, and is case-insensitive. |
Thread | Integer | 1 |
The number of threads required by a single compute node. Valid values: 1 to 1000. |
ArrayRequest | String | 2-7:2 |
The job array. Format: X-Y:Z. X is the minimum index value. Y is the maximum index value. Z is the step size. For example, 2-7:2 indicates that three jobs need to be run and their index values are 2, 4, and 6. |
StderrRedirectPath | String | ./LammpsTest |
The output file path of stderr. |
Node | Integer | 2 |
The number of the compute nodes. Valid values: 1 to 500. |
StdoutRedirectPath | String | ./Lammps |
The output file path of stdout. |
Gpu | Integer | 1 |
The maximum GPU usage required by a single compute node. Valid values: 1 to 8. The parameter takes effect only when the cluster uses PBS and a compute node is a GPU-accelerated instance. |
PackagePath | String | ./jobfolder |
The path that was used to run the job. |
ClockTime | String | 12:00:00 |
The maximum running time of the job. Valid formats:
|
ReRunable | Boolean | false |
Indicates whether the job can be rerun. Valid values:
|
Name | String | job1 |
The name of the job template. |
Id | String | ehpc-job-tmpl-6RxO5y**** |
The ID of the job template. |
RunasUser | String | user1 |
The name of the user that ran the job. |
InputFileUrl | String | https://test.oss-cn-beijing.aliyuncs.com/test.py |
The URL of the job files that were uploaded to an Object Storage Service (OSS) bucket. |
WithUnzipCmd | Boolean | true |
Indicates whether to decompress the job files downloaded from an OSS bucket. Valid values:
|
UnzipCmd | String | tar xzf |
The command that was used to decompress the job files downloaded from an OSS bucket. The parameter takes effect only when WithUnzipCmd is set to true. Valid values:
|
Examples
Sample requests
http(s)://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListJobTemplates
&Name=jobtemplateName
&PageNumber=1
&PageSize=10
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListJobTemplatesResponse>
<PageSize>1</PageSize>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE7****</RequestId>
<PageNumber>1</PageNumber>
<TotalCount>1</TotalCount>
<Templates>
<Task>2</Task>
<Variables>[{Name:,Value:},{Name:,Value:}]</Variables>
<CommandLine>./LammpsTest/lammps.pbs</CommandLine>
<Queue>workq</Queue>
<Priority>0</Priority>
<Mem>1GB</Mem>
<Thread>1</Thread>
<ArrayRequest>2-7:2</ArrayRequest>
<StderrRedirectPath>./LammpsTest</StderrRedirectPath>
<Node>2</Node>
<StdoutRedirectPath>./Lammps</StdoutRedirectPath>
<Gpu>1</Gpu>
<PackagePath>./jobfolder</PackagePath>
<ClockTime>12:00:00</ClockTime>
<ReRunable>false</ReRunable>
<Name>job1</Name>
<Id>ehpc-job-tmpl-6RxO5y****</Id>
<RunasUser>user1</RunasUser>
<InputFileUrl>https://test.oss-cn-beijing.aliyuncs.com//test.py</InputFileUrl>
<WithUnzipCmd>true</WithUnzipCmd>
<UnzipCmd>tar xzf</UnzipCmd>
</Templates>
</ListJobTemplatesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageSize" : 1,
"RequestId" : "04F0F334-1335-436C-A1D7-6C044FE7****",
"PageNumber" : 1,
"TotalCount" : 1,
"Templates" : [ {
"Task" : 2,
"Variables" : "[{Name:,Value:},{Name:,Value:}]",
"CommandLine" : "./LammpsTest/lammps.pbs",
"Queue" : "workq",
"Priority" : 0,
"Mem" : "1GB",
"Thread" : 1,
"ArrayRequest" : "2-7:2",
"StderrRedirectPath" : "./LammpsTest",
"Node" : 2,
"StdoutRedirectPath" : "./Lammps",
"Gpu" : 1,
"PackagePath" : "./jobfolder",
"ClockTime" : "12:00:00",
"ReRunable" : false,
"Name" : "job1",
"Id" : "ehpc-job-tmpl-6RxO5y****",
"RunasUser" : "user1",
"InputFileUrl" : "https://test.oss-cn-beijing.aliyuncs.com//test.py",
"WithUnzipCmd" : true,
"UnzipCmd" : "tar xzf"
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | The error message returned because the following parameter is invalid: %s. |
403 | ConflictOpt | A conflicting operation is running. | The error message returned because an operation that conflicts with the current operation is in progress. Try again later. |
406 | DbError | A database service error occurred. | The error message returned because the database request has failed. |
406 | AliyunError | An Alibaba Cloud product error occurred. | The error message returned because the operation has failed to call another Alibaba Cloud service. |
407 | NotAuthorized | You are not authorized by RAM for this request. | The error message returned because you are not authorized by RAM for this request. |
500 | UnknownError | An unknown error occurred. | The error message returned because an unknown error has occurred. Try again later. If the error persists, submit a ticket. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The error message returned because the request has failed. The service is temporarily unavailable. |
For a list of error codes, visit the API Error Center.