DeleteServerlessCacheSnapshotCommand

Deletes an existing serverless cache snapshot. Available for Valkey, Redis OSS and Serverless Memcached only.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ElastiCacheClient, DeleteServerlessCacheSnapshotCommand } from "@aws-sdk/client-elasticache"; // ES Modules import
// const { ElastiCacheClient, DeleteServerlessCacheSnapshotCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import
const client = new ElastiCacheClient(config);
const input = { // DeleteServerlessCacheSnapshotRequest
  ServerlessCacheSnapshotName: "STRING_VALUE", // required
};
const command = new DeleteServerlessCacheSnapshotCommand(input);
const response = await client.send(command);
// { // DeleteServerlessCacheSnapshotResponse
//   ServerlessCacheSnapshot: { // ServerlessCacheSnapshot
//     ServerlessCacheSnapshotName: "STRING_VALUE",
//     ARN: "STRING_VALUE",
//     KmsKeyId: "STRING_VALUE",
//     SnapshotType: "STRING_VALUE",
//     Status: "STRING_VALUE",
//     CreateTime: new Date("TIMESTAMP"),
//     ExpiryTime: new Date("TIMESTAMP"),
//     BytesUsedForCache: "STRING_VALUE",
//     ServerlessCacheConfiguration: { // ServerlessCacheConfiguration
//       ServerlessCacheName: "STRING_VALUE",
//       Engine: "STRING_VALUE",
//       MajorEngineVersion: "STRING_VALUE",
//     },
//   },
// };

DeleteServerlessCacheSnapshotCommand Input

Parameter
Type
Description
ServerlessCacheSnapshotName
Required
string | undefined

Idenfitier of the snapshot to be deleted. Available for Valkey, Redis OSS and Serverless Memcached only.

DeleteServerlessCacheSnapshotCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ServerlessCacheSnapshot
ServerlessCacheSnapshot | undefined

The snapshot to be deleted. Available for Valkey, Redis OSS and Serverless Memcached only.

Throws

Name
Fault
Details
InvalidParameterValueException
client

The value for a parameter is invalid.

InvalidServerlessCacheSnapshotStateFault
client

The state of the serverless cache snapshot was not received. Available for Valkey, Redis OSS and Serverless Memcached only.

ServerlessCacheSnapshotNotFoundFault
client

This serverless cache snapshot could not be found or does not exist. Available for Valkey, Redis OSS and Serverless Memcached only.

ServiceLinkedRoleNotFoundFault
client

The specified service linked role (SLR) was not found.

ElastiCacheServiceException
Base exception class for all service exceptions from ElastiCache service.