# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from . import outputs

__all__ = [
    'GetJobQueueResult',
    'AwaitableGetJobQueueResult',
    'get_job_queue',
]

@pulumi.output_type
class GetJobQueueResult:
    """
    A collection of values returned by getJobQueue.
    """
    def __init__(__self__, arn=None, compute_environment_orders=None, id=None, name=None, priority=None, state=None, status=None, status_reason=None, tags=None):
        if arn and not isinstance(arn, str):
            raise TypeError("Expected argument 'arn' to be a str")
        pulumi.set(__self__, "arn", arn)
        if compute_environment_orders and not isinstance(compute_environment_orders, list):
            raise TypeError("Expected argument 'compute_environment_orders' to be a list")
        pulumi.set(__self__, "compute_environment_orders", compute_environment_orders)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if priority and not isinstance(priority, int):
            raise TypeError("Expected argument 'priority' to be a int")
        pulumi.set(__self__, "priority", priority)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if status_reason and not isinstance(status_reason, str):
            raise TypeError("Expected argument 'status_reason' to be a str")
        pulumi.set(__self__, "status_reason", status_reason)
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter
    def arn(self) -> str:
        """
        The ARN of the job queue.
        """
        return pulumi.get(self, "arn")

    @property
    @pulumi.getter(name="computeEnvironmentOrders")
    def compute_environment_orders(self) -> Sequence['outputs.GetJobQueueComputeEnvironmentOrderResult']:
        """
        The 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.
        * `compute_environment_order.#.order` - The order of the compute environment.
        * `compute_environment_order.#.compute_environment` - The ARN of the compute environment.
        """
        return pulumi.get(self, "compute_environment_orders")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def priority(self) -> int:
        """
        The priority of the job queue. Job queues with a higher priority are evaluated first when
        associated with the same compute environment.
        """
        return pulumi.get(self, "priority")

    @property
    @pulumi.getter
    def state(self) -> str:
        """
        Describes the ability of the queue to accept new jobs (for example, `ENABLED` or `DISABLED`).
        """
        return pulumi.get(self, "state")

    @property
    @pulumi.getter
    def status(self) -> str:
        """
        The current status of the job queue (for example, `CREATING` or `VALID`).
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="statusReason")
    def status_reason(self) -> str:
        """
        A short, human-readable string to provide additional details about the current status
        of the job queue.
        """
        return pulumi.get(self, "status_reason")

    @property
    @pulumi.getter
    def tags(self) -> Mapping[str, str]:
        """
        Key-value map of resource tags
        """
        return pulumi.get(self, "tags")


class AwaitableGetJobQueueResult(GetJobQueueResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetJobQueueResult(
            arn=self.arn,
            compute_environment_orders=self.compute_environment_orders,
            id=self.id,
            name=self.name,
            priority=self.priority,
            state=self.state,
            status=self.status,
            status_reason=self.status_reason,
            tags=self.tags)


def get_job_queue(name: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetJobQueueResult:
    """
    The Batch Job Queue data source allows access to details of a specific
    job queue within AWS Batch.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_aws as aws

    test_queue = aws.batch.get_job_queue(name="tf-test-batch-job-queue")
    ```


    :param str name: The name of the job queue.
    :param Mapping[str, str] tags: Key-value map of resource tags
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['tags'] = tags
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:batch/getJobQueue:getJobQueue', __args__, opts=opts, typ=GetJobQueueResult).value

    return AwaitableGetJobQueueResult(
        arn=__ret__.arn,
        compute_environment_orders=__ret__.compute_environment_orders,
        id=__ret__.id,
        name=__ret__.name,
        priority=__ret__.priority,
        state=__ret__.state,
        status=__ret__.status,
        status_reason=__ret__.status_reason,
        tags=__ret__.tags)
