Interface IDatabaseClusterFromSnapshotProps
Properties for DatabaseClusterFromSnapshot
.
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.AWS.RDS.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 }),
InstanceProps = new InstanceProps {
Vpc = vpc
},
SnapshotIdentifier = "mySnapshot"
});
Synopsis
Properties
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. |
CopyTagsToSnapshot | Whether to copy tags to the snapshot when a snapshot is created. |
Credentials | Credentials for the administrative user. |
DefaultDatabaseName | Name of a database which is automatically created inside the cluster. |
DeletionProtection | Indicates whether the DB cluster should have deletion protection enabled. |
Engine | What kind of database to start. |
IamAuthentication | Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. |
InstanceIdentifierBase | Base identifier for instances. |
InstanceProps | Settings for the individual instances that are launched. |
Instances | How many replicas/instances to create. |
MonitoringInterval | The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances. |
MonitoringRole | Role that will be used to manage DB instances monitoring. |
ParameterGroup | Additional parameters to pass to the database engine. |
Parameters | The parameters in the DBClusterParameterGroup to create automatically. |
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). |
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. |
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. |
SubnetGroup | Existing subnet group for the cluster. |
Properties
BacktrackWindow
The number of seconds to set a cluster's target backtrack window to.
virtual Duration BacktrackWindow { get; }
Property Value
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.
virtual IBackupProps Backup { get; }
Property Value
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.
CloudwatchLogsExports
The list of log types that need to be enabled for exporting to CloudWatch Logs.
virtual string[] CloudwatchLogsExports { get; }
Property Value
System.String[]
Remarks
Default: - no log exports
CloudwatchLogsRetention
The number of days log events are kept in CloudWatch Logs.
virtual Nullable<RetentionDays> CloudwatchLogsRetention { get; }
Property Value
System.Nullable<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.
virtual IRole CloudwatchLogsRetentionRole { get; }
Property Value
Remarks
Default: - a new role is created.
ClusterIdentifier
An optional identifier for the cluster.
virtual string ClusterIdentifier { get; }
Property Value
System.String
Remarks
Default: - A name is automatically generated.
CopyTagsToSnapshot
Whether to copy tags to the snapshot when a snapshot is created.
virtual Nullable<bool> CopyTagsToSnapshot { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true
Credentials
Credentials for the administrative user.
virtual Credentials Credentials { get; }
Property Value
Remarks
Default: - A username of 'admin' (or 'postgres' for PostgreSQL) and SecretsManager-generated password
DefaultDatabaseName
Name of a database which is automatically created inside the cluster.
virtual string DefaultDatabaseName { get; }
Property Value
System.String
Remarks
Default: - Database is not created in cluster.
DeletionProtection
Indicates whether the DB cluster should have deletion protection enabled.
virtual Nullable<bool> DeletionProtection { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true if removalPolicy
is RETAIN, false otherwise
Engine
IamAuthentication
Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.
virtual Nullable<bool> IamAuthentication { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
InstanceIdentifierBase
Base identifier for instances.
virtual string InstanceIdentifierBase { get; }
Property Value
System.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
Settings for the individual instances that are launched.
IInstanceProps InstanceProps { get; }
Property Value
Instances
How many replicas/instances to create.
virtual Nullable<double> Instances { get; }
Property Value
System.Nullable<System.Double>
Remarks
Has to be at least 1.
Default: 2
MonitoringInterval
The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances.
virtual Duration MonitoringInterval { get; }
Property Value
Remarks
Default: no enhanced monitoring
MonitoringRole
Role that will be used to manage DB instances monitoring.
virtual IRole MonitoringRole { get; }
Property Value
Remarks
Default: - A role is automatically created for you
ParameterGroup
Additional parameters to pass to the database engine.
virtual IParameterGroup ParameterGroup { get; }
Property Value
Remarks
Default: - No parameter group.
Parameters
The parameters in the DBClusterParameterGroup to create automatically.
virtual IDictionary<string, string> Parameters { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.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
Port
What port to listen on.
virtual Nullable<double> Port { get; }
Property Value
System.Nullable<System.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).
virtual string PreferredMaintenanceWindow { get; }
Property Value
System.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.
RemovalPolicy
The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.
virtual Nullable<RemovalPolicy> RemovalPolicy { get; }
Property Value
System.Nullable<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.
virtual 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.
virtual IRole S3ExportRole { get; }
Property Value
Remarks
This feature is only supported by the Aurora database engine.
This property must not be used if s3ExportBuckets
is used.
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.
virtual 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.
virtual IRole S3ImportRole { get; }
Property Value
Remarks
This feature is only supported by the Aurora database engine.
This property must not be used if s3ImportBuckets
is used.
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
SnapshotIdentifier
The identifier for the DB instance snapshot or DB cluster snapshot to restore from.
string SnapshotIdentifier { get; }
Property Value
System.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.
virtual Nullable<bool> StorageEncrypted { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true if storageEncryptionKey is provided, false otherwise
StorageEncryptionKey
The KMS key for storage encryption.
virtual IKey StorageEncryptionKey { get; }
Property Value
Remarks
If specified, {@link storageEncrypted} will be set to true
.
Default: - if storageEncrypted is true then the default master key, no key otherwise
SubnetGroup
Existing subnet group for the cluster.
virtual ISubnetGroup SubnetGroup { get; }
Property Value
Remarks
Default: - a new subnet group will be created.