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
Constructors -
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.cluster(IDatabaseCluster cluster) Sets the value ofDatabaseInstanceProps.getCluster()dbInstanceName(String dbInstanceName) Sets the value ofDatabaseInstanceProps.getDbInstanceName()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
-
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
-
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:miConstraint: 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:
buildin interfacesoftware.amazon.jsii.Builder<DatabaseInstanceProps>- Returns:
- a new instance of
DatabaseInstanceProps - Throws:
NullPointerException- if any required attribute was not provided
-