Class DatabaseInstanceProps.Builder
java.lang.Object
software.amazon.awscdk.services.docdb.DatabaseInstanceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DatabaseInstanceProps>
- Enclosing interface:
DatabaseInstanceProps
@Stability(Stable)
public static final class DatabaseInstanceProps.Builder
extends Object
implements software.amazon.jsii.Builder<DatabaseInstanceProps>
A builder for
DatabaseInstanceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautoMinorVersionUpgrade
(Boolean autoMinorVersionUpgrade) Sets the value ofDatabaseInstanceProps.getAutoMinorVersionUpgrade()
availabilityZone
(String availabilityZone) Sets the value ofDatabaseInstanceProps.getAvailabilityZone()
build()
Builds the configured instance.caCertificate
(CaCertificate caCertificate) Sets the value ofDatabaseInstanceProps.getCaCertificate()
cluster
(IDatabaseCluster cluster) Sets the value ofDatabaseInstanceProps.getCluster()
dbInstanceName
(String dbInstanceName) Sets the value ofDatabaseInstanceProps.getDbInstanceName()
enablePerformanceInsights
(Boolean enablePerformanceInsights) Sets the value ofDatabaseInstanceProps.getEnablePerformanceInsights()
instanceType
(InstanceType instanceType) Sets the value ofDatabaseInstanceProps.getInstanceType()
preferredMaintenanceWindow
(String preferredMaintenanceWindow) Sets the value ofDatabaseInstanceProps.getPreferredMaintenanceWindow()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofDatabaseInstanceProps.getRemovalPolicy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cluster
Sets the value ofDatabaseInstanceProps.getCluster()
- Parameters:
cluster
- The DocumentDB database cluster the instance should launch into. This parameter is required.- Returns:
this
-
instanceType
Sets the value ofDatabaseInstanceProps.getInstanceType()
- Parameters:
instanceType
- The name of the compute and memory capacity classes. This parameter is required.- Returns:
this
-
autoMinorVersionUpgrade
@Stability(Stable) public DatabaseInstanceProps.Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) Sets the value ofDatabaseInstanceProps.getAutoMinorVersionUpgrade()
- Parameters:
autoMinorVersionUpgrade
- Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.- Returns:
this
-
availabilityZone
Sets the value ofDatabaseInstanceProps.getAvailabilityZone()
- Parameters:
availabilityZone
- The name of the Availability Zone where the DB instance will be located.- Returns:
this
-
caCertificate
Sets the value ofDatabaseInstanceProps.getCaCertificate()
- Parameters:
caCertificate
- The identifier of the CA certificate for this DB instance. Specifying or updating this property triggers a reboot.- Returns:
this
-
dbInstanceName
Sets the value ofDatabaseInstanceProps.getDbInstanceName()
- Parameters:
dbInstanceName
- A name for the DB instance. If you specify a name, AWS CloudFormation converts it to lowercase.- Returns:
this
-
enablePerformanceInsights
@Stability(Stable) public DatabaseInstanceProps.Builder enablePerformanceInsights(Boolean enablePerformanceInsights) Sets the value ofDatabaseInstanceProps.getEnablePerformanceInsights()
- Parameters:
enablePerformanceInsights
- A value that indicates whether to enable Performance Insights for the DB Instance.- Returns:
this
-
preferredMaintenanceWindow
@Stability(Stable) public DatabaseInstanceProps.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow) Sets the value ofDatabaseInstanceProps.getPreferredMaintenanceWindow()
- Parameters:
preferredMaintenanceWindow
- The weekly time range (in UTC) during which system maintenance can occur. Format:ddd:hh24:mi-ddd:hh24:mi
Constraint: Minimum 30-minute window- Returns:
this
-
removalPolicy
Sets the value ofDatabaseInstanceProps.getRemovalPolicy()
- Parameters:
removalPolicy
- The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DatabaseInstanceProps>
- Returns:
- a new instance of
DatabaseInstanceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-