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/memory_db.py
| def delete_snapshot(
self,
snapshot_name: "capo_memorydb.types.string.String",
*,
config_overrides: Optional[MemoryDBClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_memorydb.types.delete_snapshot_request.DeleteSnapshotRequest]",
) -> OperationResponse[
"capo_memorydb.types.delete_snapshot_response.DeleteSnapshotResponse"
]:
import capo_memorydb._operations.amazon_memory_db.delete_snapshot
output, http_response = (
capo_memorydb._operations.amazon_memory_db.delete_snapshot.delete_snapshot(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|