Class DatabaseInstanceReadReplicaProps.Builder
java.lang.Object
software.amazon.awscdk.services.rds.DatabaseInstanceReadReplicaProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DatabaseInstanceReadReplicaProps>
- Enclosing interface:
- DatabaseInstanceReadReplicaProps
@Stability(Stable)
public static final class DatabaseInstanceReadReplicaProps.Builder
extends Object
implements software.amazon.jsii.Builder<DatabaseInstanceReadReplicaProps>
A builder for
DatabaseInstanceReadReplicaProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautoMinorVersionUpgrade
(Boolean autoMinorVersionUpgrade) Sets the value ofDatabaseInstanceNewProps.getAutoMinorVersionUpgrade()
availabilityZone
(String availabilityZone) Sets the value ofDatabaseInstanceNewProps.getAvailabilityZone()
backupRetention
(Duration backupRetention) Sets the value ofDatabaseInstanceNewProps.getBackupRetention()
build()
Builds the configured instance.cloudwatchLogsExports
(List<String> cloudwatchLogsExports) Sets the value ofDatabaseInstanceNewProps.getCloudwatchLogsExports()
cloudwatchLogsRetention
(RetentionDays cloudwatchLogsRetention) Sets the value ofDatabaseInstanceNewProps.getCloudwatchLogsRetention()
cloudwatchLogsRetentionRole
(IRole cloudwatchLogsRetentionRole) Sets the value ofDatabaseInstanceNewProps.getCloudwatchLogsRetentionRole()
copyTagsToSnapshot
(Boolean copyTagsToSnapshot) Sets the value ofDatabaseInstanceNewProps.getCopyTagsToSnapshot()
deleteAutomatedBackups
(Boolean deleteAutomatedBackups) Sets the value ofDatabaseInstanceNewProps.getDeleteAutomatedBackups()
deletionProtection
(Boolean deletionProtection) Sets the value ofDatabaseInstanceNewProps.getDeletionProtection()
Sets the value ofDatabaseInstanceNewProps.getDomain()
domainRole
(IRole domainRole) Sets the value ofDatabaseInstanceNewProps.getDomainRole()
enablePerformanceInsights
(Boolean enablePerformanceInsights) Sets the value ofDatabaseInstanceNewProps.getEnablePerformanceInsights()
iamAuthentication
(Boolean iamAuthentication) Sets the value ofDatabaseInstanceNewProps.getIamAuthentication()
instanceIdentifier
(String instanceIdentifier) Sets the value ofDatabaseInstanceNewProps.getInstanceIdentifier()
instanceType
(InstanceType instanceType) Sets the value ofDatabaseInstanceReadReplicaProps.getInstanceType()
Sets the value ofDatabaseInstanceNewProps.getIops()
maxAllocatedStorage
(Number maxAllocatedStorage) Sets the value ofDatabaseInstanceNewProps.getMaxAllocatedStorage()
monitoringInterval
(Duration monitoringInterval) Sets the value ofDatabaseInstanceNewProps.getMonitoringInterval()
monitoringRole
(IRole monitoringRole) Sets the value ofDatabaseInstanceNewProps.getMonitoringRole()
Sets the value ofDatabaseInstanceNewProps.getMultiAz()
optionGroup
(IOptionGroup optionGroup) Sets the value ofDatabaseInstanceNewProps.getOptionGroup()
parameterGroup
(IParameterGroup parameterGroup) Sets the value ofDatabaseInstanceNewProps.getParameterGroup()
performanceInsightEncryptionKey
(IKey performanceInsightEncryptionKey) Sets the value ofDatabaseInstanceNewProps.getPerformanceInsightEncryptionKey()
performanceInsightRetention
(PerformanceInsightRetention performanceInsightRetention) Sets the value ofDatabaseInstanceNewProps.getPerformanceInsightRetention()
Sets the value ofDatabaseInstanceNewProps.getPort()
preferredBackupWindow
(String preferredBackupWindow) Sets the value ofDatabaseInstanceNewProps.getPreferredBackupWindow()
preferredMaintenanceWindow
(String preferredMaintenanceWindow) Sets the value ofDatabaseInstanceNewProps.getPreferredMaintenanceWindow()
processorFeatures
(ProcessorFeatures processorFeatures) Sets the value ofDatabaseInstanceNewProps.getProcessorFeatures()
publiclyAccessible
(Boolean publiclyAccessible) Sets the value ofDatabaseInstanceNewProps.getPubliclyAccessible()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofDatabaseInstanceNewProps.getRemovalPolicy()
s3ExportBuckets
(List<? extends IBucket> s3ExportBuckets) Sets the value ofDatabaseInstanceNewProps.getS3ExportBuckets()
s3ExportRole
(IRole s3ExportRole) Sets the value ofDatabaseInstanceNewProps.getS3ExportRole()
s3ImportBuckets
(List<? extends IBucket> s3ImportBuckets) Sets the value ofDatabaseInstanceNewProps.getS3ImportBuckets()
s3ImportRole
(IRole s3ImportRole) Sets the value ofDatabaseInstanceNewProps.getS3ImportRole()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofDatabaseInstanceNewProps.getSecurityGroups()
sourceDatabaseInstance
(IDatabaseInstance sourceDatabaseInstance) Sets the value ofDatabaseInstanceReadReplicaProps.getSourceDatabaseInstance()
storageEncrypted
(Boolean storageEncrypted) Sets the value ofDatabaseInstanceReadReplicaProps.getStorageEncrypted()
storageEncryptionKey
(IKey storageEncryptionKey) Sets the value ofDatabaseInstanceReadReplicaProps.getStorageEncryptionKey()
storageType
(StorageType storageType) Sets the value ofDatabaseInstanceNewProps.getStorageType()
subnetGroup
(ISubnetGroup subnetGroup) Sets the value ofDatabaseInstanceNewProps.getSubnetGroup()
Sets the value ofDatabaseInstanceNewProps.getVpc()
vpcPlacement
(SubnetSelection vpcPlacement) Deprecated.use `vpcSubnets`vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofDatabaseInstanceNewProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceType
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder instanceType(InstanceType instanceType) Sets the value ofDatabaseInstanceReadReplicaProps.getInstanceType()
- Parameters:
instanceType
- The name of the compute and memory capacity classes. This parameter is required.- Returns:
this
-
sourceDatabaseInstance
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder sourceDatabaseInstance(IDatabaseInstance sourceDatabaseInstance) Sets the value ofDatabaseInstanceReadReplicaProps.getSourceDatabaseInstance()
- Parameters:
sourceDatabaseInstance
- The source database instance. This parameter is required. Each DB instance can have a limited number of read replicas. For more information, see https://docs.aws.amazon.com/AmazonRDS/latest/DeveloperGuide/USER_ReadRepl.html.- Returns:
this
-
storageEncrypted
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder storageEncrypted(Boolean storageEncrypted) Sets the value ofDatabaseInstanceReadReplicaProps.getStorageEncrypted()
- Parameters:
storageEncrypted
- Indicates whether the DB instance is encrypted.- Returns:
this
-
storageEncryptionKey
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder storageEncryptionKey(IKey storageEncryptionKey) Sets the value ofDatabaseInstanceReadReplicaProps.getStorageEncryptionKey()
- Parameters:
storageEncryptionKey
- The KMS key that's used to encrypt the DB instance.- Returns:
this
-
vpc
Sets the value ofDatabaseInstanceNewProps.getVpc()
- Parameters:
vpc
- The VPC network where the DB subnet group should be created. This parameter is required.- Returns:
this
-
autoMinorVersionUpgrade
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) Sets the value ofDatabaseInstanceNewProps.getAutoMinorVersionUpgrade()
- Parameters:
autoMinorVersionUpgrade
- Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.- Returns:
this
-
availabilityZone
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder availabilityZone(String availabilityZone) Sets the value ofDatabaseInstanceNewProps.getAvailabilityZone()
- Parameters:
availabilityZone
- The name of the Availability Zone where the DB instance will be located.- Returns:
this
-
backupRetention
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder backupRetention(Duration backupRetention) Sets the value ofDatabaseInstanceNewProps.getBackupRetention()
- Parameters:
backupRetention
- The number of days during which automatic DB snapshots are retained. Set to zero to disable backups. When creating a read replica, you must enable automatic backups on the source database instance by setting the backup retention to a value other than zero.- Returns:
this
-
cloudwatchLogsExports
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder cloudwatchLogsExports(List<String> cloudwatchLogsExports) Sets the value ofDatabaseInstanceNewProps.getCloudwatchLogsExports()
- Parameters:
cloudwatchLogsExports
- The list of log types that need to be enabled for exporting to CloudWatch Logs.- Returns:
this
-
cloudwatchLogsRetention
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder cloudwatchLogsRetention(RetentionDays cloudwatchLogsRetention) Sets the value ofDatabaseInstanceNewProps.getCloudwatchLogsRetention()
- Parameters:
cloudwatchLogsRetention
- The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value toInfinity
.- Returns:
this
-
cloudwatchLogsRetentionRole
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder cloudwatchLogsRetentionRole(IRole cloudwatchLogsRetentionRole) Sets the value ofDatabaseInstanceNewProps.getCloudwatchLogsRetentionRole()
- Parameters:
cloudwatchLogsRetentionRole
- The IAM role for the Lambda function associated with the custom resource that sets the retention policy.- Returns:
this
-
copyTagsToSnapshot
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder copyTagsToSnapshot(Boolean copyTagsToSnapshot) Sets the value ofDatabaseInstanceNewProps.getCopyTagsToSnapshot()
- Parameters:
copyTagsToSnapshot
- Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance.- Returns:
this
-
deleteAutomatedBackups
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder deleteAutomatedBackups(Boolean deleteAutomatedBackups) Sets the value ofDatabaseInstanceNewProps.getDeleteAutomatedBackups()
- Parameters:
deleteAutomatedBackups
- Indicates whether automated backups should be deleted or retained when you delete a DB instance.- Returns:
this
-
deletionProtection
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder deletionProtection(Boolean deletionProtection) Sets the value ofDatabaseInstanceNewProps.getDeletionProtection()
- Parameters:
deletionProtection
- Indicates whether the DB instance should have deletion protection enabled.- Returns:
this
-
domain
Sets the value ofDatabaseInstanceNewProps.getDomain()
- Parameters:
domain
- The Active Directory directory ID to create the DB instance in.- Returns:
this
-
domainRole
Sets the value ofDatabaseInstanceNewProps.getDomainRole()
- Parameters:
domainRole
- The IAM role to be used when making API calls to the Directory Service. The role needs the AWS-managed policy AmazonRDSDirectoryServiceAccess or equivalent.- Returns:
this
-
enablePerformanceInsights
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder enablePerformanceInsights(Boolean enablePerformanceInsights) Sets the value ofDatabaseInstanceNewProps.getEnablePerformanceInsights()
- Parameters:
enablePerformanceInsights
- Whether to enable Performance Insights for the DB instance.- Returns:
this
-
iamAuthentication
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder iamAuthentication(Boolean iamAuthentication) Sets the value ofDatabaseInstanceNewProps.getIamAuthentication()
- Parameters:
iamAuthentication
- Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.- Returns:
this
-
instanceIdentifier
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder instanceIdentifier(String instanceIdentifier) Sets the value ofDatabaseInstanceNewProps.getInstanceIdentifier()
- Parameters:
instanceIdentifier
- A name for the DB instance. If you specify a name, AWS CloudFormation converts it to lowercase.- Returns:
this
-
iops
Sets the value ofDatabaseInstanceNewProps.getIops()
- Parameters:
iops
- The number of I/O operations per second (IOPS) that the database provisions. The value must be equal to or greater than 1000.- Returns:
this
-
maxAllocatedStorage
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder maxAllocatedStorage(Number maxAllocatedStorage) Sets the value ofDatabaseInstanceNewProps.getMaxAllocatedStorage()
- Parameters:
maxAllocatedStorage
- Upper limit to which RDS can scale the storage in GiB(Gibibyte).- Returns:
this
-
monitoringInterval
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder monitoringInterval(Duration monitoringInterval) Sets the value ofDatabaseInstanceNewProps.getMonitoringInterval()
- Parameters:
monitoringInterval
- The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance.- Returns:
this
-
monitoringRole
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder monitoringRole(IRole monitoringRole) Sets the value ofDatabaseInstanceNewProps.getMonitoringRole()
- Parameters:
monitoringRole
- Role that will be used to manage DB instance monitoring.- Returns:
this
-
multiAz
Sets the value ofDatabaseInstanceNewProps.getMultiAz()
- Parameters:
multiAz
- Specifies if the database instance is a multiple Availability Zone deployment.- Returns:
this
-
optionGroup
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder optionGroup(IOptionGroup optionGroup) Sets the value ofDatabaseInstanceNewProps.getOptionGroup()
- Parameters:
optionGroup
- The option group to associate with the instance.- Returns:
this
-
parameterGroup
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder parameterGroup(IParameterGroup parameterGroup) Sets the value ofDatabaseInstanceNewProps.getParameterGroup()
- Parameters:
parameterGroup
- The DB parameter group to associate with the instance.- Returns:
this
-
performanceInsightEncryptionKey
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder performanceInsightEncryptionKey(IKey performanceInsightEncryptionKey) Sets the value ofDatabaseInstanceNewProps.getPerformanceInsightEncryptionKey()
- Parameters:
performanceInsightEncryptionKey
- The AWS KMS key for encryption of Performance Insights data.- Returns:
this
-
performanceInsightRetention
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder performanceInsightRetention(PerformanceInsightRetention performanceInsightRetention) Sets the value ofDatabaseInstanceNewProps.getPerformanceInsightRetention()
- Parameters:
performanceInsightRetention
- The amount of time, in days, to retain Performance Insights data.- Returns:
this
-
port
Sets the value ofDatabaseInstanceNewProps.getPort()
- Parameters:
port
- The port for the instance.- Returns:
this
-
preferredBackupWindow
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder preferredBackupWindow(String preferredBackupWindow) Sets the value ofDatabaseInstanceNewProps.getPreferredBackupWindow()
- Parameters:
preferredBackupWindow
- The daily time range during which automated backups are performed. Constraints:- Must be in the format
hh24:mi-hh24:mi
. - Must be in Universal Coordinated Time (UTC).
- Must not conflict with the preferred maintenance window.
- Must be at least 30 minutes.
- Must be in the format
- Returns:
this
-
preferredMaintenanceWindow
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow) Sets the value ofDatabaseInstanceNewProps.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
-
processorFeatures
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder processorFeatures(ProcessorFeatures processorFeatures) Sets the value ofDatabaseInstanceNewProps.getProcessorFeatures()
- Parameters:
processorFeatures
- The number of CPU cores and the number of threads per core.- Returns:
this
-
publiclyAccessible
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder publiclyAccessible(Boolean publiclyAccessible) Sets the value ofDatabaseInstanceNewProps.getPubliclyAccessible()
- Parameters:
publiclyAccessible
- Indicates whether the DB instance is an internet-facing instance.- Returns:
this
-
removalPolicy
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder removalPolicy(RemovalPolicy removalPolicy) Sets the value ofDatabaseInstanceNewProps.getRemovalPolicy()
- Parameters:
removalPolicy
- The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.- Returns:
this
-
s3ExportBuckets
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder s3ExportBuckets(List<? extends IBucket> s3ExportBuckets) Sets the value ofDatabaseInstanceNewProps.getS3ExportBuckets()
- Parameters:
s3ExportBuckets
- S3 buckets that you want to load data into. This property must not be used ifs3ExportRole
is used.For Microsoft SQL Server:
- Returns:
this
-
s3ExportRole
Sets the value ofDatabaseInstanceNewProps.getS3ExportRole()
- Parameters:
s3ExportRole
- Role that will be associated with this DB instance to enable S3 export. This property must not be used ifs3ExportBuckets
is used.For Microsoft SQL Server:
- Returns:
this
-
s3ImportBuckets
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder s3ImportBuckets(List<? extends IBucket> s3ImportBuckets) Sets the value ofDatabaseInstanceNewProps.getS3ImportBuckets()
- Parameters:
s3ImportBuckets
- S3 buckets that you want to load data from. This feature is only supported by the Microsoft SQL Server, Oracle, and PostgreSQL engines.This property must not be used if
s3ImportRole
is used.For Microsoft SQL Server:
- Returns:
this
-
s3ImportRole
Sets the value ofDatabaseInstanceNewProps.getS3ImportRole()
- Parameters:
s3ImportRole
- Role that will be associated with this DB instance to enable S3 import. This feature is only supported by the Microsoft SQL Server, Oracle, and PostgreSQL engines.This property must not be used if
s3ImportBuckets
is used.For Microsoft SQL Server:
- Returns:
this
-
securityGroups
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofDatabaseInstanceNewProps.getSecurityGroups()
- Parameters:
securityGroups
- The security groups to assign to the DB instance.- Returns:
this
-
storageType
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder storageType(StorageType storageType) Sets the value ofDatabaseInstanceNewProps.getStorageType()
- Parameters:
storageType
- The storage type. Storage types supported are gp2, io1, standard.- Returns:
this
-
subnetGroup
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder subnetGroup(ISubnetGroup subnetGroup) Sets the value ofDatabaseInstanceNewProps.getSubnetGroup()
- Parameters:
subnetGroup
- Existing subnet group for the instance.- Returns:
this
-
vpcPlacement
@Stability(Deprecated) @Deprecated public DatabaseInstanceReadReplicaProps.Builder vpcPlacement(SubnetSelection vpcPlacement) Deprecated.use `vpcSubnets`Sets the value ofDatabaseInstanceNewProps.getVpcPlacement()
- Parameters:
vpcPlacement
- The type of subnets to add to the created DB subnet group.- Returns:
this
-
vpcSubnets
@Stability(Stable) public DatabaseInstanceReadReplicaProps.Builder vpcSubnets(SubnetSelection vpcSubnets) Sets the value ofDatabaseInstanceNewProps.getVpcSubnets()
- Parameters:
vpcSubnets
- The type of subnets to add to the created DB subnet group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DatabaseInstanceReadReplicaProps>
- Returns:
- a new instance of
DatabaseInstanceReadReplicaProps
- Throws:
NullPointerException
- if any required attribute was not provided
-