Class DatabaseInstanceProps.Builder
java.lang.Object
software.amazon.awscdk.services.neptune.DatabaseInstanceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DatabaseInstanceProps>
- Enclosing interface:
- DatabaseInstanceProps
@Stability(Experimental)
public static final class DatabaseInstanceProps.Builder
extends Object
implements software.amazon.jsii.Builder<DatabaseInstanceProps>
A builder for
DatabaseInstanceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionavailabilityZone
(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()
parameterGroup
(IParameterGroup parameterGroup) Sets the value ofDatabaseInstanceProps.getParameterGroup()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofDatabaseInstanceProps.getRemovalPolicy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cluster
Sets the value ofDatabaseInstanceProps.getCluster()
- Parameters:
cluster
- The Neptune database cluster the instance should launch into. This parameter is required.- Returns:
this
-
instanceType
@Stability(Experimental) public DatabaseInstanceProps.Builder instanceType(InstanceType instanceType) Sets the value ofDatabaseInstanceProps.getInstanceType()
- Parameters:
instanceType
- What type of instance to start for the replicas. This parameter is required.- Returns:
this
-
availabilityZone
@Stability(Experimental) public DatabaseInstanceProps.Builder availabilityZone(String 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
-
parameterGroup
@Stability(Experimental) public DatabaseInstanceProps.Builder parameterGroup(IParameterGroup parameterGroup) Sets the value ofDatabaseInstanceProps.getParameterGroup()
- Parameters:
parameterGroup
- The DB parameter group to associate with the instance.- Returns:
this
-
removalPolicy
@Stability(Experimental) public DatabaseInstanceProps.Builder removalPolicy(RemovalPolicy 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
-