Cancels an export task in progress that is exporting a snapshot or cluster to Amazon S3. Any data that has already been written to the S3 bucket isn't removed.
Parameters:
-
export_task_identifier
(Optional[String], default:
None
)
–
The identifier of the snapshot or cluster export task to cancel.
Raises:
Examples:
To cancel a snapshot export to Amazon S3
The following example cancels an export task in progress that is exporting a snapshot to Amazon S3.
>>> await client.cancel_export_task(export_task_identifier='my-s3-export-1')
Source code in docs_src/capo_rds/_services/async_rds.py
| async def cancel_export_task(
self,
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
export_task_identifier: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.export_task.ExportTask":
"""<p>Cancels an export task in progress that is exporting a snapshot or cluster to Amazon S3. Any data that has already been written to the S3 bucket isn't removed.</p>
Args:
export_task_identifier: <p>The identifier of the snapshot or cluster export task to cancel.</p>
Raises:
capo_rds.errors.export_task_not_found_fault.ExportTaskNotFoundFault: <p>The export task doesn't exist.</p>
capo_rds.errors.invalid_export_task_state_fault.InvalidExportTaskStateFault: <p>You can't cancel an export task that has completed.</p>
capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To cancel a snapshot export to Amazon S3
The following example cancels an export task in progress that is exporting a snapshot to Amazon S3.
>>> await client.cancel_export_task(export_task_identifier='my-s3-export-1')
"""
async def _handler(
req: "AsyncOperationRequest[capo_rds.types.cancel_export_task_message.CancelExportTaskMessage]",
) -> AsyncOperationResponse["capo_rds.types.export_task.ExportTask"]:
import capo_rds._operations.amazon_rd_sv19.cancel_export_task
(
output,
http_response,
) = await capo_rds._operations.amazon_rd_sv19.cancel_export_task.async_cancel_export_task(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CancelExportTask")
)
input_: capo_rds.types.cancel_export_task_message.CancelExportTaskMessage = {}
if export_task_identifier is not None:
input_["export_task_identifier"] = export_task_identifier
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|