Show / Hide Table of Contents

Interface IDatabaseClusterFromSnapshotProps

Properties for DatabaseClusterFromSnapshot.

Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IDatabaseClusterFromSnapshotProps
Syntax (vb)
Public Interface IDatabaseClusterFromSnapshotProps
Remarks

ExampleMetadata: infused

Examples
Vpc vpc;

            new DatabaseClusterFromSnapshot(this, "Database", new DatabaseClusterFromSnapshotProps {
                Engine = DatabaseClusterEngine.Aurora(new AuroraClusterEngineProps { Version = AuroraEngineVersion.VER_1_22_2 }),
                Writer = ClusterInstance.Provisioned("writer"),
                Vpc = vpc,
                SnapshotIdentifier = "mySnapshot"
            });

Synopsis

Properties

AutoMinorVersionUpgrade

Specifies whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window.

BacktrackWindow

The number of seconds to set a cluster's target backtrack window to.

Backup

Backup settings.

CloudwatchLogsExports

The list of log types that need to be enabled for exporting to CloudWatch Logs.

CloudwatchLogsRetention

The number of days log events are kept in CloudWatch Logs.

CloudwatchLogsRetentionRole

The IAM role for the Lambda function associated with the custom resource that sets the retention policy.

ClusterIdentifier

An optional identifier for the cluster.

ClusterScailabilityType

(deprecated) [Misspelled] Specifies the scalability mode of the Aurora DB cluster.

ClusterScalabilityType

Specifies the scalability mode of the Aurora DB cluster.

CopyTagsToSnapshot

Whether to copy tags to the snapshot when a snapshot is created.

Credentials

(deprecated) Credentials for the administrative user.

DatabaseInsightsMode

The database insights mode.

DefaultDatabaseName

Name of a database which is automatically created inside the cluster.

DeleteAutomatedBackups

Specifies whether to remove automated backups immediately after the DB cluster is deleted.

DeletionProtection

Indicates whether the DB cluster should have deletion protection enabled.

Domain

Directory ID for associating the DB cluster with a specific Active Directory.

DomainRole

The IAM role to be used when making API calls to the Directory Service.

EnableClusterLevelEnhancedMonitoring

Whether to enable enhanced monitoring at the cluster level.

EnableDataApi

Whether to enable the Data API for the cluster.

EnableLocalWriteForwarding

Whether read replicas can forward write operations to the writer DB instance in the DB cluster.

EnablePerformanceInsights

Whether to enable Performance Insights for the DB cluster.

Engine

What kind of database to start.

EngineLifecycleSupport

The life cycle type for this DB cluster.

IamAuthentication

Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.

InstanceIdentifierBase

Base identifier for instances.

InstanceProps

(deprecated) Settings for the individual instances that are launched.

InstanceUpdateBehaviour

The ordering of updates for instances.

Instances

(deprecated) How many replicas/instances to create.

MonitoringInterval

The interval between points when Amazon RDS collects enhanced monitoring metrics.

MonitoringRole

Role that will be used to manage DB monitoring.

NetworkType

The network type of the DB instance.

ParameterGroup

Additional parameters to pass to the database engine.

Parameters

The parameters in the DBClusterParameterGroup to create automatically.

PerformanceInsightEncryptionKey

The AWS KMS key for encryption of Performance Insights data.

PerformanceInsightRetention

The amount of time, in days, to retain Performance Insights data.

Port

What port to listen on.

PreferredMaintenanceWindow

A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC).

Readers

A list of instances to create as cluster reader instances.

RemovalPolicy

The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.

S3ExportBuckets

S3 buckets that you want to load data into. This feature is only supported by the Aurora database engine.

S3ExportRole

Role that will be associated with this DB cluster to enable S3 export.

S3ImportBuckets

S3 buckets that you want to load data from. This feature is only supported by the Aurora database engine.

S3ImportRole

Role that will be associated with this DB cluster to enable S3 import.

SecurityGroups

Security group.

ServerlessV2AutoPauseDuration

Specifies the duration an Aurora Serverless v2 DB instance must be idle before Aurora attempts to automatically pause it.

ServerlessV2MaxCapacity

The maximum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.

ServerlessV2MinCapacity

The minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.

SnapshotCredentials

Master user credentials.

SnapshotIdentifier

The identifier for the DB instance snapshot or DB cluster snapshot to restore from.

StorageEncrypted

Whether to enable storage encryption.

StorageEncryptionKey

The KMS key for storage encryption.

StorageType

The storage type to be associated with the DB cluster.

SubnetGroup

Existing subnet group for the cluster.

Vpc

What subnets to run the RDS instances in.

VpcSubnets

Where to place the instances within the VPC.

Writer

The instance to use for the cluster writer.

Properties

AutoMinorVersionUpgrade

Specifies whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window.

bool? AutoMinorVersionUpgrade { get; }
Property Value

bool?

Remarks

Default: true

BacktrackWindow

The number of seconds to set a cluster's target backtrack window to.

Duration? BacktrackWindow { get; }
Property Value

Duration

Remarks

This feature is only supported by the Aurora MySQL database engine and cannot be enabled on existing clusters.

Default: 0 seconds (no backtrack)

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Backtrack.html

Backup

Backup settings.

IBackupProps? Backup { get; }
Property Value

IBackupProps

Remarks

Default: - Backup retention period for automated backups is 1 day. Backup preferred window is set to a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

See: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow

CloudwatchLogsExports

The list of log types that need to be enabled for exporting to CloudWatch Logs.

string[]? CloudwatchLogsExports { get; }
Property Value

string[]

Remarks

Default: - no log exports

CloudwatchLogsRetention

The number of days log events are kept in CloudWatch Logs.

RetentionDays? CloudwatchLogsRetention { get; }
Property Value

RetentionDays?

Remarks

When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to Infinity.

Default: - logs never expire

CloudwatchLogsRetentionRole

The IAM role for the Lambda function associated with the custom resource that sets the retention policy.

IRole? CloudwatchLogsRetentionRole { get; }
Property Value

IRole

Remarks

Default: - a new role is created.

ClusterIdentifier

An optional identifier for the cluster.

string? ClusterIdentifier { get; }
Property Value

string

Remarks

Default: - A name is automatically generated.

ClusterScailabilityType

(deprecated) [Misspelled] Specifies the scalability mode of the Aurora DB cluster.

[Obsolete("Use clusterScalabilityType instead. This will be removed in the next major version.")]
ClusterScailabilityType? ClusterScailabilityType { get; }
Property Value

ClusterScailabilityType?

Remarks

Set LIMITLESS if you want to use a limitless database; otherwise, set it to STANDARD.

Default: ClusterScailabilityType.STANDARD

Stability: Deprecated

ClusterScalabilityType

Specifies the scalability mode of the Aurora DB cluster.

ClusterScalabilityType? ClusterScalabilityType { get; }
Property Value

ClusterScalabilityType?

Remarks

Set LIMITLESS if you want to use a limitless database; otherwise, set it to STANDARD.

Default: ClusterScalabilityType.STANDARD

CopyTagsToSnapshot

Whether to copy tags to the snapshot when a snapshot is created.

bool? CopyTagsToSnapshot { get; }
Property Value

bool?

Remarks

Default: - true

Credentials

(deprecated) Credentials for the administrative user.

[Obsolete("use `snapshotCredentials` which allows to generate a new password")]
Credentials? Credentials { get; }
Property Value

Credentials

Remarks

Note - using this prop only works with Credentials.fromPassword() with the username of the snapshot, Credentials.fromUsername() with the username and password of the snapshot or Credentials.fromSecret() with a secret containing the username and password of the snapshot.

Default: - A username of 'admin' (or 'postgres' for PostgreSQL) and SecretsManager-generated password that will not be applied to the cluster, use snapshotCredentials for the correct behavior.

Stability: Deprecated

DatabaseInsightsMode

The database insights mode.

DatabaseInsightsMode? DatabaseInsightsMode { get; }
Property Value

DatabaseInsightsMode?

Remarks

Default: - DatabaseInsightsMode.STANDARD when performance insights are enabled and Amazon Aurora engine is used, otherwise not set.

DefaultDatabaseName

Name of a database which is automatically created inside the cluster.

string? DefaultDatabaseName { get; }
Property Value

string

Remarks

Default: - Database is not created in cluster.

DeleteAutomatedBackups

Specifies whether to remove automated backups immediately after the DB cluster is deleted.

bool? DeleteAutomatedBackups { get; }
Property Value

bool?

Remarks

Default: undefined - AWS RDS default is to remove automated backups immediately after the DB cluster is deleted, unless the AWS Backup policy specifies a point-in-time restore rule.

DeletionProtection

Indicates whether the DB cluster should have deletion protection enabled.

bool? DeletionProtection { get; }
Property Value

bool?

Remarks

Default: - true if removalPolicy is RETAIN, undefined otherwise, which will not enable deletion protection. To disable deletion protection after it has been enabled, you must explicitly set this value to false.

Domain

Directory ID for associating the DB cluster with a specific Active Directory.

string? Domain { get; }
Property Value

string

Remarks

Necessary for enabling Kerberos authentication. If specified, the DB cluster joins the given Active Directory, enabling Kerberos authentication. If not specified, the DB cluster will not be associated with any Active Directory, and Kerberos authentication will not be enabled.

Default: - DB cluster is not associated with an Active Directory; Kerberos authentication is not enabled.

DomainRole

The IAM role to be used when making API calls to the Directory Service.

IRole? DomainRole { get; }
Property Value

IRole

Remarks

The role needs the AWS-managed policy AmazonRDSDirectoryServiceAccess or equivalent.

Default: - If DatabaseClusterBaseProps.domain is specified, a role with the AmazonRDSDirectoryServiceAccess policy is automatically created.

EnableClusterLevelEnhancedMonitoring

Whether to enable enhanced monitoring at the cluster level.

bool? EnableClusterLevelEnhancedMonitoring { get; }
Property Value

bool?

Remarks

If set to true, monitoringInterval and monitoringRole are applied to not the instances, but the cluster. monitoringInterval is required to be set if enableClusterLevelEnhancedMonitoring is set to true.

Default: - When the monitoringInterval is set, enhanced monitoring is enabled for each instance.

EnableDataApi

Whether to enable the Data API for the cluster.

bool? EnableDataApi { get; }
Property Value

bool?

Remarks

Default: - false

EnableLocalWriteForwarding

Whether read replicas can forward write operations to the writer DB instance in the DB cluster.

bool? EnableLocalWriteForwarding { get; }
Property Value

bool?

Remarks

This setting can only be enabled for Aurora MySQL 3.04 or higher, and for Aurora PostgreSQL 16.4 or higher (for version 16), 15.8 or higher (for version 15), and 14.13 or higher (for version 14).

Default: false

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-postgresql-write-forwarding.html

EnablePerformanceInsights

Whether to enable Performance Insights for the DB cluster.

bool? EnablePerformanceInsights { get; }
Property Value

bool?

Remarks

Default: - false, unless performanceInsightRetention or performanceInsightEncryptionKey is set, or databaseInsightsMode is set to DatabaseInsightsMode.ADVANCED.

Engine

What kind of database to start.

IClusterEngine Engine { get; }
Property Value

IClusterEngine

Remarks

ExampleMetadata: infused

EngineLifecycleSupport

The life cycle type for this DB cluster.

EngineLifecycleSupport? EngineLifecycleSupport { get; }
Property Value

EngineLifecycleSupport?

Remarks

Default: undefined - AWS RDS default setting is EngineLifecycleSupport.OPEN_SOURCE_RDS_EXTENDED_SUPPORT

See: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html

IamAuthentication

Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.

bool? IamAuthentication { get; }
Property Value

bool?

Remarks

Default: false

InstanceIdentifierBase

Base identifier for instances.

string? InstanceIdentifierBase { get; }
Property Value

string

Remarks

Every replica is named by appending the replica number to this string, 1-based.

Default: - clusterIdentifier is used with the word "Instance" appended. If clusterIdentifier is not provided, the identifier is automatically generated.

InstanceProps

(deprecated) Settings for the individual instances that are launched.

[Obsolete("- use writer and readers instead")]
IInstanceProps? InstanceProps { get; }
Property Value

IInstanceProps

Remarks

Stability: Deprecated

InstanceUpdateBehaviour

The ordering of updates for instances.

InstanceUpdateBehaviour? InstanceUpdateBehaviour { get; }
Property Value

InstanceUpdateBehaviour?

Remarks

Default: InstanceUpdateBehaviour.BULK

Instances

(deprecated) How many replicas/instances to create.

[Obsolete("- use writer and readers instead")]
double? Instances { get; }
Property Value

double?

Remarks

Has to be at least 1.

Default: 2

Stability: Deprecated

MonitoringInterval

The interval between points when Amazon RDS collects enhanced monitoring metrics.

Duration? MonitoringInterval { get; }
Property Value

Duration

Remarks

If you enable enableClusterLevelEnhancedMonitoring, this property is applied to the cluster, otherwise it is applied to the instances.

Default: - no enhanced monitoring

MonitoringRole

Role that will be used to manage DB monitoring.

IRole? MonitoringRole { get; }
Property Value

IRole

Remarks

If you enable enableClusterLevelEnhancedMonitoring, this property is applied to the cluster, otherwise it is applied to the instances.

Default: - A role is automatically created for you

NetworkType

The network type of the DB instance.

NetworkType? NetworkType { get; }
Property Value

NetworkType?

Remarks

Default: - IPV4

ParameterGroup

Additional parameters to pass to the database engine.

IParameterGroup? ParameterGroup { get; }
Property Value

IParameterGroup

Remarks

Default: - No parameter group.

Parameters

The parameters in the DBClusterParameterGroup to create automatically.

IDictionary<string, string>? Parameters { get; }
Property Value

IDictionary<string, string>

Remarks

You can only specify parameterGroup or parameters but not both. You need to use a versioned engine to auto-generate a DBClusterParameterGroup.

Default: - None

PerformanceInsightEncryptionKey

The AWS KMS key for encryption of Performance Insights data.

IKey? PerformanceInsightEncryptionKey { get; }
Property Value

IKey

Remarks

Default: - default master key

PerformanceInsightRetention

The amount of time, in days, to retain Performance Insights data.

PerformanceInsightRetention? PerformanceInsightRetention { get; }
Property Value

PerformanceInsightRetention?

Remarks

If you set databaseInsightsMode to DatabaseInsightsMode.ADVANCED, you must set this property to PerformanceInsightRetention.MONTHS_15.

Default: - 7

Port

What port to listen on.

double? Port { get; }
Property Value

double?

Remarks

Default: - The default for the engine is used.

PreferredMaintenanceWindow

A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC).

string? PreferredMaintenanceWindow { get; }
Property Value

string

Remarks

Example: 'Sun:23:45-Mon:00:15'

Default: - 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance

Readers

A list of instances to create as cluster reader instances.

IClusterInstance[]? Readers { get; }
Property Value

IClusterInstance[]

Remarks

Default: - no readers are created. The cluster will have a single writer/reader

RemovalPolicy

The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.

RemovalPolicy? RemovalPolicy { get; }
Property Value

RemovalPolicy?

Remarks

Default: - RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data)

S3ExportBuckets

S3 buckets that you want to load data into. This feature is only supported by the Aurora database engine.

IBucket[]? S3ExportBuckets { get; }
Property Value

IBucket[]

Remarks

This property must not be used if s3ExportRole is used.

For MySQL:

Default: - None

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/postgresql-s3-export.html

S3ExportRole

Role that will be associated with this DB cluster to enable S3 export.

IRole? S3ExportRole { get; }
Property Value

IRole

Remarks

This feature is only supported by the Aurora database engine.

This property must not be used if s3ExportBuckets is used. To use this property with Aurora PostgreSQL, it must be configured with the S3 export feature enabled when creating the DatabaseClusterEngine For MySQL:

Default: - New role is created if s3ExportBuckets is set, no role is defined otherwise

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/postgresql-s3-export.html

S3ImportBuckets

S3 buckets that you want to load data from. This feature is only supported by the Aurora database engine.

IBucket[]? S3ImportBuckets { get; }
Property Value

IBucket[]

Remarks

This property must not be used if s3ImportRole is used.

For MySQL:

Default: - None

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Migrating.html

S3ImportRole

Role that will be associated with this DB cluster to enable S3 import.

IRole? S3ImportRole { get; }
Property Value

IRole

Remarks

This feature is only supported by the Aurora database engine.

This property must not be used if s3ImportBuckets is used. To use this property with Aurora PostgreSQL, it must be configured with the S3 import feature enabled when creating the DatabaseClusterEngine For MySQL:

Default: - New role is created if s3ImportBuckets is set, no role is defined otherwise

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Migrating.html

SecurityGroups

Security group.

ISecurityGroup[]? SecurityGroups { get; }
Property Value

ISecurityGroup[]

Remarks

Default: - a new security group is created.

ServerlessV2AutoPauseDuration

Specifies the duration an Aurora Serverless v2 DB instance must be idle before Aurora attempts to automatically pause it.

Duration? ServerlessV2AutoPauseDuration { get; }
Property Value

Duration

Remarks

The duration must be between 300 seconds (5 minutes) and 86,400 seconds (24 hours).

Default: - The default is 300 seconds (5 minutes).

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2-auto-pause.html

ServerlessV2MaxCapacity

The maximum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.

double? ServerlessV2MaxCapacity { get; }
Property Value

double?

Remarks

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.

Default: 2

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.setting-capacity.html#aurora-serverless-v2.max_capacity_considerations

ServerlessV2MinCapacity

The minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.

double? ServerlessV2MinCapacity { get; }
Property Value

double?

Remarks

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.

Default: 0.5

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.setting-capacity.html#aurora-serverless-v2.min_capacity_considerations

SnapshotCredentials

Master user credentials.

SnapshotCredentials? SnapshotCredentials { get; }
Property Value

SnapshotCredentials

Remarks

Note - It is not possible to change the master username for a snapshot; however, it is possible to provide (or generate) a new password.

Default: - The existing username and password from the snapshot will be used.

SnapshotIdentifier

The identifier for the DB instance snapshot or DB cluster snapshot to restore from.

string SnapshotIdentifier { get; }
Property Value

string

Remarks

You can use either the name or the Amazon Resource Name (ARN) to specify a DB cluster snapshot. However, you can use only the ARN to specify a DB instance snapshot.

StorageEncrypted

Whether to enable storage encryption.

bool? StorageEncrypted { get; }
Property Value

bool?

Remarks

Default: - true if storageEncryptionKey is provided, false otherwise

StorageEncryptionKey

The KMS key for storage encryption.

IKeyRef? StorageEncryptionKey { get; }
Property Value

IKeyRef

Remarks

If specified, storageEncrypted will be set to true.

Default: - if storageEncrypted is true then the default master key, no key otherwise

StorageType

The storage type to be associated with the DB cluster.

DBClusterStorageType? StorageType { get; }
Property Value

DBClusterStorageType?

Remarks

Default: - DBClusterStorageType.AURORA

SubnetGroup

Existing subnet group for the cluster.

ISubnetGroup? SubnetGroup { get; }
Property Value

ISubnetGroup

Remarks

Default: - a new subnet group will be created.

Vpc

What subnets to run the RDS instances in.

IVpc? Vpc { get; }
Property Value

IVpc

Remarks

Must be at least 2 subnets in two different AZs.

VpcSubnets

Where to place the instances within the VPC.

ISubnetSelection? VpcSubnets { get; }
Property Value

ISubnetSelection

Remarks

Default: - the Vpc default strategy if not specified.

Writer

The instance to use for the cluster writer.

IClusterInstance? Writer { get; }
Property Value

IClusterInstance

Remarks

Default: - required if instanceProps is not provided

Back to top Generated by DocFX