- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListJobsCommand
Retrieves the names of all job resources in this Amazon Web Services account, or the resources with the specified tag. This operation allows you to see which resources are available in your account, and their names.
This operation takes the optional Tags
field, which you can use as a filter on the response so that tagged resources can be retrieved as a group. If you choose to use tags filtering, only resources with the tag are retrieved.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, ListJobsCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, ListJobsCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // ListJobsRequest
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
Tags: { // TagsMap
"<keys>": "STRING_VALUE",
},
};
const command = new ListJobsCommand(input);
const response = await client.send(command);
// { // ListJobsResponse
// JobNames: [ // JobNameList
// "STRING_VALUE",
// ],
// NextToken: "STRING_VALUE",
// };
ListJobsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxResults | number | undefined | The maximum size of a list to return. |
NextToken | string | undefined | A continuation token, if this is a continuation request. |
Tags | Record<string, string> | undefined | Specifies to return only these tagged resources. |
ListJobsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
JobNames | string[] | undefined | The names of all jobs in the account, or the jobs with the specified tags. |
NextToken | string | undefined | A continuation token, if the returned list does not contain the last metric available. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EntityNotFoundException | client | A specified entity does not exist |
InternalServiceException | server | An internal service error occurred. |
InvalidInputException | client | The input provided was not valid. |
OperationTimeoutException | client | The operation timed out. |
GlueServiceException | Base exception class for all service exceptions from Glue service. |