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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:35.170Z") @Stability(Stable) public interface DatabaseInstanceNewProps extends software.amazon.jsii.JsiiSerializable
Construction properties for a DatabaseInstanceNew.

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
         .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();
 
  • Method Details

    • getVpc

      @Stability(Stable) @NotNull IVpc getVpc()
      The VPC network where the DB subnet group should be created.
    • getAutoMinorVersionUpgrade

      @Stability(Stable) @Nullable default Boolean getAutoMinorVersionUpgrade()
      Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.

      Default: true

    • getAvailabilityZone

      @Stability(Stable) @Nullable default String getAvailabilityZone()
      The name of the Availability Zone where the DB instance will be located.

      Default: - no preference

    • getBackupRetention

      @Stability(Stable) @Nullable default Duration 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

      @Stability(Stable) @Nullable default CaCertificate 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

      @Stability(Stable) @Nullable default List<String> getCloudwatchLogsExports()
      The list of log types that need to be enabled for exporting to CloudWatch Logs.

      Default: - no log exports

    • getCloudwatchLogsRetention

      @Stability(Stable) @Nullable default RetentionDays 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

      @Stability(Stable) @Nullable default IRole 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

      @Stability(Stable) @Nullable default Boolean getCopyTagsToSnapshot()
      Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance.

      Default: true

    • getDeleteAutomatedBackups

      @Stability(Stable) @Nullable default Boolean getDeleteAutomatedBackups()
      Indicates whether automated backups should be deleted or retained when you delete a DB instance.

      Default: true

    • getDeletionProtection

      @Stability(Stable) @Nullable default Boolean getDeletionProtection()
      Indicates whether the DB instance should have deletion protection enabled.

      Default: - true if ``removalPolicy`` is RETAIN, false otherwise

    • getDomain

      @Stability(Stable) @Nullable default String getDomain()
      The Active Directory directory ID to create the DB instance in.

      Default: - Do not join domain

    • getDomainRole

      @Stability(Stable) @Nullable default IRole 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

      @Stability(Stable) @Nullable default Boolean getEnablePerformanceInsights()
      Whether to enable Performance Insights for the DB instance.

      Default: - false, unless ``performanceInsightRetention`` or ``performanceInsightEncryptionKey`` is set.

    • getIamAuthentication

      @Stability(Stable) @Nullable default Boolean getIamAuthentication()
      Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.

      Default: false

    • getInstanceIdentifier

      @Stability(Stable) @Nullable default String getInstanceIdentifier()
      A name for the DB instance.

      If you specify a name, AWS CloudFormation converts it to lowercase.

      Default: - a CloudFormation generated name

    • getIops

      @Stability(Stable) @Nullable default Number 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

      @Stability(Stable) @Nullable default Number getMaxAllocatedStorage()
      Upper limit to which RDS can scale the storage in GiB(Gibibyte).

      Default: - No autoscaling of RDS instance

      See Also:
    • getMonitoringInterval

      @Stability(Stable) @Nullable default Duration getMonitoringInterval()
      The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance.

      Default: - no enhanced monitoring

    • getMonitoringRole

      @Stability(Stable) @Nullable default IRole getMonitoringRole()
      Role that will be used to manage DB instance monitoring.

      Default: - A role is automatically created for you

    • getMultiAz

      @Stability(Stable) @Nullable default Boolean getMultiAz()
      Specifies if the database instance is a multiple Availability Zone deployment.

      Default: false

    • getNetworkType

      @Stability(Stable) @Nullable default NetworkType getNetworkType()
      The network type of the DB instance.

      Default: - IPV4

    • getOptionGroup

      @Stability(Stable) @Nullable default IOptionGroup getOptionGroup()
      The option group to associate with the instance.

      Default: - no option group

    • getParameterGroup

      @Stability(Stable) @Nullable default IParameterGroup getParameterGroup()
      The DB parameter group to associate with the instance.

      Default: - no parameter group

    • getPerformanceInsightEncryptionKey

      @Stability(Stable) @Nullable default IKey getPerformanceInsightEncryptionKey()
      The AWS KMS key for encryption of Performance Insights data.

      Default: - default master key

    • getPerformanceInsightRetention

      @Stability(Stable) @Nullable default PerformanceInsightRetention getPerformanceInsightRetention()
      The amount of time, in days, to retain Performance Insights data.

      Default: 7 this is the free tier

    • getPort

      @Stability(Stable) @Nullable default Number getPort()
      The port for the instance.

      Default: - the default port for the chosen engine.

    • getPreferredBackupWindow

      @Stability(Stable) @Nullable default String 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

    • getPreferredMaintenanceWindow

      @Stability(Stable) @Nullable default String getPreferredMaintenanceWindow()
      The weekly time range (in UTC) during which system maintenance can occur.

      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

    • getProcessorFeatures

      @Stability(Stable) @Nullable default ProcessorFeatures 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

      @Stability(Stable) @Nullable default Boolean 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

      @Stability(Stable) @Nullable default RemovalPolicy 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

      @Stability(Stable) @Nullable default List<IBucket> 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

      @Stability(Stable) @Nullable default IRole 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

      @Stability(Stable) @Nullable default List<IBucket> 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

      @Stability(Stable) @Nullable default IRole 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

      @Stability(Stable) @Nullable default List<ISecurityGroup> getSecurityGroups()
      The security groups to assign to the DB instance.

      Default: - a new security group is created

    • getStorageThroughput

      @Stability(Stable) @Nullable default Number 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

      @Stability(Stable) @Nullable default StorageType getStorageType()
      The storage type.

      Storage types supported are gp2, io1, standard.

      Default: GP2

      See Also:
    • getSubnetGroup

      @Stability(Stable) @Nullable default ISubnetGroup getSubnetGroup()
      Existing subnet group for the instance.

      Default: - a new subnet group will be created.

    • getVpcSubnets

      @Stability(Stable) @Nullable default SubnetSelection getVpcSubnets()
      The type of subnets to add to the created DB subnet group.

      Default: - private subnets

    • builder

      @Stability(Stable) static DatabaseInstanceNewProps.Builder builder()
      Returns:
      a DatabaseInstanceNewProps.Builder of DatabaseInstanceNewProps