1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. batch
  6. getJobQueue
Viewing docs for AWS v7.51.1
published on Friday, Oct 16, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.51.1
published on Friday, Oct 16, 2026 by Pulumi

    The Batch Job Queue data source allows access to details of a specific job queue within AWS Batch.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test_queue = aws.batch.getJobQueue({
        name: "tf-test-batch-job-queue",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test_queue = aws.batch.get_job_queue(name="tf-test-batch-job-queue")
    
    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.LookupJobQueue(ctx, &batch.LookupJobQueueArgs{
    			Name: "tf-test-batch-job-queue",
    		}, nil)
    		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 test_queue = Aws.Batch.GetJobQueue.Invoke(new()
        {
            Name = "tf-test-batch-job-queue",
        });
    
    });
    
    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.GetJobQueueArgs;
    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-queue = BatchFunctions.getJobQueue(GetJobQueueArgs.builder()
                .name("tf-test-batch-job-queue")
                .build());
    
        }
    }
    
    variables:
      test-queue:
        fn::invoke:
          function: aws:batch:getJobQueue
          arguments:
            name: tf-test-batch-job-queue
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    data "aws_batch_getjobqueue" "test-queue" {
      name = "tf-test-batch-job-queue"
    }
    

    Using getJobQueue

    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 getJobQueue(args: GetJobQueueArgs, opts?: InvokeOptions): Promise<GetJobQueueResult>
    function getJobQueueOutput(args: GetJobQueueOutputArgs, opts?: InvokeOutputOptions): Output<GetJobQueueResult>
    def get_job_queue(name: Optional[str] = None,
                      region: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetJobQueueResult
    def get_job_queue_output(name: pulumi.Input[Optional[str]] = None,
                      region: pulumi.Input[Optional[str]] = None,
                      tags: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
                      opts: Optional[InvokeOutputOptions] = None) -> Output[GetJobQueueResult]
    func LookupJobQueue(ctx *Context, args *LookupJobQueueArgs, opts ...InvokeOption) (*LookupJobQueueResult, error)
    func LookupJobQueueOutput(ctx *Context, args *LookupJobQueueOutputArgs, opts ...InvokeOption) LookupJobQueueResultOutput

    > Note: This function is named LookupJobQueue in the Go SDK.

    public static class GetJobQueue 
    {
        public static Task<GetJobQueueResult> InvokeAsync(GetJobQueueArgs args, InvokeOptions? opts = null)
        public static Output<GetJobQueueResult> Invoke(GetJobQueueInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetJobQueueResult> Invoke(GetJobQueueInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetJobQueueResult> getJobQueue(GetJobQueueArgs args, InvokeOptions options)
    public static Output<GetJobQueueResult> getJobQueue(GetJobQueueArgs args, InvokeOptions options)
    public static Output<GetJobQueueResult> getJobQueue(GetJobQueueArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: aws:batch/getJobQueue:getJobQueue
      arguments:
        # arguments dictionary
    data "aws_batch_get_job_queue" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Name of the job queue.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags Dictionary<string, string>
    Key-value map of resource tags.
    Name string
    Name of the job queue.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags map[string]string
    Key-value map of resource tags.
    name string
    Name of the job queue.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags map(string)
    Key-value map of resource tags.
    name String
    Name of the job queue.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String,String>
    Key-value map of resource tags.
    name string
    Name of the job queue.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags {[key: string]: string}
    Key-value map of resource tags.
    name str
    Name of the job queue.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Mapping[str, str]
    Key-value map of resource tags.
    name String
    Name of the job queue.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String>
    Key-value map of resource tags.

    getJobQueue Result

    The following output properties are available:

    Arn string
    ARN of the job queue.
    ComputeEnvironmentOrders List<GetJobQueueComputeEnvironmentOrder>
    Compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.
    Id string
    The provider-assigned unique ID for this managed resource.
    JobStateTimeLimitActions List<GetJobQueueJobStateTimeLimitAction>
    Action that AWS Batch takes after the job has remained at the head of the queue in the specified state for longer than the specified time.
    Name string
    Priority int
    Priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    Region string
    SchedulingPolicyArn string
    ARN of the fair share scheduling policy. If this attribute has a value, the job queue uses a fair share scheduling policy. If this attribute does not have a value, the job queue uses a first in, first out (FIFO) scheduling policy.
    State string
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    Status string
    Current status of the job queue (for example, CREATING or VALID).
    StatusReason string
    Short, human-readable string to provide additional details about the current status of the job queue.
    Tags Dictionary<string, string>
    Key-value map of resource tags.
    Arn string
    ARN of the job queue.
    ComputeEnvironmentOrders []GetJobQueueComputeEnvironmentOrder
    Compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.
    Id string
    The provider-assigned unique ID for this managed resource.
    JobStateTimeLimitActions []GetJobQueueJobStateTimeLimitAction
    Action that AWS Batch takes after the job has remained at the head of the queue in the specified state for longer than the specified time.
    Name string
    Priority int
    Priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    Region string
    SchedulingPolicyArn string
    ARN of the fair share scheduling policy. If this attribute has a value, the job queue uses a fair share scheduling policy. If this attribute does not have a value, the job queue uses a first in, first out (FIFO) scheduling policy.
    State string
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    Status string
    Current status of the job queue (for example, CREATING or VALID).
    StatusReason string
    Short, human-readable string to provide additional details about the current status of the job queue.
    Tags map[string]string
    Key-value map of resource tags.
    arn string
    ARN of the job queue.
    compute_environment_orders list(object)
    Compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.
    id string
    The provider-assigned unique ID for this managed resource.
    job_state_time_limit_actions list(object)
    Action that AWS Batch takes after the job has remained at the head of the queue in the specified state for longer than the specified time.
    name string
    priority number
    Priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    region string
    scheduling_policy_arn string
    ARN of the fair share scheduling policy. If this attribute has a value, the job queue uses a fair share scheduling policy. If this attribute does not have a value, the job queue uses a first in, first out (FIFO) scheduling policy.
    state string
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    status string
    Current status of the job queue (for example, CREATING or VALID).
    status_reason string
    Short, human-readable string to provide additional details about the current status of the job queue.
    tags map(string)
    Key-value map of resource tags.
    arn String
    ARN of the job queue.
    computeEnvironmentOrders List<GetJobQueueComputeEnvironmentOrder>
    Compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.
    id String
    The provider-assigned unique ID for this managed resource.
    jobStateTimeLimitActions List<GetJobQueueJobStateTimeLimitAction>
    Action that AWS Batch takes after the job has remained at the head of the queue in the specified state for longer than the specified time.
    name String
    priority Integer
    Priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    region String
    schedulingPolicyArn String
    ARN of the fair share scheduling policy. If this attribute has a value, the job queue uses a fair share scheduling policy. If this attribute does not have a value, the job queue uses a first in, first out (FIFO) scheduling policy.
    state String
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    status String
    Current status of the job queue (for example, CREATING or VALID).
    statusReason String
    Short, human-readable string to provide additional details about the current status of the job queue.
    tags Map<String,String>
    Key-value map of resource tags.
    arn string
    ARN of the job queue.
    computeEnvironmentOrders GetJobQueueComputeEnvironmentOrder[]
    Compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.
    id string
    The provider-assigned unique ID for this managed resource.
    jobStateTimeLimitActions GetJobQueueJobStateTimeLimitAction[]
    Action that AWS Batch takes after the job has remained at the head of the queue in the specified state for longer than the specified time.
    name string
    priority number
    Priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    region string
    schedulingPolicyArn string
    ARN of the fair share scheduling policy. If this attribute has a value, the job queue uses a fair share scheduling policy. If this attribute does not have a value, the job queue uses a first in, first out (FIFO) scheduling policy.
    state string
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    status string
    Current status of the job queue (for example, CREATING or VALID).
    statusReason string
    Short, human-readable string to provide additional details about the current status of the job queue.
    tags {[key: string]: string}
    Key-value map of resource tags.
    arn str
    ARN of the job queue.
    compute_environment_orders Sequence[GetJobQueueComputeEnvironmentOrder]
    Compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.
    id str
    The provider-assigned unique ID for this managed resource.
    job_state_time_limit_actions Sequence[GetJobQueueJobStateTimeLimitAction]
    Action that AWS Batch takes after the job has remained at the head of the queue in the specified state for longer than the specified time.
    name str
    priority int
    Priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    region str
    scheduling_policy_arn str
    ARN of the fair share scheduling policy. If this attribute has a value, the job queue uses a fair share scheduling policy. If this attribute does not have a value, the job queue uses a first in, first out (FIFO) scheduling policy.
    state str
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    status str
    Current status of the job queue (for example, CREATING or VALID).
    status_reason str
    Short, human-readable string to provide additional details about the current status of the job queue.
    tags Mapping[str, str]
    Key-value map of resource tags.
    arn String
    ARN of the job queue.
    computeEnvironmentOrders List<Property Map>
    Compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.
    id String
    The provider-assigned unique ID for this managed resource.
    jobStateTimeLimitActions List<Property Map>
    Action that AWS Batch takes after the job has remained at the head of the queue in the specified state for longer than the specified time.
    name String
    priority Number
    Priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
    region String
    schedulingPolicyArn String
    ARN of the fair share scheduling policy. If this attribute has a value, the job queue uses a fair share scheduling policy. If this attribute does not have a value, the job queue uses a first in, first out (FIFO) scheduling policy.
    state String
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    status String
    Current status of the job queue (for example, CREATING or VALID).
    statusReason String
    Short, human-readable string to provide additional details about the current status of the job queue.
    tags Map<String>
    Key-value map of resource tags.

    Supporting Types

    GetJobQueueComputeEnvironmentOrder

    ComputeEnvironment string
    ARN of the compute environment.
    Order int
    Order of the compute environment.
    ComputeEnvironment string
    ARN of the compute environment.
    Order int
    Order of the compute environment.
    compute_environment string
    ARN of the compute environment.
    order number
    Order of the compute environment.
    computeEnvironment String
    ARN of the compute environment.
    order Integer
    Order of the compute environment.
    computeEnvironment string
    ARN of the compute environment.
    order number
    Order of the compute environment.
    compute_environment str
    ARN of the compute environment.
    order int
    Order of the compute environment.
    computeEnvironment String
    ARN of the compute environment.
    order Number
    Order of the compute environment.

    GetJobQueueJobStateTimeLimitAction

    Action string
    Action to take when a job is at the head of the job queue in the specified state for the specified period of time.
    MaxTimeSeconds int
    Approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
    Reason string
    Reason to log for the action being taken.
    State string
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    Action string
    Action to take when a job is at the head of the job queue in the specified state for the specified period of time.
    MaxTimeSeconds int
    Approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
    Reason string
    Reason to log for the action being taken.
    State string
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    action string
    Action to take when a job is at the head of the job queue in the specified state for the specified period of time.
    max_time_seconds number
    Approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
    reason string
    Reason to log for the action being taken.
    state string
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    action String
    Action to take when a job is at the head of the job queue in the specified state for the specified period of time.
    maxTimeSeconds Integer
    Approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
    reason String
    Reason to log for the action being taken.
    state String
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    action string
    Action to take when a job is at the head of the job queue in the specified state for the specified period of time.
    maxTimeSeconds number
    Approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
    reason string
    Reason to log for the action being taken.
    state string
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    action str
    Action to take when a job is at the head of the job queue in the specified state for the specified period of time.
    max_time_seconds int
    Approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
    reason str
    Reason to log for the action being taken.
    state str
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).
    action String
    Action to take when a job is at the head of the job queue in the specified state for the specified period of time.
    maxTimeSeconds Number
    Approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
    reason String
    Reason to log for the action being taken.
    state String
    Ability of the queue to accept new jobs (for example, ENABLED or DISABLED).

    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 aws logo
    Viewing docs for AWS v7.51.1
    published on Friday, Oct 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial