GetJobQueueSnapshot - Amazon Batch
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

GetJobQueueSnapshot

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.

Request Syntax

POST /v1/getjobqueuesnapshot HTTP/1.1 Content-type: application/json { "jobQueue": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

jobQueue

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

Type: String

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "frontOfQueue": { "jobs": [ { "earliestTimeAtPosition": number, "jobArn": "string" } ], "lastUpdatedAt": number }, "frontOfQuotaShares": { "lastUpdatedAt": number, "quotaShares": { "string" : [ { "earliestTimeAtPosition": number, "jobArn": "string" } ] } }, "queueUtilization": { "fairshareUtilization": { "activeShareCount": number, "topCapacityUtilization": [ { "capacityUsage": [ { "capacityUnit": "string", "quantity": number } ], "shareIdentifier": "string" } ] }, "lastUpdatedAt": number, "quotaShareUtilization": { "topCapacityUtilization": [ { "capacityUsage": [ { "capacityUnit": "string", "quantity": number } ], "quotaShareName": "string" } ] }, "totalCapacityUsage": [ { "capacityUnit": "string", "quantity": number } ] } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

frontOfQueue

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.

Type: FrontOfQueueDetail object

frontOfQuotaShares

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

Type: FrontOfQuotaSharesDetail object

queueUtilization

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

Type: QueueSnapshotUtilizationDetail object

Errors

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.

HTTP Status Code: 400

ServerException

These errors are usually caused by a server issue.

HTTP Status Code: 500

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: