io.burkard.cdk.services.apigateway.ApiKey.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 ApiKey {
def apply(
internalResourceId: String,
description: Option[String] = None,
generateDistinctId: Option[Boolean] = None,
enabled: Option[Boolean] = None,
customerId: Option[String] = None,
defaultCorsPreflightOptions: Option[software.amazon.awscdk.services.apigateway.CorsOptions] = None,
apiKeyName: Option[String] = None,
resources: Option[List[_ <: software.amazon.awscdk.services.apigateway.IRestApi]] = None,
defaultMethodOptions: Option[software.amazon.awscdk.services.apigateway.MethodOptions] = None,
value: Option[String] = None,
defaultIntegration: Option[software.amazon.awscdk.services.apigateway.Integration] = None
)(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.apigateway.ApiKey =
software.amazon.awscdk.services.apigateway.ApiKey.Builder
.create(stackCtx, internalResourceId)
.description(description.orNull)
.generateDistinctId(generateDistinctId.map(Boolean.box).orNull)
.enabled(enabled.map(Boolean.box).orNull)
.customerId(customerId.orNull)
.defaultCorsPreflightOptions(defaultCorsPreflightOptions.orNull)
.apiKeyName(apiKeyName.orNull)
.resources(resources.map(_.asJava).orNull)
.defaultMethodOptions(defaultMethodOptions.orNull)
.value(value.orNull)
.defaultIntegration(defaultIntegration.orNull)
.build()
}