- 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
Returns an array of JobListEntry
objects of the specified length. Each JobListEntry
object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of export jobs. Calling this API action in one of the US regions will return jobs from the list of all jobs associated with this account in all US regions.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SnowballClient, ListJobsCommand } from "@aws-sdk/client-snowball"; // ES Modules import
// const { SnowballClient, ListJobsCommand } = require("@aws-sdk/client-snowball"); // CommonJS import
const client = new SnowballClient(config);
const input = { // ListJobsRequest
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new ListJobsCommand(input);
const response = await client.send(command);
// { // ListJobsResult
// JobListEntries: [ // JobListEntryList
// { // JobListEntry
// JobId: "STRING_VALUE",
// JobState: "New" || "PreparingAppliance" || "PreparingShipment" || "InTransitToCustomer" || "WithCustomer" || "InTransitToAWS" || "WithAWSSortingFacility" || "WithAWS" || "InProgress" || "Complete" || "Cancelled" || "Listing" || "Pending",
// IsMaster: true || false,
// JobType: "IMPORT" || "EXPORT" || "LOCAL_USE",
// SnowballType: "STANDARD" || "EDGE" || "EDGE_C" || "EDGE_CG" || "EDGE_S" || "SNC1_HDD" || "SNC1_SSD" || "V3_5C" || "V3_5S" || "RACK_5U_C",
// CreationDate: new Date("TIMESTAMP"),
// Description: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
Example Usage
ListJobsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxResults | number | undefined | The number of |
NextToken | string | undefined | HTTP requests are stateless. To identify what object comes "next" in the list of |
ListJobsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
JobListEntries | JobListEntry[] | undefined | Each |
NextToken | string | undefined | HTTP requests are stateless. If you use this automatically generated |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidNextTokenException | client | The |
SnowballServiceException | Base exception class for all service exceptions from Snowball service. |