io.burkard.cdk.services.apigateway.LambdaIntegration.scala Maven / Gradle / Ivy
The newest version!
package io.burkard.cdk.services.apigateway
import scala.collection.JavaConverters._
@scala.annotation.nowarn("cat=deprecation")
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object LambdaIntegration {
def apply(
handler: software.amazon.awscdk.services.lambda.IFunction,
requestParameters: Option[Map[String, String]] = None,
credentialsPassthrough: Option[Boolean] = None,
integrationResponses: Option[List[_ <: software.amazon.awscdk.services.apigateway.IntegrationResponse]] = None,
cacheKeyParameters: Option[List[String]] = None,
allowTestInvoke: Option[Boolean] = None,
requestTemplates: Option[Map[String, String]] = None,
cacheNamespace: Option[String] = None,
credentialsRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
proxy: Option[Boolean] = None,
vpcLink: Option[software.amazon.awscdk.services.apigateway.IVpcLink] = None,
contentHandling: Option[software.amazon.awscdk.services.apigateway.ContentHandling] = None,
passthroughBehavior: Option[software.amazon.awscdk.services.apigateway.PassthroughBehavior] = None,
timeout: Option[software.amazon.awscdk.Duration] = None,
connectionType: Option[software.amazon.awscdk.services.apigateway.ConnectionType] = None
): software.amazon.awscdk.services.apigateway.LambdaIntegration =
software.amazon.awscdk.services.apigateway.LambdaIntegration.Builder
.create(handler)
.requestParameters(requestParameters.map(_.asJava).orNull)
.credentialsPassthrough(credentialsPassthrough.map(Boolean.box).orNull)
.integrationResponses(integrationResponses.map(_.asJava).orNull)
.cacheKeyParameters(cacheKeyParameters.map(_.asJava).orNull)
.allowTestInvoke(allowTestInvoke.map(Boolean.box).orNull)
.requestTemplates(requestTemplates.map(_.asJava).orNull)
.cacheNamespace(cacheNamespace.orNull)
.credentialsRole(credentialsRole.orNull)
.proxy(proxy.map(Boolean.box).orNull)
.vpcLink(vpcLink.orNull)
.contentHandling(contentHandling.orNull)
.passthroughBehavior(passthroughBehavior.orNull)
.timeout(timeout.orNull)
.connectionType(connectionType.orNull)
.build()
}