Class CfnDatabaseSnapshot

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

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-09T14:39:13.863Z") @Stability(Stable) public class CfnDatabaseSnapshot extends CfnResource implements IInspectable, IDatabaseSnapshotRef, ITaggableV2
Resource Type definition for AWS::Lightsail::DatabaseSnapshot.

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.lightsail.*;
 CfnDatabaseSnapshot cfnDatabaseSnapshot = CfnDatabaseSnapshot.Builder.create(this, "MyCfnDatabaseSnapshot")
         .relationalDatabaseName("relationalDatabaseName")
         .relationalDatabaseSnapshotName("relationalDatabaseSnapshotName")
         // 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

    • CfnDatabaseSnapshot

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

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

      @Stability(Stable) public CfnDatabaseSnapshot(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDatabaseSnapshotProps props)
      Create a new AWS::Lightsail::DatabaseSnapshot.

      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

    • arnForDatabaseSnapshot

      @Stability(Stable) @NotNull public static String arnForDatabaseSnapshot(@NotNull IDatabaseSnapshotRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnDatabaseSnapshot

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

      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 Amazon Resource Name (ARN) of the database snapshot.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The timestamp when the database snapshot was created.
    • getAttrEngine

      @Stability(Stable) @NotNull public String getAttrEngine()
      The software of the database snapshot (for example, MySQL).
    • getAttrEngineVersion

      @Stability(Stable) @NotNull public String getAttrEngineVersion()
      The database engine version for the database snapshot (for example, 5.7.23).
    • getAttrFromRelationalDatabaseArn

      @Stability(Stable) @NotNull public String getAttrFromRelationalDatabaseArn()
      The Amazon Resource Name (ARN) of the database from which the database snapshot was created.
    • getAttrFromRelationalDatabaseBlueprintId

      @Stability(Stable) @NotNull public String getAttrFromRelationalDatabaseBlueprintId()
      The blueprint ID of the database from which the database snapshot was created.

      A blueprint describes the major engine version of a database.

    • getAttrFromRelationalDatabaseBundleId

      @Stability(Stable) @NotNull public String getAttrFromRelationalDatabaseBundleId()
      The bundle ID of the database from which the database snapshot was created.
    • getAttrFromRelationalDatabaseName

      @Stability(Stable) @NotNull public String getAttrFromRelationalDatabaseName()
      The name of the source database from which the database snapshot was created.
    • getAttrLocation

      @Stability(Stable) @NotNull public IResolvable getAttrLocation()
      The Region name and Availability Zone where the database snapshot is located.
    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      The name of the database snapshot.
    • getAttrResourceType

      @Stability(Stable) @NotNull public String getAttrResourceType()
      The Lightsail resource type.
    • getAttrSizeInGb

      @Stability(Stable) @NotNull public Number getAttrSizeInGb()
      The size of the disk in GB (for example, 32) for the database snapshot.
    • getAttrState

      @Stability(Stable) @NotNull public String getAttrState()
      The state of the database snapshot.
    • getAttrSupportCode

      @Stability(Stable) @NotNull public String getAttrSupportCode()
      The support code for the database snapshot.

      Include this code in your email to support when you have questions about a database snapshot in Lightsail. This code enables our support team to look up your Lightsail information more easily.

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

      @Stability(Stable) @NotNull public DatabaseSnapshotReference getDatabaseSnapshotRef()
      A reference to a DatabaseSnapshot resource.
      Specified by:
      getDatabaseSnapshotRef in interface IDatabaseSnapshotRef
    • getRelationalDatabaseName

      @Stability(Stable) @NotNull public String getRelationalDatabaseName()
      The name of the database on which to base your new snapshot.
    • setRelationalDatabaseName

      @Stability(Stable) public void setRelationalDatabaseName(@NotNull String value)
      The name of the database on which to base your new snapshot.
    • getRelationalDatabaseSnapshotName

      @Stability(Stable) @NotNull public String getRelationalDatabaseSnapshotName()
      The name for your new database snapshot.
    • setRelationalDatabaseSnapshotName

      @Stability(Stable) public void setRelationalDatabaseSnapshotName(@NotNull String value)
      The name for your new database snapshot.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of key-value pairs to apply to this resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.