![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.cdn.kotlin.inputs.CustomRuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.cdn.kotlin.inputs
import com.pulumi.azurenative.cdn.inputs.CustomRuleArgs.builder
import com.pulumi.azurenative.cdn.kotlin.enums.ActionType
import com.pulumi.azurenative.cdn.kotlin.enums.CustomRuleEnabledState
import com.pulumi.core.Either
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Defines the common attributes for a custom rule that can be included in a waf policy
* @property action Describes what action to be applied when rule matches
* @property enabledState Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.
* @property matchConditions List of match conditions.
* @property name Defines the name of the custom rule
* @property priority Defines in what order this rule be evaluated in the overall list of custom rules
*/
public data class CustomRuleArgs(
public val action: Output>,
public val enabledState: Output>? = null,
public val matchConditions: Output>,
public val name: Output,
public val priority: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.cdn.inputs.CustomRuleArgs =
com.pulumi.azurenative.cdn.inputs.CustomRuleArgs.builder()
.action(
action.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.enabledState(
enabledState?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.matchConditions(
matchConditions.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.name(name.applyValue({ args0 -> args0 }))
.priority(priority.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [CustomRuleArgs].
*/
@PulumiTagMarker
public class CustomRuleArgsBuilder internal constructor() {
private var action: Output>? = null
private var enabledState: Output>? = null
private var matchConditions: Output>? = null
private var name: Output? = null
private var priority: Output? = null
/**
* @param value Describes what action to be applied when rule matches
*/
@JvmName("tvnwbdbmreexwlor")
public suspend fun action(`value`: Output>) {
this.action = value
}
/**
* @param value Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.
*/
@JvmName("mwqjdwvpmplhtats")
public suspend fun enabledState(`value`: Output>) {
this.enabledState = value
}
/**
* @param value List of match conditions.
*/
@JvmName("fdjynwflfcssdvty")
public suspend fun matchConditions(`value`: Output>) {
this.matchConditions = value
}
@JvmName("tgtmtxewrnpthkaf")
public suspend fun matchConditions(vararg values: Output) {
this.matchConditions = Output.all(values.asList())
}
/**
* @param values List of match conditions.
*/
@JvmName("qidiqsmwyshcxlhq")
public suspend fun matchConditions(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy