1. Packages
  2. AWS Classic
  3. API Docs
  4. batch
  5. JobQueue

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.batch.JobQueue

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Provides a Batch Job Queue resource.

    Example Usage

    Basic Job Queue

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const testQueue = new aws.batch.JobQueue("test_queue", {
        name: "tf-test-batch-job-queue",
        state: "ENABLED",
        priority: 1,
        computeEnvironmentOrders: [
            {
                order: 1,
                computeEnvironment: testEnvironment1.arn,
            },
            {
                order: 2,
                computeEnvironment: testEnvironment2.arn,
            },
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test_queue = aws.batch.JobQueue("test_queue",
        name="tf-test-batch-job-queue",
        state="ENABLED",
        priority=1,
        compute_environment_orders=[
            aws.batch.JobQueueComputeEnvironmentOrderArgs(
                order=1,
                compute_environment=test_environment1["arn"],
            ),
            aws.batch.JobQueueComputeEnvironmentOrderArgs(
                order=2,
                compute_environment=test_environment2["arn"],
            ),
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := batch.NewJobQueue(ctx, "test_queue", &batch.JobQueueArgs{
    			Name:     pulumi.String("tf-test-batch-job-queue"),
    			State:    pulumi.String("ENABLED"),
    			Priority: pulumi.Int(1),
    			ComputeEnvironmentOrders: batch.JobQueueComputeEnvironmentOrderArray{
    				&batch.JobQueueComputeEnvironmentOrderArgs{
    					Order:              pulumi.Int(1),
    					ComputeEnvironment: pulumi.Any(testEnvironment1.Arn),
    				},
    				&batch.JobQueueComputeEnvironmentOrderArgs{
    					Order:              pulumi.Int(2),
    					ComputeEnvironment: pulumi.Any(testEnvironment2.Arn),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var testQueue = new Aws.Batch.JobQueue("test_queue", new()
        {
            Name = "tf-test-batch-job-queue",
            State = "ENABLED",
            Priority = 1,
            ComputeEnvironmentOrders = new[]
            {
                new Aws.Batch.Inputs.JobQueueComputeEnvironmentOrderArgs
                {
                    Order = 1,
                    ComputeEnvironment = testEnvironment1.Arn,
                },
                new Aws.Batch.Inputs.JobQueueComputeEnvironmentOrderArgs
                {
                    Order = 2,
                    ComputeEnvironment = testEnvironment2.Arn,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.batch.JobQueue;
    import com.pulumi.aws.batch.JobQueueArgs;
    import com.pulumi.aws.batch.inputs.JobQueueComputeEnvironmentOrderArgs;
    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 testQueue = new JobQueue("testQueue", JobQueueArgs.builder()        
                .name("tf-test-batch-job-queue")
                .state("ENABLED")
                .priority(1)
                .computeEnvironmentOrders(            
                    JobQueueComputeEnvironmentOrderArgs.builder()
                        .order(1)
                        .computeEnvironment(testEnvironment1.arn())
                        .build(),
                    JobQueueComputeEnvironmentOrderArgs.builder()
                        .order(2)
                        .computeEnvironment(testEnvironment2.arn())
                        .build())
                .build());
    
        }
    }
    
    resources:
      testQueue:
        type: aws:batch:JobQueue
        name: test_queue
        properties:
          name: tf-test-batch-job-queue
          state: ENABLED
          priority: 1
          computeEnvironmentOrders:
            - order: 1
              computeEnvironment: ${testEnvironment1.arn}
            - order: 2
              computeEnvironment: ${testEnvironment2.arn}
    

    Job Queue with a fair share scheduling policy

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.batch.SchedulingPolicy("example", {
        name: "example",
        fairSharePolicy: {
            computeReservation: 1,
            shareDecaySeconds: 3600,
            shareDistributions: [{
                shareIdentifier: "A1*",
                weightFactor: 0.1,
            }],
        },
    });
    const exampleJobQueue = new aws.batch.JobQueue("example", {
        name: "tf-test-batch-job-queue",
        schedulingPolicyArn: example.arn,
        state: "ENABLED",
        priority: 1,
        computeEnvironmentOrders: [
            {
                order: 1,
                computeEnvironment: testEnvironment1.arn,
            },
            {
                order: 2,
                computeEnvironment: testEnvironment2.arn,
            },
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.batch.SchedulingPolicy("example",
        name="example",
        fair_share_policy=aws.batch.SchedulingPolicyFairSharePolicyArgs(
            compute_reservation=1,
            share_decay_seconds=3600,
            share_distributions=[aws.batch.SchedulingPolicyFairSharePolicyShareDistributionArgs(
                share_identifier="A1*",
                weight_factor=0.1,
            )],
        ))
    example_job_queue = aws.batch.JobQueue("example",
        name="tf-test-batch-job-queue",
        scheduling_policy_arn=example.arn,
        state="ENABLED",
        priority=1,
        compute_environment_orders=[
            aws.batch.JobQueueComputeEnvironmentOrderArgs(
                order=1,
                compute_environment=test_environment1["arn"],
            ),
            aws.batch.JobQueueComputeEnvironmentOrderArgs(
                order=2,
                compute_environment=test_environment2["arn"],
            ),
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := batch.NewSchedulingPolicy(ctx, "example", &batch.SchedulingPolicyArgs{
    			Name: pulumi.String("example"),
    			FairSharePolicy: &batch.SchedulingPolicyFairSharePolicyArgs{
    				ComputeReservation: pulumi.Int(1),
    				ShareDecaySeconds:  pulumi.Int(3600),
    				ShareDistributions: batch.SchedulingPolicyFairSharePolicyShareDistributionArray{
    					&batch.SchedulingPolicyFairSharePolicyShareDistributionArgs{
    						ShareIdentifier: pulumi.String("A1*"),
    						WeightFactor:    pulumi.Float64(0.1),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = batch.NewJobQueue(ctx, "example", &batch.JobQueueArgs{
    			Name:                pulumi.String("tf-test-batch-job-queue"),
    			SchedulingPolicyArn: example.Arn,
    			State:               pulumi.String("ENABLED"),
    			Priority:            pulumi.Int(1),
    			ComputeEnvironmentOrders: batch.JobQueueComputeEnvironmentOrderArray{
    				&batch.JobQueueComputeEnvironmentOrderArgs{
    					Order:              pulumi.Int(1),
    					ComputeEnvironment: pulumi.Any(testEnvironment1.Arn),
    				},
    				&batch.JobQueueComputeEnvironmentOrderArgs{
    					Order:              pulumi.Int(2),
    					ComputeEnvironment: pulumi.Any(testEnvironment2.Arn),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Batch.SchedulingPolicy("example", new()
        {
            Name = "example",
            FairSharePolicy = new Aws.Batch.Inputs.SchedulingPolicyFairSharePolicyArgs
            {
                ComputeReservation = 1,
                ShareDecaySeconds = 3600,
                ShareDistributions = new[]
                {
                    new Aws.Batch.Inputs.SchedulingPolicyFairSharePolicyShareDistributionArgs
                    {
                        ShareIdentifier = "A1*",
                        WeightFactor = 0.1,
                    },
                },
            },
        });
    
        var exampleJobQueue = new Aws.Batch.JobQueue("example", new()
        {
            Name = "tf-test-batch-job-queue",
            SchedulingPolicyArn = example.Arn,
            State = "ENABLED",
            Priority = 1,
            ComputeEnvironmentOrders = new[]
            {
                new Aws.Batch.Inputs.JobQueueComputeEnvironmentOrderArgs
                {
                    Order = 1,
                    ComputeEnvironment = testEnvironment1.Arn,
                },
                new Aws.Batch.Inputs.JobQueueComputeEnvironmentOrderArgs
                {
                    Order = 2,
                    ComputeEnvironment = testEnvironment2.Arn,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.batch.SchedulingPolicy;
    import com.pulumi.aws.batch.SchedulingPolicyArgs;
    import com.pulumi.aws.batch.inputs.SchedulingPolicyFairSharePolicyArgs;
    import com.pulumi.aws.batch.JobQueue;
    import com.pulumi.aws.batch.JobQueueArgs;
    import com.pulumi.aws.batch.inputs.JobQueueComputeEnvironmentOrderArgs;
    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 example = new SchedulingPolicy("example", SchedulingPolicyArgs.builder()        
                .name("example")
                .fairSharePolicy(SchedulingPolicyFairSharePolicyArgs.builder()
                    .computeReservation(1)
                    .shareDecaySeconds(3600)
                    .shareDistributions(SchedulingPolicyFairSharePolicyShareDistributionArgs.builder()
                        .shareIdentifier("A1*")
                        .weightFactor(0.1)
                        .build())
                    .build())
                .build());
    
            var exampleJobQueue = new JobQueue("exampleJobQueue", JobQueueArgs.builder()        
                .name("tf-test-batch-job-queue")
                .schedulingPolicyArn(example.arn())
                .state("ENABLED")
                .priority(1)
                .computeEnvironmentOrders(            
                    JobQueueComputeEnvironmentOrderArgs.builder()
                        .order(1)
                        .computeEnvironment(testEnvironment1.arn())
                        .build(),
                    JobQueueComputeEnvironmentOrderArgs.builder()
                        .order(2)
                        .computeEnvironment(testEnvironment2.arn())
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:batch:SchedulingPolicy
        properties:
          name: example
          fairSharePolicy:
            computeReservation: 1
            shareDecaySeconds: 3600
            shareDistributions:
              - shareIdentifier: A1*
                weightFactor: 0.1
      exampleJobQueue:
        type: aws:batch:JobQueue
        name: example
        properties:
          name: tf-test-batch-job-queue
          schedulingPolicyArn: ${example.arn}
          state: ENABLED
          priority: 1
          computeEnvironmentOrders:
            - order: 1
              computeEnvironment: ${testEnvironment1.arn}
            - order: 2
              computeEnvironment: ${testEnvironment2.arn}
    

    Create JobQueue Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new JobQueue(name: string, args: JobQueueArgs, opts?: CustomResourceOptions);
    @overload
    def JobQueue(resource_name: str,
                 args: JobQueueArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def JobQueue(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 priority: Optional[int] = None,
                 state: Optional[str] = None,
                 compute_environment_orders: Optional[Sequence[JobQueueComputeEnvironmentOrderArgs]] = None,
                 compute_environments: Optional[Sequence[str]] = None,
                 name: Optional[str] = None,
                 scheduling_policy_arn: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 timeouts: Optional[JobQueueTimeoutsArgs] = None)
    func NewJobQueue(ctx *Context, name string, args JobQueueArgs, opts ...ResourceOption) (*JobQueue, error)
    public JobQueue(string name, JobQueueArgs args, CustomResourceOptions? opts = null)
    public JobQueue(String name, JobQueueArgs args)
    public JobQueue(String name, JobQueueArgs args, CustomResourceOptions options)
    
    type: aws:batch:JobQueue
    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 JobQueueArgs
    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 JobQueueArgs
    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 JobQueueArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args JobQueueArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args JobQueueArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var jobQueueResource = new Aws.Batch.JobQueue("jobQueueResource", new()
    {
        Priority = 0,
        State = "string",
        ComputeEnvironmentOrders = new[]
        {
            new Aws.Batch.Inputs.JobQueueComputeEnvironmentOrderArgs
            {
                ComputeEnvironment = "string",
                Order = 0,
            },
        },
        Name = "string",
        SchedulingPolicyArn = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.Batch.Inputs.JobQueueTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := batch.NewJobQueue(ctx, "jobQueueResource", &batch.JobQueueArgs{
    	Priority: pulumi.Int(0),
    	State:    pulumi.String("string"),
    	ComputeEnvironmentOrders: batch.JobQueueComputeEnvironmentOrderArray{
    		&batch.JobQueueComputeEnvironmentOrderArgs{
    			ComputeEnvironment: pulumi.String("string"),
    			Order:              pulumi.Int(0),
    		},
    	},
    	Name:                pulumi.String("string"),
    	SchedulingPolicyArn: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &batch.JobQueueTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var jobQueueResource = new JobQueue("jobQueueResource", JobQueueArgs.builder()        
        .priority(0)
        .state("string")
        .computeEnvironmentOrders(JobQueueComputeEnvironmentOrderArgs.builder()
            .computeEnvironment("string")
            .order(0)
            .build())
        .name("string")
        .schedulingPolicyArn("string")
        .tags(Map.of("string", "string"))
        .timeouts(JobQueueTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    job_queue_resource = aws.batch.JobQueue("jobQueueResource",
        priority=0,
        state="string",
        compute_environment_orders=[aws.batch.JobQueueComputeEnvironmentOrderArgs(
            compute_environment="string",
            order=0,
        )],
        name="string",
        scheduling_policy_arn="string",
        tags={
            "string": "string",
        },
        timeouts=aws.batch.JobQueueTimeoutsArgs(
            create="string",
            delete="string",
            update="string",
        ))
    
    const jobQueueResource = new aws.batch.JobQueue("jobQueueResource", {
        priority: 0,
        state: "string",
        computeEnvironmentOrders: [{
            computeEnvironment: "string",
            order: 0,
        }],
        name: "string",
        schedulingPolicyArn: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: aws:batch:JobQueue
    properties:
        computeEnvironmentOrders:
            - computeEnvironment: string
              order: 0
        name: string
        priority: 0
        schedulingPolicyArn: string
        state: string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
            update: string
    

    JobQueue 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 JobQueue resource accepts the following input properties:

    Priority int
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    State string
    The state of the job queue. Must be one of: ENABLED or DISABLED
    ComputeEnvironmentOrders List<JobQueueComputeEnvironmentOrder>
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    ComputeEnvironments List<string>
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    Name string
    Specifies the name of the job queue.
    SchedulingPolicyArn string
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts JobQueueTimeouts
    Priority int
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    State string
    The state of the job queue. Must be one of: ENABLED or DISABLED
    ComputeEnvironmentOrders []JobQueueComputeEnvironmentOrderArgs
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    ComputeEnvironments []string
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    Name string
    Specifies the name of the job queue.
    SchedulingPolicyArn string
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts JobQueueTimeoutsArgs
    priority Integer
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    state String
    The state of the job queue. Must be one of: ENABLED or DISABLED
    computeEnvironmentOrders List<JobQueueComputeEnvironmentOrder>
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    computeEnvironments List<String>
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    name String
    Specifies the name of the job queue.
    schedulingPolicyArn String
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts JobQueueTimeouts
    priority number
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    state string
    The state of the job queue. Must be one of: ENABLED or DISABLED
    computeEnvironmentOrders JobQueueComputeEnvironmentOrder[]
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    computeEnvironments string[]
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    name string
    Specifies the name of the job queue.
    schedulingPolicyArn string
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts JobQueueTimeouts
    priority int
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    state str
    The state of the job queue. Must be one of: ENABLED or DISABLED
    compute_environment_orders Sequence[JobQueueComputeEnvironmentOrderArgs]
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    compute_environments Sequence[str]
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    name str
    Specifies the name of the job queue.
    scheduling_policy_arn str
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts JobQueueTimeoutsArgs
    priority Number
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    state String
    The state of the job queue. Must be one of: ENABLED or DISABLED
    computeEnvironmentOrders List<Property Map>
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    computeEnvironments List<String>
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    name String
    Specifies the name of the job queue.
    schedulingPolicyArn String
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the JobQueue resource produces the following output properties:

    Arn string
    The Amazon Resource Name of the job queue.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name of the job queue.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name of the job queue.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name of the job queue.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The Amazon Resource Name of the job queue.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name of the job queue.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing JobQueue Resource

    Get an existing JobQueue 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?: JobQueueState, opts?: CustomResourceOptions): JobQueue
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            compute_environment_orders: Optional[Sequence[JobQueueComputeEnvironmentOrderArgs]] = None,
            compute_environments: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            priority: Optional[int] = None,
            scheduling_policy_arn: Optional[str] = None,
            state: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            timeouts: Optional[JobQueueTimeoutsArgs] = None) -> JobQueue
    func GetJobQueue(ctx *Context, name string, id IDInput, state *JobQueueState, opts ...ResourceOption) (*JobQueue, error)
    public static JobQueue Get(string name, Input<string> id, JobQueueState? state, CustomResourceOptions? opts = null)
    public static JobQueue get(String name, Output<String> id, JobQueueState 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:
    Arn string
    The Amazon Resource Name of the job queue.
    ComputeEnvironmentOrders List<JobQueueComputeEnvironmentOrder>
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    ComputeEnvironments List<string>
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    Name string
    Specifies the name of the job queue.
    Priority int
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    SchedulingPolicyArn string
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    State string
    The state of the job queue. Must be one of: ENABLED or DISABLED
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Timeouts JobQueueTimeouts
    Arn string
    The Amazon Resource Name of the job queue.
    ComputeEnvironmentOrders []JobQueueComputeEnvironmentOrderArgs
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    ComputeEnvironments []string
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    Name string
    Specifies the name of the job queue.
    Priority int
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    SchedulingPolicyArn string
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    State string
    The state of the job queue. Must be one of: ENABLED or DISABLED
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Timeouts JobQueueTimeoutsArgs
    arn String
    The Amazon Resource Name of the job queue.
    computeEnvironmentOrders List<JobQueueComputeEnvironmentOrder>
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    computeEnvironments List<String>
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    name String
    Specifies the name of the job queue.
    priority Integer
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    schedulingPolicyArn String
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    state String
    The state of the job queue. Must be one of: ENABLED or DISABLED
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    timeouts JobQueueTimeouts
    arn string
    The Amazon Resource Name of the job queue.
    computeEnvironmentOrders JobQueueComputeEnvironmentOrder[]
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    computeEnvironments string[]
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    name string
    Specifies the name of the job queue.
    priority number
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    schedulingPolicyArn string
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    state string
    The state of the job queue. Must be one of: ENABLED or DISABLED
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    timeouts JobQueueTimeouts
    arn str
    The Amazon Resource Name of the job queue.
    compute_environment_orders Sequence[JobQueueComputeEnvironmentOrderArgs]
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    compute_environments Sequence[str]
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    name str
    Specifies the name of the job queue.
    priority int
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    scheduling_policy_arn str
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    state str
    The state of the job queue. Must be one of: ENABLED or DISABLED
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    timeouts JobQueueTimeoutsArgs
    arn String
    The Amazon Resource Name of the job queue.
    computeEnvironmentOrders List<Property Map>
    The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.
    computeEnvironments List<String>
    (Optional) This parameter is deprecated, please use compute_environment_order instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter compute_environments will always be used over compute_environment_order. Please adjust your HCL accordingly.

    Deprecated: This parameter will be replaced by compute_environments_order.

    name String
    Specifies the name of the job queue.
    priority Number
    The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    schedulingPolicyArn String
    The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
    state String
    The state of the job queue. Must be one of: ENABLED or DISABLED
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    timeouts Property Map

    Supporting Types

    JobQueueComputeEnvironmentOrder, JobQueueComputeEnvironmentOrderArgs

    ComputeEnvironment string
    The Amazon Resource Name (ARN) of the compute environment.
    Order int
    The order of the compute environment. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first.
    ComputeEnvironment string
    The Amazon Resource Name (ARN) of the compute environment.
    Order int
    The order of the compute environment. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first.
    computeEnvironment String
    The Amazon Resource Name (ARN) of the compute environment.
    order Integer
    The order of the compute environment. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first.
    computeEnvironment string
    The Amazon Resource Name (ARN) of the compute environment.
    order number
    The order of the compute environment. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first.
    compute_environment str
    The Amazon Resource Name (ARN) of the compute environment.
    order int
    The order of the compute environment. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first.
    computeEnvironment String
    The Amazon Resource Name (ARN) of the compute environment.
    order Number
    The order of the compute environment. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first.

    JobQueueTimeouts, JobQueueTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    Using pulumi import, import Batch Job Queue using the arn. For example:

    $ pulumi import aws:batch/jobQueue:JobQueue test_queue arn:aws:batch:us-east-1:123456789012:job-queue/sample
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi