Class InstanceProps.Builder
java.lang.Object
software.amazon.awscdk.services.rds.InstanceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<InstanceProps>
- Enclosing interface:
InstanceProps
@Stability(Stable)
public static final class InstanceProps.Builder
extends Object
implements software.amazon.jsii.Builder<InstanceProps>
A builder for
InstanceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowMajorVersionUpgrade
(Boolean allowMajorVersionUpgrade) Sets the value ofInstanceProps.getAllowMajorVersionUpgrade()
autoMinorVersionUpgrade
(Boolean autoMinorVersionUpgrade) Sets the value ofInstanceProps.getAutoMinorVersionUpgrade()
build()
Builds the configured instance.deleteAutomatedBackups
(Boolean deleteAutomatedBackups) Sets the value ofInstanceProps.getDeleteAutomatedBackups()
enablePerformanceInsights
(Boolean enablePerformanceInsights) Sets the value ofInstanceProps.getEnablePerformanceInsights()
instanceType
(InstanceType instanceType) Sets the value ofInstanceProps.getInstanceType()
parameterGroup
(IParameterGroup parameterGroup) Sets the value ofInstanceProps.getParameterGroup()
parameters
(Map<String, String> parameters) Sets the value ofInstanceProps.getParameters()
performanceInsightEncryptionKey
(IKey performanceInsightEncryptionKey) Sets the value ofInstanceProps.getPerformanceInsightEncryptionKey()
performanceInsightRetention
(PerformanceInsightRetention performanceInsightRetention) Sets the value ofInstanceProps.getPerformanceInsightRetention()
publiclyAccessible
(Boolean publiclyAccessible) Sets the value ofInstanceProps.getPubliclyAccessible()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofInstanceProps.getSecurityGroups()
Sets the value ofInstanceProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofInstanceProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
vpc
Sets the value ofInstanceProps.getVpc()
- Parameters:
vpc
- What subnets to run the RDS instances in. This parameter is required. Must be at least 2 subnets in two different AZs.- Returns:
this
-
allowMajorVersionUpgrade
@Stability(Stable) public InstanceProps.Builder allowMajorVersionUpgrade(Boolean allowMajorVersionUpgrade) Sets the value ofInstanceProps.getAllowMajorVersionUpgrade()
- Parameters:
allowMajorVersionUpgrade
- Whether to allow upgrade of major version for the DB instance.- Returns:
this
-
autoMinorVersionUpgrade
@Stability(Stable) public InstanceProps.Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) Sets the value ofInstanceProps.getAutoMinorVersionUpgrade()
- Parameters:
autoMinorVersionUpgrade
- Whether to enable automatic upgrade of minor version for the DB instance.- Returns:
this
-
deleteAutomatedBackups
@Stability(Stable) public InstanceProps.Builder deleteAutomatedBackups(Boolean deleteAutomatedBackups) Sets the value ofInstanceProps.getDeleteAutomatedBackups()
- Parameters:
deleteAutomatedBackups
- Whether to remove automated backups immediately after the DB instance is deleted for the DB instance.- Returns:
this
-
enablePerformanceInsights
@Stability(Stable) public InstanceProps.Builder enablePerformanceInsights(Boolean enablePerformanceInsights) Sets the value ofInstanceProps.getEnablePerformanceInsights()
- Parameters:
enablePerformanceInsights
- Whether to enable Performance Insights for the DB instance.- Returns:
this
-
instanceType
Sets the value ofInstanceProps.getInstanceType()
- Parameters:
instanceType
- What type of instance to start for the replicas.- Returns:
this
-
parameterGroup
Sets the value ofInstanceProps.getParameterGroup()
- Parameters:
parameterGroup
- The DB parameter group to associate with the instance.- Returns:
this
-
parameters
Sets the value ofInstanceProps.getParameters()
- Parameters:
parameters
- The parameters in the DBParameterGroup to create automatically. You can only specify parameterGroup or parameters but not both. You need to use a versioned engine to auto-generate a DBParameterGroup.- Returns:
this
-
performanceInsightEncryptionKey
@Stability(Stable) public InstanceProps.Builder performanceInsightEncryptionKey(IKey performanceInsightEncryptionKey) Sets the value ofInstanceProps.getPerformanceInsightEncryptionKey()
- Parameters:
performanceInsightEncryptionKey
- The AWS KMS key for encryption of Performance Insights data.- Returns:
this
-
performanceInsightRetention
@Stability(Stable) public InstanceProps.Builder performanceInsightRetention(PerformanceInsightRetention performanceInsightRetention) Sets the value ofInstanceProps.getPerformanceInsightRetention()
- Parameters:
performanceInsightRetention
- The amount of time, in days, to retain Performance Insights data.- Returns:
this
-
publiclyAccessible
Sets the value ofInstanceProps.getPubliclyAccessible()
- Parameters:
publiclyAccessible
- Indicates whether the DB instance is an internet-facing instance.- Returns:
this
-
securityGroups
@Stability(Stable) public InstanceProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofInstanceProps.getSecurityGroups()
- Parameters:
securityGroups
- Security group.- Returns:
this
-
vpcSubnets
Sets the value ofInstanceProps.getVpcSubnets()
- Parameters:
vpcSubnets
- Where to place the instances within the VPC.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<InstanceProps>
- Returns:
- a new instance of
InstanceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-