getSchedulingPolicy function
Future<GetSchedulingPolicyResult>
getSchedulingPolicy(
- GetSchedulingPolicyArgs args, {
- InvokeOptions? options,
The Batch Scheduling Policy data source allows access to details of a specific Scheduling Policy within AWS Batch.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.batch.getSchedulingPolicy({
arn: "arn:aws:batch:us-east-1:012345678910:scheduling-policy/example",
});
import pulumi
import pulumi_aws as aws
test = aws.batch.get_scheduling_policy(arn="arn:aws:batch:us-east-1:012345678910:scheduling-policy/example")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.Batch.GetSchedulingPolicy.Invoke(new()
{
Arn = "arn:aws:batch:us-east-1:012345678910:scheduling-policy/example",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/batch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := batch.LookupSchedulingPolicy(ctx, &batch.LookupSchedulingPolicyArgs{
Arn: "arn:aws:batch:us-east-1:012345678910:scheduling-policy/example",
}, nil)
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_batch_getschedulingpolicy" "test" {
arn = "arn:aws:batch:us-east-1:012345678910:scheduling-policy/example"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.batch.BatchFunctions;
import com.pulumi.aws.batch.inputs.GetSchedulingPolicyArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
final var test = BatchFunctions.getSchedulingPolicy(GetSchedulingPolicyArgs.builder()
.arn("arn:aws:batch:us-east-1:012345678910:scheduling-policy/example")
.build());
}
}
variables:
test:
fn::invoke:
function: aws:batch:getSchedulingPolicy
arguments:
arn: arn:aws:batch:us-east-1:012345678910:scheduling-policy/example
args Arguments passed to this invoke. Arguments for getSchedulingPolicy.
options Invoke options controlling this call.
Implementation
Future<GetSchedulingPolicyResult> getSchedulingPolicy(
GetSchedulingPolicyArgs args, {
pulumi.InvokeOptions? options,
}) async {
final deployment = pulumi.Deployment.instance;
final result = await deployment.invoke<Map<String, dynamic>>(
'aws:batch/getSchedulingPolicy:getSchedulingPolicy',
args.toMap(),
options: pulumi.toDeploymentInvokeOptions(options),
);
return GetSchedulingPolicyResult.fromMap(result);
}