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:59.722Z") @Stability(Stable) public class CfnSnapshot extends CfnResource implements IInspectable, ISnapshotRef, ITaggableV2
Resource Type definition for AWS::Redshift::Snapshot.

Creates a manual snapshot of the specified cluster. The cluster must be in the available state.

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.redshift.*;
 CfnSnapshot cfnSnapshot = CfnSnapshot.Builder.create(this, "MyCfnSnapshot")
         .clusterIdentifier("clusterIdentifier")
         .snapshotIdentifier("snapshotIdentifier")
         // the properties below are optional
         .manualSnapshotRetentionPeriod(123)
         .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::Redshift::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.
    • getAttrAvailabilityZone

      @Stability(Stable) @NotNull public String getAttrAvailabilityZone()
      The Availability Zone in which the cluster was created.
    • getAttrClusterCreateTime

      @Stability(Stable) @NotNull public String getAttrClusterCreateTime()
      The time (UTC) when the cluster was originally created.
    • getAttrClusterVersion

      @Stability(Stable) @NotNull public String getAttrClusterVersion()
      The version ID of the Amazon Redshift engine that is running on the cluster.
    • getAttrDbName

      @Stability(Stable) @NotNull public String getAttrDbName()
      The name of the database that was created when the cluster was created.
    • getAttrEncrypted

      @Stability(Stable) @NotNull public IResolvable getAttrEncrypted()
      If true, the data in the snapshot is encrypted at rest.
    • getAttrEncryptedWithHsm

      @Stability(Stable) @NotNull public IResolvable getAttrEncryptedWithHsm()
      A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster.
    • getAttrEngineFullVersion

      @Stability(Stable) @NotNull public String getAttrEngineFullVersion()
      The engine full version of the cluster at the time the snapshot was taken.
    • getAttrEnhancedVpcRouting

      @Stability(Stable) @NotNull public IResolvable getAttrEnhancedVpcRouting()
      An option that specifies whether to create the cluster with enhanced VPC routing enabled.
    • getAttrKmsKeyId

      @Stability(Stable) @NotNull public String getAttrKmsKeyId()
      The Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.
    • getAttrMaintenanceTrackName

      @Stability(Stable) @NotNull public String getAttrMaintenanceTrackName()
      The name of the maintenance track for the snapshot.
    • getAttrMasterUsername

      @Stability(Stable) @NotNull public String getAttrMasterUsername()
      The admin user name for the cluster.
    • getAttrNodeType

      @Stability(Stable) @NotNull public String getAttrNodeType()
      The node type that the cluster is provisioned with.
    • getAttrNumberOfNodes

      @Stability(Stable) @NotNull public Number getAttrNumberOfNodes()
      The number of nodes in the cluster.
    • getAttrOwnerAccount

      @Stability(Stable) @NotNull public String getAttrOwnerAccount()
      The Amazon Web Services account that owns the snapshot.
    • getAttrPort

      @Stability(Stable) @NotNull public Number getAttrPort()
      The port that the cluster is listening on.
    • getAttrSnapshotArn

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

      @Stability(Stable) @NotNull public String getAttrSnapshotCreateTime()
      The time (in UTC format) when Amazon Redshift began the snapshot.
    • getAttrSnapshotType

      @Stability(Stable) @NotNull public String getAttrSnapshotType()
      The snapshot type.

      Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot are of type manual.

    • getAttrStatus

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

      The value of the status depends on the API operation used: CreateClusterSnapshot and CopyClusterSnapshot returns status as creating. DescribeClusterSnapshots returns status as creating, available, final snapshot, or failed. DeleteClusterSnapshot returns status as deleted.

    • getAttrVpcId

      @Stability(Stable) @NotNull public String getAttrVpcId()
      The VPC identifier of the cluster if the snapshot is from a cluster in a VPC.
    • 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
    • getClusterIdentifier

      @Stability(Stable) @NotNull public String getClusterIdentifier()
      The cluster identifier for which you want a snapshot.
    • setClusterIdentifier

      @Stability(Stable) public void setClusterIdentifier(@NotNull String value)
      The cluster identifier for which you want a snapshot.
    • getSnapshotIdentifier

      @Stability(Stable) @NotNull public String getSnapshotIdentifier()
      A unique identifier for the snapshot that you are requesting.
    • setSnapshotIdentifier

      @Stability(Stable) public void setSnapshotIdentifier(@NotNull String value)
      A unique identifier for the snapshot that you are requesting.
    • getManualSnapshotRetentionPeriod

      @Stability(Stable) @Nullable public Number getManualSnapshotRetentionPeriod()
      The number of days that a manual snapshot is retained.
    • setManualSnapshotRetentionPeriod

      @Stability(Stable) public void setManualSnapshotRetentionPeriod(@Nullable Number value)
      The number of days that a manual snapshot is retained.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      A list of tag instances.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      A list of tag instances.