Skip to content

list_crawls

list_crawls(
    crawler_name: NameString,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    max_results: Optional[PageSize] = None,
    filters: Optional[CrawlsFilterList] = None,
    next_token: Optional[Token] = None,
) -> ListCrawlsResponse

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.

Parameters:

  • crawler_name (NameString) –

    The name of the crawler whose runs you want to retrieve.

  • max_results (Optional[PageSize], default: None ) –

    The maximum number of results to return. The default is 20, and maximum is 100.

  • filters (Optional[CrawlsFilterList], default: None ) –

    Filters the crawls by the criteria you specify in a list of CrawlsFilter objects.

  • next_token (Optional[Token], default: None ) –

    A continuation token, if this is a continuation call.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def list_crawls(
    self,
    crawler_name: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    max_results: Optional["capo_glue.types.page_size.PageSize"] = None,
    filters: Optional["capo_glue.types.crawls_filter_list.CrawlsFilterList"] = None,
    next_token: Optional["capo_glue.types.token.Token"] = None,
) -> "capo_glue.types.list_crawls_response.ListCrawlsResponse":
    """<p>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.</p> <p>You may use this API to:</p> <ul> <li> <p>Retrive all the crawls of a specified crawler.</p> </li> <li> <p>Retrieve all the crawls of a specified crawler within a limited count.</p> </li> <li> <p>Retrieve all the crawls of a specified crawler in a specific time range.</p> </li> <li> <p>Retrieve all the crawls of a specified crawler with a particular state, crawl ID, or DPU hour value.</p> </li> </ul>

    Args:
        crawler_name: <p>The name of the crawler whose runs you want to retrieve.</p>
        max_results: <p>The maximum number of results to return. The default is 20, and maximum is 100.</p>
        filters: <p>Filters the crawls by the criteria you specify in a list of <code>CrawlsFilter</code> objects.</p>
        next_token: <p>A continuation token, if this is a continuation call.</p>

    Raises:
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.list_crawls_request.ListCrawlsRequest]",
    ) -> OperationResponse[
        "capo_glue.types.list_crawls_response.ListCrawlsResponse"
    ]:
        import capo_glue._operations.aws_glue.list_crawls

        output, http_response = (
            capo_glue._operations.aws_glue.list_crawls.list_crawls(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCrawls")
    )
    input_: capo_glue.types.list_crawls_request.ListCrawlsRequest = {
        "crawler_name": crawler_name
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if filters is not None:
        input_["filters"] = filters
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output