DescribeServerlessCacheSnapshotsCommand

Returns information about serverless cache snapshots. By default, this API lists all of the customer’s serverless cache snapshots. It can also describe a single serverless cache snapshot, or the snapshots associated with a particular serverless cache. 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, DescribeServerlessCacheSnapshotsCommand } from "@aws-sdk/client-elasticache"; // ES Modules import
// const { ElastiCacheClient, DescribeServerlessCacheSnapshotsCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import
const client = new ElastiCacheClient(config);
const input = { // DescribeServerlessCacheSnapshotsRequest
  ServerlessCacheName: "STRING_VALUE",
  ServerlessCacheSnapshotName: "STRING_VALUE",
  SnapshotType: "STRING_VALUE",
  NextToken: "STRING_VALUE",
  MaxResults: Number("int"),
};
const command = new DescribeServerlessCacheSnapshotsCommand(input);
const response = await client.send(command);
// { // DescribeServerlessCacheSnapshotsResponse
//   NextToken: "STRING_VALUE",
//   ServerlessCacheSnapshots: [ // ServerlessCacheSnapshotList
//     { // 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",
//       },
//     },
//   ],
// };

DescribeServerlessCacheSnapshotsCommand Input

Parameter
Type
Description
MaxResults
number | undefined

The maximum number of records to include in the response. If more records exist than the specified max-results value, a market is included in the response so that remaining results can be retrieved. Available for Valkey, Redis OSS and Serverless Memcached only.The default is 50. The Validation Constraints are a maximum of 50.

NextToken
string | undefined

An optional marker returned from a prior request to support pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by max-results. Available for Valkey, Redis OSS and Serverless Memcached only.

ServerlessCacheName
string | undefined

The identifier of serverless cache. If this parameter is specified, only snapshots associated with that specific serverless cache are described. Available for Valkey, Redis OSS and Serverless Memcached only.

ServerlessCacheSnapshotName
string | undefined

The identifier of the serverless cache’s snapshot. If this parameter is specified, only this snapshot is described. Available for Valkey, Redis OSS and Serverless Memcached only.

SnapshotType
string | undefined

The type of snapshot that is being described. Available for Valkey, Redis OSS and Serverless Memcached only.

DescribeServerlessCacheSnapshotsCommand Output

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

An optional marker returned from a prior request to support pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by max-results. Available for Valkey, Redis OSS and Serverless Memcached only.

ServerlessCacheSnapshots
ServerlessCacheSnapshot[] | undefined

The serverless caches snapshots associated with a given description request. Available for Valkey, Redis OSS and Serverless Memcached only.

Throws

Name
Fault
Details
InvalidParameterCombinationException
client

Two or more incompatible parameters were specified.

InvalidParameterValueException
client

The value for a parameter is invalid.

ServerlessCacheNotFoundFault
client

The serverless cache was not found or does not exist.

ServerlessCacheSnapshotNotFoundFault
client

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

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