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

com.pulumi.awsnative.wafv2.kotlin.WebAclArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.wafv2.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.wafv2.WebAclArgs.builder
import com.pulumi.awsnative.wafv2.kotlin.enums.WebAclScope
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclAssociationConfigArgs
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclAssociationConfigArgsBuilder
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclCaptchaConfigArgs
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclCaptchaConfigArgsBuilder
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclChallengeConfigArgs
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclChallengeConfigArgsBuilder
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclCustomResponseBodyArgs
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclCustomResponseBodyArgsBuilder
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclDefaultActionArgs
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclDefaultActionArgsBuilder
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclRuleArgs
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclRuleArgsBuilder
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclVisibilityConfigArgs
import com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclVisibilityConfigArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Contains the Rules that identify the requests that you want to allow, block, or count. In a WebACL, you also specify a default action (ALLOW or BLOCK), and the action for each Rule that you add to a WebACL, for example, block requests from specified IP addresses or block requests from specified referrers. You also associate the WebACL with a CloudFront distribution to identify the requests that you want AWS WAF to filter. If you add more than one Rule to a WebACL, a request needs to match only one of the specifications to be allowed, blocked, or counted.
 * @property associationConfig Specifies custom configurations for the associations between the web ACL and protected resources.
 * Use this to customize the maximum size of the request body that your protected resources forward to AWS WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes).
 * > You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see [AWS WAF Pricing](https://docs.aws.amazon.com/waf/pricing/) .
 * For Application Load Balancer and AWS AppSync , the limit is fixed at 8 KB (8,192 bytes).
 * @property captchaConfig Specifies how AWS WAF should handle `CAPTCHA` evaluations for rules that don't have their own `CaptchaConfig` settings. If you don't specify this, AWS WAF uses its default settings for `CaptchaConfig` .
 * @property challengeConfig Specifies how AWS WAF should handle challenge evaluations for rules that don't have their own `ChallengeConfig` settings. If you don't specify this, AWS WAF uses its default settings for `ChallengeConfig` .
 * @property customResponseBodies A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.
 * For information about customizing web requests and responses, see [Customizing web requests and responses in AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) in the *AWS WAF Developer Guide* .
 * For information about the limits on count and size for custom request and response settings, see [AWS WAF quotas](https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in the *AWS WAF Developer Guide* .
 * @property defaultAction The action to perform if none of the `Rules` contained in the `WebACL` match.
 * @property description A description of the web ACL that helps with identification.
 * @property name The name of the web ACL. You cannot change the name of a web ACL after you create it.
 * @property rules Collection of Rules.
 * @property scope Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` .
 * > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .
 * For information about how to define the association of the web ACL with your resource, see `WebACLAssociation` .
 * @property tags Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
 * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
 * @property tokenDomains Specifies the domains that AWS WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
 * @property visibilityConfig Defines and enables Amazon CloudWatch metrics and web request sample collection.
 */
public data class WebAclArgs(
    public val associationConfig: Output? = null,
    public val captchaConfig: Output? = null,
    public val challengeConfig: Output? = null,
    public val customResponseBodies: Output>? = null,
    public val defaultAction: Output? = null,
    public val description: Output? = null,
    public val name: Output? = null,
    public val rules: Output>? = null,
    public val scope: Output? = null,
    public val tags: Output>? = null,
    public val tokenDomains: Output>? = null,
    public val visibilityConfig: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.wafv2.WebAclArgs =
        com.pulumi.awsnative.wafv2.WebAclArgs.builder()
            .associationConfig(associationConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .captchaConfig(captchaConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .challengeConfig(challengeConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .customResponseBodies(
                customResponseBodies?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .defaultAction(defaultAction?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .rules(rules?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .scope(scope?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .tokenDomains(tokenDomains?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .visibilityConfig(
                visibilityConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [WebAclArgs].
 */
@PulumiTagMarker
public class WebAclArgsBuilder internal constructor() {
    private var associationConfig: Output? = null

    private var captchaConfig: Output? = null

    private var challengeConfig: Output? = null

    private var customResponseBodies: Output>? = null

    private var defaultAction: Output? = null

    private var description: Output? = null

    private var name: Output? = null

    private var rules: Output>? = null

    private var scope: Output? = null

    private var tags: Output>? = null

    private var tokenDomains: Output>? = null

    private var visibilityConfig: Output? = null

    /**
     * @param value Specifies custom configurations for the associations between the web ACL and protected resources.
     * Use this to customize the maximum size of the request body that your protected resources forward to AWS WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes).
     * > You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see [AWS WAF Pricing](https://docs.aws.amazon.com/waf/pricing/) .
     * For Application Load Balancer and AWS AppSync , the limit is fixed at 8 KB (8,192 bytes).
     */
    @JvmName("pueslfkvlhqrgurs")
    public suspend fun associationConfig(`value`: Output) {
        this.associationConfig = value
    }

    /**
     * @param value Specifies how AWS WAF should handle `CAPTCHA` evaluations for rules that don't have their own `CaptchaConfig` settings. If you don't specify this, AWS WAF uses its default settings for `CaptchaConfig` .
     */
    @JvmName("aaleryxeunrytnrl")
    public suspend fun captchaConfig(`value`: Output) {
        this.captchaConfig = value
    }

    /**
     * @param value Specifies how AWS WAF should handle challenge evaluations for rules that don't have their own `ChallengeConfig` settings. If you don't specify this, AWS WAF uses its default settings for `ChallengeConfig` .
     */
    @JvmName("wnpowvlyiwclwdsh")
    public suspend fun challengeConfig(`value`: Output) {
        this.challengeConfig = value
    }

    /**
     * @param value A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.
     * For information about customizing web requests and responses, see [Customizing web requests and responses in AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) in the *AWS WAF Developer Guide* .
     * For information about the limits on count and size for custom request and response settings, see [AWS WAF quotas](https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in the *AWS WAF Developer Guide* .
     */
    @JvmName("bvqbnqnaaqfavutq")
    public suspend fun customResponseBodies(`value`: Output>) {
        this.customResponseBodies = value
    }

    /**
     * @param value The action to perform if none of the `Rules` contained in the `WebACL` match.
     */
    @JvmName("gpehfwwjjkkrqrcb")
    public suspend fun defaultAction(`value`: Output) {
        this.defaultAction = value
    }

    /**
     * @param value A description of the web ACL that helps with identification.
     */
    @JvmName("ylwpqkqxbiawjfab")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The name of the web ACL. You cannot change the name of a web ACL after you create it.
     */
    @JvmName("vtoljreloovpdpnd")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Collection of Rules.
     */
    @JvmName("tyvgxmgyeruwruyx")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

    @JvmName("rnifsghjtiadrpjj")
    public suspend fun rules(vararg values: Output) {
        this.rules = Output.all(values.asList())
    }

    /**
     * @param values Collection of Rules.
     */
    @JvmName("clgnisyomvbhlenv")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` .
     * > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .
     * For information about how to define the association of the web ACL with your resource, see `WebACLAssociation` .
     */
    @JvmName("wfaittdbdhwabnyw")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("bmkgerollskccxuw")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("iaovwirwpwgiigfu")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("asaaklxerecqgflc")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Specifies the domains that AWS WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
     */
    @JvmName("vpkiryjlydolbbjb")
    public suspend fun tokenDomains(`value`: Output>) {
        this.tokenDomains = value
    }

    @JvmName("hyqedfmkeqfnyxvi")
    public suspend fun tokenDomains(vararg values: Output) {
        this.tokenDomains = Output.all(values.asList())
    }

    /**
     * @param values Specifies the domains that AWS WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
     */
    @JvmName("xxdalcemjpkebshj")
    public suspend fun tokenDomains(values: List>) {
        this.tokenDomains = Output.all(values)
    }

    /**
     * @param value Defines and enables Amazon CloudWatch metrics and web request sample collection.
     */
    @JvmName("bnitjihtifbmscxk")
    public suspend fun visibilityConfig(`value`: Output) {
        this.visibilityConfig = value
    }

    /**
     * @param value Specifies custom configurations for the associations between the web ACL and protected resources.
     * Use this to customize the maximum size of the request body that your protected resources forward to AWS WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes).
     * > You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see [AWS WAF Pricing](https://docs.aws.amazon.com/waf/pricing/) .
     * For Application Load Balancer and AWS AppSync , the limit is fixed at 8 KB (8,192 bytes).
     */
    @JvmName("cnwrikymsyidvxwa")
    public suspend fun associationConfig(`value`: WebAclAssociationConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.associationConfig = mapped
    }

    /**
     * @param argument Specifies custom configurations for the associations between the web ACL and protected resources.
     * Use this to customize the maximum size of the request body that your protected resources forward to AWS WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes).
     * > You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see [AWS WAF Pricing](https://docs.aws.amazon.com/waf/pricing/) .
     * For Application Load Balancer and AWS AppSync , the limit is fixed at 8 KB (8,192 bytes).
     */
    @JvmName("yfwnfnyicnrcaiji")
    public suspend fun associationConfig(argument: suspend WebAclAssociationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WebAclAssociationConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.associationConfig = mapped
    }

    /**
     * @param value Specifies how AWS WAF should handle `CAPTCHA` evaluations for rules that don't have their own `CaptchaConfig` settings. If you don't specify this, AWS WAF uses its default settings for `CaptchaConfig` .
     */
    @JvmName("exvlrbcwnetumnjv")
    public suspend fun captchaConfig(`value`: WebAclCaptchaConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.captchaConfig = mapped
    }

    /**
     * @param argument Specifies how AWS WAF should handle `CAPTCHA` evaluations for rules that don't have their own `CaptchaConfig` settings. If you don't specify this, AWS WAF uses its default settings for `CaptchaConfig` .
     */
    @JvmName("qhbdxkumxdpfttqo")
    public suspend fun captchaConfig(argument: suspend WebAclCaptchaConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WebAclCaptchaConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.captchaConfig = mapped
    }

    /**
     * @param value Specifies how AWS WAF should handle challenge evaluations for rules that don't have their own `ChallengeConfig` settings. If you don't specify this, AWS WAF uses its default settings for `ChallengeConfig` .
     */
    @JvmName("lxjxbjtjkhuevadl")
    public suspend fun challengeConfig(`value`: WebAclChallengeConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.challengeConfig = mapped
    }

    /**
     * @param argument Specifies how AWS WAF should handle challenge evaluations for rules that don't have their own `ChallengeConfig` settings. If you don't specify this, AWS WAF uses its default settings for `ChallengeConfig` .
     */
    @JvmName("dljkehnvqtdudcfy")
    public suspend fun challengeConfig(argument: suspend WebAclChallengeConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WebAclChallengeConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.challengeConfig = mapped
    }

    /**
     * @param value A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.
     * For information about customizing web requests and responses, see [Customizing web requests and responses in AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) in the *AWS WAF Developer Guide* .
     * For information about the limits on count and size for custom request and response settings, see [AWS WAF quotas](https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in the *AWS WAF Developer Guide* .
     */
    @JvmName("xiipqamhhxvthffo")
    public suspend fun customResponseBodies(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customResponseBodies = mapped
    }

    /**
     * @param argument A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.
     * For information about customizing web requests and responses, see [Customizing web requests and responses in AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) in the *AWS WAF Developer Guide* .
     * For information about the limits on count and size for custom request and response settings, see [AWS WAF quotas](https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in the *AWS WAF Developer Guide* .
     */
    @JvmName("derwfwtdspaitoxw")
    public suspend fun customResponseBodies(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                WebAclCustomResponseBodyArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.customResponseBodies = mapped
    }

    /**
     * @param values A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.
     * For information about customizing web requests and responses, see [Customizing web requests and responses in AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) in the *AWS WAF Developer Guide* .
     * For information about the limits on count and size for custom request and response settings, see [AWS WAF quotas](https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in the *AWS WAF Developer Guide* .
     */
    @JvmName("snniwsdgdshasmoi")
    public fun customResponseBodies(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customResponseBodies = mapped
    }

    /**
     * @param value The action to perform if none of the `Rules` contained in the `WebACL` match.
     */
    @JvmName("mayqhvjmawrejjbd")
    public suspend fun defaultAction(`value`: WebAclDefaultActionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

    /**
     * @param argument The action to perform if none of the `Rules` contained in the `WebACL` match.
     */
    @JvmName("usikuokcclwjemcl")
    public suspend fun defaultAction(argument: suspend WebAclDefaultActionArgsBuilder.() -> Unit) {
        val toBeMapped = WebAclDefaultActionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.defaultAction = mapped
    }

    /**
     * @param value A description of the web ACL that helps with identification.
     */
    @JvmName("lcbibejimhpwjmjx")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The name of the web ACL. You cannot change the name of a web ACL after you create it.
     */
    @JvmName("eowaavxqdydjhukj")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Collection of Rules.
     */
    @JvmName("dhbmrworghastdnm")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument Collection of Rules.
     */
    @JvmName("yjdfknndeiieflrj")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map { WebAclRuleArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Collection of Rules.
     */
    @JvmName("ajhtbgheumawebfc")
    public suspend fun rules(vararg argument: suspend WebAclRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { WebAclRuleArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Collection of Rules.
     */
    @JvmName("qoscetomcdrlaohx")
    public suspend fun rules(argument: suspend WebAclRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(WebAclRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values Collection of Rules.
     */
    @JvmName("wvupjlkfgjdgfdvn")
    public suspend fun rules(vararg values: WebAclRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param value Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` .
     * > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .
     * For information about how to define the association of the web ACL with your resource, see `WebACLAssociation` .
     */
    @JvmName("lckghjmkrsqsrjmg")
    public suspend fun scope(`value`: WebAclScope?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param value Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("cvbjnsxuqahqwclr")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("tspqnmdgfvkiivri")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("hqttgwmwamjewdax")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("rlpvprfbrsyfifqh")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("rpgufaeplhatkpxl")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specifies the domains that AWS WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
     */
    @JvmName("ftgabgapbtxhgsff")
    public suspend fun tokenDomains(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenDomains = mapped
    }

    /**
     * @param values Specifies the domains that AWS WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
     */
    @JvmName("udvotrifwjrbhaib")
    public suspend fun tokenDomains(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tokenDomains = mapped
    }

    /**
     * @param value Defines and enables Amazon CloudWatch metrics and web request sample collection.
     */
    @JvmName("eghxrlmgjoqixcui")
    public suspend fun visibilityConfig(`value`: WebAclVisibilityConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.visibilityConfig = mapped
    }

    /**
     * @param argument Defines and enables Amazon CloudWatch metrics and web request sample collection.
     */
    @JvmName("rqflgxmgcoxwaeff")
    public suspend fun visibilityConfig(argument: suspend WebAclVisibilityConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WebAclVisibilityConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.visibilityConfig = mapped
    }

    internal fun build(): WebAclArgs = WebAclArgs(
        associationConfig = associationConfig,
        captchaConfig = captchaConfig,
        challengeConfig = challengeConfig,
        customResponseBodies = customResponseBodies,
        defaultAction = defaultAction,
        description = description,
        name = name,
        rules = rules,
        scope = scope,
        tags = tags,
        tokenDomains = tokenDomains,
        visibilityConfig = visibilityConfig,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy