alicloud.ehpc.JobTemplate
Explore with Pulumi AI
Provides a Ehpc Job Template resource.
For information about Ehpc Job Template and how to use it, see What is Job Template.
NOTE: Available since v1.133.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.ehpc.JobTemplate("default", {
jobTemplateName: "example_value",
commandLine: "./LammpsTest/lammps.pbs",
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ehpc.JobTemplate("default",
job_template_name="example_value",
command_line="./LammpsTest/lammps.pbs")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ehpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ehpc.NewJobTemplate(ctx, "default", &ehpc.JobTemplateArgs{
JobTemplateName: pulumi.String("example_value"),
CommandLine: pulumi.String("./LammpsTest/lammps.pbs"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.Ehpc.JobTemplate("default", new()
{
JobTemplateName = "example_value",
CommandLine = "./LammpsTest/lammps.pbs",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ehpc.JobTemplate;
import com.pulumi.alicloud.ehpc.JobTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new JobTemplate("default", JobTemplateArgs.builder()
.jobTemplateName("example_value")
.commandLine("./LammpsTest/lammps.pbs")
.build());
}
}
resources:
default:
type: alicloud:ehpc:JobTemplate
properties:
jobTemplateName: example_value
commandLine: ./LammpsTest/lammps.pbs
Create JobTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new JobTemplate(name: string, args: JobTemplateArgs, opts?: CustomResourceOptions);
@overload
def JobTemplate(resource_name: str,
args: JobTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def JobTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
command_line: Optional[str] = None,
job_template_name: Optional[str] = None,
priority: Optional[int] = None,
queue: Optional[str] = None,
clock_time: Optional[str] = None,
mem: Optional[str] = None,
node: Optional[int] = None,
package_path: Optional[str] = None,
array_request: Optional[str] = None,
gpu: Optional[int] = None,
re_runable: Optional[bool] = None,
runas_user: Optional[str] = None,
stderr_redirect_path: Optional[str] = None,
stdout_redirect_path: Optional[str] = None,
task: Optional[int] = None,
thread: Optional[int] = None,
variables: Optional[str] = None)
func NewJobTemplate(ctx *Context, name string, args JobTemplateArgs, opts ...ResourceOption) (*JobTemplate, error)
public JobTemplate(string name, JobTemplateArgs args, CustomResourceOptions? opts = null)
public JobTemplate(String name, JobTemplateArgs args)
public JobTemplate(String name, JobTemplateArgs args, CustomResourceOptions options)
type: alicloud:ehpc:JobTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args JobTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args JobTemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args JobTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args JobTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args JobTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var jobTemplateResource = new AliCloud.Ehpc.JobTemplate("jobTemplateResource", new()
{
CommandLine = "string",
JobTemplateName = "string",
Priority = 0,
Queue = "string",
ClockTime = "string",
Mem = "string",
Node = 0,
PackagePath = "string",
ArrayRequest = "string",
Gpu = 0,
ReRunable = false,
RunasUser = "string",
StderrRedirectPath = "string",
StdoutRedirectPath = "string",
Task = 0,
Thread = 0,
Variables = "string",
});
example, err := ehpc.NewJobTemplate(ctx, "jobTemplateResource", &ehpc.JobTemplateArgs{
CommandLine: pulumi.String("string"),
JobTemplateName: pulumi.String("string"),
Priority: pulumi.Int(0),
Queue: pulumi.String("string"),
ClockTime: pulumi.String("string"),
Mem: pulumi.String("string"),
Node: pulumi.Int(0),
PackagePath: pulumi.String("string"),
ArrayRequest: pulumi.String("string"),
Gpu: pulumi.Int(0),
ReRunable: pulumi.Bool(false),
RunasUser: pulumi.String("string"),
StderrRedirectPath: pulumi.String("string"),
StdoutRedirectPath: pulumi.String("string"),
Task: pulumi.Int(0),
Thread: pulumi.Int(0),
Variables: pulumi.String("string"),
})
var jobTemplateResource = new JobTemplate("jobTemplateResource", JobTemplateArgs.builder()
.commandLine("string")
.jobTemplateName("string")
.priority(0)
.queue("string")
.clockTime("string")
.mem("string")
.node(0)
.packagePath("string")
.arrayRequest("string")
.gpu(0)
.reRunable(false)
.runasUser("string")
.stderrRedirectPath("string")
.stdoutRedirectPath("string")
.task(0)
.thread(0)
.variables("string")
.build());
job_template_resource = alicloud.ehpc.JobTemplate("jobTemplateResource",
command_line="string",
job_template_name="string",
priority=0,
queue="string",
clock_time="string",
mem="string",
node=0,
package_path="string",
array_request="string",
gpu=0,
re_runable=False,
runas_user="string",
stderr_redirect_path="string",
stdout_redirect_path="string",
task=0,
thread=0,
variables="string")
const jobTemplateResource = new alicloud.ehpc.JobTemplate("jobTemplateResource", {
commandLine: "string",
jobTemplateName: "string",
priority: 0,
queue: "string",
clockTime: "string",
mem: "string",
node: 0,
packagePath: "string",
arrayRequest: "string",
gpu: 0,
reRunable: false,
runasUser: "string",
stderrRedirectPath: "string",
stdoutRedirectPath: "string",
task: 0,
thread: 0,
variables: "string",
});
type: alicloud:ehpc:JobTemplate
properties:
arrayRequest: string
clockTime: string
commandLine: string
gpu: 0
jobTemplateName: string
mem: string
node: 0
packagePath: string
priority: 0
queue: string
reRunable: false
runasUser: string
stderrRedirectPath: string
stdoutRedirectPath: string
task: 0
thread: 0
variables: string
JobTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The JobTemplate resource accepts the following input properties:
- Command
Line string - Job Commands.
- Job
Template stringName - A Job Template Name.
- Array
Request string - Queue Jobs, Is of the Form: 1-10:2.
- Clock
Time string - Job Maximum Run Time.
- Gpu int
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- Mem string
- A Single Compute Node Maximum Memory.
- Node int
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- Package
Path string - Job Commands the Directory.
- Priority int
- The Job Priority.
- Queue string
- The Job Queue.
- Re
Runable bool - If the Job Is Support for the Re-Run.
- Runas
User string - The name of the user who performed the job.
- Stderr
Redirect stringPath - Error Output Path.
- Stdout
Redirect stringPath - Standard Output Path and.
- Task int
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- Thread int
- A Single Task and the Number of Required Threads.
- Variables string
- The Job of the Environment Variable.
- Command
Line string - Job Commands.
- Job
Template stringName - A Job Template Name.
- Array
Request string - Queue Jobs, Is of the Form: 1-10:2.
- Clock
Time string - Job Maximum Run Time.
- Gpu int
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- Mem string
- A Single Compute Node Maximum Memory.
- Node int
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- Package
Path string - Job Commands the Directory.
- Priority int
- The Job Priority.
- Queue string
- The Job Queue.
- Re
Runable bool - If the Job Is Support for the Re-Run.
- Runas
User string - The name of the user who performed the job.
- Stderr
Redirect stringPath - Error Output Path.
- Stdout
Redirect stringPath - Standard Output Path and.
- Task int
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- Thread int
- A Single Task and the Number of Required Threads.
- Variables string
- The Job of the Environment Variable.
- command
Line String - Job Commands.
- job
Template StringName - A Job Template Name.
- array
Request String - Queue Jobs, Is of the Form: 1-10:2.
- clock
Time String - Job Maximum Run Time.
- gpu Integer
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- mem String
- A Single Compute Node Maximum Memory.
- node Integer
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- package
Path String - Job Commands the Directory.
- priority Integer
- The Job Priority.
- queue String
- The Job Queue.
- re
Runable Boolean - If the Job Is Support for the Re-Run.
- runas
User String - The name of the user who performed the job.
- stderr
Redirect StringPath - Error Output Path.
- stdout
Redirect StringPath - Standard Output Path and.
- task Integer
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- thread Integer
- A Single Task and the Number of Required Threads.
- variables String
- The Job of the Environment Variable.
- command
Line string - Job Commands.
- job
Template stringName - A Job Template Name.
- array
Request string - Queue Jobs, Is of the Form: 1-10:2.
- clock
Time string - Job Maximum Run Time.
- gpu number
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- mem string
- A Single Compute Node Maximum Memory.
- node number
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- package
Path string - Job Commands the Directory.
- priority number
- The Job Priority.
- queue string
- The Job Queue.
- re
Runable boolean - If the Job Is Support for the Re-Run.
- runas
User string - The name of the user who performed the job.
- stderr
Redirect stringPath - Error Output Path.
- stdout
Redirect stringPath - Standard Output Path and.
- task number
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- thread number
- A Single Task and the Number of Required Threads.
- variables string
- The Job of the Environment Variable.
- command_
line str - Job Commands.
- job_
template_ strname - A Job Template Name.
- array_
request str - Queue Jobs, Is of the Form: 1-10:2.
- clock_
time str - Job Maximum Run Time.
- gpu int
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- mem str
- A Single Compute Node Maximum Memory.
- node int
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- package_
path str - Job Commands the Directory.
- priority int
- The Job Priority.
- queue str
- The Job Queue.
- re_
runable bool - If the Job Is Support for the Re-Run.
- runas_
user str - The name of the user who performed the job.
- stderr_
redirect_ strpath - Error Output Path.
- stdout_
redirect_ strpath - Standard Output Path and.
- task int
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- thread int
- A Single Task and the Number of Required Threads.
- variables str
- The Job of the Environment Variable.
- command
Line String - Job Commands.
- job
Template StringName - A Job Template Name.
- array
Request String - Queue Jobs, Is of the Form: 1-10:2.
- clock
Time String - Job Maximum Run Time.
- gpu Number
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- mem String
- A Single Compute Node Maximum Memory.
- node Number
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- package
Path String - Job Commands the Directory.
- priority Number
- The Job Priority.
- queue String
- The Job Queue.
- re
Runable Boolean - If the Job Is Support for the Re-Run.
- runas
User String - The name of the user who performed the job.
- stderr
Redirect StringPath - Error Output Path.
- stdout
Redirect StringPath - Standard Output Path and.
- task Number
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- thread Number
- A Single Task and the Number of Required Threads.
- variables String
- The Job of the Environment Variable.
Outputs
All input properties are implicitly available as output properties. Additionally, the JobTemplate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing JobTemplate Resource
Get an existing JobTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: JobTemplateState, opts?: CustomResourceOptions): JobTemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
array_request: Optional[str] = None,
clock_time: Optional[str] = None,
command_line: Optional[str] = None,
gpu: Optional[int] = None,
job_template_name: Optional[str] = None,
mem: Optional[str] = None,
node: Optional[int] = None,
package_path: Optional[str] = None,
priority: Optional[int] = None,
queue: Optional[str] = None,
re_runable: Optional[bool] = None,
runas_user: Optional[str] = None,
stderr_redirect_path: Optional[str] = None,
stdout_redirect_path: Optional[str] = None,
task: Optional[int] = None,
thread: Optional[int] = None,
variables: Optional[str] = None) -> JobTemplate
func GetJobTemplate(ctx *Context, name string, id IDInput, state *JobTemplateState, opts ...ResourceOption) (*JobTemplate, error)
public static JobTemplate Get(string name, Input<string> id, JobTemplateState? state, CustomResourceOptions? opts = null)
public static JobTemplate get(String name, Output<String> id, JobTemplateState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Array
Request string - Queue Jobs, Is of the Form: 1-10:2.
- Clock
Time string - Job Maximum Run Time.
- Command
Line string - Job Commands.
- Gpu int
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- Job
Template stringName - A Job Template Name.
- Mem string
- A Single Compute Node Maximum Memory.
- Node int
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- Package
Path string - Job Commands the Directory.
- Priority int
- The Job Priority.
- Queue string
- The Job Queue.
- Re
Runable bool - If the Job Is Support for the Re-Run.
- Runas
User string - The name of the user who performed the job.
- Stderr
Redirect stringPath - Error Output Path.
- Stdout
Redirect stringPath - Standard Output Path and.
- Task int
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- Thread int
- A Single Task and the Number of Required Threads.
- Variables string
- The Job of the Environment Variable.
- Array
Request string - Queue Jobs, Is of the Form: 1-10:2.
- Clock
Time string - Job Maximum Run Time.
- Command
Line string - Job Commands.
- Gpu int
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- Job
Template stringName - A Job Template Name.
- Mem string
- A Single Compute Node Maximum Memory.
- Node int
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- Package
Path string - Job Commands the Directory.
- Priority int
- The Job Priority.
- Queue string
- The Job Queue.
- Re
Runable bool - If the Job Is Support for the Re-Run.
- Runas
User string - The name of the user who performed the job.
- Stderr
Redirect stringPath - Error Output Path.
- Stdout
Redirect stringPath - Standard Output Path and.
- Task int
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- Thread int
- A Single Task and the Number of Required Threads.
- Variables string
- The Job of the Environment Variable.
- array
Request String - Queue Jobs, Is of the Form: 1-10:2.
- clock
Time String - Job Maximum Run Time.
- command
Line String - Job Commands.
- gpu Integer
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- job
Template StringName - A Job Template Name.
- mem String
- A Single Compute Node Maximum Memory.
- node Integer
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- package
Path String - Job Commands the Directory.
- priority Integer
- The Job Priority.
- queue String
- The Job Queue.
- re
Runable Boolean - If the Job Is Support for the Re-Run.
- runas
User String - The name of the user who performed the job.
- stderr
Redirect StringPath - Error Output Path.
- stdout
Redirect StringPath - Standard Output Path and.
- task Integer
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- thread Integer
- A Single Task and the Number of Required Threads.
- variables String
- The Job of the Environment Variable.
- array
Request string - Queue Jobs, Is of the Form: 1-10:2.
- clock
Time string - Job Maximum Run Time.
- command
Line string - Job Commands.
- gpu number
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- job
Template stringName - A Job Template Name.
- mem string
- A Single Compute Node Maximum Memory.
- node number
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- package
Path string - Job Commands the Directory.
- priority number
- The Job Priority.
- queue string
- The Job Queue.
- re
Runable boolean - If the Job Is Support for the Re-Run.
- runas
User string - The name of the user who performed the job.
- stderr
Redirect stringPath - Error Output Path.
- stdout
Redirect stringPath - Standard Output Path and.
- task number
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- thread number
- A Single Task and the Number of Required Threads.
- variables string
- The Job of the Environment Variable.
- array_
request str - Queue Jobs, Is of the Form: 1-10:2.
- clock_
time str - Job Maximum Run Time.
- command_
line str - Job Commands.
- gpu int
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- job_
template_ strname - A Job Template Name.
- mem str
- A Single Compute Node Maximum Memory.
- node int
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- package_
path str - Job Commands the Directory.
- priority int
- The Job Priority.
- queue str
- The Job Queue.
- re_
runable bool - If the Job Is Support for the Re-Run.
- runas_
user str - The name of the user who performed the job.
- stderr_
redirect_ strpath - Error Output Path.
- stdout_
redirect_ strpath - Standard Output Path and.
- task int
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- thread int
- A Single Task and the Number of Required Threads.
- variables str
- The Job of the Environment Variable.
- array
Request String - Queue Jobs, Is of the Form: 1-10:2.
- clock
Time String - Job Maximum Run Time.
- command
Line String - Job Commands.
- gpu Number
- A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
- job
Template StringName - A Job Template Name.
- mem String
- A Single Compute Node Maximum Memory.
- node Number
- Submit a Task Is Required for Computing the Number of Data Nodes to Be. Possible Values: 1~5000 .
- package
Path String - Job Commands the Directory.
- priority Number
- The Job Priority.
- queue String
- The Job Queue.
- re
Runable Boolean - If the Job Is Support for the Re-Run.
- runas
User String - The name of the user who performed the job.
- stderr
Redirect StringPath - Error Output Path.
- stdout
Redirect StringPath - Standard Output Path and.
- task Number
- A Single Compute Node Required Number of Tasks. Possible Values: 1~20000 .
- thread Number
- A Single Task and the Number of Required Threads.
- variables String
- The Job of the Environment Variable.
Import
Ehpc Job Template can be imported using the id, e.g.
$ pulumi import alicloud:ehpc/jobTemplate:JobTemplate example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.