Interface InstanceProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
InstanceProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:56:04.840Z") @Stability(Stable) public interface InstanceProps extends software.amazon.jsii.JsiiSerializable
Instance properties for database instances.

Example:

 DatabaseCluster cluster = DatabaseCluster.Builder.create(stack, "Database")
         .engine(DatabaseClusterEngine.AURORA)
         .instanceProps(InstanceProps.builder()
                 .instanceType(InstanceType.of(InstanceClass.BURSTABLE3, InstanceSize.SMALL))
                 .vpc(vpc)
                 .build())
         .build();
 cluster.addRotationSingleUser();
 DatabaseCluster clusterWithCustomRotationOptions = DatabaseCluster.Builder.create(stack, "CustomRotationOptions")
         .engine(DatabaseClusterEngine.AURORA)
         .instanceProps(InstanceProps.builder()
                 .instanceType(InstanceType.of(InstanceClass.BURSTABLE3, InstanceSize.SMALL))
                 .vpc(vpc)
                 .build())
         .build();
 clusterWithCustomRotationOptions.addRotationSingleUser(RotationSingleUserOptions.builder()
         .automaticallyAfter(Duration.days(7))
         .excludeCharacters("!@#$%^&*")
         .securityGroup(securityGroup)
         .vpcSubnets(SubnetSelection.builder().subnetType(SubnetType.PRIVATE_WITH_EGRESS).build())
         .endpoint(endpoint)
         .build());
 
  • Method Details

    • getVpc

      @Stability(Stable) @NotNull IVpc getVpc()
      What subnets to run the RDS instances in.

      Must be at least 2 subnets in two different AZs.

    • getAllowMajorVersionUpgrade

      @Stability(Stable) @Nullable default Boolean getAllowMajorVersionUpgrade()
      Whether to allow upgrade of major version for the DB instance.

      Default: - false

    • getAutoMinorVersionUpgrade

      @Stability(Stable) @Nullable default Boolean getAutoMinorVersionUpgrade()
      Whether to enable automatic upgrade of minor version for the DB instance.

      Default: - true

    • getDeleteAutomatedBackups

      @Stability(Stable) @Nullable default Boolean getDeleteAutomatedBackups()
      Whether to remove automated backups immediately after the DB instance is deleted for the DB instance.

      Default: - true

    • getEnablePerformanceInsights

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

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

    • getInstanceType

      @Stability(Stable) @Nullable default InstanceType getInstanceType()
      What type of instance to start for the replicas.

      Default: - t3.medium (or, more precisely, db.t3.medium)

    • getParameterGroup

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

      Default: no parameter group

    • getParameters

      @Stability(Stable) @Nullable default Map<String,String> getParameters()
      The parameters in the DBParameterGroup to create automatically.

      You can only specify parameterGroup or parameters but not both. You need to use a versioned engine to auto-generate a DBParameterGroup.

      Default: - None

    • 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

    • getPreferredMaintenanceWindow

      @Stability(Stable) @Nullable default String getPreferredMaintenanceWindow()
      A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC).

      Example: 'Sun:23:45-Mon:00:15'

      Default: - 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.

      See Also:
    • getPubliclyAccessible

      @Stability(Stable) @Nullable default Boolean getPubliclyAccessible()
      Indicates whether the DB instance is an internet-facing instance.

      Default: - `true` if `vpcSubnets` is `subnetType: SubnetType.PUBLIC`, `false` otherwise

    • getSecurityGroups

      @Stability(Stable) @Nullable default List<ISecurityGroup> getSecurityGroups()
      Security group.

      Default: a new security group is created.

    • getVpcSubnets

      @Stability(Stable) @Nullable default SubnetSelection getVpcSubnets()
      Where to place the instances within the VPC.

      Default: - the Vpc default strategy if not specified.

    • builder

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