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.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.*;
import software.amazon.awscdk.core.*;
Bucket bucket;
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
.autoMinorVersionUpgrade(false)
.availabilityZone("availabilityZone")
.backupRetention(Duration.minutes(30))
.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)
.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))
.storageType(StorageType.STANDARD)
.subnetGroup(subnetGroup)
.vpcPlacement(SubnetSelection.builder()
.availabilityZones(List.of("availabilityZones"))
.onePerAz(false)
.subnetFilters(List.of(subnetFilter))
.subnetGroupName("subnetGroupName")
.subnetName("subnetName")
.subnets(List.of(subnet))
.subnetType(SubnetType.ISOLATED)
.build())
.vpcSubnets(SubnetSelection.builder()
.availabilityZones(List.of("availabilityZones"))
.onePerAz(false)
.subnetFilters(List.of(subnetFilter))
.subnetGroupName("subnetGroupName")
.subnetName("subnetName")
.subnets(List.of(subnet))
.subnetType(SubnetType.ISOLATED)
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDatabaseInstanceNewPropsstatic final classAn implementation forDatabaseInstanceNewProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanIndicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.default StringThe name of the Availability Zone where the DB instance will be located.default DurationThe number of days during which automatic DB snapshots are retained.The list of log types that need to be enabled for exporting to CloudWatch Logs.default RetentionDaysThe number of days log events are kept in CloudWatch Logs.default IRoleThe IAM role for the Lambda function associated with the custom resource that sets the retention policy.default BooleanIndicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance.default BooleanIndicates whether automated backups should be deleted or retained when you delete a DB instance.default BooleanIndicates whether the DB instance should have deletion protection enabled.default StringThe Active Directory directory ID to create the DB instance in.default IRoleThe IAM role to be used when making API calls to the Directory Service.default BooleanWhether to enable Performance Insights for the DB instance.default BooleanWhether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.default StringA name for the DB instance.default NumbergetIops()The number of I/O operations per second (IOPS) that the database provisions.default NumberUpper limit to which RDS can scale the storage in GiB(Gibibyte).default DurationThe interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance.default IRoleRole that will be used to manage DB instance monitoring.default BooleanSpecifies if the database instance is a multiple Availability Zone deployment.default IOptionGroupThe option group to associate with the instance.default IParameterGroupThe DB parameter group to associate with the instance.default IKeyThe AWS KMS key for encryption of Performance Insights data.default PerformanceInsightRetentionThe amount of time, in days, to retain Performance Insights data.default NumbergetPort()The port for the instance.default StringThe daily time range during which automated backups are performed.default StringThe weekly time range (in UTC) during which system maintenance can occur.default ProcessorFeaturesThe number of CPU cores and the number of threads per core.default BooleanIndicates whether the DB instance is an internet-facing instance.default RemovalPolicyThe 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 IRoleRole that will be associated with this DB instance to enable S3 export.S3 buckets that you want to load data from.default IRoleRole 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 StorageTypeThe storage type.default ISubnetGroupExisting subnet group for the instance.getVpc()The VPC network where the DB subnet group should be created.default SubnetSelectionDeprecated.default SubnetSelectionThe 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. -
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
-
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: false
-
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#domainis specified -
getEnablePerformanceInsights
Whether to enable Performance Insights for the DB instance.Default: - false, unless ``performanceInsightRentention`` 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
-
getMaxAllocatedStorage
Upper limit to which RDS can scale the storage in GiB(Gibibyte).Default: - No autoscaling of RDS instance
-
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
-
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
-
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:miConstraint: 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.Default: - `true` if `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
s3ExportRoleis used.For Microsoft SQL Server:
Default: - None
-
getS3ExportRole
Role that will be associated with this DB instance to enable S3 export.This property must not be used if
s3ExportBucketsis used.For Microsoft SQL Server:
Default: - New role is created if `s3ExportBuckets` is set, no role is defined otherwise
-
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
s3ImportRoleis used.For Microsoft SQL Server:
Default: - None
-
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
s3ImportBucketsis used.For Microsoft SQL Server:
Default: - New role is created if `s3ImportBuckets` is set, no role is defined otherwise
-
getSecurityGroups
The security groups to assign to the DB instance.Default: - a new security group is created
-
getStorageType
The storage type.Storage types supported are gp2, io1, standard.
Default: GP2
-
getSubnetGroup
Existing subnet group for the instance.Default: - a new subnet group will be created.
-
getVpcPlacement
Deprecated.usevpcSubnets(deprecated) The type of subnets to add to the created DB subnet group.Default: - private subnets
-
getVpcSubnets
The type of subnets to add to the created DB subnet group.Default: - private subnets
-
builder
- Returns:
- a
DatabaseInstanceNewProps.BuilderofDatabaseInstanceNewProps
-
vpcSubnets