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

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

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

import com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property action The action to be applied when the managed rule matches or when the anomaly score is 5 or greater. Possible values for DRS `1.1` and below are `Allow`, `Log`, `Block`, and `Redirect`. For DRS `2.0` and above the possible values are `Log` or `AnomalyScoring`.
 * ->**NOTE:** Please see the DRS [product documentation](https://learn.microsoft.com/azure/web-application-firewall/afds/waf-front-door-drs?tabs=drs20#anomaly-scoring-mode) for more information.
 * @property enabled Is the managed rule override enabled or disabled. Defaults to `false`
 * @property exclusions One or more `exclusion` blocks as defined below.
 * @property ruleId Identifier for the managed rule.
 */
public data class FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs(
    public val action: Output,
    public val enabled: Output? = null,
    public val exclusions: Output>? =
        null,
    public val ruleId: Output,
) :
    ConvertibleToJava {
    override fun toJava():
        com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs =
        com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs.builder()
            .action(action.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .exclusions(
                exclusions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .ruleId(ruleId.applyValue({ args0 -> args0 })).build()
}

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

    private var enabled: Output? = null

    private var exclusions: Output>? =
        null

    private var ruleId: Output? = null

    /**
     * @param value The action to be applied when the managed rule matches or when the anomaly score is 5 or greater. Possible values for DRS `1.1` and below are `Allow`, `Log`, `Block`, and `Redirect`. For DRS `2.0` and above the possible values are `Log` or `AnomalyScoring`.
     * ->**NOTE:** Please see the DRS [product documentation](https://learn.microsoft.com/azure/web-application-firewall/afds/waf-front-door-drs?tabs=drs20#anomaly-scoring-mode) for more information.
     */
    @JvmName("ugbiwkqxsldqkvlw")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value Is the managed rule override enabled or disabled. Defaults to `false`
     */
    @JvmName("qojfknrpbxigeepx")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

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

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

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

    /**
     * @param value Identifier for the managed rule.
     */
    @JvmName("aewkinvhvshfseyn")
    public suspend fun ruleId(`value`: Output) {
        this.ruleId = value
    }

    /**
     * @param value The action to be applied when the managed rule matches or when the anomaly score is 5 or greater. Possible values for DRS `1.1` and below are `Allow`, `Log`, `Block`, and `Redirect`. For DRS `2.0` and above the possible values are `Log` or `AnomalyScoring`.
     * ->**NOTE:** Please see the DRS [product documentation](https://learn.microsoft.com/azure/web-application-firewall/afds/waf-front-door-drs?tabs=drs20#anomaly-scoring-mode) for more information.
     */
    @JvmName("evajiqbnkrqfdmlt")
    public suspend fun action(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value Is the managed rule override enabled or disabled. Defaults to `false`
     */
    @JvmName("owgduuyenrackqnu")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value One or more `exclusion` blocks as defined below.
     */
    @JvmName("ciwjkoebkmhdcwly")
    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("ebanucfudwwirhoc")
    public suspend
    fun exclusions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FrontdoorFirewallPolicyManagedRuleOverrideRuleExclusionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.exclusions = mapped
    }

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

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

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

    /**
     * @param value Identifier for the managed rule.
     */
    @JvmName("mdkpqtnnwuaqcmwm")
    public suspend fun ruleId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ruleId = mapped
    }

    internal fun build(): FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs =
        FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs(
            action = action ?: throw PulumiNullFieldException("action"),
            enabled = enabled,
            exclusions = exclusions,
            ruleId = ruleId ?: throw PulumiNullFieldException("ruleId"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy