@finnairoyj/cdk-constructs-lib
    Preparing search index...

    Interface RdsDatabaseClusterProps

    interface RdsDatabaseClusterProps {
        adminCredentials?: ISecret;
        allowMajorVersionUpgrade?: boolean;
        autoMinorVersionUpgrade?: boolean;
        cloudwatchLogsRetention?: RetentionDays;
        clusterEngine: ClusterEngine;
        clusterEngineVersion: ClusterEngineVersion;
        clusterName: string;
        clusterScalabilityType?: ClusterScalabilityType;
        clusterType: ClusterType;
        createClientAccessSecurityGroup?: boolean;
        deletionProtection?: boolean;
        enableDataApi?: boolean;
        iamAuthentication?: boolean;
        kmsEnvironmentKey?: IKey;
        kmsSecretsKey?: IKey;
        kmsStorageEncryptionKey: IKey;
        logRetentionRole?: IRole;
        port?: number;
        privateHostedZone?: IHostedZone;
        provisionedInstanceClass?: InstanceClass;
        provisionedInstanceSize?: InstanceSize;
        readReplicas?: number;
        serverlessV2AutoPauseDuration?: Duration;
        serverlessV2MaxCapacity?: number;
        serverlessV2MinCapacity?: number;
        snapshotId?: string;
        storageType?: DBClusterStorageType;
        vpc?: IVpc;
        vpcSubnets?: SubnetSelection;
    }
    Index

    Properties

    adminCredentials?: ISecret

    Admin credentials for the database. Must be in JSON format for RDS

    - New SecretsManager secret is created for admin credentials
    
    allowMajorVersionUpgrade?: boolean

    Allow RDS to automatically perform major DB engine version updates during defined service window

    false
    
    autoMinorVersionUpgrade?: boolean

    Allow RDS to automatically perform minor DB engine version updates and patches during defined service window

    true
    
    cloudwatchLogsRetention?: RetentionDays

    Retention period for database CloudWatch logs

    RetentionDays.SIX_MONTHS
    
    clusterEngine: ClusterEngine

    Cluster engine type

    clusterEngineVersion: ClusterEngineVersion

    Cluster engine version. Use AuroraMysqlEngineVersion for AURORA_MYSQL and AuroraPostgresEngineVersion for AURORA_POSTGRES

    It is recommended to specify the DB major version only when 'autoMinorVersionUpgrade' is enabled (default). Specifying exact minor version in this case will cause stack drift when the minor version is automatically updated by RDS. When specifying only the major version, RDS will use the latest minor version available when launching the DB instance

    clusterName: string

    Unique identifier for the DB cluster

    clusterScalabilityType?: ClusterScalabilityType

    Scalability mode for the Aurora cluster

    ClusterScalabilityType.STANDARD
    
    clusterType: ClusterType

    Cluster compute type

    createClientAccessSecurityGroup?: boolean

    Create an empty SecurityGroup that allows access to the database instance from external instances that have the client access security group associated.

    Note that the preferred way of granting access to the database is to use the CDK connections API to grant access to the DB default security group from the client instance's security group. This method follows the leas-access principle and creates point-to-point openings from client to the database

    false No ClientAccessSecurityGroup is created
    
    deletionProtection?: boolean

    Protect the DB instance from accidental deletion. Should only be disabled when intentionally deleting the DB instance

    true
    
    enableDataApi?: boolean

    Enable RDS Data API for the Aurora cluster

    false
    
    iamAuthentication?: boolean

    Enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts

    false
    
    kmsEnvironmentKey?: IKey

    KMS key to be used to encrypt performance insights data

    kmsSecretsKey?: IKey

    KMS key to be used to encrypt the DB admin password secret

    Required if 'adminCredentials' secret is not provided

    kmsStorageEncryptionKey: IKey

    KMS key used to encrypt the cluster storage

    logRetentionRole?: IRole

    Shared CloudWatch log retention role that CDK-generated Lambda uses to set retention period for the DB CloudWatch log groups. Using a shared role reduces number of redundant resources

    - New role is created
    
    port?: number

    Custom port for the database

    5432 for 'postgres' engine, 3306 for 'mysql' engine
    
    privateHostedZone?: IHostedZone

    Private HostedZone to create the DNS alias record for the RDS instance to.

    The created alias record is of the format <kebab-case(dbInstanceName)>. Example: my-db-instance.privatezonename.internal

    No DNS alias is created
    
    provisionedInstanceClass?: InstanceClass

    DB instance class to use for provisioned DB cluster

    provisionedInstanceSize?: InstanceSize

    DB instance size to use for provisioned DB cluster

    readReplicas?: number

    Number of read replicas for the cluster

    serverlessV2AutoPauseDuration?: Duration

    Specifies the duration an Aurora Serverless v2 DB instance must be idle before Aurora attempts to automatically pause it. The duration must be between 300 seconds (5 minutes) and 86,400 seconds (24 hours).

    serverlessV2MaxCapacity?: number

    The maximum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster. You can specify ACU values in half-step increments, such as 40, 40.5, 41, and so on. The largest value that you can use is 256. The maximum capacity must be higher than 0.5 ACUs.

    serverlessV2MinCapacity?: number

    The minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster. You can specify ACU values in half-step increments, such as 8, 8.5, 9, and so on. The smallest value that you can use is 0. For Aurora versions that support the Aurora Serverless v2 auto-pause feature, the smallest value that you can use is 0. For versions that don't support Aurora Serverless v2 auto-pause, the smallest value that you can use is 0.5.

    snapshotId?: string

    ID or ARN of the database snapshot to create the instance from

    Providing a snapshotId will trigger replacement of existing RDS instance. If restoring a snapshot it is recommended to create a separate instance of this construct, not to update existing one

    NOTE: When restoring a DB from a snapshot, please refer to the AWS documentation! Potential risk of data loss exists. After restoring a DB from snapshot, the 'snapshotId' property cannot be changed or removed. This will result in CloudFormation replacing the DB instance

    storageType?: DBClusterStorageType

    The storage type for the Aurora cluster

    DBClusterStorageType.AURORA
    
    vpc?: IVpc

    VPC to use for the DB instance

    - Use the LandingZone managed VPC on the current account
    
    vpcSubnets?: SubnetSelection

    Subnets to use for the VPC. Minimum set of 2 subnets needs to be defined

    - Use the RESTRICTED subnets in the LandingZone managed VPC on the current account