Class CfnDBClusterPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.rds.CfnDBClusterPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:20:04.301Z") @Stability(Stable) public class CfnDBClusterPropsMixin extends Mixin implements software.constructs.IMixin
The AWS::RDS::DBCluster resource creates an Amazon Aurora DB cluster or Multi-AZ DB cluster.

For more information about creating an Aurora DB cluster, see Creating an Amazon Aurora DB cluster in the Amazon Aurora User Guide .

For more information about creating a Multi-AZ DB cluster, see Creating a Multi-AZ DB cluster in the Amazon RDS User Guide .

You can only create this resource in AWS Regions where Amazon Aurora or Multi-AZ DB clusters are supported.

Updating DB clusters

When properties labeled " Update requires: Replacement " are updated, AWS CloudFormation first creates a replacement DB cluster, then changes references from other dependent resources to point to the replacement DB cluster, and finally deletes the old DB cluster.

We highly recommend that you take a snapshot of the database before updating the stack. If you don't, you lose the data when AWS CloudFormation replaces your DB cluster. To preserve your data, perform the following procedure:

  • Deactivate any applications that are using the DB cluster so that there's no activity on the DB instance.
  • Create a snapshot of the DB cluster. For more information, see Creating a DB cluster snapshot .
  • If you want to restore your DB cluster using a DB cluster snapshot, modify the updated template with your DB cluster changes and add the SnapshotIdentifier property with the ID of the DB cluster snapshot that you want to use.

After you restore a DB cluster with a SnapshotIdentifier property, you must specify the same SnapshotIdentifier property for any future updates to the DB cluster. When you specify this property for an update, the DB cluster is not restored from the DB cluster snapshot again, and the data in the database is not changed. However, if you don't specify the SnapshotIdentifier property, an empty DB cluster is created, and the original DB cluster is deleted. If you specify a property that is different from the previous snapshot restore property, a new DB cluster is restored from the specified SnapshotIdentifier property, and the original DB cluster is deleted.

  • Update the stack.

Currently, when you are updating the stack for an Aurora Serverless DB cluster, you can't include changes to any other properties when you specify one of the following properties: PreferredBackupWindow , PreferredMaintenanceWindow , and Port . This limitation doesn't apply to provisioned DB clusters.

For more information about updating other properties of this resource, see [ModifyDBCluster](https://docs.aws.amazon.com//AmazonRDS/latest/APIReference/API_ModifyDBCluster.html) . For more information about updating stacks, see AWS CloudFormation Stacks Updates .

Deleting DB clusters

The default DeletionPolicy for AWS::RDS::DBCluster resources is Snapshot . For more information about how AWS CloudFormation deletes resources, see DeletionPolicy Attribute .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.rds.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnDBClusterPropsMixin cfnDBClusterPropsMixin = CfnDBClusterPropsMixin.Builder.create(CfnDBClusterMixinProps.builder()
         .allocatedStorage(123)
         .associatedRoles(List.of(DBClusterRoleProperty.builder()
                 .featureName("featureName")
                 .roleArn("roleArn")
                 .build()))
         .autoMinorVersionUpgrade(false)
         .availabilityZones(List.of("availabilityZones"))
         .backtrackWindow(123)
         .backupRetentionPeriod(123)
         .clusterScalabilityType("clusterScalabilityType")
         .copyTagsToSnapshot(false)
         .databaseInsightsMode("databaseInsightsMode")
         .databaseName("databaseName")
         .dbClusterIdentifier("dbClusterIdentifier")
         .dbClusterInstanceClass("dbClusterInstanceClass")
         .dbClusterParameterGroupName("dbClusterParameterGroupName")
         .dbInstanceParameterGroupName("dbInstanceParameterGroupName")
         .dbSubnetGroupName("dbSubnetGroupName")
         .dbSystemId("dbSystemId")
         .deleteAutomatedBackups(false)
         .deletionProtection(false)
         .domain("domain")
         .domainIamRoleName("domainIamRoleName")
         .enableCloudwatchLogsExports(List.of("enableCloudwatchLogsExports"))
         .enableGlobalWriteForwarding(false)
         .enableHttpEndpoint(false)
         .enableIamDatabaseAuthentication(false)
         .enableLocalWriteForwarding(false)
         .engine("engine")
         .engineLifecycleSupport("engineLifecycleSupport")
         .engineMode("engineMode")
         .engineVersion("engineVersion")
         .globalClusterIdentifier("globalClusterIdentifier")
         .iops(123)
         .kmsKeyId("kmsKeyId")
         .manageMasterUserPassword(false)
         .masterUserAuthenticationType("masterUserAuthenticationType")
         .masterUsername("masterUsername")
         .masterUserPassword("masterUserPassword")
         .masterUserSecret(MasterUserSecretProperty.builder()
                 .kmsKeyId("kmsKeyId")
                 .secretArn("secretArn")
                 .build())
         .monitoringInterval(123)
         .monitoringRoleArn("monitoringRoleArn")
         .networkType("networkType")
         .performanceInsightsEnabled(false)
         .performanceInsightsKmsKeyId("performanceInsightsKmsKeyId")
         .performanceInsightsRetentionPeriod(123)
         .port(123)
         .preferredBackupWindow("preferredBackupWindow")
         .preferredMaintenanceWindow("preferredMaintenanceWindow")
         .publiclyAccessible(false)
         .replicationSourceIdentifier("replicationSourceIdentifier")
         .restoreToTime("restoreToTime")
         .restoreType("restoreType")
         .scalingConfiguration(ScalingConfigurationProperty.builder()
                 .autoPause(false)
                 .maxCapacity(123)
                 .minCapacity(123)
                 .secondsBeforeTimeout(123)
                 .secondsUntilAutoPause(123)
                 .timeoutAction("timeoutAction")
                 .build())
         .serverlessV2ScalingConfiguration(ServerlessV2ScalingConfigurationProperty.builder()
                 .maxCapacity(123)
                 .minCapacity(123)
                 .secondsUntilAutoPause(123)
                 .build())
         .snapshotIdentifier("snapshotIdentifier")
         .sourceDbClusterIdentifier("sourceDbClusterIdentifier")
         .sourceDbClusterResourceId("sourceDbClusterResourceId")
         .sourceRegion("sourceRegion")
         .storageEncrypted(false)
         .storageType("storageType")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .useLatestRestorableTime(false)
         .vpcSecurityGroupIds(List.of("vpcSecurityGroupIds"))
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnDBClusterPropsMixin

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

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

      @Stability(Stable) public CfnDBClusterPropsMixin(@NotNull CfnDBClusterMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::RDS::DBCluster.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnDBClusterPropsMixin

      @Stability(Stable) public CfnDBClusterPropsMixin(@NotNull CfnDBClusterMixinProps props)
      Create a mixin to apply properties to AWS::RDS::DBCluster.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnDBClusterMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()