Cancels an active import task and stops importing data from the CloudTrail Lake Event Data Store.
Parameters:
-
import_id
(ImportId)
–
The ID of the import task to cancel.
Raises:
Source code in docs_src/capo_cloudwatch_logs/_services/async_cloud_watch_logs.py
| async def cancel_import_task(
self,
import_id: "capo_cloudwatch_logs.types.import_id.ImportId",
*,
config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
) -> "capo_cloudwatch_logs.types.cancel_import_task_response.CancelImportTaskResponse":
"""<p>Cancels an active import task and stops importing data from the CloudTrail Lake Event Data Store.</p>
Args:
import_id: <p>The ID of the import task to cancel.</p>
Raises:
capo_cloudwatch_logs.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
capo_cloudwatch_logs.errors.invalid_operation_exception.InvalidOperationException: <p>The operation is not valid on the specified resource.</p>
capo_cloudwatch_logs.errors.invalid_parameter_exception.InvalidParameterException: <p>A parameter is specified incorrectly.</p>
capo_cloudwatch_logs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_cloudwatch_logs.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits.</p>
capo_cloudwatch_logs.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudwatch_logs.types.cancel_import_task_request.CancelImportTaskRequest]",
) -> AsyncOperationResponse[
"capo_cloudwatch_logs.types.cancel_import_task_response.CancelImportTaskResponse"
]:
import capo_cloudwatch_logs._operations.logs_20140328.cancel_import_task
(
output,
http_response,
) = await capo_cloudwatch_logs._operations.logs_20140328.cancel_import_task.async_cancel_import_task(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CancelImportTask")
)
input_: capo_cloudwatch_logs.types.cancel_import_task_request.CancelImportTaskRequest = {
"import_id": import_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|