Skip to content

start_crawler async

start_crawler(
    name: NameString, *, config_overrides: Optional[AsyncGlueClientConfig] = None
) -> StartCrawlerResponse

Starts a crawl using the specified crawler, regardless of what is scheduled. If the crawler is already running, returns a CrawlerRunningException.

Parameters:

  • name (NameString) –

    Name of the crawler to start.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def start_crawler(
    self,
    name: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> "capo_glue.types.start_crawler_response.StartCrawlerResponse":
    """<p>Starts a crawl using the specified crawler, regardless of what is scheduled. If the crawler is already running, returns a <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-exceptions.html#aws-glue-api-exceptions-CrawlerRunningException">CrawlerRunningException</a>.</p>

    Args:
        name: <p>Name of the crawler to start.</p>

    Raises:
        capo_glue.errors.crawler_running_exception.CrawlerRunningException: <p>The operation cannot be performed because the crawler is already running.</p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.start_crawler_request.StartCrawlerRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.start_crawler_response.StartCrawlerResponse"
    ]:
        import capo_glue._operations.aws_glue.start_crawler

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.start_crawler.async_start_crawler(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartCrawler")
    )
    input_: capo_glue.types.start_crawler_request.StartCrawlerRequest = {
        "name": name
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output