CopyServerlessCacheSnapshotCommand

Creates a copy of an existing serverless cache’s 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, CopyServerlessCacheSnapshotCommand } from "@aws-sdk/client-elasticache"; // ES Modules import
// const { ElastiCacheClient, CopyServerlessCacheSnapshotCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import
const client = new ElastiCacheClient(config);
const input = { // CopyServerlessCacheSnapshotRequest
  SourceServerlessCacheSnapshotName: "STRING_VALUE", // required
  TargetServerlessCacheSnapshotName: "STRING_VALUE", // required
  KmsKeyId: "STRING_VALUE",
  Tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE",
      Value: "STRING_VALUE",
    },
  ],
};
const command = new CopyServerlessCacheSnapshotCommand(input);
const response = await client.send(command);
// { // CopyServerlessCacheSnapshotResponse
//   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",
//     },
//   },
// };

CopyServerlessCacheSnapshotCommand Input

Parameter
Type
Description
SourceServerlessCacheSnapshotName
Required
string | undefined

The identifier of the existing serverless cache’s snapshot to be copied. Available for Valkey, Redis OSS and Serverless Memcached only.

TargetServerlessCacheSnapshotName
Required
string | undefined

The identifier for the snapshot to be created. Available for Valkey, Redis OSS and Serverless Memcached only.

KmsKeyId
string | undefined

The identifier of the KMS key used to encrypt the target snapshot. Available for Valkey, Redis OSS and Serverless Memcached only.

Tags
Tag[] | undefined

A list of tags to be added to the target snapshot resource. A tag is a key-value pair. Available for Valkey, Redis OSS and Serverless Memcached only. Default: NULL

CopyServerlessCacheSnapshotCommand Output

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

The response for the attempt to copy the serverless cache snapshot. 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.

InvalidServerlessCacheSnapshotStateFault
client

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

ServerlessCacheSnapshotAlreadyExistsFault
client

A serverless cache snapshot with this name already exists. 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.

ServerlessCacheSnapshotQuotaExceededFault
client

The number of serverless cache snapshots exceeds the customer snapshot quota. Available for Valkey, Redis OSS and Serverless Memcached only.

ServiceLinkedRoleNotFoundFault
client

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

TagQuotaPerResourceExceeded
client

The request cannot be processed because it would cause the resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource is 50.

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