io.burkard.cdk.services.lambda.eventsources.ManagedKafkaEventSource.scala Maven / Gradle / Ivy
The newest version!
package io.burkard.cdk.services.lambda.eventsources
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object ManagedKafkaEventSource {
def apply(
clusterArn: String,
secret: Option[software.amazon.awscdk.services.secretsmanager.ISecret] = None,
batchSize: Option[Number] = None,
enabled: Option[Boolean] = None,
maxBatchingWindow: Option[software.amazon.awscdk.Duration] = None,
startingPosition: Option[software.amazon.awscdk.services.lambda.StartingPosition] = None,
topic: Option[String] = None
): software.amazon.awscdk.services.lambda.eventsources.ManagedKafkaEventSource =
software.amazon.awscdk.services.lambda.eventsources.ManagedKafkaEventSource.Builder
.create()
.clusterArn(clusterArn)
.secret(secret.orNull)
.batchSize(batchSize.orNull)
.enabled(enabled.map(Boolean.box).orNull)
.maxBatchingWindow(maxBatchingWindow.orNull)
.startingPosition(startingPosition.orNull)
.topic(topic.orNull)
.build()
}