"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CfnIntegrationPropsMixin = exports.CfnDBShardGroupPropsMixin = exports.CfnOptionGroupPropsMixin = exports.CfnGlobalClusterPropsMixin = exports.CfnEventSubscriptionPropsMixin = exports.CfnDBSubnetGroupPropsMixin = exports.CfnDBSecurityGroupIngressPropsMixin = exports.CfnDBSecurityGroupPropsMixin = exports.CfnDBProxyTargetGroupPropsMixin = exports.CfnDBProxyEndpointPropsMixin = exports.CfnDBProxyPropsMixin = exports.CfnDBParameterGroupPropsMixin = exports.CfnDBInstancePropsMixin = exports.CfnDBClusterParameterGroupPropsMixin = exports.CfnDBClusterPropsMixin = exports.CfnCustomDBEngineVersionPropsMixin = void 0;
const jsiiDeprecationWarnings = require("../../../.warnings.jsii.js");
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
/* eslint-disable @stylistic/max-len, eol-last */
const cdk = __importStar(require("aws-cdk-lib/core"));
const service = __importStar(require("aws-cdk-lib/aws-rds"));
/**
 * Creates a custom DB engine version (CEV).
 *
 * @cloudformationResource AWS::RDS::CustomDBEngineVersion
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-customdbengineversion.html
 */
class CfnCustomDBEngineVersionPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnCustomDBEngineVersionPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["databaseInstallationFiles", "databaseInstallationFilesS3BucketName", "databaseInstallationFilesS3Prefix", "description", "engine", "engineVersion", "imageId", "kmsKeyId", "manifest", "sourceCustomDbEngineVersionIdentifier", "status", "tags", "useAwsProvidedLatestImage"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::CustomDBEngineVersion`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnCustomDBEngineVersionMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnCustomDBEngineVersionPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnCustomDBEngineVersion.isCfnCustomDBEngineVersion(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnCustomDBEngineVersionPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnCustomDBEngineVersionPropsMixin = CfnCustomDBEngineVersionPropsMixin;
/**
 * 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](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.CreateInstance.html) in the *Amazon Aurora User Guide* .
 *
 * For more information about creating a Multi-AZ DB cluster, see [Creating a Multi-AZ DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/create-multi-az-db-cluster.html) 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-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](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CreateSnapshotCluster.html) .
 * > - 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html) .
 *
 * *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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) .
 *
 * @cloudformationResource AWS::RDS::DBCluster
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html
 */
class CfnDBClusterPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBClusterPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["allocatedStorage", "associatedRoles", "autoMinorVersionUpgrade", "availabilityZones", "backtrackWindow", "backupRetentionPeriod", "clusterScalabilityType", "copyTagsToSnapshot", "databaseInsightsMode", "databaseName", "dbClusterIdentifier", "dbClusterInstanceClass", "dbClusterParameterGroupName", "dbInstanceParameterGroupName", "dbSubnetGroupName", "dbSystemId", "deleteAutomatedBackups", "deletionProtection", "domain", "domainIamRoleName", "enableCloudwatchLogsExports", "enableGlobalWriteForwarding", "enableHttpEndpoint", "enableIamDatabaseAuthentication", "enableLocalWriteForwarding", "engine", "engineLifecycleSupport", "engineMode", "engineVersion", "globalClusterIdentifier", "iops", "kmsKeyId", "manageMasterUserPassword", "masterUserAuthenticationType", "masterUsername", "masterUserPassword", "masterUserSecret", "monitoringInterval", "monitoringRoleArn", "networkType", "performanceInsightsEnabled", "performanceInsightsKmsKeyId", "performanceInsightsRetentionPeriod", "port", "preferredBackupWindow", "preferredMaintenanceWindow", "publiclyAccessible", "replicationSourceIdentifier", "restoreToTime", "restoreType", "scalingConfiguration", "serverlessV2ScalingConfiguration", "snapshotIdentifier", "sourceDbClusterIdentifier", "sourceDbClusterResourceId", "sourceRegion", "storageEncrypted", "storageType", "tags", "useLatestRestorableTime", "vpcSecurityGroupIds"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBCluster`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBClusterMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBClusterPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDBClusterMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBCluster.isCfnDBCluster(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBClusterPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBClusterPropsMixin = CfnDBClusterPropsMixin;
// @ts-ignore TS6133
function flattenCfnDBClusterPropsMixinMasterUserSecretProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        kmsKeyId: (!props.kmsKeyId ? undefined : cdk.getRefProperty(props.kmsKeyId?.keyRef, 'keyId') ?? cdk.ensureStringOrUndefined(props.kmsKeyId, "kmsKeyId", "kms.IKeyRef | string")),
        secretArn: (!props.secretArn ? undefined : props.secretArn)
    };
}
// @ts-ignore TS6133
function flattenCfnDBClusterPropsMixinDBClusterRoleProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        featureName: (!props.featureName ? undefined : props.featureName),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnDBClusterMixinProps(props) {
    const ret = {};
    if ((props.associatedRoles !== undefined))
        ret.associatedRoles = (cdk.isResolvableObject(props.associatedRoles) ? props.associatedRoles : cdk.mapArrayInPlace(props.associatedRoles, (item) => flattenCfnDBClusterPropsMixinDBClusterRoleProperty(item)));
    if ((props.dbClusterParameterGroupName !== undefined))
        ret.dbClusterParameterGroupName = cdk.getRefProperty(props.dbClusterParameterGroupName?.dbClusterParameterGroupRef, 'dbClusterParameterGroupName') ?? cdk.ensureStringOrUndefined(props.dbClusterParameterGroupName, "dbClusterParameterGroupName", "rds.IDBClusterParameterGroupRef | string");
    if ((props.dbSubnetGroupName !== undefined))
        ret.dbSubnetGroupName = cdk.getRefProperty(props.dbSubnetGroupName?.dbSubnetGroupRef, 'dbSubnetGroupName') ?? cdk.ensureStringOrUndefined(props.dbSubnetGroupName, "dbSubnetGroupName", "rds.IDBSubnetGroupRef | string");
    if ((props.globalClusterIdentifier !== undefined))
        ret.globalClusterIdentifier = cdk.getRefProperty(props.globalClusterIdentifier?.globalClusterRef, 'globalClusterIdentifier') ?? cdk.ensureStringOrUndefined(props.globalClusterIdentifier, "globalClusterIdentifier", "rds.IGlobalClusterRef | string");
    if ((props.kmsKeyId !== undefined))
        ret.kmsKeyId = cdk.getRefProperty(props.kmsKeyId?.keyRef, 'keyArn') ?? cdk.getRefProperty(props.kmsKeyId?.keyRef, 'keyId') ?? cdk.ensureStringOrUndefined(props.kmsKeyId, "kmsKeyId", "kms.IKeyRef | string");
    if ((props.masterUserSecret !== undefined))
        ret.masterUserSecret = flattenCfnDBClusterPropsMixinMasterUserSecretProperty(props.masterUserSecret);
    if ((props.vpcSecurityGroupIds !== undefined))
        ret.vpcSecurityGroupIds = cdk.mapArrayInPlace(props.vpcSecurityGroupIds, (item) => cdk.getRefProperty(item?.securityGroupRef, 'securityGroupId') ?? cdk.ensureStringOrUndefined(item, "vpcSecurityGroupIds", "ec2.ISecurityGroupRef | string"));
    return ret;
}
/**
 * The `AWS::RDS::DBClusterParameterGroup` resource creates a new Amazon RDS DB cluster parameter group.
 *
 * For information about configuring parameters for Amazon Aurora DB clusters, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.html) in the *Amazon Aurora User Guide* .
 *
 * > If you apply a parameter group to a DB cluster, then its DB instances might need to reboot. This can result in an outage while the DB instances are rebooting.
 * >
 * > If you apply a change to parameter group associated with a stopped DB cluster, then the updated stack waits until the DB cluster is started.
 *
 * @cloudformationResource AWS::RDS::DBClusterParameterGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbclusterparametergroup.html
 */
class CfnDBClusterParameterGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBClusterParameterGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["dbClusterParameterGroupName", "description", "family", "parameters", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBClusterParameterGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBClusterParameterGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBClusterParameterGroupPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBClusterParameterGroup.isCfnDBClusterParameterGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBClusterParameterGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBClusterParameterGroupPropsMixin = CfnDBClusterParameterGroupPropsMixin;
/**
 * The `AWS::RDS::DBInstance` resource creates an Amazon DB instance.
 *
 * The new DB instance can be an RDS DB instance, or it can be a DB instance in an Aurora DB cluster.
 *
 * For more information about creating an RDS DB instance, see [Creating an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html) in the *Amazon RDS User Guide* .
 *
 * For more information about creating a DB instance in an Aurora DB cluster, see [Creating an Amazon Aurora DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.CreateInstance.html) in the *Amazon Aurora User Guide* .
 *
 * If you import an existing DB instance, and the template configuration doesn't match the actual configuration of the DB instance, AWS CloudFormation applies the changes in the template during the import operation.
 *
 * > If a DB instance is deleted or replaced during an update, AWS CloudFormation deletes all automated snapshots. However, it retains manual DB snapshots. During an update that requires replacement, you can apply a stack policy to prevent DB instances from being replaced. For more information, see [Prevent Updates to Stack Resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html) .
 *
 * *Updating DB instances*
 *
 * When properties labeled " *Update requires:* [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) " are updated, AWS CloudFormation first creates a replacement DB instance, then changes references from other dependent resources to point to the replacement DB instance, and finally deletes the old DB instance.
 *
 * > 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 instance. To preserve your data, perform the following procedure:
 * >
 * > - Deactivate any applications that are using the DB instance so that there's no activity on the DB instance.
 * > - Create a snapshot of the DB instance. For more information, see [Creating a DB Snapshot](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateSnapshot.html) .
 * > - If you want to restore your instance using a DB snapshot, modify the updated template with your DB instance changes and add the `DBSnapshotIdentifier` property with the ID of the DB snapshot that you want to use.
 * >
 * > After you restore a DB instance with a `DBSnapshotIdentifier` property, you can delete the `DBSnapshotIdentifier` property. When you specify this property for an update, the DB instance is not restored from the DB snapshot again, and the data in the database is not changed. However, if you don't specify the `DBSnapshotIdentifier` property, an empty DB instance is created, and the original DB instance is deleted. If you specify a property that is different from the previous snapshot restore property, a new DB instance is restored from the specified `DBSnapshotIdentifier` property, and the original DB instance is deleted.
 * > - Update the stack.
 *
 * For more information about updating other properties of this resource, see `[ModifyDBInstance](https://docs.aws.amazon.com//AmazonRDS/latest/APIReference/API_ModifyDBInstance.html)` . For more information about updating stacks, see [AWS CloudFormation Stacks Updates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html) .
 *
 * *Deleting DB instances*
 *
 * For DB instances that are part of an Aurora DB cluster, you can set a deletion policy for your DB instance to control how AWS CloudFormation handles the DB instance when the stack is deleted. For Amazon RDS DB instances, you can choose to *retain* the DB instance, to *delete* the DB instance, or to *create a snapshot* of the DB instance. The default AWS CloudFormation behavior depends on the `DBClusterIdentifier` property:
 *
 * - For `AWS::RDS::DBInstance` resources that don't specify the `DBClusterIdentifier` property, AWS CloudFormation saves a snapshot of the DB instance.
 * - For `AWS::RDS::DBInstance` resources that do specify the `DBClusterIdentifier` property, AWS CloudFormation deletes the DB instance.
 *
 * For more information, see [DeletionPolicy Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) .
 *
 * @cloudformationResource AWS::RDS::DBInstance
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html
 */
class CfnDBInstancePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBInstancePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["additionalStorageVolumes", "allocatedStorage", "allowMajorVersionUpgrade", "applyImmediately", "associatedRoles", "automaticBackupReplicationKmsKeyId", "automaticBackupReplicationRegion", "automaticBackupReplicationRetentionPeriod", "autoMinorVersionUpgrade", "availabilityZone", "backupRetentionPeriod", "backupTarget", "caCertificateIdentifier", "certificateRotationRestart", "characterSetName", "copyTagsToSnapshot", "customIamInstanceProfile", "databaseInsightsMode", "dbClusterIdentifier", "dbClusterSnapshotIdentifier", "dbInstanceClass", "dbInstanceIdentifier", "dbName", "dbParameterGroupName", "dbSecurityGroups", "dbSnapshotIdentifier", "dbSubnetGroupName", "dbSystemId", "dedicatedLogVolume", "deleteAutomatedBackups", "deletionProtection", "domain", "domainAuthSecretArn", "domainDnsIps", "domainFqdn", "domainIamRoleName", "domainOu", "enableCloudwatchLogsExports", "enableIamDatabaseAuthentication", "enablePerformanceInsights", "engine", "engineLifecycleSupport", "engineVersion", "iops", "kmsKeyId", "licenseModel", "manageMasterUserPassword", "masterUserAuthenticationType", "masterUsername", "masterUserPassword", "masterUserSecret", "maxAllocatedStorage", "monitoringInterval", "monitoringRoleArn", "multiAz", "ncharCharacterSetName", "networkType", "optionGroupName", "performanceInsightsKmsKeyId", "performanceInsightsRetentionPeriod", "port", "preferredBackupWindow", "preferredMaintenanceWindow", "processorFeatures", "promotionTier", "publiclyAccessible", "replicaMode", "restoreTime", "sourceDbClusterIdentifier", "sourceDbInstanceAutomatedBackupsArn", "sourceDbInstanceIdentifier", "sourceDbiResourceId", "sourceRegion", "storageEncrypted", "storageThroughput", "storageType", "tags", "tdeCredentialArn", "tdeCredentialPassword", "timezone", "useDefaultProcessorFeatures", "useLatestRestorableTime", "vpcSecurityGroups"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBInstance`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBInstanceMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBInstancePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDBInstanceMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBInstance.isCfnDBInstance(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBInstancePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBInstancePropsMixin = CfnDBInstancePropsMixin;
// @ts-ignore TS6133
function flattenCfnDBInstancePropsMixinMasterUserSecretProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        kmsKeyId: (!props.kmsKeyId ? undefined : cdk.getRefProperty(props.kmsKeyId?.keyRef, 'keyId') ?? cdk.ensureStringOrUndefined(props.kmsKeyId, "kmsKeyId", "kms.IKeyRef | string")),
        secretArn: (!props.secretArn ? undefined : props.secretArn)
    };
}
// @ts-ignore TS6133
function flattenCfnDBInstanceMixinProps(props) {
    const ret = {};
    if ((props.dbClusterIdentifier !== undefined))
        ret.dbClusterIdentifier = cdk.getRefProperty(props.dbClusterIdentifier?.dbClusterRef, 'dbClusterIdentifier') ?? cdk.ensureStringOrUndefined(props.dbClusterIdentifier, "dbClusterIdentifier", "rds.IDBClusterRef | string");
    if ((props.dbParameterGroupName !== undefined))
        ret.dbParameterGroupName = cdk.getRefProperty(props.dbParameterGroupName?.dbParameterGroupRef, 'dbParameterGroupName') ?? cdk.ensureStringOrUndefined(props.dbParameterGroupName, "dbParameterGroupName", "rds.IDBParameterGroupRef | string");
    if ((props.dbSubnetGroupName !== undefined))
        ret.dbSubnetGroupName = cdk.getRefProperty(props.dbSubnetGroupName?.dbSubnetGroupRef, 'dbSubnetGroupName') ?? cdk.ensureStringOrUndefined(props.dbSubnetGroupName, "dbSubnetGroupName", "rds.IDBSubnetGroupRef | string");
    if ((props.kmsKeyId !== undefined))
        ret.kmsKeyId = cdk.getRefProperty(props.kmsKeyId?.keyRef, 'keyArn') ?? cdk.getRefProperty(props.kmsKeyId?.keyRef, 'keyId') ?? cdk.ensureStringOrUndefined(props.kmsKeyId, "kmsKeyId", "kms.IKeyRef | string");
    if ((props.masterUserSecret !== undefined))
        ret.masterUserSecret = flattenCfnDBInstancePropsMixinMasterUserSecretProperty(props.masterUserSecret);
    if ((props.monitoringRoleArn !== undefined))
        ret.monitoringRoleArn = cdk.getRefProperty(props.monitoringRoleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.monitoringRoleArn, "monitoringRoleArn", "iam.IRoleRef | string");
    if ((props.performanceInsightsKmsKeyId !== undefined))
        ret.performanceInsightsKmsKeyId = cdk.getRefProperty(props.performanceInsightsKmsKeyId?.keyRef, 'keyArn') ?? cdk.getRefProperty(props.performanceInsightsKmsKeyId?.keyRef, 'keyId') ?? cdk.ensureStringOrUndefined(props.performanceInsightsKmsKeyId, "performanceInsightsKmsKeyId", "kms.IKeyRef | string");
    if ((props.sourceDbInstanceIdentifier !== undefined))
        ret.sourceDbInstanceIdentifier = cdk.getRefProperty(props.sourceDbInstanceIdentifier?.dbInstanceRef, 'dbInstanceIdentifier') ?? cdk.ensureStringOrUndefined(props.sourceDbInstanceIdentifier, "sourceDbInstanceIdentifier", "rds.IDBInstanceRef | string");
    if ((props.vpcSecurityGroups !== undefined))
        ret.vpcSecurityGroups = cdk.mapArrayInPlace(props.vpcSecurityGroups, (item) => cdk.getRefProperty(item?.securityGroupRef, 'securityGroupId') ?? cdk.ensureStringOrUndefined(item, "vpcSecurityGroups", "ec2.ISecurityGroupRef | string"));
    return ret;
}
/**
 * The `AWS::RDS::DBParameterGroup` resource creates a custom parameter group for an RDS database family.
 *
 * This type can be declared in a template and referenced in the `DBParameterGroupName` property of an `[AWS::RDS::DBInstance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html)` resource.
 *
 * For information about configuring parameters for Amazon RDS DB instances, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html) in the *Amazon RDS User Guide* .
 *
 * For information about configuring parameters for Amazon Aurora DB instances, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.html) in the *Amazon Aurora User Guide* .
 *
 * > Applying a parameter group to a DB instance may require the DB instance to reboot, resulting in a database outage for the duration of the reboot.
 *
 * @cloudformationResource AWS::RDS::DBParameterGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbparametergroup.html
 */
class CfnDBParameterGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBParameterGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["dbParameterGroupName", "description", "family", "parameters", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBParameterGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBParameterGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBParameterGroupPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBParameterGroup.isCfnDBParameterGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBParameterGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBParameterGroupPropsMixin = CfnDBParameterGroupPropsMixin;
/**
 * The `AWS::RDS::DBProxy` resource creates or updates a DB proxy.
 *
 * For information about RDS Proxy for Amazon RDS, see [Managing Connections with Amazon RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html) in the *Amazon RDS User Guide* .
 *
 * For information about RDS Proxy for Amazon Aurora, see [Managing Connections with Amazon RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html) in the *Amazon Aurora User Guide* .
 *
 * > Limitations apply to RDS Proxy, including DB engine version limitations and AWS Region limitations.
 * >
 * > For information about limitations that apply to RDS Proxy for Amazon RDS, see [Limitations for RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html#rds-proxy.limitations) in the *Amazon RDS User Guide* .
 * >
 * > For information about that apply to RDS Proxy for Amazon Aurora, see [Limitations for RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html#rds-proxy.limitations) in the *Amazon Aurora User Guide* .
 *
 * @cloudformationResource AWS::RDS::DBProxy
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbproxy.html
 */
class CfnDBProxyPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBProxyPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["auth", "dbProxyName", "debugLogging", "defaultAuthScheme", "endpointNetworkType", "engineFamily", "idleClientTimeout", "requireTls", "roleArn", "tags", "targetConnectionNetworkType", "vpcSecurityGroupIds", "vpcSubnetIds"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBProxy`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBProxyMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBProxyPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDBProxyMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBProxy.isCfnDBProxy(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBProxyPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBProxyPropsMixin = CfnDBProxyPropsMixin;
// @ts-ignore TS6133
function flattenCfnDBProxyPropsMixinAuthFormatProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        authScheme: (!props.authScheme ? undefined : props.authScheme),
        clientPasswordAuthType: (!props.clientPasswordAuthType ? undefined : props.clientPasswordAuthType),
        description: (!props.description ? undefined : props.description),
        iamAuth: (!props.iamAuth ? undefined : props.iamAuth),
        secretArn: (!props.secretArn ? undefined : cdk.getRefProperty(props.secretArn?.secretRef, 'secretId') ?? cdk.ensureStringOrUndefined(props.secretArn, "secretArn", "secretsmanager.ISecretRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnDBProxyMixinProps(props) {
    const ret = {};
    if ((props.auth !== undefined))
        ret.auth = (cdk.isResolvableObject(props.auth) ? props.auth : cdk.mapArrayInPlace(props.auth, (item) => flattenCfnDBProxyPropsMixinAuthFormatProperty(item)));
    if ((props.roleArn !== undefined))
        ret.roleArn = cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string");
    if ((props.vpcSecurityGroupIds !== undefined))
        ret.vpcSecurityGroupIds = cdk.mapArrayInPlace(props.vpcSecurityGroupIds, (item) => cdk.getRefProperty(item?.securityGroupRef, 'securityGroupId') ?? cdk.ensureStringOrUndefined(item, "vpcSecurityGroupIds", "ec2.ISecurityGroupRef | string"));
    if ((props.vpcSubnetIds !== undefined))
        ret.vpcSubnetIds = cdk.mapArrayInPlace(props.vpcSubnetIds, (item) => cdk.getRefProperty(item?.subnetRef, 'subnetId') ?? cdk.ensureStringOrUndefined(item, "vpcSubnetIds", "ec2.ISubnetRef | string"));
    return ret;
}
/**
 * The `AWS::RDS::DBProxyEndpoint` resource creates or updates a DB proxy endpoint.
 *
 * You can use custom proxy endpoints to access a proxy through a different VPC than the proxy's default VPC.
 *
 * For more information about RDS Proxy, see [AWS::RDS::DBProxy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbproxy.html) .
 *
 * @cloudformationResource AWS::RDS::DBProxyEndpoint
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbproxyendpoint.html
 */
class CfnDBProxyEndpointPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBProxyEndpointPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["dbProxyEndpointName", "dbProxyName", "endpointNetworkType", "tags", "targetRole", "vpcSecurityGroupIds", "vpcSubnetIds"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBProxyEndpoint`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBProxyEndpointMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBProxyEndpointPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDBProxyEndpointMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBProxyEndpoint.isCfnDBProxyEndpoint(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBProxyEndpointPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBProxyEndpointPropsMixin = CfnDBProxyEndpointPropsMixin;
// @ts-ignore TS6133
function flattenCfnDBProxyEndpointMixinProps(props) {
    const ret = {};
    if ((props.vpcSecurityGroupIds !== undefined))
        ret.vpcSecurityGroupIds = cdk.mapArrayInPlace(props.vpcSecurityGroupIds, (item) => cdk.getRefProperty(item?.securityGroupRef, 'securityGroupId') ?? cdk.ensureStringOrUndefined(item, "vpcSecurityGroupIds", "ec2.ISecurityGroupRef | string"));
    if ((props.vpcSubnetIds !== undefined))
        ret.vpcSubnetIds = cdk.mapArrayInPlace(props.vpcSubnetIds, (item) => cdk.getRefProperty(item?.subnetRef, 'subnetId') ?? cdk.ensureStringOrUndefined(item, "vpcSubnetIds", "ec2.ISubnetRef | string"));
    return ret;
}
/**
 * The `AWS::RDS::DBProxyTargetGroup` resource represents a set of RDS DB instances, Aurora DB clusters, or both that a proxy can connect to.
 *
 * Currently, each target group is associated with exactly one RDS DB instance or Aurora DB cluster.
 *
 * This data type is used as a response element in the `DescribeDBProxyTargetGroups` action.
 *
 * For information about RDS Proxy for Amazon RDS, see [Managing Connections with Amazon RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html) in the *Amazon RDS User Guide* .
 *
 * For information about RDS Proxy for Amazon Aurora, see [Managing Connections with Amazon RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html) in the *Amazon Aurora User Guide* .
 *
 * For a sample template that creates a DB proxy and registers a DB instance, see [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbproxy.html#aws-resource-rds-dbproxy--examples) in AWS::RDS::DBProxy.
 *
 * > Limitations apply to RDS Proxy, including DB engine version limitations and AWS Region limitations.
 * >
 * > For information about limitations that apply to RDS Proxy for Amazon RDS, see [Limitations for RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html#rds-proxy.limitations) in the *Amazon RDS User Guide* .
 * >
 * > For information about that apply to RDS Proxy for Amazon Aurora, see [Limitations for RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html#rds-proxy.limitations) in the *Amazon Aurora User Guide* .
 *
 * @cloudformationResource AWS::RDS::DBProxyTargetGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbproxytargetgroup.html
 */
class CfnDBProxyTargetGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBProxyTargetGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["connectionPoolConfigurationInfo", "dbClusterIdentifiers", "dbInstanceIdentifiers", "dbProxyName", "targetGroupName"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBProxyTargetGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBProxyTargetGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBProxyTargetGroupPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDBProxyTargetGroupMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBProxyTargetGroup.isCfnDBProxyTargetGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBProxyTargetGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBProxyTargetGroupPropsMixin = CfnDBProxyTargetGroupPropsMixin;
// @ts-ignore TS6133
function flattenCfnDBProxyTargetGroupMixinProps(props) {
    const ret = {};
    if ((props.dbClusterIdentifiers !== undefined))
        ret.dbClusterIdentifiers = cdk.mapArrayInPlace(props.dbClusterIdentifiers, (item) => cdk.getRefProperty(item?.dbClusterRef, 'dbClusterIdentifier') ?? cdk.ensureStringOrUndefined(item, "dbClusterIdentifiers", "rds.IDBClusterRef | string"));
    if ((props.dbProxyName !== undefined))
        ret.dbProxyName = cdk.getRefProperty(props.dbProxyName?.dbProxyRef, 'dbProxyName') ?? cdk.ensureStringOrUndefined(props.dbProxyName, "dbProxyName", "rds.IDBProxyRef | string");
    return ret;
}
/**
 * The `AWS::RDS::DBSecurityGroup` resource creates or updates an Amazon RDS DB security group.
 *
 * > EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see [Migrate from EC2-Classic to a VPC](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the *Amazon EC2 User Guide* , the blog [EC2-Classic Networking is Retiring – Here’s How to Prepare](https://docs.aws.amazon.com/aws/ec2-classic-is-retiring-heres-how-to-prepare/) , and [Moving a DB instance not in a VPC into a VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) in the *Amazon RDS User Guide* .
 *
 * @cloudformationResource AWS::RDS::DBSecurityGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbsecuritygroup.html
 */
class CfnDBSecurityGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBSecurityGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["dbSecurityGroupIngress", "ec2VpcId", "groupDescription", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBSecurityGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBSecurityGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBSecurityGroupPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBSecurityGroup.isCfnDBSecurityGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBSecurityGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBSecurityGroupPropsMixin = CfnDBSecurityGroupPropsMixin;
/**
 * The `AWS::RDS::DBSecurityGroupIngress` resource enables ingress to a DB security group using one of two forms of authorization.
 *
 * First, you can add EC2 or VPC security groups to the DB security group if the application using the database is running on EC2 or VPC instances. Second, IP ranges are available if the application accessing your database is running on the Internet.
 *
 * This type supports updates. For more information about updating stacks, see [AWS CloudFormation Stacks Updates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html) .
 *
 * For details about the settings for DB security group ingress, see [AuthorizeDBSecurityGroupIngress](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_AuthorizeDBSecurityGroupIngress.html) .
 *
 * > EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see [Migrate from EC2-Classic to a VPC](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the *Amazon EC2 User Guide* , the blog [EC2-Classic Networking is Retiring – Here’s How to Prepare](https://docs.aws.amazon.com/aws/ec2-classic-is-retiring-heres-how-to-prepare/) , and [Moving a DB instance not in a VPC into a VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) in the *Amazon RDS User Guide* .
 *
 * @cloudformationResource AWS::RDS::DBSecurityGroupIngress
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbsecuritygroupingress.html
 */
class CfnDBSecurityGroupIngressPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBSecurityGroupIngressPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["cidrip", "dbSecurityGroupName", "ec2SecurityGroupId", "ec2SecurityGroupName", "ec2SecurityGroupOwnerId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBSecurityGroupIngress`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBSecurityGroupIngressMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBSecurityGroupIngressPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBSecurityGroupIngress.isCfnDBSecurityGroupIngress(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBSecurityGroupIngressPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBSecurityGroupIngressPropsMixin = CfnDBSecurityGroupIngressPropsMixin;
/**
 * The `AWS::RDS::DBSubnetGroup` resource creates a database subnet group.
 *
 * Subnet groups must contain at least two subnets in two different Availability Zones in the same region.
 *
 * For more information, see [Working with DB subnet groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Subnets) in the *Amazon RDS User Guide* .
 *
 * @cloudformationResource AWS::RDS::DBSubnetGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbsubnetgroup.html
 */
class CfnDBSubnetGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBSubnetGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["dbSubnetGroupDescription", "dbSubnetGroupName", "subnetIds", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBSubnetGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBSubnetGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBSubnetGroupPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDBSubnetGroupMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBSubnetGroup.isCfnDBSubnetGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBSubnetGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBSubnetGroupPropsMixin = CfnDBSubnetGroupPropsMixin;
// @ts-ignore TS6133
function flattenCfnDBSubnetGroupMixinProps(props) {
    const ret = {};
    if ((props.subnetIds !== undefined))
        ret.subnetIds = cdk.mapArrayInPlace(props.subnetIds, (item) => cdk.getRefProperty(item?.subnetRef, 'subnetId') ?? cdk.ensureStringOrUndefined(item, "subnetIds", "ec2.ISubnetRef | string"));
    return ret;
}
/**
 * The `AWS::RDS::EventSubscription` resource allows you to receive notifications for Amazon Relational Database Service events through the Amazon Simple Notification Service (Amazon SNS).
 *
 * For more information, see [Using Amazon RDS Event Notification](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) in the *Amazon RDS User Guide* .
 *
 * @cloudformationResource AWS::RDS::EventSubscription
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-eventsubscription.html
 */
class CfnEventSubscriptionPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnEventSubscriptionPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["enabled", "eventCategories", "snsTopicArn", "sourceIds", "sourceType", "subscriptionName", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::EventSubscription`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnEventSubscriptionMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnEventSubscriptionPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnEventSubscriptionMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnEventSubscription.isCfnEventSubscription(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnEventSubscriptionPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnEventSubscriptionPropsMixin = CfnEventSubscriptionPropsMixin;
// @ts-ignore TS6133
function flattenCfnEventSubscriptionMixinProps(props) {
    const ret = {};
    if ((props.snsTopicArn !== undefined))
        ret.snsTopicArn = cdk.getRefProperty(props.snsTopicArn?.topicRef, 'topicArn') ?? cdk.ensureStringOrUndefined(props.snsTopicArn, "snsTopicArn", "sns.ITopicRef | string");
    if ((props.sourceIds !== undefined))
        ret.sourceIds = cdk.mapArrayInPlace(props.sourceIds, (item) => cdk.getRefProperty(item?.dbClusterRef, 'dbClusterIdentifier') ?? cdk.getRefProperty(item?.dbInstanceRef, 'dbInstanceIdentifier') ?? cdk.ensureStringOrUndefined(item, "sourceIds", "rds.IDBClusterRef | rds.IDBInstanceRef | string"));
    return ret;
}
/**
 * The `AWS::RDS::GlobalCluster` resource creates or updates an Amazon Aurora global database spread across multiple AWS Regions.
 *
 * The global database contains a single primary cluster with read-write capability, and a read-only secondary cluster that receives data from the primary cluster through high-speed replication performed by the Aurora storage subsystem.
 *
 * You can create a global database that is initially empty, and then add a primary cluster and a secondary cluster to it.
 *
 * For information about Aurora global databases, see [Working with Amazon Aurora Global Databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html) in the *Amazon Aurora User Guide* .
 *
 * @cloudformationResource AWS::RDS::GlobalCluster
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html
 */
class CfnGlobalClusterPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnGlobalClusterPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["deletionProtection", "engine", "engineLifecycleSupport", "engineVersion", "globalClusterIdentifier", "sourceDbClusterIdentifier", "storageEncrypted", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::GlobalCluster`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnGlobalClusterMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnGlobalClusterPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnGlobalClusterMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnGlobalCluster.isCfnGlobalCluster(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnGlobalClusterPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnGlobalClusterPropsMixin = CfnGlobalClusterPropsMixin;
// @ts-ignore TS6133
function flattenCfnGlobalClusterMixinProps(props) {
    const ret = {};
    if ((props.sourceDbClusterIdentifier !== undefined))
        ret.sourceDbClusterIdentifier = cdk.getRefProperty(props.sourceDbClusterIdentifier?.dbClusterRef, 'dbClusterIdentifier') ?? cdk.ensureStringOrUndefined(props.sourceDbClusterIdentifier, "sourceDbClusterIdentifier", "rds.IDBClusterRef | string");
    return ret;
}
/**
 * The `AWS::RDS::OptionGroup` resource creates or updates an option group, to enable and configure features that are specific to a particular DB engine.
 *
 * @cloudformationResource AWS::RDS::OptionGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-optiongroup.html
 */
class CfnOptionGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnOptionGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["engineName", "majorEngineVersion", "optionConfigurations", "optionGroupDescription", "optionGroupName", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::OptionGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnOptionGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnOptionGroupPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnOptionGroup.isCfnOptionGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnOptionGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnOptionGroupPropsMixin = CfnOptionGroupPropsMixin;
/**
 * Creates a new DB shard group for Aurora Limitless Database.
 *
 * You must enable Aurora Limitless Database to create a DB shard group.
 *
 * Valid for: Aurora DB clusters only
 *
 * @cloudformationResource AWS::RDS::DBShardGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbshardgroup.html
 */
class CfnDBShardGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnDBShardGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["computeRedundancy", "dbClusterIdentifier", "dbShardGroupIdentifier", "maxAcu", "minAcu", "publiclyAccessible", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::DBShardGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnDBShardGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDBShardGroupPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDBShardGroup.isCfnDBShardGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDBShardGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDBShardGroupPropsMixin = CfnDBShardGroupPropsMixin;
/**
 * A zero-ETL integration with Amazon Redshift.
 *
 * @cloudformationResource AWS::RDS::Integration
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-integration.html
 */
class CfnIntegrationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_rds.CfnIntegrationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["additionalEncryptionContext", "dataFilter", "description", "integrationName", "kmsKeyId", "sourceArn", "tags", "targetArn"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::RDS::Integration`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_rds_CfnIntegrationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnIntegrationPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnIntegration.isCfnIntegration(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnIntegrationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnIntegrationPropsMixin = CfnIntegrationPropsMixin;
