Create Snapshot
elasticache_create_snapshot | R Documentation |
Creates a copy of an entire cluster or replication group at a specific moment in time¶
Description¶
Creates a copy of an entire cluster or replication group at a specific moment in time.
This operation is valid for Valkey or Redis OSS only.
Usage¶
Arguments¶
ReplicationGroupId
The identifier of an existing replication group. The snapshot is created from this replication group.
CacheClusterId
The identifier of an existing cluster. The snapshot is created from this cluster.
SnapshotName
[required] A name for the snapshot being created.
KmsKeyId
The ID of the KMS key used to encrypt the snapshot.
Tags
A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
Value¶
A list with the following syntax:
list(
Snapshot = list(
SnapshotName = "string",
ReplicationGroupId = "string",
ReplicationGroupDescription = "string",
CacheClusterId = "string",
SnapshotStatus = "string",
SnapshotSource = "string",
CacheNodeType = "string",
Engine = "string",
EngineVersion = "string",
NumCacheNodes = 123,
PreferredAvailabilityZone = "string",
PreferredOutpostArn = "string",
CacheClusterCreateTime = as.POSIXct(
"2015-01-01"
),
PreferredMaintenanceWindow = "string",
TopicArn = "string",
Port = 123,
CacheParameterGroupName = "string",
CacheSubnetGroupName = "string",
VpcId = "string",
AutoMinorVersionUpgrade = TRUE|FALSE,
SnapshotRetentionLimit = 123,
SnapshotWindow = "string",
NumNodeGroups = 123,
AutomaticFailover = "enabled"|"disabled"|"enabling"|"disabling",
NodeSnapshots = list(
list(
CacheClusterId = "string",
NodeGroupId = "string",
CacheNodeId = "string",
NodeGroupConfiguration = list(
NodeGroupId = "string",
Slots = "string",
ReplicaCount = 123,
PrimaryAvailabilityZone = "string",
ReplicaAvailabilityZones = list(
"string"
),
PrimaryOutpostArn = "string",
ReplicaOutpostArns = list(
"string"
)
),
CacheSize = "string",
CacheNodeCreateTime = as.POSIXct(
"2015-01-01"
),
SnapshotCreateTime = as.POSIXct(
"2015-01-01"
)
)
),
KmsKeyId = "string",
ARN = "string",
DataTiering = "enabled"|"disabled"
)
)
Request syntax¶
svc$create_snapshot(
ReplicationGroupId = "string",
CacheClusterId = "string",
SnapshotName = "string",
KmsKeyId = "string",
Tags = list(
list(
Key = "string",
Value = "string"
)
)
)
Examples¶
## Not run:
# Creates a snapshot of a non-clustered Redis cluster that has only one
# node.
svc$create_snapshot(
CacheClusterId = "onenoderedis",
SnapshotName = "snapshot-1"
)
# Creates a snapshot of a non-clustered Redis cluster that has only three
# nodes, primary and two read-replicas. CacheClusterId must be a specific
# node in the cluster.
svc$create_snapshot(
CacheClusterId = "threenoderedis-001",
SnapshotName = "snapshot-2"
)
# Creates a snapshot of a clustered Redis cluster that has 2 shards, each
# with a primary and 4 read-replicas.
svc$create_snapshot(
ReplicationGroupId = "clusteredredis",
SnapshotName = "snapshot-2x5"
)
## End(Not run)