DescribeJobQueuesCommand

Describes one or more of your job queues.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { BatchClient, DescribeJobQueuesCommand } from "@aws-sdk/client-batch"; // ES Modules import
// const { BatchClient, DescribeJobQueuesCommand } = require("@aws-sdk/client-batch"); // CommonJS import
const client = new BatchClient(config);
const input = { // DescribeJobQueuesRequest
  jobQueues: [ // StringList
    "STRING_VALUE",
  ],
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
};
const command = new DescribeJobQueuesCommand(input);
const response = await client.send(command);
// { // DescribeJobQueuesResponse
//   jobQueues: [ // JobQueueDetailList
//     { // JobQueueDetail
//       jobQueueName: "STRING_VALUE", // required
//       jobQueueArn: "STRING_VALUE", // required
//       state: "ENABLED" || "DISABLED", // required
//       schedulingPolicyArn: "STRING_VALUE",
//       status: "CREATING" || "UPDATING" || "DELETING" || "DELETED" || "VALID" || "INVALID",
//       statusReason: "STRING_VALUE",
//       priority: Number("int"), // required
//       computeEnvironmentOrder: [ // ComputeEnvironmentOrders // required
//         { // ComputeEnvironmentOrder
//           order: Number("int"), // required
//           computeEnvironment: "STRING_VALUE", // required
//         },
//       ],
//       tags: { // TagrisTagsMap
//         "<keys>": "STRING_VALUE",
//       },
//       jobStateTimeLimitActions: [ // JobStateTimeLimitActions
//         { // JobStateTimeLimitAction
//           reason: "STRING_VALUE", // required
//           state: "RUNNABLE", // required
//           maxTimeSeconds: Number("int"), // required
//           action: "CANCEL", // required
//         },
//       ],
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

Example Usage

 Loading code editor

DescribeJobQueuesCommand Input

See DescribeJobQueuesCommandInput for more details

Parameter
Type
Description
jobQueues
string[] | undefined

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

maxResults
number | undefined

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.

nextToken
string | undefined

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.

DescribeJobQueuesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
jobQueues
JobQueueDetail[] | undefined

The list of job queues.

nextToken
string | undefined

The nextToken value to include in a future DescribeJobQueues request. When the results of a DescribeJobQueues request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Throws

Name
Fault
Details
ClientException
client

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
server

These errors are usually caused by a server issue.

BatchServiceException
Base exception class for all service exceptions from Batch service.