Deletes an existing serverless cache snapshot. Available for Valkey, Redis OSS and Serverless Memcached only.
Parameters:
-
serverless_cache_snapshot_name
(Optional[String], default:
None
)
–
Idenfitier of the snapshot to be deleted. Available for Valkey, Redis OSS and Serverless Memcached only.
Raises:
Source code in docs_src/capo_elasticache/_services/elasti_cache.py
| def delete_serverless_cache_snapshot(
self,
*,
config_overrides: Optional[ElastiCacheClientConfig] = None,
serverless_cache_snapshot_name: Optional[
"capo_elasticache.types.string.String"
] = None,
) -> "capo_elasticache.types.delete_serverless_cache_snapshot_response.DeleteServerlessCacheSnapshotResponse":
"""<p>Deletes an existing serverless cache snapshot. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
Args:
serverless_cache_snapshot_name: <p>Idenfitier of the snapshot to be deleted. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
Raises:
capo_elasticache.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value for a parameter is invalid.</p>
capo_elasticache.errors.invalid_serverless_cache_snapshot_state_fault.InvalidServerlessCacheSnapshotStateFault: <p>The state of the serverless cache snapshot was not received. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
capo_elasticache.errors.serverless_cache_snapshot_not_found_fault.ServerlessCacheSnapshotNotFoundFault: <p>This serverless cache snapshot could not be found or does not exist. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
capo_elasticache.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The specified service linked role (SLR) was not found.</p>
capo_elasticache.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_elasticache.types.delete_serverless_cache_snapshot_request.DeleteServerlessCacheSnapshotRequest]",
) -> OperationResponse[
"capo_elasticache.types.delete_serverless_cache_snapshot_response.DeleteServerlessCacheSnapshotResponse"
]:
import capo_elasticache._operations.amazon_elasti_cache_v9.delete_serverless_cache_snapshot
output, http_response = (
capo_elasticache._operations.amazon_elasti_cache_v9.delete_serverless_cache_snapshot.delete_serverless_cache_snapshot(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteServerlessCacheSnapshot")
)
input_: capo_elasticache.types.delete_serverless_cache_snapshot_request.DeleteServerlessCacheSnapshotRequest = {}
if serverless_cache_snapshot_name is not None:
input_["serverless_cache_snapshot_name"] = serverless_cache_snapshot_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|