Modifies a job template.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | EditJobTemplate |
The operation that you want to perform. Set the value to EditJobTemplate. |
TemplateId | String | Yes | ehpc-job-tmpl-6RxO5y**** |
The ID of the job template. You can call the ListJobTemplates operation to obtain the job template ID. |
CommandLine | String | Yes | ./LammpsTest/lammps.pbs |
The command that is used to run the job. |
Name | String | Yes | jobTemapleteName |
The name of the job template. You can call the ListJobTemplates operation to obtain the job template name. |
RunasUser | String | No | user |
The name of the user that runs the job. You can call the ListUsers operation to query the users of the cluster. |
Priority | Integer | No | 0 |
The priority of the job. Valid values: 0 to 9. A large value indicates a high priority. Default value: 0 |
PackagePath | String | No | ./packageFolder |
The path that is used to run the job. |
StdoutRedirectPath | String | No | ./LammpsTest |
The output file path of stdout. |
StderrRedirectPath | String | No | ./Lammps |
The output file path of stderr. |
ReRunable | Boolean | No | false |
Specifies whether the job can be rerun. Valid values:
|
ArrayRequest | String | No | 1-10: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. |
Variables | String | No | [{Name:,Value:},{Name:,Value:}] |
The runtime variables passed to the job. They can be accessed by using environment variables in the executable file. |
Queue | String | No | workq |
The name of the queue. |
ClockTime | String | No | 12:00:00 |
The maximum running time of the job. Valid formats:
We recommend that you use the hh:mm:ss format. If the maximum running time is 12 hours, set the value to 12:00:00. |
Node | Integer | No | 2 |
The number of the compute nodes. Valid values: 1 to 500. Note If the parameter is not specified, the Task, Thread, Mem, and Gpu parameters become
invalid.
|
Task | Integer | No | 2 |
The number of tasks required by a single compute node. Valid values: 1 to 1000. |
Thread | Integer | No | 1 |
The number of threads required by a single compute node. Valid values: 1 to 1000. |
Mem | String | No | 1GB |
The maximum memory usage required by a single compute node. Unit: GB, MB, or KB. The unit is case-insensitive. |
Gpu | Integer | No | 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. |
InputFileUrl | String | No | https://test.oss-cn-beijing.aliyuncs.com/test.py |
The URL of the job files that are uploaded to an Object Storage Service (OSS) bucket. |
WithUnzipCmd | Boolean | No | true |
Specifies whether to decompress the job files downloaded from an OSS bucket. Valid values:
|
UnzipCmd | String | No | tar xzf |
The command that is used to decompress the job files downloaded from an OSS bucket. The parameter takes effect only when WithUnzipCmd is set to true. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TemplateId | String | ehpc-job-tmpl-6RxO5y**** |
The ID of the job template. |
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE7**** |
The ID of the request. |
Examples
Sample requests
https://ehpc.cn-hangzhou.aliyuncs.com/?Action=EditJobTemplate
&CommandLine=./LammpsTest/lammps.pbs
&Name=jobTemapleteName
&TemplateId=ehpc-job-tmpl-6RxO5y****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<EditJobTemplateResponse>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE7****</RequestId>
<TemplateId>ehpc-job-tmpl-6RxO5y****</TemplateId>
</EditJobTemplateResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "04F0F334-1335-436C-A1D7-6C044FE7****",
"TemplateId" : "ehpc-job-tmpl-6RxO5y****"
}
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. |
400 | NotEnabled | You have not enabled this service | The error message returned because the service is not activated for your account. |
400 | InDebt | Your account has overdue payments. | The error message returned because your account has overdue payments. |
403 | InvalidClusterStatus | The operation failed due to invalid cluster status. | The error message returned because the operation is not supported while the cluster is in the current state. |
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. |
403 | TemplateNameExist | The template name already exists. | The error message returned because the name of the job template already exists. |
403 | TooMuchTemplates | The number of templates exceeds the quota. | The error message returned because the number of job templates has exceeded the job template quota. |
404 | TemplateNotExist | The template ID does not exist. | The error message returned because the job template ID does not exist. |
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. |
409 | PartFailure | Part of the batch operation failed. | The error message returned because the batch operation has failed. |
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.