1. Packages
  2. Alicloud Provider
  3. API Docs
  4. ehpc
  5. JobTemplate
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.ehpc.JobTemplate

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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

    The JobTemplate resource accepts the following input properties:

    CommandLine string
    Job Commands.
    JobTemplateName string
    A Job Template Name.
    ArrayRequest string
    Queue Jobs, Is of the Form: 1-10:2.
    ClockTime 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 .
    PackagePath string
    Job Commands the Directory.
    Priority int
    The Job Priority.
    Queue string
    The Job Queue.
    ReRunable bool
    If the Job Is Support for the Re-Run.
    RunasUser string
    The name of the user who performed the job.
    StderrRedirectPath string
    Error Output Path.
    StdoutRedirectPath string
    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.
    CommandLine string
    Job Commands.
    JobTemplateName string
    A Job Template Name.
    ArrayRequest string
    Queue Jobs, Is of the Form: 1-10:2.
    ClockTime 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 .
    PackagePath string
    Job Commands the Directory.
    Priority int
    The Job Priority.
    Queue string
    The Job Queue.
    ReRunable bool
    If the Job Is Support for the Re-Run.
    RunasUser string
    The name of the user who performed the job.
    StderrRedirectPath string
    Error Output Path.
    StdoutRedirectPath string
    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.
    commandLine String
    Job Commands.
    jobTemplateName String
    A Job Template Name.
    arrayRequest String
    Queue Jobs, Is of the Form: 1-10:2.
    clockTime 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 .
    packagePath String
    Job Commands the Directory.
    priority Integer
    The Job Priority.
    queue String
    The Job Queue.
    reRunable Boolean
    If the Job Is Support for the Re-Run.
    runasUser String
    The name of the user who performed the job.
    stderrRedirectPath String
    Error Output Path.
    stdoutRedirectPath String
    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.
    commandLine string
    Job Commands.
    jobTemplateName string
    A Job Template Name.
    arrayRequest string
    Queue Jobs, Is of the Form: 1-10:2.
    clockTime 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 .
    packagePath string
    Job Commands the Directory.
    priority number
    The Job Priority.
    queue string
    The Job Queue.
    reRunable boolean
    If the Job Is Support for the Re-Run.
    runasUser string
    The name of the user who performed the job.
    stderrRedirectPath string
    Error Output Path.
    stdoutRedirectPath string
    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_name str
    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_path str
    Error Output Path.
    stdout_redirect_path str
    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.
    commandLine String
    Job Commands.
    jobTemplateName String
    A Job Template Name.
    arrayRequest String
    Queue Jobs, Is of the Form: 1-10:2.
    clockTime 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 .
    packagePath String
    Job Commands the Directory.
    priority Number
    The Job Priority.
    queue String
    The Job Queue.
    reRunable Boolean
    If the Job Is Support for the Re-Run.
    runasUser String
    The name of the user who performed the job.
    stderrRedirectPath String
    Error Output Path.
    stdoutRedirectPath String
    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.
    The following state arguments are supported:
    ArrayRequest string
    Queue Jobs, Is of the Form: 1-10:2.
    ClockTime string
    Job Maximum Run Time.
    CommandLine string
    Job Commands.
    Gpu int
    A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
    JobTemplateName string
    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 .
    PackagePath string
    Job Commands the Directory.
    Priority int
    The Job Priority.
    Queue string
    The Job Queue.
    ReRunable bool
    If the Job Is Support for the Re-Run.
    RunasUser string
    The name of the user who performed the job.
    StderrRedirectPath string
    Error Output Path.
    StdoutRedirectPath string
    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.
    ArrayRequest string
    Queue Jobs, Is of the Form: 1-10:2.
    ClockTime string
    Job Maximum Run Time.
    CommandLine string
    Job Commands.
    Gpu int
    A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
    JobTemplateName string
    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 .
    PackagePath string
    Job Commands the Directory.
    Priority int
    The Job Priority.
    Queue string
    The Job Queue.
    ReRunable bool
    If the Job Is Support for the Re-Run.
    RunasUser string
    The name of the user who performed the job.
    StderrRedirectPath string
    Error Output Path.
    StdoutRedirectPath string
    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.
    arrayRequest String
    Queue Jobs, Is of the Form: 1-10:2.
    clockTime String
    Job Maximum Run Time.
    commandLine String
    Job Commands.
    gpu Integer
    A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
    jobTemplateName String
    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 .
    packagePath String
    Job Commands the Directory.
    priority Integer
    The Job Priority.
    queue String
    The Job Queue.
    reRunable Boolean
    If the Job Is Support for the Re-Run.
    runasUser String
    The name of the user who performed the job.
    stderrRedirectPath String
    Error Output Path.
    stdoutRedirectPath String
    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.
    arrayRequest string
    Queue Jobs, Is of the Form: 1-10:2.
    clockTime string
    Job Maximum Run Time.
    commandLine string
    Job Commands.
    gpu number
    A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
    jobTemplateName string
    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 .
    packagePath string
    Job Commands the Directory.
    priority number
    The Job Priority.
    queue string
    The Job Queue.
    reRunable boolean
    If the Job Is Support for the Re-Run.
    runasUser string
    The name of the user who performed the job.
    stderrRedirectPath string
    Error Output Path.
    stdoutRedirectPath string
    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_name str
    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_path str
    Error Output Path.
    stdout_redirect_path str
    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.
    arrayRequest String
    Queue Jobs, Is of the Form: 1-10:2.
    clockTime String
    Job Maximum Run Time.
    commandLine String
    Job Commands.
    gpu Number
    A Single Compute Node Using the GPU Number.Possible Values: 1~20000.
    jobTemplateName String
    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 .
    packagePath String
    Job Commands the Directory.
    priority Number
    The Job Priority.
    queue String
    The Job Queue.
    reRunable Boolean
    If the Job Is Support for the Re-Run.
    runasUser String
    The name of the user who performed the job.
    stderrRedirectPath String
    Error Output Path.
    stdoutRedirectPath String
    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.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi