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

com.pulumi.azure.cdn.kotlin.inputs.FrontdoorFirewallPolicyManagedRuleArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.cdn.kotlin.inputs

import com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyManagedRuleArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property action The action to perform for all DRS rules when the managed rule is matched or when the anomaly score is 5 or greater depending on which version of the DRS you are using. Possible values include `Allow`, `Log`, `Block`, and `Redirect`.
 * @property exclusions One or more `exclusion` blocks as defined below.
 * @property overrides One or more `override` blocks as defined below.
 * @property type The name of the managed rule to use with this resource. Possible values include `DefaultRuleSet`, `Microsoft_DefaultRuleSet`, `BotProtection` or `Microsoft_BotManagerRuleSet`.
 * @property version The version of the managed rule to use with this resource. Possible values depends on which DRS type you are using, for the `DefaultRuleSet` type the possible values include `1.0` or `preview-0.1`. For `Microsoft_DefaultRuleSet` the possible values include `1.1`, `2.0` or `2.1`. For `BotProtection` the value must be `preview-0.1` and for `Microsoft_BotManagerRuleSet` the value must be `1.0`.
 */
public data class FrontdoorFirewallPolicyManagedRuleArgs(
    public val action: Output,
    public val exclusions: Output>? = null,
    public val overrides: Output>? = null,
    public val type: Output,
    public val version: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyManagedRuleArgs =
        com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyManagedRuleArgs.builder()
            .action(action.applyValue({ args0 -> args0 }))
            .exclusions(
                exclusions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .overrides(
                overrides?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .type(type.applyValue({ args0 -> args0 }))
            .version(version.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FrontdoorFirewallPolicyManagedRuleArgs].
 */
@PulumiTagMarker
public class FrontdoorFirewallPolicyManagedRuleArgsBuilder internal constructor() {
    private var action: Output? = null

    private var exclusions: Output>? = null

    private var overrides: Output>? = null

    private var type: Output? = null

    private var version: Output? = null

    /**
     * @param value The action to perform for all DRS rules when the managed rule is matched or when the anomaly score is 5 or greater depending on which version of the DRS you are using. Possible values include `Allow`, `Log`, `Block`, and `Redirect`.
     */
    @JvmName("vervtybpegswohan")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value One or more `exclusion` blocks as defined below.
     */
    @JvmName("yyivrnbnuqpnscft")
    public suspend fun exclusions(`value`: Output>) {
        this.exclusions = value
    }

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

    /**
     * @param values One or more `exclusion` blocks as defined below.
     */
    @JvmName("xmgthjkmsofffeei")
    public suspend fun exclusions(values: List>) {
        this.exclusions = Output.all(values)
    }

    /**
     * @param value One or more `override` blocks as defined below.
     */
    @JvmName("aegfoykxwuqyxiec")
    public suspend fun overrides(`value`: Output>) {
        this.overrides = value
    }

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

    /**
     * @param values One or more `override` blocks as defined below.
     */
    @JvmName("ethcixjtourpgjwc")
    public suspend fun overrides(values: List>) {
        this.overrides = Output.all(values)
    }

    /**
     * @param value The name of the managed rule to use with this resource. Possible values include `DefaultRuleSet`, `Microsoft_DefaultRuleSet`, `BotProtection` or `Microsoft_BotManagerRuleSet`.
     */
    @JvmName("kbvvlbeqkrcghoar")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The version of the managed rule to use with this resource. Possible values depends on which DRS type you are using, for the `DefaultRuleSet` type the possible values include `1.0` or `preview-0.1`. For `Microsoft_DefaultRuleSet` the possible values include `1.1`, `2.0` or `2.1`. For `BotProtection` the value must be `preview-0.1` and for `Microsoft_BotManagerRuleSet` the value must be `1.0`.
     */
    @JvmName("aypjweeyvqntcfao")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

    /**
     * @param value The action to perform for all DRS rules when the managed rule is matched or when the anomaly score is 5 or greater depending on which version of the DRS you are using. Possible values include `Allow`, `Log`, `Block`, and `Redirect`.
     */
    @JvmName("pwhkhmbfgipkbyrb")
    public suspend fun action(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value One or more `exclusion` blocks as defined below.
     */
    @JvmName("jfuetgprqhslqsrx")
    public suspend fun exclusions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.exclusions = mapped
    }

    /**
     * @param argument One or more `exclusion` blocks as defined below.
     */
    @JvmName("wyptjtymmhhvahvx")
    public suspend fun exclusions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FrontdoorFirewallPolicyManagedRuleExclusionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.exclusions = mapped
    }

    /**
     * @param argument One or more `exclusion` blocks as defined below.
     */
    @JvmName("qlqomeqqkehxfuqw")
    public suspend fun exclusions(vararg argument: suspend FrontdoorFirewallPolicyManagedRuleExclusionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FrontdoorFirewallPolicyManagedRuleExclusionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.exclusions = mapped
    }

    /**
     * @param argument One or more `exclusion` blocks as defined below.
     */
    @JvmName("eruirosxskuoecrk")
    public suspend fun exclusions(argument: suspend FrontdoorFirewallPolicyManagedRuleExclusionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            FrontdoorFirewallPolicyManagedRuleExclusionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.exclusions = mapped
    }

    /**
     * @param values One or more `exclusion` blocks as defined below.
     */
    @JvmName("vsjngwexkcbtqenn")
    public suspend fun exclusions(vararg values: FrontdoorFirewallPolicyManagedRuleExclusionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.exclusions = mapped
    }

    /**
     * @param value One or more `override` blocks as defined below.
     */
    @JvmName("nspeumhxbvcbsecy")
    public suspend fun overrides(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.overrides = mapped
    }

    /**
     * @param argument One or more `override` blocks as defined below.
     */
    @JvmName("nyoxrbrrccysthla")
    public suspend fun overrides(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FrontdoorFirewallPolicyManagedRuleOverrideArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.overrides = mapped
    }

    /**
     * @param argument One or more `override` blocks as defined below.
     */
    @JvmName("wnhgalniurjopxct")
    public suspend fun overrides(vararg argument: suspend FrontdoorFirewallPolicyManagedRuleOverrideArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FrontdoorFirewallPolicyManagedRuleOverrideArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.overrides = mapped
    }

    /**
     * @param argument One or more `override` blocks as defined below.
     */
    @JvmName("igfanhsxeierdsjq")
    public suspend fun overrides(argument: suspend FrontdoorFirewallPolicyManagedRuleOverrideArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            FrontdoorFirewallPolicyManagedRuleOverrideArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.overrides = mapped
    }

    /**
     * @param values One or more `override` blocks as defined below.
     */
    @JvmName("syccemgvojsefmrn")
    public suspend fun overrides(vararg values: FrontdoorFirewallPolicyManagedRuleOverrideArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.overrides = mapped
    }

    /**
     * @param value The name of the managed rule to use with this resource. Possible values include `DefaultRuleSet`, `Microsoft_DefaultRuleSet`, `BotProtection` or `Microsoft_BotManagerRuleSet`.
     */
    @JvmName("rarpkgrkcojrkjjt")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The version of the managed rule to use with this resource. Possible values depends on which DRS type you are using, for the `DefaultRuleSet` type the possible values include `1.0` or `preview-0.1`. For `Microsoft_DefaultRuleSet` the possible values include `1.1`, `2.0` or `2.1`. For `BotProtection` the value must be `preview-0.1` and for `Microsoft_BotManagerRuleSet` the value must be `1.0`.
     */
    @JvmName("rvmelvsqfxajxmsh")
    public suspend fun version(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.version = mapped
    }

    internal fun build(): FrontdoorFirewallPolicyManagedRuleArgs =
        FrontdoorFirewallPolicyManagedRuleArgs(
            action = action ?: throw PulumiNullFieldException("action"),
            exclusions = exclusions,
            overrides = overrides,
            type = type ?: throw PulumiNullFieldException("type"),
            version = version ?: throw PulumiNullFieldException("version"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy