Cancels an in-progress bulk operation asynchronously. Cancellation doesn't remove items that the operation has already written. Use DescribeBulkOperation to monitor the operation until it reaches a terminal status.
Parameters:
-
bulk_operation_arn
(BulkOperationArn)
–
The Amazon Resource Name (ARN) of the bulk operation to cancel.
Raises:
-
ResourceNotFoundException
–
The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_dynamodb/_services/async_dynamo_db.py
| async def cancel_bulk_operation(
self,
bulk_operation_arn: "capo_dynamodb.types.bulk_operation_arn.BulkOperationArn",
*,
config_overrides: Optional[AsyncDynamoDBClientConfig] = None,
) -> "capo_dynamodb.types.cancel_bulk_operation_output.CancelBulkOperationOutput":
"""<p>Cancels an in-progress bulk operation asynchronously. Cancellation doesn't remove items that the operation has already written. Use <code>DescribeBulkOperation</code> to monitor the operation until it reaches a terminal status.</p>
Args:
bulk_operation_arn: <p>The Amazon Resource Name (ARN) of the bulk operation to cancel.</p>
Raises:
capo_dynamodb.errors.invalid_endpoint_exception.InvalidEndpointException
capo_dynamodb.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
capo_dynamodb.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_dynamodb.types.cancel_bulk_operation_input.CancelBulkOperationInput]",
) -> AsyncOperationResponse[
"capo_dynamodb.types.cancel_bulk_operation_output.CancelBulkOperationOutput"
]:
import capo_dynamodb._operations.dynamo_db_20120810.cancel_bulk_operation
(
output,
http_response,
) = await capo_dynamodb._operations.dynamo_db_20120810.cancel_bulk_operation.async_cancel_bulk_operation(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CancelBulkOperation")
)
input_: capo_dynamodb.types.cancel_bulk_operation_input.CancelBulkOperationInput = {
"bulk_operation_arn": bulk_operation_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|