Skip to content

get_job_queue_snapshot async

get_job_queue_snapshot(
    *,
    config_overrides: Optional[AsyncBatchClientConfig] = None,
    job_queue: Optional[String] = None,
) -> GetJobQueueSnapshotResponse

Provides a snapshot of job queue state, including ordering of RUNNABLE jobs, as well as capacity utilization for already dispatched jobs. The first 100 RUNNABLE jobs in the job queue are listed in order of dispatch. For job queues with an attached quota-share policy, the first RUNNABLE job in each quota share is also listed. Capacity utilization for the job queue is provided, as well as break downs by share for job queues with attached fair-share or quota-share scheduling policies.

Parameters:

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

    The job queue’s name or full queue Amazon Resource Name (ARN).

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.

Source code in docs_src/capo_batch/_services/async_batch.py
async def get_job_queue_snapshot(
    self,
    *,
    config_overrides: Optional[AsyncBatchClientConfig] = None,
    job_queue: Optional["capo_batch.types.string.String"] = None,
) -> "capo_batch.types.get_job_queue_snapshot_response.GetJobQueueSnapshotResponse":
    """<p>Provides a snapshot of job queue state, including ordering of <code>RUNNABLE</code> jobs, as well as capacity utilization for already dispatched jobs. The first 100 <code>RUNNABLE</code> jobs in the job queue are listed in order of dispatch. For job queues with an attached quota-share policy, the first <code>RUNNABLE</code> job in each quota share is also listed. Capacity utilization for the job queue is provided, as well as break downs by share for job queues with attached fair-share or quota-share scheduling policies.</p>

    Args:
        job_queue: <p>The job queue’s name or full queue Amazon Resource Name (ARN).</p>

    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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_batch.types.get_job_queue_snapshot_request.GetJobQueueSnapshotRequest]",
    ) -> AsyncOperationResponse[
        "capo_batch.types.get_job_queue_snapshot_response.GetJobQueueSnapshotResponse"
    ]:
        import capo_batch._operations.aws_batch_v20160810.get_job_queue_snapshot

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetJobQueueSnapshot")
    )
    input_: capo_batch.types.get_job_queue_snapshot_request.GetJobQueueSnapshotRequest = {}
    if job_queue is not None:
        input_["job_queue"] = job_queue

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