Class CfnSnapshot

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

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-09-30T11:04:56.177Z") @Stability(Stable) public class CfnSnapshot extends CfnResource implements IInspectable, ISnapshotRef, ITaggableV2
Resource Type definition for AWS::MemoryDB::Snapshot.

Represents a copy of an entire cluster 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.memorydb.*;
 CfnSnapshot cfnSnapshot = CfnSnapshot.Builder.create(this, "MyCfnSnapshot")
         .clusterName("clusterName")
         .snapshotName("snapshotName")
         // the properties below are optional
         .kmsKeyId("kmsKeyId")
         .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::MemoryDB::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.
    • getAttrClusterConfiguration

      @Stability(Stable) @NotNull public IResolvable getAttrClusterConfiguration()
    • getAttrDataTiering

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

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

    • getAttrSource

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

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

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

    • 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
    • getClusterName

      @Stability(Stable) @NotNull public String getClusterName()
      The name of the cluster from which the snapshot was taken.
    • setClusterName

      @Stability(Stable) public void setClusterName(@NotNull String value)
      The name of the cluster from which the snapshot was taken.
    • getSnapshotName

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

      @Stability(Stable) public void setSnapshotName(@NotNull String value)
      The name of the snapshot.
    • 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.
    • 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.