Class CfnSnapshot

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ISnapshotRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-10-08T16:59:54.491Z") @Stability(Stable) public class CfnSnapshot extends CfnResource implements IInspectable, ISnapshotRef, ITaggableV2
Represents a copy of an entire cluster or replication group as of the time when the snapshot was taken.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.elasticache.*;
 CfnSnapshot cfnSnapshot = CfnSnapshot.Builder.create(this, "MyCfnSnapshot")
         .snapshotName("snapshotName")
         // the properties below are optional
         .cacheClusterId("cacheClusterId")
         .kmsKeyId("kmsKeyId")
         .replicationGroupId("replicationGroupId")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnSnapshot

      protected CfnSnapshot(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnSnapshot

      protected CfnSnapshot(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnSnapshot

      @Stability(Stable) public CfnSnapshot(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnSnapshotProps props)
      Create a new AWS::ElastiCache::Snapshot.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForSnapshot

      @Stability(Stable) @NotNull public static String arnForSnapshot(@NotNull ISnapshotRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnSnapshot

      @Stability(Stable) @NotNull public static Boolean isCfnSnapshot(@NotNull Object x)
      Checks whether the given object is a CfnSnapshot.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN (Amazon Resource Name) of the snapshot.
    • getAttrAutomaticFailover

      @Stability(Stable) @NotNull public String getAttrAutomaticFailover()
      Indicates the status of automatic failover for the source replication group.
    • getAttrAutoMinorVersionUpgrade

      @Stability(Stable) @NotNull public IResolvable getAttrAutoMinorVersionUpgrade()
      If true, opt-in to the next auto minor version upgrade campaign.
    • getAttrCacheClusterCreateTime

      @Stability(Stable) @NotNull public String getAttrCacheClusterCreateTime()
      The date and time when the source cluster was created.
    • getAttrCacheNodeType

      @Stability(Stable) @NotNull public String getAttrCacheNodeType()
      The name of the compute and memory capacity node type for the source cluster.
    • getAttrCacheParameterGroupName

      @Stability(Stable) @NotNull public String getAttrCacheParameterGroupName()
      The cache parameter group that is associated with the source cluster.
    • getAttrCacheSubnetGroupName

      @Stability(Stable) @NotNull public String getAttrCacheSubnetGroupName()
      The name of the cache subnet group associated with the source cluster.
    • getAttrDataTiering

      @Stability(Stable) @NotNull public String getAttrDataTiering()
      Enables data tiering.

      Data tiering is only supported for replication groups using the r6gd node type.

    • getAttrEngine

      @Stability(Stable) @NotNull public String getAttrEngine()
      The name of the cache engine used by the source cluster.
    • getAttrEngineVersion

      @Stability(Stable) @NotNull public String getAttrEngineVersion()
      The version of the cache engine version used by the source cluster.
    • getAttrNodeSnapshots

      @Stability(Stable) @NotNull public IResolvable getAttrNodeSnapshots()
      A list of the cache nodes in the source cluster.
    • getAttrNumCacheNodes

      @Stability(Stable) @NotNull public Number getAttrNumCacheNodes()
      The number of cache nodes in the source cluster.
    • getAttrNumNodeGroups

      @Stability(Stable) @NotNull public Number getAttrNumNodeGroups()
      The number of node groups (shards) in this snapshot.
    • getAttrPort

      @Stability(Stable) @NotNull public Number getAttrPort()
      The port number used by each cache nodes in the source cluster.
    • getAttrPreferredAvailabilityZone

      @Stability(Stable) @NotNull public String getAttrPreferredAvailabilityZone()
      The name of the Availability Zone in which the source cluster is located.
    • getAttrPreferredMaintenanceWindow

      @Stability(Stable) @NotNull public String getAttrPreferredMaintenanceWindow()
      Specifies the weekly time range during which maintenance on the cluster is performed.
    • getAttrReplicationGroupDescription

      @Stability(Stable) @NotNull public String getAttrReplicationGroupDescription()
      A description of the source replication group.
    • getAttrSnapshotRetentionLimit

      @Stability(Stable) @NotNull public Number getAttrSnapshotRetentionLimit()
      For an automatic snapshot, the number of days for which ElastiCache retains the snapshot before deleting it.
    • getAttrSnapshotSource

      @Stability(Stable) @NotNull public String getAttrSnapshotSource()
      Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual).
    • getAttrSnapshotStatus

      @Stability(Stable) @NotNull public String getAttrSnapshotStatus()
      The status of the snapshot.

      Valid values: creating | available | restoring | copying | deleting | failed | deleted.

    • getAttrSnapshotWindow

      @Stability(Stable) @NotNull public String getAttrSnapshotWindow()
      The daily time range during which ElastiCache takes daily snapshots of the source cluster.
    • getAttrTopicArn

      @Stability(Stable) @NotNull public String getAttrTopicArn()
      The Amazon Resource Name (ARN) for the topic used by the source cluster for publishing notifications.
    • getAttrVpcId

      @Stability(Stable) @NotNull public String getAttrVpcId()
      The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cluster.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getSnapshotRef

      @Stability(Stable) @NotNull public SnapshotReference getSnapshotRef()
      A reference to a Snapshot resource.
      Specified by:
      getSnapshotRef in interface ISnapshotRef
    • getSnapshotName

      @Stability(Stable) @NotNull public String getSnapshotName()
      The name of a snapshot.
    • setSnapshotName

      @Stability(Stable) public void setSnapshotName(@NotNull String value)
      The name of a snapshot.
    • getCacheClusterId

      @Stability(Stable) @Nullable public String getCacheClusterId()
      The identifier of an existing cluster to create a snapshot from.
    • setCacheClusterId

      @Stability(Stable) public void setCacheClusterId(@Nullable String value)
      The identifier of an existing cluster to create a snapshot from.
    • getKmsKeyId

      @Stability(Stable) @Nullable public String getKmsKeyId()
      The ID of the KMS key used to encrypt the snapshot.
    • setKmsKeyId

      @Stability(Stable) public void setKmsKeyId(@Nullable String value)
      The ID of the KMS key used to encrypt the snapshot.
    • getReplicationGroupId

      @Stability(Stable) @Nullable public String getReplicationGroupId()
      The identifier of an existing replication group to create a snapshot from.
    • setReplicationGroupId

      @Stability(Stable) public void setReplicationGroupId(@Nullable String value)
      The identifier of an existing replication group to create a snapshot from.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      A list of tags to be added to this resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      A list of tags to be added to this resource.