Class DatabaseInstance.Builder

java.lang.Object
software.amazon.awscdk.services.docdb.DatabaseInstance.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<DatabaseInstance>
Enclosing class:
DatabaseInstance

@Stability(Stable) public static final class DatabaseInstance.Builder extends Object implements software.amazon.jsii.Builder<DatabaseInstance>
A fluent builder for DatabaseInstance.
  • Method Details

    • create

      @Stability(Stable) public static DatabaseInstance.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of DatabaseInstance.Builder.
    • cluster

      @Stability(Stable) public DatabaseInstance.Builder cluster(IDatabaseCluster cluster)
      The DocumentDB database cluster the instance should launch into.

      Parameters:
      cluster - The DocumentDB database cluster the instance should launch into. This parameter is required.
      Returns:
      this
    • instanceType

      @Stability(Stable) public DatabaseInstance.Builder instanceType(InstanceType instanceType)
      The name of the compute and memory capacity classes.

      Parameters:
      instanceType - The name of the compute and memory capacity classes. This parameter is required.
      Returns:
      this
    • autoMinorVersionUpgrade

      @Stability(Stable) public DatabaseInstance.Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade)
      Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.

      Default: true

      Parameters:
      autoMinorVersionUpgrade - Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. This parameter is required.
      Returns:
      this
    • availabilityZone

      @Stability(Stable) public DatabaseInstance.Builder availabilityZone(String availabilityZone)
      The name of the Availability Zone where the DB instance will be located.

      Default: - no preference

      Parameters:
      availabilityZone - The name of the Availability Zone where the DB instance will be located. This parameter is required.
      Returns:
      this
    • dbInstanceName

      @Stability(Stable) public DatabaseInstance.Builder dbInstanceName(String dbInstanceName)
      A name for the DB instance.

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

      Default: - a CloudFormation generated name

      Parameters:
      dbInstanceName - A name for the DB instance. This parameter is required.
      Returns:
      this
    • enablePerformanceInsights

      @Stability(Stable) public DatabaseInstance.Builder enablePerformanceInsights(Boolean enablePerformanceInsights)
      A value that indicates whether to enable Performance Insights for the DB Instance.

      Default: - false

      Parameters:
      enablePerformanceInsights - A value that indicates whether to enable Performance Insights for the DB Instance. This parameter is required.
      Returns:
      this
    • preferredMaintenanceWindow

      @Stability(Stable) public DatabaseInstance.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow)
      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/documentdb/latest/developerguide/db-instance-maintain.html#maintenance-window

      Parameters:
      preferredMaintenanceWindow - The weekly time range (in UTC) during which system maintenance can occur. This parameter is required.
      Returns:
      this
    • removalPolicy

      @Stability(Stable) public DatabaseInstance.Builder removalPolicy(RemovalPolicy removalPolicy)
      The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.

      Default: RemovalPolicy.Retain

      Parameters:
      removalPolicy - The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public DatabaseInstance build()
      Specified by:
      build in interface software.amazon.jsii.Builder<DatabaseInstance>
      Returns:
      a newly built instance of DatabaseInstance.