Class DatabaseInstance.Builder
java.lang.Object
software.amazon.awscdk.services.docdb.DatabaseInstance.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DatabaseInstance>
- Enclosing class:
DatabaseInstance
@Stability(Stable)
public static final class DatabaseInstance.Builder
extends Object
implements software.amazon.jsii.Builder<DatabaseInstance>
A fluent builder for
DatabaseInstance
.-
Method Summary
Modifier and TypeMethodDescriptionautoMinorVersionUpgrade
(Boolean autoMinorVersionUpgrade) Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.availabilityZone
(String availabilityZone) The name of the Availability Zone where the DB instance will be located.build()
caCertificate
(CaCertificate caCertificate) The identifier of the CA certificate for this DB instance.cluster
(IDatabaseCluster cluster) The DocumentDB database cluster the instance should launch into.static DatabaseInstance.Builder
dbInstanceName
(String dbInstanceName) A name for the DB instance.enablePerformanceInsights
(Boolean enablePerformanceInsights) A value that indicates whether to enable Performance Insights for the DB Instance.instanceType
(InstanceType instanceType) The name of the compute and memory capacity classes.preferredMaintenanceWindow
(String preferredMaintenanceWindow) The weekly time range (in UTC) during which system maintenance can occur.removalPolicy
(RemovalPolicy removalPolicy) The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.
-
Method Details
-
create
@Stability(Stable) public static DatabaseInstance.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
DatabaseInstance.Builder
.
-
cluster
The DocumentDB database cluster the instance should launch into.- Parameters:
cluster
- The DocumentDB database cluster the instance should launch into. This parameter is required.- Returns:
this
-
instanceType
The name of the compute and memory capacity classes.- Parameters:
instanceType
- The name of the compute and memory capacity classes. This parameter is required.- Returns:
this
-
autoMinorVersionUpgrade
@Stability(Stable) public DatabaseInstance.Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.Default: true
- Parameters:
autoMinorVersionUpgrade
- Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. This parameter is required.- Returns:
this
-
availabilityZone
The name of the Availability Zone where the DB instance will be located.Default: - no preference
- Parameters:
availabilityZone
- The name of the Availability Zone where the DB instance will be located. This parameter is required.- Returns:
this
-
caCertificate
The identifier of the CA certificate for this DB instance.Specifying or updating this property triggers a reboot.
Default: - DocumentDB will choose a certificate authority
- Parameters:
caCertificate
- The identifier of the CA certificate for this DB instance. This parameter is required.- Returns:
this
- See Also:
-
dbInstanceName
A name for the DB instance.If you specify a name, AWS CloudFormation converts it to lowercase.
Default: - a CloudFormation generated name
- Parameters:
dbInstanceName
- A name for the DB instance. This parameter is required.- Returns:
this
-
enablePerformanceInsights
@Stability(Stable) public DatabaseInstance.Builder enablePerformanceInsights(Boolean enablePerformanceInsights) A value that indicates whether to enable Performance Insights for the DB Instance.Default: - false
- Parameters:
enablePerformanceInsights
- A value that indicates whether to enable Performance Insights for the DB Instance. This parameter is required.- Returns:
this
-
preferredMaintenanceWindow
@Stability(Stable) public DatabaseInstance.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow) The weekly time range (in UTC) during which system maintenance can occur.Format:
ddd:hh24:mi-ddd:hh24:mi
Constraint: Minimum 30-minute windowDefault: - 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. To see the time blocks available, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-maintain.html#maintenance-window
- Parameters:
preferredMaintenanceWindow
- The weekly time range (in UTC) during which system maintenance can occur. This parameter is required.- Returns:
this
-
removalPolicy
The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.Default: RemovalPolicy.Retain
- Parameters:
removalPolicy
- The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DatabaseInstance>
- Returns:
- a newly built instance of
DatabaseInstance
.
-