- 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.
ListCrawlsCommand
Returns all the crawls of a specified crawler. Returns only the crawls that have occurred since the launch date of the crawler history feature, and only retains up to 12 months of crawls. Older crawls will not be returned.
You may use this API to:
-
Retrive all the crawls of a specified crawler.
-
Retrieve all the crawls of a specified crawler within a limited count.
-
Retrieve all the crawls of a specified crawler in a specific time range.
-
Retrieve all the crawls of a specified crawler with a particular state, crawl ID, or DPU hour value.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, ListCrawlsCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, ListCrawlsCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // ListCrawlsRequest
CrawlerName: "STRING_VALUE", // required
MaxResults: Number("int"),
Filters: [ // CrawlsFilterList
{ // CrawlsFilter
FieldName: "CRAWL_ID" || "STATE" || "START_TIME" || "END_TIME" || "DPU_HOUR",
FilterOperator: "GT" || "GE" || "LT" || "LE" || "EQ" || "NE",
FieldValue: "STRING_VALUE",
},
],
NextToken: "STRING_VALUE",
};
const command = new ListCrawlsCommand(input);
const response = await client.send(command);
// { // ListCrawlsResponse
// Crawls: [ // CrawlerHistoryList
// { // CrawlerHistory
// CrawlId: "STRING_VALUE",
// State: "RUNNING" || "COMPLETED" || "FAILED" || "STOPPED",
// StartTime: new Date("TIMESTAMP"),
// EndTime: new Date("TIMESTAMP"),
// Summary: "STRING_VALUE",
// ErrorMessage: "STRING_VALUE",
// LogGroup: "STRING_VALUE",
// LogStream: "STRING_VALUE",
// MessagePrefix: "STRING_VALUE",
// DPUHour: Number("double"),
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListCrawlsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
CrawlerName Required | string | undefined | The name of the crawler whose runs you want to retrieve. |
Filters | CrawlsFilter[] | undefined | Filters the crawls by the criteria you specify in a list of |
MaxResults | number | undefined | The maximum number of results to return. The default is 20, and maximum is 100. |
NextToken | string | undefined | A continuation token, if this is a continuation call. |
ListCrawlsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Crawls | CrawlerHistory[] | undefined | A list of |
NextToken | string | undefined | A continuation token for paginating the returned list of tokens, returned if the current segment of the list is not the last. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EntityNotFoundException | client | A specified entity does not exist |
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. |