Menu
Amazon ElastiCache
API Reference (API Version 2015-02-02)

CreateSnapshot

Creates a copy of an entire cluster or replication group at a specific moment in time.

Note

This operation is valid for Redis only.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

SnapshotName

A name for the snapshot being created.

Type: String

Required: Yes

CacheClusterId

The identifier of an existing cluster. The snapshot is created from this cluster.

Type: String

Required: No

ReplicationGroupId

The identifier of an existing replication group. The snapshot is created from this replication group.

Type: String

Required: No

Response Elements

The following element is returned by the service.

Snapshot

Represents a copy of an entire Redis cluster as of the time when the snapshot was taken.

Type: Snapshot object

Errors

For information about the errors that are common to all actions, see Common Errors.

CacheClusterNotFound

The requested cluster ID does not refer to an existing cluster.

HTTP Status Code: 404

InvalidCacheClusterState

The requested cluster is not in the available state.

HTTP Status Code: 400

InvalidParameterCombination

Two or more incompatible parameters were specified.

HTTP Status Code: 400

InvalidParameterValue

The value for a parameter is invalid.

HTTP Status Code: 400

InvalidReplicationGroupState

The requested replication group is not in the available state.

HTTP Status Code: 400

ReplicationGroupNotFoundFault

The specified replication group does not exist.

HTTP Status Code: 404

SnapshotAlreadyExistsFault

You already have a snapshot with the given name.

HTTP Status Code: 400

SnapshotFeatureNotSupportedFault

You attempted one of the following operations:

  • Creating a snapshot of a Redis cluster running on a cache.t1.micro cache node.

  • Creating a snapshot of a cluster that is running Memcached rather than Redis.

Neither of these are supported by ElastiCache.

HTTP Status Code: 400

SnapshotQuotaExceededFault

The request cannot be processed because it would exceed the maximum number of snapshots.

HTTP Status Code: 400

Example

CreateSnapshot

Sample Request

https://elasticache.us-west-2.amazonaws.com/ ?Action=CreateSnapshot &CacheClusterId=my-redis-primary &SnapshotName=my-manual-snapshot &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>

Sample Response

<CreateSnapshotResponse xmlns="http://elasticache.amazonaws.com/doc/2015-02-02/"> <CreateSnapshotResult> <Snapshot> <CacheClusterId>my-redis-primary</CacheClusterId> <Port>6379</Port> <CacheNodeType>cache.m1.small</CacheNodeType> <CacheParameterGroupName>default.redis2.8</CacheParameterGroupName> <Engine>redis</Engine> <PreferredAvailabilityZone>us-west-2c</PreferredAvailabilityZone> <CacheClusterCreateTime>2015-02-02T18:46:57.972Z</CacheClusterCreateTime> <EngineVersion>2.8.6</EngineVersion> <SnapshotSource>manual</SnapshotSource> <AutoMinorVersionUpgrade>true</AutoMinorVersionUpgrade> <PreferredMaintenanceWindow>wed:09:00-wed:10:00</PreferredMaintenanceWindow> <SnapshotName>my-manual-snapshot</SnapshotName> <SnapshotRetentionLimit>5</SnapshotRetentionLimit> <NodeSnapshots> <NodeSnapshot> <CacheNodeCreateTime>2015-02-02T18:46:57.972Z</CacheNodeCreateTime> <CacheNodeId>0001</CacheNodeId> <CacheSize /> </NodeSnapshot> </NodeSnapshots> <SnapshotStatus>creating</SnapshotStatus> <NumCacheNodes>1</NumCacheNodes> <SnapshotWindow>07:30-08:30</SnapshotWindow> </Snapshot> </CreateSnapshotResult> <ResponseMetadata> <RequestId>faf5a232-b9ce-11e3-8a16-7978bb24ffdf</RequestId> </ResponseMetadata> </CreateSnapshotResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: