Interface DatabaseInstanceNewProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
DatabaseInstanceFromSnapshotProps
,DatabaseInstanceProps
,DatabaseInstanceReadReplicaProps
,DatabaseInstanceSourceProps
- All Known Implementing Classes:
DatabaseInstanceFromSnapshotProps.Jsii$Proxy
,DatabaseInstanceNewProps.Jsii$Proxy
,DatabaseInstanceProps.Jsii$Proxy
,DatabaseInstanceReadReplicaProps.Jsii$Proxy
,DatabaseInstanceSourceProps.Jsii$Proxy
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.*; import software.amazon.awscdk.services.ec2.*; import software.amazon.awscdk.services.iam.*; import software.amazon.awscdk.services.kms.*; import software.amazon.awscdk.services.logs.*; import software.amazon.awscdk.services.rds.*; import software.amazon.awscdk.services.s3.*; Bucket bucket; CaCertificate caCertificate; Key key; OptionGroup optionGroup; ParameterGroup parameterGroup; Role role; SecurityGroup securityGroup; Subnet subnet; SubnetFilter subnetFilter; SubnetGroup subnetGroup; Vpc vpc; DatabaseInstanceNewProps databaseInstanceNewProps = DatabaseInstanceNewProps.builder() .vpc(vpc) // the properties below are optional .applyImmediately(false) .autoMinorVersionUpgrade(false) .availabilityZone("availabilityZone") .backupRetention(Duration.minutes(30)) .caCertificate(caCertificate) .cloudwatchLogsExports(List.of("cloudwatchLogsExports")) .cloudwatchLogsRetention(RetentionDays.ONE_DAY) .cloudwatchLogsRetentionRole(role) .copyTagsToSnapshot(false) .deleteAutomatedBackups(false) .deletionProtection(false) .domain("domain") .domainRole(role) .enablePerformanceInsights(false) .iamAuthentication(false) .instanceIdentifier("instanceIdentifier") .iops(123) .maxAllocatedStorage(123) .monitoringInterval(Duration.minutes(30)) .monitoringRole(role) .multiAz(false) .networkType(NetworkType.IPV4) .optionGroup(optionGroup) .parameterGroup(parameterGroup) .performanceInsightEncryptionKey(key) .performanceInsightRetention(PerformanceInsightRetention.DEFAULT) .port(123) .preferredBackupWindow("preferredBackupWindow") .preferredMaintenanceWindow("preferredMaintenanceWindow") .processorFeatures(ProcessorFeatures.builder() .coreCount(123) .threadsPerCore(123) .build()) .publiclyAccessible(false) .removalPolicy(RemovalPolicy.DESTROY) .s3ExportBuckets(List.of(bucket)) .s3ExportRole(role) .s3ImportBuckets(List.of(bucket)) .s3ImportRole(role) .securityGroups(List.of(securityGroup)) .storageThroughput(123) .storageType(StorageType.STANDARD) .subnetGroup(subnetGroup) .vpcSubnets(SubnetSelection.builder() .availabilityZones(List.of("availabilityZones")) .onePerAz(false) .subnetFilters(List.of(subnetFilter)) .subnetGroupName("subnetGroupName") .subnets(List.of(subnet)) .subnetType(SubnetType.PRIVATE_ISOLATED) .build()) .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forDatabaseInstanceNewProps
static final class
An implementation forDatabaseInstanceNewProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Boolean
Specifies whether changes to the DB instance and any pending modifications are applied immediately, regardless of thepreferredMaintenanceWindow
setting.default Boolean
Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.default String
The name of the Availability Zone where the DB instance will be located.default Duration
The number of days during which automatic DB snapshots are retained.default CaCertificate
The identifier of the CA certificate for this DB instance.The list of log types that need to be enabled for exporting to CloudWatch Logs.default RetentionDays
The number of days log events are kept in CloudWatch Logs.default IRole
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.default Boolean
Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance.default Boolean
Indicates whether automated backups should be deleted or retained when you delete a DB instance.default Boolean
Indicates whether the DB instance should have deletion protection enabled.default String
The Active Directory directory ID to create the DB instance in.default IRole
The IAM role to be used when making API calls to the Directory Service.default Boolean
Whether to enable Performance Insights for the DB instance.default Boolean
Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.default String
A name for the DB instance.default Number
getIops()
The number of I/O operations per second (IOPS) that the database provisions.default Number
Upper limit to which RDS can scale the storage in GiB(Gibibyte).default Duration
The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance.default IRole
Role that will be used to manage DB instance monitoring.default Boolean
Specifies if the database instance is a multiple Availability Zone deployment.default NetworkType
The network type of the DB instance.default IOptionGroup
The option group to associate with the instance.default IParameterGroup
The DB parameter group to associate with the instance.default IKey
The AWS KMS key for encryption of Performance Insights data.default PerformanceInsightRetention
The amount of time, in days, to retain Performance Insights data.default Number
getPort()
The port for the instance.default String
The daily time range during which automated backups are performed.default String
The weekly time range (in UTC) during which system maintenance can occur.default ProcessorFeatures
The number of CPU cores and the number of threads per core.default Boolean
Indicates whether the DB instance is an internet-facing instance.default RemovalPolicy
The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.S3 buckets that you want to load data into.default IRole
Role that will be associated with this DB instance to enable S3 export.S3 buckets that you want to load data from.default IRole
Role that will be associated with this DB instance to enable S3 import.default List<ISecurityGroup>
The security groups to assign to the DB instance.default Number
The storage throughput, specified in mebibytes per second (MiBps).default StorageType
The storage type.default ISubnetGroup
Existing subnet group for the instance.getVpc()
The VPC network where the DB subnet group should be created.default SubnetSelection
The type of subnets to add to the created DB subnet group.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getVpc
The VPC network where the DB subnet group should be created. -
getApplyImmediately
Specifies whether changes to the DB instance and any pending modifications are applied immediately, regardless of thepreferredMaintenanceWindow
setting.If set to
false
, changes are applied during the next maintenance window.Until RDS applies the changes, the DB instance remains in a drift state. As a result, the configuration doesn't fully reflect the requested modifications and temporarily diverges from the intended state.
This property also determines whether the DB instance reboots when a static parameter is modified in the associated DB parameter group.
Default: - Changes will be applied immediately
- See Also:
-
getAutoMinorVersionUpgrade
Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.Default: true
-
getAvailabilityZone
The name of the Availability Zone where the DB instance will be located.Default: - no preference
-
getBackupRetention
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.
Default: - Duration.days(1) for source instances, disabled for read replicas
-
getCaCertificate
The identifier of the CA certificate for this DB instance.Specifying or updating this property triggers a reboot.
For RDS DB engines:
Default: - RDS will choose a certificate authority
- See Also:
-
getCloudwatchLogsExports
The list of log types that need to be enabled for exporting to CloudWatch Logs.Default: - no log exports
-
getCloudwatchLogsRetention
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 to
Infinity
.Default: - logs never expire
-
getCloudwatchLogsRetentionRole
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.Default: - a new role is created.
-
getCopyTagsToSnapshot
Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance.Default: true
-
getDeleteAutomatedBackups
Indicates whether automated backups should be deleted or retained when you delete a DB instance.Default: true
-
getDeletionProtection
Indicates whether the DB instance should have deletion protection enabled.Default: - true if ``removalPolicy`` is RETAIN, false otherwise
-
getDomain
The Active Directory directory ID to create the DB instance in.Default: - Do not join domain
-
getDomainRole
The IAM role to be used when making API calls to the Directory Service.The role needs the AWS-managed policy AmazonRDSDirectoryServiceAccess or equivalent.
Default: - The role will be created for you if `DatabaseInstanceNewProps#domain` is specified
-
getEnablePerformanceInsights
Whether to enable Performance Insights for the DB instance.Default: - false, unless ``performanceInsightRetention`` or ``performanceInsightEncryptionKey`` is set.
-
getIamAuthentication
Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.Default: false
-
getInstanceIdentifier
A name for the DB instance.If you specify a name, AWS CloudFormation converts it to lowercase.
Default: - a CloudFormation generated name
-
getIops
The number of I/O operations per second (IOPS) that the database provisions.The value must be equal to or greater than 1000.
Default: - no provisioned iops if storage type is not specified. For GP3: 3,000 IOPS if allocated storage is less than 400 GiB for MariaDB, MySQL, and PostgreSQL, less than 200 GiB for Oracle and less than 20 GiB for SQL Server. 12,000 IOPS otherwise (except for SQL Server where the default is always 3,000 IOPS).
-
getMaxAllocatedStorage
Upper limit to which RDS can scale the storage in GiB(Gibibyte).Default: - No autoscaling of RDS instance
- See Also:
-
getMonitoringInterval
The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance.Default: - no enhanced monitoring
-
getMonitoringRole
Role that will be used to manage DB instance monitoring.Default: - A role is automatically created for you
-
getMultiAz
Specifies if the database instance is a multiple Availability Zone deployment.Default: false
-
getNetworkType
The network type of the DB instance.Default: - IPV4
-
getOptionGroup
The option group to associate with the instance.Default: - no option group
-
getParameterGroup
The DB parameter group to associate with the instance.Default: - no parameter group
-
getPerformanceInsightEncryptionKey
The AWS KMS key for encryption of Performance Insights data.Default: - default master key
-
getPerformanceInsightRetention
The amount of time, in days, to retain Performance Insights data.Default: 7 this is the free tier
-
getPort
The port for the instance.Default: - the default port for the chosen engine.
-
getPreferredBackupWindow
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.
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
- Must be in the format
-
getPreferredMaintenanceWindow
The weekly time range (in UTC) during which system maintenance can occur.Format:
ddd:hh24:mi-ddd:hh24:mi
Constraint: Minimum 30-minute windowDefault: - 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
-
getProcessorFeatures
The number of CPU cores and the number of threads per core.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
-
getPubliclyAccessible
Indicates whether the DB instance is an internet-facing instance.If not specified, the instance's vpcSubnets will be used to determine if the instance is internet-facing or not.
Default: - `true` if the instance's `vpcSubnets` is `subnetType: SubnetType.PUBLIC`, `false` otherwise
-
getRemovalPolicy
The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.Default: - RemovalPolicy.SNAPSHOT (remove the resource, but retain a snapshot of the data)
-
getS3ExportBuckets
S3 buckets that you want to load data into.This property must not be used if
s3ExportRole
is used.For Microsoft SQL Server:
Default: - None
- See Also:
-
getS3ExportRole
Role that will be associated with this DB instance to enable S3 export.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
- See Also:
-
getS3ImportBuckets
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:
Default: - None
- See Also:
-
getS3ImportRole
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:
Default: - New role is created if `s3ImportBuckets` is set, no role is defined otherwise
- See Also:
-
getSecurityGroups
The security groups to assign to the DB instance.Default: - a new security group is created
-
getStorageThroughput
The storage throughput, specified in mebibytes per second (MiBps).Only applicable for GP3.
Default: - 125 MiBps if allocated storage is less than 400 GiB for MariaDB, MySQL, and PostgreSQL, less than 200 GiB for Oracle and less than 20 GiB for SQL Server. 500 MiBps otherwise (except for SQL Server where the default is always 125 MiBps).
- See Also:
-
getStorageType
The storage type.Storage types supported are gp2, io1, standard.
Default: GP2
- See Also:
-
getSubnetGroup
Existing subnet group for the instance.Default: - a new subnet group will be created.
-
getVpcSubnets
The type of subnets to add to the created DB subnet group.Default: - private subnets
-
builder
- Returns:
- a
DatabaseInstanceNewProps.Builder
ofDatabaseInstanceNewProps
-