Class ClusterInstanceProps.Jsii$Proxy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.rds.ClusterInstanceProps.Jsii$Proxy
All Implemented Interfaces:
ClusterInstanceOptions, ClusterInstanceProps, software.amazon.jsii.JsiiSerializable
Enclosing interface:
ClusterInstanceProps

@Stability(Stable) @Internal public static final class ClusterInstanceProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ClusterInstanceProps
An implementation for ClusterInstanceProps
  • Constructor Details

    • Jsii$Proxy

      protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
      Constructor that initializes the object based on values retrieved from the JsiiObject.
      Parameters:
      objRef - Reference to the JSII managed object.
    • Jsii$Proxy

      protected Jsii$Proxy(ClusterInstanceProps.Builder builder)
      Constructor that initializes the object based on literal property values passed by the ClusterInstanceProps.Builder.
  • Method Details

    • getInstanceType

      public final ClusterInstanceType getInstanceType()
      Description copied from interface: ClusterInstanceProps
      The type of cluster instance to create.

      Can be either provisioned or serverless v2

      Specified by:
      getInstanceType in interface ClusterInstanceProps
    • getPromotionTier

      public final Number getPromotionTier()
      Description copied from interface: ClusterInstanceProps
      The promotion tier of the cluster instance.

      This matters more for serverlessV2 instances. If a serverless instance is in tier 0-1 then it will scale with the writer.

      For provisioned instances this just determines the failover priority. If multiple instances have the same priority then one will be picked at random

      Default: 2

      Specified by:
      getPromotionTier in interface ClusterInstanceProps
    • getAllowMajorVersionUpgrade

      public final Boolean getAllowMajorVersionUpgrade()
      Description copied from interface: ClusterInstanceOptions
      Whether to allow upgrade of major version for the DB instance.

      Default: - false

      Specified by:
      getAllowMajorVersionUpgrade in interface ClusterInstanceOptions
    • getAutoMinorVersionUpgrade

      public final Boolean getAutoMinorVersionUpgrade()
      Description copied from interface: ClusterInstanceOptions
      Whether to enable automatic upgrade of minor version for the DB instance.

      Default: - true

      Specified by:
      getAutoMinorVersionUpgrade in interface ClusterInstanceOptions
    • getCaCertificate

      public final CaCertificate getCaCertificate()
      Description copied from interface: ClusterInstanceOptions
      The identifier of the CA certificate for this DB cluster's instances.

      Specifying or updating this property triggers a reboot.

      For RDS DB engines:

      Default: - RDS will choose a certificate authority

      Specified by:
      getCaCertificate in interface ClusterInstanceOptions
      See Also:
    • getEnablePerformanceInsights

      public final Boolean getEnablePerformanceInsights()
      Description copied from interface: ClusterInstanceOptions
      Whether to enable Performance Insights for the DB instance.

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

      Specified by:
      getEnablePerformanceInsights in interface ClusterInstanceOptions
    • getInstanceIdentifier

      public final String getInstanceIdentifier()
      Description copied from interface: ClusterInstanceOptions
      The identifier for the database instance.

      Default: - CloudFormation generated identifier

      Specified by:
      getInstanceIdentifier in interface ClusterInstanceOptions
    • getIsFromLegacyInstanceProps

      public final Boolean getIsFromLegacyInstanceProps()
      Description copied from interface: ClusterInstanceOptions
      Only used for migrating existing clusters from using instanceProps to writer and readers.

      Default: false

      Example:

       // existing cluster
       Vpc vpc;
       DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database")
               .engine(DatabaseClusterEngine.auroraMysql(AuroraMysqlClusterEngineProps.builder()
                       .version(AuroraMysqlEngineVersion.VER_3_03_0)
                       .build()))
               .instances(2)
               .instanceProps(InstanceProps.builder()
                       .instanceType(InstanceType.of(InstanceClass.BURSTABLE3, InstanceSize.SMALL))
                       .vpcSubnets(SubnetSelection.builder().subnetType(SubnetType.PUBLIC).build())
                       .vpc(vpc)
                       .build())
               .build();
       // migration
       Map<String, Object> instanceProps = Map.of(
               "instanceType", InstanceType.of(InstanceClass.BURSTABLE3, InstanceSize.SMALL),
               "isFromLegacyInstanceProps", true);
       DatabaseCluster myCluster = DatabaseCluster.Builder.create(this, "Database")
               .engine(DatabaseClusterEngine.auroraMysql(AuroraMysqlClusterEngineProps.builder()
                       .version(AuroraMysqlEngineVersion.VER_3_03_0)
                       .build()))
               .vpcSubnets(SubnetSelection.builder().subnetType(SubnetType.PUBLIC).build())
               .vpc(vpc)
               .writer(ClusterInstance.provisioned("Instance1", ProvisionedClusterInstanceProps.builder()
                       .instanceType(instanceProps.getInstanceType())
                       .isFromLegacyInstanceProps(instanceProps.getIsFromLegacyInstanceProps())
                       .build()))
               .readers(List.of(ClusterInstance.provisioned("Instance2", ProvisionedClusterInstanceProps.builder()
                       .instanceType(instanceProps.getInstanceType())
                       .isFromLegacyInstanceProps(instanceProps.getIsFromLegacyInstanceProps())
                       .build())))
               .build();
       
      Specified by:
      getIsFromLegacyInstanceProps in interface ClusterInstanceOptions
    • getParameterGroup

      public final IParameterGroup getParameterGroup()
      Description copied from interface: ClusterInstanceOptions
      The DB parameter group to associate with the instance.

      This is only needed if you need to configure different parameter groups for each individual instance, otherwise you should not provide this and just use the cluster parameter group

      Default: the cluster parameter group is used

      Specified by:
      getParameterGroup in interface ClusterInstanceOptions
    • getParameters

      public final Map<String,String> getParameters()
      Description copied from interface: ClusterInstanceOptions
      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

      Specified by:
      getParameters in interface ClusterInstanceOptions
    • getPerformanceInsightEncryptionKey

      public final IKey getPerformanceInsightEncryptionKey()
      Description copied from interface: ClusterInstanceOptions
      The AWS KMS key for encryption of Performance Insights data.

      Default: - default master key

      Specified by:
      getPerformanceInsightEncryptionKey in interface ClusterInstanceOptions
    • getPerformanceInsightRetention

      public final PerformanceInsightRetention getPerformanceInsightRetention()
      Description copied from interface: ClusterInstanceOptions
      The amount of time, in days, to retain Performance Insights data.

      Default: 7

      Specified by:
      getPerformanceInsightRetention in interface ClusterInstanceOptions
    • getPreferredMaintenanceWindow

      public final String getPreferredMaintenanceWindow()
      Description copied from interface: ClusterInstanceOptions
      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.

      Specified by:
      getPreferredMaintenanceWindow in interface ClusterInstanceOptions
      See Also:
    • getPubliclyAccessible

      public final Boolean getPubliclyAccessible()
      Description copied from interface: ClusterInstanceOptions
      Indicates whether the DB instance is an internet-facing instance.

      If not specified, the cluster's vpcSubnets will be used to determine if the instance is internet-facing or not.

      Default: - `true` if the cluster's `vpcSubnets` is `subnetType: SubnetType.PUBLIC`, `false` otherwise

      Specified by:
      getPubliclyAccessible in interface ClusterInstanceOptions
    • $jsii$toJson

      @Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
      Specified by:
      $jsii$toJson in interface software.amazon.jsii.JsiiSerializable
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object