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

io.burkard.cdk.services.sns.subscriptions.SqsSubscription.scala Maven / Gradle / Ivy

The newest version!
package io.burkard.cdk.services.sns.subscriptions

import scala.collection.JavaConverters._

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

  def apply(
    queue: software.amazon.awscdk.services.sqs.IQueue,
    deadLetterQueue: Option[software.amazon.awscdk.services.sqs.IQueue] = None,
    filterPolicy: Option[Map[String, _ <: software.amazon.awscdk.services.sns.SubscriptionFilter]] = None,
    rawMessageDelivery: Option[Boolean] = None
  ): software.amazon.awscdk.services.sns.subscriptions.SqsSubscription =
    software.amazon.awscdk.services.sns.subscriptions.SqsSubscription.Builder
      .create(queue)
      .deadLetterQueue(deadLetterQueue.orNull)
      .filterPolicy(filterPolicy.map(_.asJava).orNull)
      .rawMessageDelivery(rawMessageDelivery.map(Boolean.box).orNull)
      .build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy