Deletes an existing snapshot. When you receive a successful response from this operation, MemoryDB immediately begins deleting the snapshot; you cannot cancel or revert this operation.
Parameters:
-
snapshot_name
(String)
–
The name of the snapshot to delete.
Raises:
Source code in docs_src/capo_memorydb/_services/async_memory_db.py
| async def delete_snapshot(
self,
snapshot_name: "capo_memorydb.types.string.String",
*,
config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
) -> "capo_memorydb.types.delete_snapshot_response.DeleteSnapshotResponse":
"""<p>Deletes an existing snapshot. When you receive a successful response from this operation, MemoryDB immediately begins deleting the snapshot; you cannot cancel or revert this operation.</p>
Args:
snapshot_name: <p>The name of the snapshot to delete.</p>
Raises:
capo_memorydb.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>The specified parameter combination is not valid.</p>
capo_memorydb.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The specified parameter value is not valid.</p>
capo_memorydb.errors.invalid_snapshot_state_fault.InvalidSnapshotStateFault: <p>The snapshot is not in a valid state for the requested operation.</p>
capo_memorydb.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The required service-linked role was not found.</p>
capo_memorydb.errors.snapshot_not_found_fault.SnapshotNotFoundFault: <p>The specified snapshot does not exist.</p>
capo_memorydb.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_memorydb.types.delete_snapshot_request.DeleteSnapshotRequest]",
) -> AsyncOperationResponse[
"capo_memorydb.types.delete_snapshot_response.DeleteSnapshotResponse"
]:
import capo_memorydb._operations.amazon_memory_db.delete_snapshot
(
output,
http_response,
) = await capo_memorydb._operations.amazon_memory_db.delete_snapshot.async_delete_snapshot(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteSnapshot")
)
input_: capo_memorydb.types.delete_snapshot_request.DeleteSnapshotRequest = {
"snapshot_name": snapshot_name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|