Skip to content

describe_job_queues async

describe_job_queues(
    *,
    config_overrides: Optional[AsyncBatchClientConfig] = None,
    job_queues: Optional[StringList] = None,
    max_results: Optional[Integer] = None,
    next_token: Optional[String] = None,
) -> DescribeJobQueuesResponse

Describes one or more of your job queues.

Parameters:

  • job_queues (Optional[StringList], default: None ) –

    A list of up to 100 queue names or full queue Amazon Resource Name (ARN) entries.

  • max_results (Optional[Integer], default: None ) –

    The maximum number of results returned by DescribeJobQueues in paginated output. When this parameter is used, DescribeJobQueues only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeJobQueues request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then DescribeJobQueues returns up to 100 results and a nextToken value if applicable.

  • next_token (Optional[String], default: None ) –

    The nextToken value returned from a previous paginated DescribeJobQueues request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

    Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.

Raises:

  • ClientException –

    These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.

  • ServerException –

    These errors are usually caused by a server issue.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To describe a job queue This example describes the HighPriority job queue.

>>> await client.describe_job_queues(job_queues=['HighPriority'])
Source code in docs_src/capo_batch/_services/async_batch.py
async def describe_job_queues(
    self,
    *,
    config_overrides: Optional[AsyncBatchClientConfig] = None,
    job_queues: Optional["capo_batch.types.string_list.StringList"] = None,
    max_results: Optional["capo_batch.types.integer.Integer"] = None,
    next_token: Optional["capo_batch.types.string.String"] = None,
) -> "capo_batch.types.describe_job_queues_response.DescribeJobQueuesResponse":
    """<p>Describes one or more of your job queues.</p>

    Args:
        job_queues: <p>A list of up to 100 queue names or full queue Amazon Resource Name (ARN) entries.</p>
        max_results: <p>The maximum number of results returned by <code>DescribeJobQueues</code> in paginated output. When this parameter is used, <code>DescribeJobQueues</code> only returns <code>maxResults</code> results in a single page and a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribeJobQueues</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, then <code>DescribeJobQueues</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>
        next_token: <p>The <code>nextToken</code> value returned from a previous paginated <code>DescribeJobQueues</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is <code>null</code> when there are no more results to return.</p> <note> <p>Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note>

    Raises:
        capo_batch.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.</p>
        capo_batch.errors.server_exception.ServerException: <p>These errors are usually caused by a server issue.</p>
        capo_batch.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe a job queue
        This example describes the HighPriority job queue.

        >>> await client.describe_job_queues(job_queues=['HighPriority'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_batch.types.describe_job_queues_request.DescribeJobQueuesRequest]",
    ) -> AsyncOperationResponse[
        "capo_batch.types.describe_job_queues_response.DescribeJobQueuesResponse"
    ]:
        import capo_batch._operations.aws_batch_v20160810.describe_job_queues

        (
            output,
            http_response,
        ) = await capo_batch._operations.aws_batch_v20160810.describe_job_queues.async_describe_job_queues(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeJobQueues")
    )
    input_: capo_batch.types.describe_job_queues_request.DescribeJobQueuesRequest = {}
    if job_queues is not None:
        input_["job_queues"] = job_queues
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output