If the specified crawler is running, stops the crawl.
Parameters:
Raises:
Source code in docs_src/capo_glue/_services/async_glue.py
| async def stop_crawler(
self,
name: "capo_glue.types.name_string.NameString",
*,
config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> "capo_glue.types.stop_crawler_response.StopCrawlerResponse":
"""<p>If the specified crawler is running, stops the crawl.</p>
Args:
name: <p>Name of the crawler to stop.</p>
Raises:
capo_glue.errors.crawler_not_running_exception.CrawlerNotRunningException: <p>The specified crawler is not running.</p>
capo_glue.errors.crawler_stopping_exception.CrawlerStoppingException: <p>The specified crawler is stopping.</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.stop_crawler_request.StopCrawlerRequest]",
) -> AsyncOperationResponse[
"capo_glue.types.stop_crawler_response.StopCrawlerResponse"
]:
import capo_glue._operations.aws_glue.stop_crawler
(
output,
http_response,
) = await capo_glue._operations.aws_glue.stop_crawler.async_stop_crawler(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopCrawler")
)
input_: capo_glue.types.stop_crawler_request.StopCrawlerRequest = {"name": name}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|