Class DatabaseClusterFromSnapshot

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.rds.DatabaseClusterBase
software.amazon.awscdk.services.rds.DatabaseClusterFromSnapshot
All Implemented Interfaces:
IResource, IConnectable, IDatabaseCluster, ISecretAttachmentTarget, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:35.140Z") @Stability(Stable) public class DatabaseClusterFromSnapshot extends DatabaseClusterBase
A database cluster restored from a snapshot.

Example:

 Vpc vpc;
 DatabaseClusterFromSnapshot.Builder.create(this, "Database")
         .engine(DatabaseClusterEngine.aurora(AuroraClusterEngineProps.builder().version(AuroraEngineVersion.VER_1_22_2).build()))
         .writer(ClusterInstance.provisioned("writer"))
         .vpc(vpc)
         .snapshotIdentifier("mySnapshot")
         .build();
 
  • Constructor Details

    • DatabaseClusterFromSnapshot

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

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

      @Stability(Stable) public DatabaseClusterFromSnapshot(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseClusterFromSnapshotProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • addRotationMultiUser

      @Stability(Stable) @NotNull public SecretRotation addRotationMultiUser(@NotNull String id, @NotNull RotationMultiUserOptions options)
      Adds the multi user rotation to this cluster.

      See Alternating users rotation strategy

      Parameters:
      id - This parameter is required.
      options - This parameter is required.
    • addRotationSingleUser

      @Stability(Stable) @NotNull public SecretRotation addRotationSingleUser(@Nullable RotationSingleUserOptions options)
      Adds the single user rotation of the master password to this cluster.

      See Single user rotation strategy

      Parameters:
      options -
    • addRotationSingleUser

      @Stability(Stable) @NotNull public SecretRotation addRotationSingleUser()
      Adds the single user rotation of the master password to this cluster.

      See Single user rotation strategy

    • metricACUUtilization

      @Stability(Stable) @NotNull public Metric metricACUUtilization(@Nullable MetricOptions props)
      This value is represented as a percentage.

      It's calculated as the value of the ServerlessDatabaseCapacity metric divided by the maximum ACU value of the DB cluster.

      If this metric approaches a value of 100.0, the DB instance has scaled up as high as it can. Consider increasing the maximum ACU setting for the cluster.

      Parameters:
      props -
    • metricACUUtilization

      @Stability(Stable) @NotNull public Metric metricACUUtilization()
      This value is represented as a percentage.

      It's calculated as the value of the ServerlessDatabaseCapacity metric divided by the maximum ACU value of the DB cluster.

      If this metric approaches a value of 100.0, the DB instance has scaled up as high as it can. Consider increasing the maximum ACU setting for the cluster.

    • metricServerlessDatabaseCapacity

      @Stability(Stable) @NotNull public Metric metricServerlessDatabaseCapacity(@Nullable MetricOptions props)
      As a cluster-level metric, it represents the average of the ServerlessDatabaseCapacity values of all the Aurora Serverless v2 DB instances in the cluster.

      Parameters:
      props -
    • metricServerlessDatabaseCapacity

      @Stability(Stable) @NotNull public Metric metricServerlessDatabaseCapacity()
      As a cluster-level metric, it represents the average of the ServerlessDatabaseCapacity values of all the Aurora Serverless v2 DB instances in the cluster.
    • getCloudwatchLogGroups

      @Stability(Stable) @NotNull public Map<String,ILogGroup> getCloudwatchLogGroups()
      The log group is created when cloudwatchLogsExports is set.

      Each export value will create a separate log group.

    • getClusterEndpoint

      @Stability(Stable) @NotNull public Endpoint getClusterEndpoint()
      The endpoint to use for read/write operations.
      Specified by:
      getClusterEndpoint in interface IDatabaseCluster
      Specified by:
      getClusterEndpoint in class DatabaseClusterBase
    • getClusterIdentifier

      @Stability(Stable) @NotNull public String getClusterIdentifier()
      Identifier of the cluster.
      Specified by:
      getClusterIdentifier in interface IDatabaseCluster
      Specified by:
      getClusterIdentifier in class DatabaseClusterBase
    • getClusterReadEndpoint

      @Stability(Stable) @NotNull public Endpoint getClusterReadEndpoint()
      Endpoint to use for load-balanced read-only operations.
      Specified by:
      getClusterReadEndpoint in interface IDatabaseCluster
      Specified by:
      getClusterReadEndpoint in class DatabaseClusterBase
    • getClusterResourceIdentifier

      @Stability(Stable) @NotNull public String getClusterResourceIdentifier()
      The immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP.

      This AWS Region-unique identifier is used in things like IAM authentication policies.

      Specified by:
      getClusterResourceIdentifier in interface IDatabaseCluster
      Specified by:
      getClusterResourceIdentifier in class DatabaseClusterBase
    • getConnections

      @Stability(Stable) @NotNull public Connections getConnections()
      Access to the network connections.
      Specified by:
      getConnections in interface IConnectable
      Specified by:
      getConnections in class DatabaseClusterBase
    • getInstanceEndpoints

      @Stability(Stable) @NotNull public List<Endpoint> getInstanceEndpoints()
      Endpoints which address each individual replica.
      Specified by:
      getInstanceEndpoints in interface IDatabaseCluster
      Specified by:
      getInstanceEndpoints in class DatabaseClusterBase
    • getInstanceIdentifiers

      @Stability(Stable) @NotNull public List<String> getInstanceIdentifiers()
      Identifiers of the replicas.
      Specified by:
      getInstanceIdentifiers in interface IDatabaseCluster
      Specified by:
      getInstanceIdentifiers in class DatabaseClusterBase
    • getMultiUserRotationApplication

      @Stability(Stable) @NotNull public SecretRotationApplication getMultiUserRotationApplication()
      Application for multi user rotation to this cluster.
    • getNewCfnProps

      @Stability(Stable) @NotNull protected CfnDBClusterProps getNewCfnProps()
    • getSecurityGroups

      @Stability(Stable) @NotNull protected List<ISecurityGroup> getSecurityGroups()
    • getServerlessV2MaxCapacity

      @Stability(Stable) @NotNull protected Number getServerlessV2MaxCapacity()
    • getServerlessV2MinCapacity

      @Stability(Stable) @NotNull protected Number getServerlessV2MinCapacity()
    • getSingleUserRotationApplication

      @Stability(Stable) @NotNull public SecretRotationApplication getSingleUserRotationApplication()
      Application for single user rotation of the master password to this cluster.
    • getSubnetGroup

      @Stability(Stable) @NotNull protected ISubnetGroup getSubnetGroup()
    • getVpc

      @Stability(Stable) @NotNull public IVpc getVpc()
      The VPC network to place the cluster in.
    • getEngine

      @Stability(Stable) @Nullable public IClusterEngine getEngine()
      The engine for this Cluster.

      Never undefined.

      Specified by:
      getEngine in interface IDatabaseCluster
      Specified by:
      getEngine in class DatabaseClusterBase
    • getSecret

      @Stability(Stable) @Nullable public ISecret getSecret()
      The secret attached to this cluster.
      Specified by:
      getSecret in class DatabaseClusterBase
    • getVpcSubnets

      @Stability(Stable) @Nullable public SubnetSelection getVpcSubnets()
      The cluster's subnets.
    • getEnableDataApi

      @Stability(Stable) @Nullable protected Boolean getEnableDataApi()
      Specified by:
      getEnableDataApi in class DatabaseClusterBase
    • setEnableDataApi

      @Stability(Stable) protected void setEnableDataApi(@Nullable Boolean value)
      Specified by:
      setEnableDataApi in class DatabaseClusterBase
    • getHasServerlessInstance

      @Stability(Stable) @Nullable protected Boolean getHasServerlessInstance()
    • setHasServerlessInstance

      @Stability(Stable) protected void setHasServerlessInstance(@Nullable Boolean value)