@Stability(value=Stable) public static final class DatabaseClusterFromSnapshot.Builder extends Object implements software.amazon.jsii.Builder<DatabaseClusterFromSnapshot>
DatabaseClusterFromSnapshot.| Modifier and Type | Method and Description |
|---|---|
DatabaseClusterFromSnapshot.Builder |
backtrackWindow(Duration backtrackWindow)
The number of seconds to set a cluster's target backtrack window to.
|
DatabaseClusterFromSnapshot.Builder |
backup(BackupProps backup)
Backup settings.
|
DatabaseClusterFromSnapshot |
build() |
DatabaseClusterFromSnapshot.Builder |
cloudwatchLogsExports(List<String> cloudwatchLogsExports)
The list of log types that need to be enabled for exporting to CloudWatch Logs.
|
DatabaseClusterFromSnapshot.Builder |
cloudwatchLogsRetention(RetentionDays cloudwatchLogsRetention)
The number of days log events are kept in CloudWatch Logs.
|
DatabaseClusterFromSnapshot.Builder |
cloudwatchLogsRetentionRole(IRole cloudwatchLogsRetentionRole)
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
|
DatabaseClusterFromSnapshot.Builder |
clusterIdentifier(String clusterIdentifier)
An optional identifier for the cluster.
|
DatabaseClusterFromSnapshot.Builder |
copyTagsToSnapshot(Boolean copyTagsToSnapshot)
Whether to copy tags to the snapshot when a snapshot is created.
|
static DatabaseClusterFromSnapshot.Builder |
create(software.constructs.Construct scope,
String id) |
DatabaseClusterFromSnapshot.Builder |
credentials(Credentials credentials)
Deprecated.
use `snapshotCredentials` which allows to generate a new password
|
DatabaseClusterFromSnapshot.Builder |
defaultDatabaseName(String defaultDatabaseName)
Name of a database which is automatically created inside the cluster.
|
DatabaseClusterFromSnapshot.Builder |
deletionProtection(Boolean deletionProtection)
Indicates whether the DB cluster should have deletion protection enabled.
|
DatabaseClusterFromSnapshot.Builder |
engine(IClusterEngine engine)
What kind of database to start.
|
DatabaseClusterFromSnapshot.Builder |
iamAuthentication(Boolean iamAuthentication)
Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.
|
DatabaseClusterFromSnapshot.Builder |
instanceIdentifierBase(String instanceIdentifierBase)
Base identifier for instances.
|
DatabaseClusterFromSnapshot.Builder |
instanceProps(InstanceProps instanceProps)
Settings for the individual instances that are launched.
|
DatabaseClusterFromSnapshot.Builder |
instances(Number instances)
How many replicas/instances to create.
|
DatabaseClusterFromSnapshot.Builder |
instanceUpdateBehaviour(InstanceUpdateBehaviour instanceUpdateBehaviour)
The ordering of updates for instances.
|
DatabaseClusterFromSnapshot.Builder |
monitoringInterval(Duration monitoringInterval)
The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances.
|
DatabaseClusterFromSnapshot.Builder |
monitoringRole(IRole monitoringRole)
Role that will be used to manage DB instances monitoring.
|
DatabaseClusterFromSnapshot.Builder |
parameterGroup(IParameterGroup parameterGroup)
Additional parameters to pass to the database engine.
|
DatabaseClusterFromSnapshot.Builder |
parameters(Map<String,String> parameters)
The parameters in the DBClusterParameterGroup to create automatically.
|
DatabaseClusterFromSnapshot.Builder |
port(Number port)
What port to listen on.
|
DatabaseClusterFromSnapshot.Builder |
preferredMaintenanceWindow(String preferredMaintenanceWindow)
A preferred maintenance window day/time range.
|
DatabaseClusterFromSnapshot.Builder |
removalPolicy(RemovalPolicy removalPolicy)
The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.
|
DatabaseClusterFromSnapshot.Builder |
s3ExportBuckets(List<? extends IBucket> s3ExportBuckets)
S3 buckets that you want to load data into.
|
DatabaseClusterFromSnapshot.Builder |
s3ExportRole(IRole s3ExportRole)
Role that will be associated with this DB cluster to enable S3 export.
|
DatabaseClusterFromSnapshot.Builder |
s3ImportBuckets(List<? extends IBucket> s3ImportBuckets)
S3 buckets that you want to load data from.
|
DatabaseClusterFromSnapshot.Builder |
s3ImportRole(IRole s3ImportRole)
Role that will be associated with this DB cluster to enable S3 import.
|
DatabaseClusterFromSnapshot.Builder |
snapshotCredentials(SnapshotCredentials snapshotCredentials)
Master user credentials.
|
DatabaseClusterFromSnapshot.Builder |
snapshotIdentifier(String snapshotIdentifier)
The identifier for the DB instance snapshot or DB cluster snapshot to restore from.
|
DatabaseClusterFromSnapshot.Builder |
storageEncrypted(Boolean storageEncrypted)
Whether to enable storage encryption.
|
DatabaseClusterFromSnapshot.Builder |
storageEncryptionKey(IKey storageEncryptionKey)
The KMS key for storage encryption.
|
DatabaseClusterFromSnapshot.Builder |
subnetGroup(ISubnetGroup subnetGroup)
Existing subnet group for the cluster.
|
@Stability(value=Stable) public static DatabaseClusterFromSnapshot.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.DatabaseClusterFromSnapshot.Builder.@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder engine(IClusterEngine engine)
engine - What kind of database to start. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder instanceProps(InstanceProps instanceProps)
instanceProps - Settings for the individual instances that are launched. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder snapshotIdentifier(String snapshotIdentifier)
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.
snapshotIdentifier - The identifier for the DB instance snapshot or DB cluster snapshot to restore from. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder backtrackWindow(Duration backtrackWindow)
This feature is only supported by the Aurora MySQL database engine and cannot be enabled on existing clusters.
Default: 0 seconds (no backtrack)
backtrackWindow - The number of seconds to set a cluster's target backtrack window to. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder backup(BackupProps backup)
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.
backup - Backup settings. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder cloudwatchLogsExports(List<String> cloudwatchLogsExports)
Default: - no log exports
cloudwatchLogsExports - The list of log types that need to be enabled for exporting to CloudWatch Logs. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder cloudwatchLogsRetention(RetentionDays cloudwatchLogsRetention)
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
cloudwatchLogsRetention - The number of days log events are kept in CloudWatch Logs. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder cloudwatchLogsRetentionRole(IRole cloudwatchLogsRetentionRole)
Default: - a new role is created.
cloudwatchLogsRetentionRole - The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder clusterIdentifier(String clusterIdentifier)
Default: - A name is automatically generated.
clusterIdentifier - An optional identifier for the cluster. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder copyTagsToSnapshot(Boolean copyTagsToSnapshot)
Default: - true
copyTagsToSnapshot - Whether to copy tags to the snapshot when a snapshot is created. This parameter is required.this@Stability(value=Deprecated) @Deprecated public DatabaseClusterFromSnapshot.Builder credentials(Credentials credentials)
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.
credentials - Credentials for the administrative user. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder defaultDatabaseName(String defaultDatabaseName)
Default: - Database is not created in cluster.
defaultDatabaseName - Name of a database which is automatically created inside the cluster. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder deletionProtection(Boolean deletionProtection)
Default: - true if ``removalPolicy`` is RETAIN, false otherwise
deletionProtection - Indicates whether the DB cluster should have deletion protection enabled. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder iamAuthentication(Boolean iamAuthentication)
Default: false
iamAuthentication - Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder instanceIdentifierBase(String instanceIdentifierBase)
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.
instanceIdentifierBase - Base identifier for instances. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder instances(Number instances)
Has to be at least 1.
Default: 2
instances - How many replicas/instances to create. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder instanceUpdateBehaviour(InstanceUpdateBehaviour instanceUpdateBehaviour)
Default: InstanceUpdateBehaviour.BULK
instanceUpdateBehaviour - The ordering of updates for instances. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder monitoringInterval(Duration monitoringInterval)
Default: no enhanced monitoring
monitoringInterval - The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder monitoringRole(IRole monitoringRole)
Default: - A role is automatically created for you
monitoringRole - Role that will be used to manage DB instances monitoring. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder parameterGroup(IParameterGroup parameterGroup)
Default: - No parameter group.
parameterGroup - Additional parameters to pass to the database engine. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder parameters(Map<String,String> parameters)
You can only specify parameterGroup or parameters but not both. You need to use a versioned engine to auto-generate a DBClusterParameterGroup.
Default: - None
parameters - The parameters in the DBClusterParameterGroup to create automatically. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder port(Number port)
Default: - The default for the engine is used.
port - What port to listen on. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow)
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.
preferredMaintenanceWindow - A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder removalPolicy(RemovalPolicy removalPolicy)
Default: - RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data)
removalPolicy - The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder s3ExportBuckets(List<? extends IBucket> s3ExportBuckets)
This property must not be used if s3ExportRole is used.
For MySQL:
Default: - None
s3ExportBuckets - S3 buckets that you want to load data into. This feature is only supported by the Aurora database engine. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder s3ExportRole(IRole s3ExportRole)
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
s3ExportRole - Role that will be associated with this DB cluster to enable S3 export. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder s3ImportBuckets(List<? extends IBucket> s3ImportBuckets)
This property must not be used if s3ImportRole is used.
For MySQL:
Default: - None
s3ImportBuckets - S3 buckets that you want to load data from. This feature is only supported by the Aurora database engine. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder s3ImportRole(IRole s3ImportRole)
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
s3ImportRole - Role that will be associated with this DB cluster to enable S3 import. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder snapshotCredentials(SnapshotCredentials snapshotCredentials)
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.
snapshotCredentials - Master user credentials. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder storageEncrypted(Boolean storageEncrypted)
Default: - true if storageEncryptionKey is provided, false otherwise
storageEncrypted - Whether to enable storage encryption. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder storageEncryptionKey(IKey storageEncryptionKey)
If specified, {@link storageEncrypted} will be set to true.
Default: - if storageEncrypted is true then the default master key, no key otherwise
storageEncryptionKey - The KMS key for storage encryption. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot.Builder subnetGroup(ISubnetGroup subnetGroup)
Default: - a new subnet group will be created.
subnetGroup - Existing subnet group for the cluster. This parameter is required.this@Stability(value=Stable) public DatabaseClusterFromSnapshot build()
build in interface software.amazon.jsii.Builder<DatabaseClusterFromSnapshot>Copyright © 2022. All rights reserved.