Class CfnDBSnapshot

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

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:17.313Z") @Stability(Stable) public class CfnDBSnapshot extends CfnResource implements IInspectable, IDBSnapshotRef, ITaggableV2
Creates a snapshot of a DB instance.

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.rds.*;
 CfnDBSnapshot cfnDBSnapshot = CfnDBSnapshot.Builder.create(this, "MyCfnDBSnapshot")
         .dbInstanceIdentifier("dbInstanceIdentifier")
         .dbSnapshotIdentifier("dbSnapshotIdentifier")
         // the properties below are optional
         .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

    • CfnDBSnapshot

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

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

      @Stability(Stable) public CfnDBSnapshot(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDBSnapshotProps props)
      Create a new AWS::RDS::DBSnapshot.

      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

    • arnForDBSnapshot

      @Stability(Stable) @NotNull public static String arnForDBSnapshot(@NotNull IDBSnapshotRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnDBSnapshot

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

      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.
    • getAttrAllocatedStorage

      @Stability(Stable) @NotNull public Number getAttrAllocatedStorage()
      The allocated storage size in gibibytes (GiB).
    • getAttrAvailabilityZone

      @Stability(Stable) @NotNull public String getAttrAvailabilityZone()
      The name of the Availability Zone the DB instance was located in at the time of the DB snapshot.
    • getAttrDbiResourceId

      @Stability(Stable) @NotNull public String getAttrDbiResourceId()
      The identifier for the source DB instance, which is unique to an AWS Region.
    • getAttrDbSnapshotArn

      @Stability(Stable) @NotNull public String getAttrDbSnapshotArn()
      The Amazon Resource Name (ARN) for the DB snapshot.
    • getAttrEncrypted

      @Stability(Stable) @NotNull public IResolvable getAttrEncrypted()
      Indicates whether the DB snapshot is encrypted.
    • getAttrEngine

      @Stability(Stable) @NotNull public String getAttrEngine()
      The name of the database engine.
    • getAttrEngineVersion

      @Stability(Stable) @NotNull public String getAttrEngineVersion()
      The version of the database engine.
    • getAttrIamDatabaseAuthenticationEnabled

      @Stability(Stable) @NotNull public IResolvable getAttrIamDatabaseAuthenticationEnabled()
      Indicates whether mapping of AWS IAM accounts to database accounts is enabled.
    • getAttrInstanceCreateTime

      @Stability(Stable) @NotNull public String getAttrInstanceCreateTime()
      The time when the DB instance was created, in UTC.
    • getAttrIops

      @Stability(Stable) @NotNull public Number getAttrIops()
      The Provisioned IOPS value of the DB instance at the time of the snapshot.
    • getAttrKmsKeyId

      @Stability(Stable) @NotNull public String getAttrKmsKeyId()
      If Encrypted is true, the AWS KMS key identifier for the encrypted DB snapshot.
    • getAttrLicenseModel

      @Stability(Stable) @NotNull public String getAttrLicenseModel()
      License model information for the restored DB instance.
    • getAttrMasterUsername

      @Stability(Stable) @NotNull public String getAttrMasterUsername()
      The master username for the DB snapshot.
    • getAttrOptionGroupName

      @Stability(Stable) @NotNull public String getAttrOptionGroupName()
      The option group name for the DB snapshot.
    • getAttrOriginalSnapshotCreateTime

      @Stability(Stable) @NotNull public String getAttrOriginalSnapshotCreateTime()
      The time of the CreateDBSnapshot operation in UTC.

      Doesn't change when the snapshot is copied.

    • getAttrPort

      @Stability(Stable) @NotNull public Number getAttrPort()
      The port that the database engine was listening on at the time of the snapshot.
    • getAttrSnapshotCreateTime

      @Stability(Stable) @NotNull public String getAttrSnapshotCreateTime()
      The time when the snapshot was taken, in UTC.
    • getAttrSnapshotType

      @Stability(Stable) @NotNull public String getAttrSnapshotType()
      The type of the DB snapshot.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of this DB snapshot.
    • getAttrStorageThroughput

      @Stability(Stable) @NotNull public Number getAttrStorageThroughput()
      The storage throughput for the DB snapshot.
    • getAttrStorageType

      @Stability(Stable) @NotNull public String getAttrStorageType()
      The storage type associated with the DB snapshot.
    • getAttrVpcId

      @Stability(Stable) @NotNull public String getAttrVpcId()
      The VPC ID associated with the DB snapshot.
    • 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
    • getDbSnapshotRef

      @Stability(Stable) @NotNull public DBSnapshotReference getDbSnapshotRef()
      A reference to a DBSnapshot resource.
      Specified by:
      getDbSnapshotRef in interface IDBSnapshotRef
    • getDbInstanceIdentifier

      @Stability(Stable) @NotNull public String getDbInstanceIdentifier()
      The identifier of the DB instance that you want to create the snapshot of.
    • setDbInstanceIdentifier

      @Stability(Stable) public void setDbInstanceIdentifier(@NotNull String value)
      The identifier of the DB instance that you want to create the snapshot of.
    • getDbSnapshotIdentifier

      @Stability(Stable) @NotNull public String getDbSnapshotIdentifier()
      The identifier for the DB snapshot.
    • setDbSnapshotIdentifier

      @Stability(Stable) public void setDbSnapshotIdentifier(@NotNull String value)
      The identifier for the DB snapshot.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags to be assigned to the DB snapshot.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags to be assigned to the DB snapshot.