Interface DatabaseClusterFromSnapshotProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DatabaseClusterFromSnapshotProps.Jsii$Proxy
DatabaseClusterFromSnapshot.
Example:
Vpc vpc;
DatabaseClusterFromSnapshot.Builder.create(this, "Database")
.engine(DatabaseClusterEngine.aurora(AuroraClusterEngineProps.builder().version(AuroraEngineVersion.VER_1_22_2).build()))
.writer(ClusterInstance.provisioned("writer"))
.vpc(vpc)
.snapshotIdentifier("mySnapshot")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDatabaseClusterFromSnapshotPropsstatic final classAn implementation forDatabaseClusterFromSnapshotProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanSpecifies whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window.default DurationThe number of seconds to set a cluster's target backtrack window to.default BackupPropsBackup settings.The list of log types that need to be enabled for exporting to CloudWatch Logs.default RetentionDaysThe number of days log events are kept in CloudWatch Logs.default IRoleThe IAM role for the Lambda function associated with the custom resource that sets the retention policy.default StringAn optional identifier for the cluster.default ClusterScailabilityTypeDeprecated.Use clusterScalabilityType instead.default ClusterScalabilityTypeSpecifies the scalability mode of the Aurora DB cluster.default BooleanWhether to copy tags to the snapshot when a snapshot is created.default CredentialsDeprecated.usesnapshotCredentialswhich allows to generate a new passworddefault DatabaseInsightsModeThe database insights mode.default StringName of a database which is automatically created inside the cluster.default BooleanSpecifies whether to remove automated backups immediately after the DB cluster is deleted.default BooleanIndicates whether the DB cluster should have deletion protection enabled.default StringDirectory ID for associating the DB cluster with a specific Active Directory.default IRoleThe IAM role to be used when making API calls to the Directory Service.default BooleanWhether to enable enhanced monitoring at the cluster level.default BooleanWhether to enable the Data API for the cluster.default BooleanWhether read replicas can forward write operations to the writer DB instance in the DB cluster.default BooleanWhether to enable Performance Insights for the DB cluster.What kind of database to start.default EngineLifecycleSupportThe life cycle type for this DB cluster.default BooleanWhether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.default StringBase identifier for instances.default InstancePropsDeprecated.use writer and readers insteaddefault NumberDeprecated.use writer and readers insteaddefault InstanceUpdateBehaviourThe ordering of updates for instances.default DurationThe interval between points when Amazon RDS collects enhanced monitoring metrics.default IRoleRole that will be used to manage DB monitoring.default NetworkTypeThe network type of the DB instance.default IParameterGroupAdditional parameters to pass to the database engine.The parameters in the DBClusterParameterGroup to create automatically.default IKeyThe AWS KMS key for encryption of Performance Insights data.default PerformanceInsightRetentionThe amount of time, in days, to retain Performance Insights data.default NumbergetPort()What port to listen on.default StringA preferred maintenance window day/time range.default List<IClusterInstance> A list of instances to create as cluster reader instances.default RemovalPolicyThe removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.S3 buckets that you want to load data into.default IRoleRole that will be associated with this DB cluster to enable S3 export.S3 buckets that you want to load data from.default IRoleRole that will be associated with this DB cluster to enable S3 import.default List<ISecurityGroup> Security group.default DurationSpecifies the duration an Aurora Serverless v2 DB instance must be idle before Aurora attempts to automatically pause it.default NumberThe maximum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.default NumberThe minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.default SnapshotCredentialsMaster user credentials.The identifier for the DB instance snapshot or DB cluster snapshot to restore from.default BooleanWhether to enable storage encryption.default IKeyRefThe KMS key for storage encryption.default DBClusterStorageTypeThe storage type to be associated with the DB cluster.default ISubnetGroupExisting subnet group for the cluster.default IVpcgetVpc()What subnets to run the RDS instances in.default SubnetSelectionWhere to place the instances within the VPC.default IClusterInstanceThe instance to use for the cluster writer.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEngine
What kind of database to start. -
getSnapshotIdentifier
The identifier for the DB instance snapshot or DB cluster snapshot to restore from.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.
-
getAutoMinorVersionUpgrade
Specifies whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window.Default: true
-
getBacktrackWindow
The number of seconds to set a cluster's target backtrack window to.This feature is only supported by the Aurora MySQL database engine and cannot be enabled on existing clusters.
Default: 0 seconds (no backtrack)
- See Also:
-
getBackup
Backup settings.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 Also:
-
getCloudwatchLogsExports
The list of log types that need to be enabled for exporting to CloudWatch Logs.Default: - no log exports
-
getCloudwatchLogsRetention
The number of days log events are kept in CloudWatch Logs.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
-
getCloudwatchLogsRetentionRole
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.Default: - a new role is created.
-
getClusterIdentifier
An optional identifier for the cluster.Default: - A name is automatically generated.
-
getClusterScailabilityType
@Stability(Deprecated) @Deprecated @Nullable default ClusterScailabilityType getClusterScailabilityType()Deprecated.Use clusterScalabilityType instead. This will be removed in the next major version.(deprecated) [Misspelled] Specifies the scalability mode of the Aurora DB cluster.Set LIMITLESS if you want to use a limitless database; otherwise, set it to STANDARD.
Default: ClusterScailabilityType.STANDARD
-
getClusterScalabilityType
Specifies the scalability mode of the Aurora DB cluster.Set LIMITLESS if you want to use a limitless database; otherwise, set it to STANDARD.
Default: ClusterScalabilityType.STANDARD
-
getCopyTagsToSnapshot
Whether to copy tags to the snapshot when a snapshot is created.Default: - true
-
getCredentials
Deprecated.usesnapshotCredentialswhich allows to generate a new password(deprecated) Credentials for the administrative user.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 orCredentials.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.
-
getDatabaseInsightsMode
The database insights mode.Default: - DatabaseInsightsMode.STANDARD when performance insights are enabled and Amazon Aurora engine is used, otherwise not set.
-
getDefaultDatabaseName
Name of a database which is automatically created inside the cluster.Default: - Database is not created in cluster.
-
getDeleteAutomatedBackups
Specifies whether to remove automated backups immediately after the DB cluster is deleted.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.
-
getDeletionProtection
Indicates whether the DB cluster should have deletion protection enabled.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`.
-
getDomain
Directory ID for associating the DB cluster with a specific Active Directory.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.
-
getDomainRole
The IAM role to be used when making API calls to the Directory Service.The role needs the AWS-managed policy
AmazonRDSDirectoryServiceAccessor equivalent.Default: - If `DatabaseClusterBaseProps.domain` is specified, a role with the `AmazonRDSDirectoryServiceAccess` policy is automatically created.
-
getEnableClusterLevelEnhancedMonitoring
Whether to enable enhanced monitoring at the cluster level.If set to true,
monitoringIntervalandmonitoringRoleare applied to not the instances, but the cluster.monitoringIntervalis required to be set ifenableClusterLevelEnhancedMonitoringis set to true.Default: - When the `monitoringInterval` is set, enhanced monitoring is enabled for each instance.
-
getEnableDataApi
Whether to enable the Data API for the cluster.Default: - false
-
getEnableLocalWriteForwarding
Whether read replicas can forward write operations to the writer DB instance in the DB cluster.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 Also:
-
getEnablePerformanceInsights
Whether to enable Performance Insights for the DB cluster.Default: - false, unless `performanceInsightRetention` or `performanceInsightEncryptionKey` is set, or `databaseInsightsMode` is set to `DatabaseInsightsMode.ADVANCED`.
-
getEngineLifecycleSupport
The life cycle type for this DB cluster.Default: undefined - AWS RDS default setting is `EngineLifecycleSupport.OPEN_SOURCE_RDS_EXTENDED_SUPPORT`
- See Also:
-
getIamAuthentication
Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.Default: false
-
getInstanceIdentifierBase
Base identifier for instances.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.
-
getInstanceProps
Deprecated.- use writer and readers instead
(deprecated) Settings for the individual instances that are launched. -
getInstances
Deprecated.- use writer and readers instead
(deprecated) How many replicas/instances to create.Has to be at least 1.
Default: 2
-
getInstanceUpdateBehaviour
The ordering of updates for instances.Default: InstanceUpdateBehaviour.BULK
-
getMonitoringInterval
The interval between points when Amazon RDS collects enhanced monitoring metrics.If you enable
enableClusterLevelEnhancedMonitoring, this property is applied to the cluster, otherwise it is applied to the instances.Default: - no enhanced monitoring
-
getMonitoringRole
Role that will be used to manage DB monitoring.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
-
getNetworkType
The network type of the DB instance.Default: - IPV4
-
getParameterGroup
Additional parameters to pass to the database engine.Default: - No parameter group.
-
getParameters
The parameters in the DBClusterParameterGroup to create automatically.You can only specify parameterGroup or parameters but not both. You need to use a versioned engine to auto-generate a DBClusterParameterGroup.
Default: - None
-
getPerformanceInsightEncryptionKey
The AWS KMS key for encryption of Performance Insights data.Default: - default master key
-
getPerformanceInsightRetention
The amount of time, in days, to retain Performance Insights data.If you set
databaseInsightsModetoDatabaseInsightsMode.ADVANCED, you must set this property toPerformanceInsightRetention.MONTHS_15.Default: - 7
-
getPort
What port to listen on.Default: - The default for the engine is used.
-
getPreferredMaintenanceWindow
A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC).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 Also:
-
getReaders
A list of instances to create as cluster reader instances.Default: - no readers are created. The cluster will have a single writer/reader
-
getRemovalPolicy
The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.Default: - RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data)
-
getS3ExportBuckets
S3 buckets that you want to load data into. This feature is only supported by the Aurora database engine.This property must not be used if
s3ExportRoleis used.For MySQL:
Default: - None
- See Also:
-
getS3ExportRole
Role that will be associated with this DB cluster to enable S3 export.This feature is only supported by the Aurora database engine.
This property must not be used if
s3ExportBucketsis 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 Also:
-
getS3ImportBuckets
S3 buckets that you want to load data from. This feature is only supported by the Aurora database engine.This property must not be used if
s3ImportRoleis used.For MySQL:
Default: - None
- See Also:
-
getS3ImportRole
Role that will be associated with this DB cluster to enable S3 import.This feature is only supported by the Aurora database engine.
This property must not be used if
s3ImportBucketsis 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 Also:
-
getSecurityGroups
Security group.Default: - a new security group is created.
-
getServerlessV2AutoPauseDuration
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).
Default: - The default is 300 seconds (5 minutes).
- See Also:
-
getServerlessV2MaxCapacity
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.
Default: 2
- See Also:
-
getServerlessV2MinCapacity
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.
Default: 0.5
- See Also:
-
getSnapshotCredentials
Master user credentials.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.
-
getStorageEncrypted
Whether to enable storage encryption.Default: - true if storageEncryptionKey is provided, false otherwise
-
getStorageEncryptionKey
The KMS key for storage encryption.If specified,
storageEncryptedwill be set totrue.Default: - if storageEncrypted is true then the default master key, no key otherwise
-
getStorageType
The storage type to be associated with the DB cluster.Default: - DBClusterStorageType.AURORA
-
getSubnetGroup
Existing subnet group for the cluster.Default: - a new subnet group will be created.
-
getVpc
What subnets to run the RDS instances in.Must be at least 2 subnets in two different AZs.
-
getVpcSubnets
Where to place the instances within the VPC.Default: - the Vpc default strategy if not specified.
-
getWriter
The instance to use for the cluster writer.Default: - required if instanceProps is not provided
-
builder
-