@Stability(value=Experimental) public static final class DatabaseInstance.Builder extends Object implements software.amazon.jsii.Builder<DatabaseInstance>
DatabaseInstance
.Modifier and Type | Method and Description |
---|---|
DatabaseInstance.Builder |
allocatedStorage(Number allocatedStorage)
(experimental) The allocated storage size, specified in gigabytes (GB).
|
DatabaseInstance.Builder |
allowMajorVersionUpgrade(Boolean allowMajorVersionUpgrade)
(experimental) Whether to allow major version upgrades.
|
DatabaseInstance.Builder |
autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade)
(experimental) Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.
|
DatabaseInstance.Builder |
availabilityZone(String availabilityZone)
(experimental) The name of the Availability Zone where the DB instance will be located.
|
DatabaseInstance.Builder |
backupRetention(Duration backupRetention)
(experimental) The number of days during which automatic DB snapshots are retained.
|
DatabaseInstance |
build() |
DatabaseInstance.Builder |
characterSetName(String characterSetName)
(experimental) For supported engines, specifies the character set to associate with the DB instance.
|
DatabaseInstance.Builder |
cloudwatchLogsExports(List<String> cloudwatchLogsExports)
(experimental) The list of log types that need to be enabled for exporting to CloudWatch Logs.
|
DatabaseInstance.Builder |
cloudwatchLogsRetention(RetentionDays cloudwatchLogsRetention)
(experimental) The number of days log events are kept in CloudWatch Logs.
|
DatabaseInstance.Builder |
cloudwatchLogsRetentionRole(IRole cloudwatchLogsRetentionRole)
(experimental) The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
|
DatabaseInstance.Builder |
copyTagsToSnapshot(Boolean copyTagsToSnapshot)
(experimental) Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance.
|
static DatabaseInstance.Builder |
create(software.constructs.Construct scope,
String id) |
DatabaseInstance.Builder |
credentials(Credentials credentials)
(experimental) Credentials for the administrative user.
|
DatabaseInstance.Builder |
databaseName(String databaseName)
(experimental) The name of the database.
|
DatabaseInstance.Builder |
deleteAutomatedBackups(Boolean deleteAutomatedBackups)
(experimental) Indicates whether automated backups should be deleted or retained when you delete a DB instance.
|
DatabaseInstance.Builder |
deletionProtection(Boolean deletionProtection)
(experimental) Indicates whether the DB instance should have deletion protection enabled.
|
DatabaseInstance.Builder |
domain(String domain)
(experimental) The Active Directory directory ID to create the DB instance in.
|
DatabaseInstance.Builder |
domainRole(IRole domainRole)
(experimental) The IAM role to be used when making API calls to the Directory Service.
|
DatabaseInstance.Builder |
enablePerformanceInsights(Boolean enablePerformanceInsights)
(experimental) Whether to enable Performance Insights for the DB instance.
|
DatabaseInstance.Builder |
engine(IInstanceEngine engine)
(experimental) The database engine.
|
DatabaseInstance.Builder |
iamAuthentication(Boolean iamAuthentication)
(experimental) Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.
|
DatabaseInstance.Builder |
instanceIdentifier(String instanceIdentifier)
(experimental) A name for the DB instance.
|
DatabaseInstance.Builder |
instanceType(InstanceType instanceType)
(experimental) The name of the compute and memory capacity for the instance.
|
DatabaseInstance.Builder |
iops(Number iops)
(experimental) The number of I/O operations per second (IOPS) that the database provisions.
|
DatabaseInstance.Builder |
licenseModel(LicenseModel licenseModel)
(experimental) The license model.
|
DatabaseInstance.Builder |
maxAllocatedStorage(Number maxAllocatedStorage)
(experimental) Upper limit to which RDS can scale the storage in GiB(Gibibyte).
|
DatabaseInstance.Builder |
monitoringInterval(Duration monitoringInterval)
(experimental) The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance.
|
DatabaseInstance.Builder |
monitoringRole(IRole monitoringRole)
(experimental) Role that will be used to manage DB instance monitoring.
|
DatabaseInstance.Builder |
multiAz(Boolean multiAz)
(experimental) Specifies if the database instance is a multiple Availability Zone deployment.
|
DatabaseInstance.Builder |
optionGroup(IOptionGroup optionGroup)
(experimental) The option group to associate with the instance.
|
DatabaseInstance.Builder |
parameterGroup(IParameterGroup parameterGroup)
(experimental) The DB parameter group to associate with the instance.
|
DatabaseInstance.Builder |
performanceInsightEncryptionKey(IKey performanceInsightEncryptionKey)
(experimental) The AWS KMS key for encryption of Performance Insights data.
|
DatabaseInstance.Builder |
performanceInsightRetention(PerformanceInsightRetention performanceInsightRetention)
(experimental) The amount of time, in days, to retain Performance Insights data.
|
DatabaseInstance.Builder |
port(Number port)
(experimental) The port for the instance.
|
DatabaseInstance.Builder |
preferredBackupWindow(String preferredBackupWindow)
(experimental) The daily time range during which automated backups are performed.
|
DatabaseInstance.Builder |
preferredMaintenanceWindow(String preferredMaintenanceWindow)
(experimental) The weekly time range (in UTC) during which system maintenance can occur.
|
DatabaseInstance.Builder |
processorFeatures(ProcessorFeatures processorFeatures)
(experimental) The number of CPU cores and the number of threads per core.
|
DatabaseInstance.Builder |
publiclyAccessible(Boolean publiclyAccessible)
(experimental) Indicates whether the DB instance is an internet-facing instance.
|
DatabaseInstance.Builder |
removalPolicy(RemovalPolicy removalPolicy)
(experimental) The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.
|
DatabaseInstance.Builder |
s3ExportBuckets(List<? extends IBucket> s3ExportBuckets)
(experimental) S3 buckets that you want to load data into.
|
DatabaseInstance.Builder |
s3ExportRole(IRole s3ExportRole)
(experimental) Role that will be associated with this DB instance to enable S3 export.
|
DatabaseInstance.Builder |
s3ImportBuckets(List<? extends IBucket> s3ImportBuckets)
(experimental) S3 buckets that you want to load data from.
|
DatabaseInstance.Builder |
s3ImportRole(IRole s3ImportRole)
(experimental) Role that will be associated with this DB instance to enable S3 import.
|
DatabaseInstance.Builder |
securityGroups(List<? extends ISecurityGroup> securityGroups)
(experimental) The security groups to assign to the DB instance.
|
DatabaseInstance.Builder |
storageEncrypted(Boolean storageEncrypted)
(experimental) Indicates whether the DB instance is encrypted.
|
DatabaseInstance.Builder |
storageEncryptionKey(IKey storageEncryptionKey)
(experimental) The KMS key that's used to encrypt the DB instance.
|
DatabaseInstance.Builder |
storageType(StorageType storageType)
(experimental) The storage type.
|
DatabaseInstance.Builder |
subnetGroup(ISubnetGroup subnetGroup)
(experimental) Existing subnet group for the instance.
|
DatabaseInstance.Builder |
timezone(String timezone)
(experimental) The time zone of the instance.
|
DatabaseInstance.Builder |
vpc(IVpc vpc)
(experimental) The VPC network where the DB subnet group should be created.
|
DatabaseInstance.Builder |
vpcSubnets(SubnetSelection vpcSubnets)
(experimental) The type of subnets to add to the created DB subnet group.
|
@Stability(value=Experimental) public static DatabaseInstance.Builder create(software.constructs.Construct scope, String id)
scope
- This parameter is required.id
- This parameter is required.DatabaseInstance.Builder
.@Stability(value=Experimental) public DatabaseInstance.Builder vpc(IVpc vpc)
vpc
- The VPC network where the DB subnet group should be created. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade)
Default: true
autoMinorVersionUpgrade
- Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder availabilityZone(String availabilityZone)
Default: - no preference
availabilityZone
- The name of the Availability Zone where the DB instance will be located. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder backupRetention(Duration backupRetention)
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.
Default: Duration.days(1)
backupRetention
- The number of days during which automatic DB snapshots are retained. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder cloudwatchLogsExports(List<String> cloudwatchLogsExports)
Default: - no log exports
cloudwatchLogsExports
- The list of log types that need to be enabled for exporting to CloudWatch Logs. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder cloudwatchLogsRetention(RetentionDays cloudwatchLogsRetention)
When updating
this property, unsetting it doesn't remove the log retention policy. To
remove the retention policy, set the value to Infinity
.
Default: - logs never expire
cloudwatchLogsRetention
- The number of days log events are kept in CloudWatch Logs. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder cloudwatchLogsRetentionRole(IRole cloudwatchLogsRetentionRole)
Default: - a new role is created.
cloudwatchLogsRetentionRole
- The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder copyTagsToSnapshot(Boolean copyTagsToSnapshot)
Default: true
copyTagsToSnapshot
- Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder deleteAutomatedBackups(Boolean deleteAutomatedBackups)
Default: false
deleteAutomatedBackups
- Indicates whether automated backups should be deleted or retained when you delete a DB instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder deletionProtection(Boolean deletionProtection)
Default: - true if ``removalPolicy`` is RETAIN, false otherwise
deletionProtection
- Indicates whether the DB instance should have deletion protection enabled. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder domain(String domain)
Default: - Do not join domain
domain
- The Active Directory directory ID to create the DB instance in. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder domainRole(IRole domainRole)
The role needs the AWS-managed policy AmazonRDSDirectoryServiceAccess or equivalent.
Default: - The role will be created for you if DatabaseInstanceNewProps#domain
is specified
domainRole
- The IAM role to be used when making API calls to the Directory Service. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder enablePerformanceInsights(Boolean enablePerformanceInsights)
Default: - false, unless ``performanceInsightRentention`` or ``performanceInsightEncryptionKey`` is set.
enablePerformanceInsights
- Whether to enable Performance Insights for the DB instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder iamAuthentication(Boolean iamAuthentication)
Default: false
iamAuthentication
- Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder instanceIdentifier(String instanceIdentifier)
If you specify a name, AWS CloudFormation converts it to lowercase.
Default: - a CloudFormation generated name
instanceIdentifier
- A name for the DB instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder iops(Number iops)
The value must be equal to or greater than 1000.
Default: - no provisioned iops
iops
- The number of I/O operations per second (IOPS) that the database provisions. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder maxAllocatedStorage(Number maxAllocatedStorage)
Default: - No autoscaling of RDS instance
maxAllocatedStorage
- Upper limit to which RDS can scale the storage in GiB(Gibibyte). This parameter is required.this
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling
@Stability(value=Experimental) public DatabaseInstance.Builder monitoringInterval(Duration monitoringInterval)
Default: - no enhanced monitoring
monitoringInterval
- The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder monitoringRole(IRole monitoringRole)
Default: - A role is automatically created for you
monitoringRole
- Role that will be used to manage DB instance monitoring. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder multiAz(Boolean multiAz)
Default: false
multiAz
- Specifies if the database instance is a multiple Availability Zone deployment. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder optionGroup(IOptionGroup optionGroup)
Default: - no option group
optionGroup
- The option group to associate with the instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder performanceInsightEncryptionKey(IKey performanceInsightEncryptionKey)
Default: - default master key
performanceInsightEncryptionKey
- The AWS KMS key for encryption of Performance Insights data. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder performanceInsightRetention(PerformanceInsightRetention performanceInsightRetention)
Default: 7
performanceInsightRetention
- The amount of time, in days, to retain Performance Insights data. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder port(Number port)
Default: - the default port for the chosen engine.
port
- The port for the instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder preferredBackupWindow(String preferredBackupWindow)
Constraints:
hh24:mi-hh24:mi
.Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow
preferredBackupWindow
- The daily time range during which automated backups are performed. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow)
Format: ddd:hh24:mi-ddd:hh24:mi
Constraint: Minimum 30-minute window
Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance
preferredMaintenanceWindow
- The weekly time range (in UTC) during which system maintenance can occur. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder processorFeatures(ProcessorFeatures processorFeatures)
Default: - the default number of CPU cores and threads per core for the chosen instance class. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor
processorFeatures
- The number of CPU cores and the number of threads per core. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder publiclyAccessible(Boolean publiclyAccessible)
Default: - `true` if `vpcSubnets` is `subnetType: SubnetType.PUBLIC`, `false` otherwise
publiclyAccessible
- Indicates whether the DB instance is an internet-facing instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder removalPolicy(RemovalPolicy removalPolicy)
Default: - RemovalPolicy.SNAPSHOT (remove the resource, but retain a snapshot of the data)
removalPolicy
- The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder s3ExportBuckets(List<? extends IBucket> s3ExportBuckets)
This feature is only supported by the Microsoft SQL Server and Oracle engines.
This property must not be used if s3ExportRole
is used.
For Microsoft SQL Server:
Default: - None
s3ExportBuckets
- S3 buckets that you want to load data into. This parameter is required.this
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-s3-integration.html
@Stability(value=Experimental) public DatabaseInstance.Builder s3ExportRole(IRole s3ExportRole)
This feature is only supported by the Microsoft SQL Server and Oracle engines.
This property must not be used if s3ExportBuckets
is used.
For Microsoft SQL Server:
Default: - New role is created if `s3ExportBuckets` is set, no role is defined otherwise
s3ExportRole
- Role that will be associated with this DB instance to enable S3 export. This parameter is required.this
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-s3-integration.html
@Stability(value=Experimental) public DatabaseInstance.Builder s3ImportBuckets(List<? extends IBucket> s3ImportBuckets)
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:
Default: - None
s3ImportBuckets
- S3 buckets that you want to load data from. This parameter is required.this
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Procedural.Importing.html
@Stability(value=Experimental) public DatabaseInstance.Builder s3ImportRole(IRole s3ImportRole)
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:
Default: - New role is created if `s3ImportBuckets` is set, no role is defined otherwise
s3ImportRole
- Role that will be associated with this DB instance to enable S3 import. This parameter is required.this
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Procedural.Importing.html
@Stability(value=Experimental) public DatabaseInstance.Builder securityGroups(List<? extends ISecurityGroup> securityGroups)
Default: - a new security group is created
securityGroups
- The security groups to assign to the DB instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder storageType(StorageType storageType)
Storage types supported are gp2, io1, standard.
Default: GP2
storageType
- The storage type. This parameter is required.this
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#Concepts.Storage.GeneralSSD
@Stability(value=Experimental) public DatabaseInstance.Builder subnetGroup(ISubnetGroup subnetGroup)
Default: - a new subnet group will be created.
subnetGroup
- Existing subnet group for the instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder vpcSubnets(SubnetSelection vpcSubnets)
Default: - private subnets
vpcSubnets
- The type of subnets to add to the created DB subnet group. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder engine(IInstanceEngine engine)
engine
- The database engine. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder allocatedStorage(Number allocatedStorage)
Default: 100
allocatedStorage
- The allocated storage size, specified in gigabytes (GB). This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder allowMajorVersionUpgrade(Boolean allowMajorVersionUpgrade)
Default: false
allowMajorVersionUpgrade
- Whether to allow major version upgrades. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder databaseName(String databaseName)
Default: - no name
databaseName
- The name of the database. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder instanceType(InstanceType instanceType)
Default: - m5.large (or, more specifically, db.m5.large)
instanceType
- The name of the compute and memory capacity for the instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder licenseModel(LicenseModel licenseModel)
Default: - RDS default license model
licenseModel
- The license model. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder parameterGroup(IParameterGroup parameterGroup)
Default: - no parameter group
parameterGroup
- The DB parameter group to associate with the instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder timezone(String timezone)
This is currently supported only by Microsoft Sql Server.
Default: - RDS default timezone
timezone
- The time zone of the instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder characterSetName(String characterSetName)
Default: - RDS default character set name
characterSetName
- For supported engines, specifies the character set to associate with the DB instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder credentials(Credentials credentials)
Default: - A username of 'admin' (or 'postgres' for PostgreSQL) and SecretsManager-generated password
credentials
- Credentials for the administrative user. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder storageEncrypted(Boolean storageEncrypted)
Default: - true if storageEncryptionKey has been provided, false otherwise
storageEncrypted
- Indicates whether the DB instance is encrypted. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance.Builder storageEncryptionKey(IKey storageEncryptionKey)
Default: - default master key if storageEncrypted is true, no key otherwise
storageEncryptionKey
- The KMS key that's used to encrypt the DB instance. This parameter is required.this
@Stability(value=Experimental) public DatabaseInstance build()
build
in interface software.amazon.jsii.Builder<DatabaseInstance>
Copyright © 2021. All rights reserved.