All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.burkard.cdk.services.docdb.DatabaseInstance.scala Maven / Gradle / Ivy

The newest version!
package io.burkard.cdk.services.docdb

@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object DatabaseInstance {

  def apply(
    internalResourceId: String,
    instanceType: software.amazon.awscdk.services.ec2.InstanceType,
    cluster: software.amazon.awscdk.services.docdb.IDatabaseCluster,
    availabilityZone: Option[String] = None,
    preferredMaintenanceWindow: Option[String] = None,
    autoMinorVersionUpgrade: Option[Boolean] = None,
    dbInstanceName: Option[String] = None,
    removalPolicy: Option[software.amazon.awscdk.RemovalPolicy] = None
  )(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.docdb.DatabaseInstance =
    software.amazon.awscdk.services.docdb.DatabaseInstance.Builder
      .create(stackCtx, internalResourceId)
      .instanceType(instanceType)
      .cluster(cluster)
      .availabilityZone(availabilityZone.orNull)
      .preferredMaintenanceWindow(preferredMaintenanceWindow.orNull)
      .autoMinorVersionUpgrade(autoMinorVersionUpgrade.map(Boolean.box).orNull)
      .dbInstanceName(dbInstanceName.orNull)
      .removalPolicy(removalPolicy.orNull)
      .build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy