Batch / Client / get_job_queue_snapshot

get_job_queue_snapshot

Batch.Client.get_job_queue_snapshot(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_job_queue_snapshot(
    jobQueue='string'
)
Parameters:

jobQueue (string) –

[REQUIRED]

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

Return type:

dict

Returns:

Response Syntax

{
    'frontOfQueue': {
        'jobs': [
            {
                'jobArn': 'string',
                'earliestTimeAtPosition': 123
            },
        ],
        'lastUpdatedAt': 123
    },
    'frontOfQuotaShares': {
        'quotaShares': {
            'string': [
                {
                    'jobArn': 'string',
                    'earliestTimeAtPosition': 123
                },
            ]
        },
        'lastUpdatedAt': 123
    },
    'queueUtilization': {
        'totalCapacityUsage': [
            {
                'capacityUnit': 'string',
                'quantity': 123.0
            },
        ],
        'fairshareUtilization': {
            'activeShareCount': 123,
            'topCapacityUtilization': [
                {
                    'shareIdentifier': 'string',
                    'capacityUsage': [
                        {
                            'capacityUnit': 'string',
                            'quantity': 123.0
                        },
                    ]
                },
            ]
        },
        'quotaShareUtilization': {
            'topCapacityUtilization': [
                {
                    'quotaShareName': 'string',
                    'capacityUsage': [
                        {
                            'capacityUnit': 'string',
                            'quantity': 123.0
                        },
                    ]
                },
            ]
        },
        'lastUpdatedAt': 123
    }
}

Response Structure

  • (dict) –

    • frontOfQueue (dict) –

      The list of the first 100 RUNNABLE jobs in each job queue. For first-in-first-out (FIFO) job queues, jobs are ordered based on their submission time. For job queues with an attached fair-share scheduling (FSS) or quota-share policy, jobs are ordered based on their job priority and share usage.

      • jobs (list) –

        The Amazon Resource Names (ARNs) of the first 100 RUNNABLE jobs in a named job queue. For first-in-first-out (FIFO) job queues, jobs are ordered based on their submission time. For fair-share scheduling (FSS) job queues, jobs are ordered based on their job priority and share usage.

        • (dict) –

          An object that represents summary details for the first 100 RUNNABLE jobs in a job queue.

          • jobArn (string) –

            The ARN for a job in a named job queue.

          • earliestTimeAtPosition (integer) –

            The Unix timestamp (in milliseconds) for when the job transitioned to its current position in the job queue.

      • lastUpdatedAt (integer) –

        The Unix timestamp (in milliseconds) for when each of the first 100 RUNNABLE jobs were last updated.

    • frontOfQuotaShares (dict) –

      The first RUNNABLE job in each quota share. Jobs are ordered based on their job priority and share usage.

      • quotaShares (dict) –

        Contains a list of the first RUNNABLE job in each named quota share.

        • (string) –

          • (list) –

            • (dict) –

              An object that represents summary details for the first RUNNABLE job in a quota share.

              • jobArn (string) –

                The ARN for a job in a named quota share.

              • earliestTimeAtPosition (integer) –

                The Unix timestamp (in milliseconds) for when the job transitioned to its current position in the quota share.

      • lastUpdatedAt (integer) –

        The Unix timestamp (in milliseconds) for when the first RUNNABLE job per quota share were all last updated.

    • queueUtilization (dict) –

      The job queue’s capacity utilization, including total usage and breakdown per given share.

      • totalCapacityUsage (list) –

        The total capacity usage for the entire job queue.

        • (dict) –

          The configured capacity usage for a job queue snapshot, including the unit of measure and quantity of resources being used.

          • capacityUnit (string) –

            The unit of measure for the capacity usage. For compute jobs, this is VCPU for Amazon EC2 and cpu for Amazon EKS. For service jobs, this is the instance type.

          • quantity (float) –

            The quantity of capacity being used in the queue snapshot, measured in the units specified by capacityUnit.

      • fairshareUtilization (dict) –

        The utilization information for a fairshare scheduling job queues, including active share count and top capacity utilization by share.

        • activeShareCount (integer) –

          The total number of active shares in the fairshare scheduling job queue that are currently utilizing capacity.

        • topCapacityUtilization (list) –

          A list of the top 20 shares with the highest capacity utilization, ordered by usage amount.

          • (dict) –

            The capacity utilization for a specific share in a fairshare scheduling job queue, including the share identifier and its current usage.

            • shareIdentifier (string) –

              The share identifier for the fairshare scheduling job queue.

            • capacityUsage (list) –

              The capacity usage information for this share, including the unit of measure and quantity being used. This is VCPU for Amazon EC2 and cpu for Amazon EKS.

              • (dict) –

                The capacity usage for a fairshare scheduling job queue.

                • capacityUnit (string) –

                  The unit of measure for the capacity usage. For compute jobs, this is VCPU for Amazon EC2 and cpu for Amazon EKS. For service jobs, this is the instance type.

                • quantity (float) –

                  The quantity of capacity being used, measured in the units specified by capacityUnit.

      • quotaShareUtilization (dict) –

        The utilization information for a job queue with a quota share scheduling policy.

        • topCapacityUtilization (list) –

          A list of the top capacity utilizations across quota shares associated with a job queue.

          • (dict) –

            The capacity utilization for a specific quota share, including the quota share name and its current usage.

            • quotaShareName (string) –

              The name of the quota share.

            • capacityUsage (list) –

              The capacity usage information for this quota share, including the units of compute capacity and quantity being used.

              • (dict) –

                The capacity usage for a quota share, including units of compute capacity and quantity of resources being used.

                • capacityUnit (string) –

                  The unit of compute capacity for the capacity usage.

                • quantity (float) –

                  The quantity of capacity being used.

      • lastUpdatedAt (integer) –

        The Unix timestamp (in milliseconds) for when the queue utilization information was last updated.

Exceptions

  • Batch.Client.exceptions.ClientException

  • Batch.Client.exceptions.ServerException