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

io.burkard.cdk.services.rds.DatabaseCluster.scala Maven / Gradle / Ivy

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

import scala.collection.JavaConverters._

@scala.annotation.nowarn("cat=deprecation")
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object DatabaseCluster {

  def apply(
    internalResourceId: String,
    instanceProps: software.amazon.awscdk.services.rds.InstanceProps,
    engine: software.amazon.awscdk.services.rds.IClusterEngine,
    s3ExportRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
    subnetGroup: Option[software.amazon.awscdk.services.rds.ISubnetGroup] = None,
    backup: Option[software.amazon.awscdk.services.rds.BackupProps] = None,
    iamAuthentication: Option[Boolean] = None,
    s3ImportBuckets: Option[List[_ <: software.amazon.awscdk.services.s3.IBucket]] = None,
    instanceUpdateBehaviour: Option[software.amazon.awscdk.services.rds.InstanceUpdateBehaviour] = None,
    storageEncrypted: Option[Boolean] = None,
    defaultDatabaseName: Option[String] = None,
    clusterIdentifier: Option[String] = None,
    instances: Option[Number] = None,
    preferredMaintenanceWindow: Option[String] = None,
    s3ImportRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
    monitoringRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
    parameterGroup: Option[software.amazon.awscdk.services.rds.IParameterGroup] = None,
    cloudwatchLogsExports: Option[List[String]] = None,
    deletionProtection: Option[Boolean] = None,
    copyTagsToSnapshot: Option[Boolean] = None,
    port: Option[Number] = None,
    storageEncryptionKey: Option[software.amazon.awscdk.services.kms.IKey] = None,
    cloudwatchLogsRetentionRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
    instanceIdentifierBase: Option[String] = None,
    cloudwatchLogsRetention: Option[software.amazon.awscdk.services.logs.RetentionDays] = None,
    parameters: Option[Map[String, String]] = None,
    backtrackWindow: Option[software.amazon.awscdk.Duration] = None,
    s3ExportBuckets: Option[List[_ <: software.amazon.awscdk.services.s3.IBucket]] = None,
    removalPolicy: Option[software.amazon.awscdk.RemovalPolicy] = None,
    credentials: Option[software.amazon.awscdk.services.rds.Credentials] = None,
    monitoringInterval: Option[software.amazon.awscdk.Duration] = None
  )(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.rds.DatabaseCluster =
    software.amazon.awscdk.services.rds.DatabaseCluster.Builder
      .create(stackCtx, internalResourceId)
      .instanceProps(instanceProps)
      .engine(engine)
      .s3ExportRole(s3ExportRole.orNull)
      .subnetGroup(subnetGroup.orNull)
      .backup(backup.orNull)
      .iamAuthentication(iamAuthentication.map(Boolean.box).orNull)
      .s3ImportBuckets(s3ImportBuckets.map(_.asJava).orNull)
      .instanceUpdateBehaviour(instanceUpdateBehaviour.orNull)
      .storageEncrypted(storageEncrypted.map(Boolean.box).orNull)
      .defaultDatabaseName(defaultDatabaseName.orNull)
      .clusterIdentifier(clusterIdentifier.orNull)
      .instances(instances.orNull)
      .preferredMaintenanceWindow(preferredMaintenanceWindow.orNull)
      .s3ImportRole(s3ImportRole.orNull)
      .monitoringRole(monitoringRole.orNull)
      .parameterGroup(parameterGroup.orNull)
      .cloudwatchLogsExports(cloudwatchLogsExports.map(_.asJava).orNull)
      .deletionProtection(deletionProtection.map(Boolean.box).orNull)
      .copyTagsToSnapshot(copyTagsToSnapshot.map(Boolean.box).orNull)
      .port(port.orNull)
      .storageEncryptionKey(storageEncryptionKey.orNull)
      .cloudwatchLogsRetentionRole(cloudwatchLogsRetentionRole.orNull)
      .instanceIdentifierBase(instanceIdentifierBase.orNull)
      .cloudwatchLogsRetention(cloudwatchLogsRetention.orNull)
      .parameters(parameters.map(_.asJava).orNull)
      .backtrackWindow(backtrackWindow.orNull)
      .s3ExportBuckets(s3ExportBuckets.map(_.asJava).orNull)
      .removalPolicy(removalPolicy.orNull)
      .credentials(credentials.orNull)
      .monitoringInterval(monitoringInterval.orNull)
      .build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy