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

com.pulumi.azure.frontdoor.kotlin.inputs.FirewallPolicyManagedRuleOverrideRuleArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.frontdoor.kotlin.inputs

import com.pulumi.azure.frontdoor.inputs.FirewallPolicyManagedRuleOverrideRuleArgs.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 rule matches. Possible values are `Allow`, `Block`, `Log`, or `Redirect`.
 * @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 FirewallPolicyManagedRuleOverrideRuleArgs(
    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.frontdoor.inputs.FirewallPolicyManagedRuleOverrideRuleArgs =
        com.pulumi.azure.frontdoor.inputs.FirewallPolicyManagedRuleOverrideRuleArgs.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 [FirewallPolicyManagedRuleOverrideRuleArgs].
 */
@PulumiTagMarker
public class FirewallPolicyManagedRuleOverrideRuleArgsBuilder 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 rule matches. Possible values are `Allow`, `Block`, `Log`, or `Redirect`.
     */
    @JvmName("nehwsnlvvoecmfqv")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

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

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

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

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

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

    /**
     * @param value The action to be applied when the rule matches. Possible values are `Allow`, `Block`, `Log`, or `Redirect`.
     */
    @JvmName("cinyersnudyofuxn")
    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("tbbwayeabtcrapca")
    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("lkstcirgtopeqxpg")
    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("btjaecrxjicftdhu")
    public suspend
    fun exclusions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FirewallPolicyManagedRuleOverrideRuleExclusionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.exclusions = mapped
    }

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy