Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi
alicloud.ehpc.getJobTemplates
Explore with Pulumi AI
This data source provides the Ehpc Job Templates of the current Alibaba Cloud user.
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",
});
const ids = alicloud.ehpc.getJobTemplatesOutput({
ids: [_default.id],
});
export const ehpcJobTemplateId1 = ids.apply(ids => ids.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ehpc.JobTemplate("default",
job_template_name="example_value",
command_line="./LammpsTest/lammps.pbs")
ids = alicloud.ehpc.get_job_templates_output(ids=[default.id])
pulumi.export("ehpcJobTemplateId1", ids.id)
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
}
ids := ehpc.GetJobTemplatesOutput(ctx, ehpc.GetJobTemplatesOutputArgs{
Ids: pulumi.StringArray{
_default.ID(),
},
}, nil)
ctx.Export("ehpcJobTemplateId1", ids.ApplyT(func(ids ehpc.GetJobTemplatesResult) (*string, error) {
return &ids.Id, nil
}).(pulumi.StringPtrOutput))
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",
});
var ids = AliCloud.Ehpc.GetJobTemplates.Invoke(new()
{
Ids = new[]
{
@default.Id,
},
});
return new Dictionary<string, object?>
{
["ehpcJobTemplateId1"] = ids.Apply(getJobTemplatesResult => getJobTemplatesResult.Id),
};
});
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 com.pulumi.alicloud.ehpc.EhpcFunctions;
import com.pulumi.alicloud.ehpc.inputs.GetJobTemplatesArgs;
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());
final var ids = EhpcFunctions.getJobTemplates(GetJobTemplatesArgs.builder()
.ids(default_.id())
.build());
ctx.export("ehpcJobTemplateId1", ids.applyValue(getJobTemplatesResult -> getJobTemplatesResult).applyValue(ids -> ids.applyValue(getJobTemplatesResult -> getJobTemplatesResult.id())));
}
}
resources:
default:
type: alicloud:ehpc:JobTemplate
properties:
jobTemplateName: example_value
commandLine: ./LammpsTest/lammps.pbs
variables:
ids:
fn::invoke:
Function: alicloud:ehpc:getJobTemplates
Arguments:
ids:
- ${default.id}
outputs:
ehpcJobTemplateId1: ${ids.id}
Using getJobTemplates
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getJobTemplates(args: GetJobTemplatesArgs, opts?: InvokeOptions): Promise<GetJobTemplatesResult>
function getJobTemplatesOutput(args: GetJobTemplatesOutputArgs, opts?: InvokeOptions): Output<GetJobTemplatesResult>
def get_job_templates(ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetJobTemplatesResult
def get_job_templates_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetJobTemplatesResult]
func GetJobTemplates(ctx *Context, args *GetJobTemplatesArgs, opts ...InvokeOption) (*GetJobTemplatesResult, error)
func GetJobTemplatesOutput(ctx *Context, args *GetJobTemplatesOutputArgs, opts ...InvokeOption) GetJobTemplatesResultOutput
> Note: This function is named GetJobTemplates
in the Go SDK.
public static class GetJobTemplates
{
public static Task<GetJobTemplatesResult> InvokeAsync(GetJobTemplatesArgs args, InvokeOptions? opts = null)
public static Output<GetJobTemplatesResult> Invoke(GetJobTemplatesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetJobTemplatesResult> getJobTemplates(GetJobTemplatesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ehpc/getJobTemplates:getJobTemplates
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Job Template IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids []string
- A list of Job Template IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Job Template IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids string[]
- A list of Job Template IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids Sequence[str]
- A list of Job Template IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Job Template IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getJobTemplates Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Templates
List<Pulumi.
Ali Cloud. Ehpc. Outputs. Get Job Templates Template> - A list of Ehpc Job Templates. Each element contains the following attributes:
- Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Templates
[]Get
Job Templates Template - A list of Ehpc Job Templates. Each element contains the following attributes:
- Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- templates
List<Get
Job Templates Template> - A list of Ehpc Job Templates. Each element contains the following attributes:
- output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- templates
Get
Job Templates Template[] - A list of Ehpc Job Templates. Each element contains the following attributes:
- output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- templates
Sequence[Get
Job Templates Template] - A list of Ehpc Job Templates. Each element contains the following attributes:
- output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- templates List<Property Map>
- A list of Ehpc Job Templates. Each element contains the following attributes:
- output
File String
Supporting Types
GetJobTemplatesTemplate
- 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.
- Id string
- The ID of the Job Template.
- Job
Template stringId - The first ID of the resource.
- 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.Possible Values: 0~9.
- 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.Possible Values: 1~20000.
- 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.
- Id string
- The ID of the Job Template.
- Job
Template stringId - The first ID of the resource.
- 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.Possible Values: 0~9.
- 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.Possible Values: 1~20000.
- 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.
- id String
- The ID of the Job Template.
- job
Template StringId - The first ID of the resource.
- 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.Possible Values: 0~9.
- 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.Possible Values: 1~20000.
- 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.
- id string
- The ID of the Job Template.
- job
Template stringId - The first ID of the resource.
- 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.Possible Values: 0~9.
- 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.Possible Values: 1~20000.
- 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.
- id str
- The ID of the Job Template.
- job_
template_ strid - The first ID of the resource.
- 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.Possible Values: 0~9.
- 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.Possible Values: 1~20000.
- 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.
- id String
- The ID of the Job Template.
- job
Template StringId - The first ID of the resource.
- 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.Possible Values: 0~9.
- 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.Possible Values: 1~20000.
- variables String
- The Job of the Environment Variable.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.