Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin.inputs
import com.pulumi.azurenative.network.inputs.PolicySettingsArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.WebApplicationFirewallEnabledState
import com.pulumi.azurenative.network.kotlin.enums.WebApplicationFirewallMode
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.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Defines contents of a web application firewall global configuration.
* @property customBlockResponseBody If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
* @property customBlockResponseStatusCode If the action type is block, customer can override the response status code.
* @property fileUploadEnforcement Whether allow WAF to enforce file upload limits.
* @property fileUploadLimitInMb Maximum file upload size in Mb for WAF.
* @property logScrubbing To scrub sensitive log fields
* @property maxRequestBodySizeInKb Maximum request body size in Kb for WAF.
* @property mode The mode of the policy.
* @property requestBodyCheck Whether to allow WAF to check request Body.
* @property requestBodyEnforcement Whether allow WAF to enforce request body limits.
* @property requestBodyInspectLimitInKB Max inspection limit in KB for request body inspection for WAF.
* @property state The state of the policy.
*/
public data class PolicySettingsArgs(
public val customBlockResponseBody: Output? = null,
public val customBlockResponseStatusCode: Output? = null,
public val fileUploadEnforcement: Output? = null,
public val fileUploadLimitInMb: Output? = null,
public val logScrubbing: Output? = null,
public val maxRequestBodySizeInKb: Output? = null,
public val mode: Output>? = null,
public val requestBodyCheck: Output? = null,
public val requestBodyEnforcement: Output? = null,
public val requestBodyInspectLimitInKB: Output? = null,
public val state: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.inputs.PolicySettingsArgs =
com.pulumi.azurenative.network.inputs.PolicySettingsArgs.builder()
.customBlockResponseBody(customBlockResponseBody?.applyValue({ args0 -> args0 }))
.customBlockResponseStatusCode(customBlockResponseStatusCode?.applyValue({ args0 -> args0 }))
.fileUploadEnforcement(fileUploadEnforcement?.applyValue({ args0 -> args0 }))
.fileUploadLimitInMb(fileUploadLimitInMb?.applyValue({ args0 -> args0 }))
.logScrubbing(logScrubbing?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.maxRequestBodySizeInKb(maxRequestBodySizeInKb?.applyValue({ args0 -> args0 }))
.mode(
mode?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.requestBodyCheck(requestBodyCheck?.applyValue({ args0 -> args0 }))
.requestBodyEnforcement(requestBodyEnforcement?.applyValue({ args0 -> args0 }))
.requestBodyInspectLimitInKB(requestBodyInspectLimitInKB?.applyValue({ args0 -> args0 }))
.state(
state?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [PolicySettingsArgs].
*/
@PulumiTagMarker
public class PolicySettingsArgsBuilder internal constructor() {
private var customBlockResponseBody: Output? = null
private var customBlockResponseStatusCode: Output? = null
private var fileUploadEnforcement: Output? = null
private var fileUploadLimitInMb: Output? = null
private var logScrubbing: Output? = null
private var maxRequestBodySizeInKb: Output? = null
private var mode: Output>? = null
private var requestBodyCheck: Output? = null
private var requestBodyEnforcement: Output? = null
private var requestBodyInspectLimitInKB: Output? = null
private var state: Output>? = null
/**
* @param value If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
*/
@JvmName("xjyfftusroecnbtu")
public suspend fun customBlockResponseBody(`value`: Output) {
this.customBlockResponseBody = value
}
/**
* @param value If the action type is block, customer can override the response status code.
*/
@JvmName("pdutdbeirvycjhdu")
public suspend fun customBlockResponseStatusCode(`value`: Output) {
this.customBlockResponseStatusCode = value
}
/**
* @param value Whether allow WAF to enforce file upload limits.
*/
@JvmName("lkdwtoqkbquqwnrw")
public suspend fun fileUploadEnforcement(`value`: Output) {
this.fileUploadEnforcement = value
}
/**
* @param value Maximum file upload size in Mb for WAF.
*/
@JvmName("vdqlakagenybqaln")
public suspend fun fileUploadLimitInMb(`value`: Output) {
this.fileUploadLimitInMb = value
}
/**
* @param value To scrub sensitive log fields
*/
@JvmName("dwrqeoeenliqsblh")
public suspend fun logScrubbing(`value`: Output) {
this.logScrubbing = value
}
/**
* @param value Maximum request body size in Kb for WAF.
*/
@JvmName("gdakuobvwmqutmab")
public suspend fun maxRequestBodySizeInKb(`value`: Output) {
this.maxRequestBodySizeInKb = value
}
/**
* @param value The mode of the policy.
*/
@JvmName("nahnmsxkoospegst")
public suspend fun mode(`value`: Output>) {
this.mode = value
}
/**
* @param value Whether to allow WAF to check request Body.
*/
@JvmName("teacxvigqepvvuuv")
public suspend fun requestBodyCheck(`value`: Output) {
this.requestBodyCheck = value
}
/**
* @param value Whether allow WAF to enforce request body limits.
*/
@JvmName("cxnjecriewbxndbv")
public suspend fun requestBodyEnforcement(`value`: Output) {
this.requestBodyEnforcement = value
}
/**
* @param value Max inspection limit in KB for request body inspection for WAF.
*/
@JvmName("rfnskifhnqgixjgk")
public suspend fun requestBodyInspectLimitInKB(`value`: Output) {
this.requestBodyInspectLimitInKB = value
}
/**
* @param value The state of the policy.
*/
@JvmName("xedgfqmlwbxxmrmr")
public suspend fun state(`value`: Output>) {
this.state = value
}
/**
* @param value If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
*/
@JvmName("wkcyeyfomwhnloco")
public suspend fun customBlockResponseBody(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.customBlockResponseBody = mapped
}
/**
* @param value If the action type is block, customer can override the response status code.
*/
@JvmName("cmtqkrtyeotpuxgo")
public suspend fun customBlockResponseStatusCode(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.customBlockResponseStatusCode = mapped
}
/**
* @param value Whether allow WAF to enforce file upload limits.
*/
@JvmName("jheclnjukwppvunt")
public suspend fun fileUploadEnforcement(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.fileUploadEnforcement = mapped
}
/**
* @param value Maximum file upload size in Mb for WAF.
*/
@JvmName("tipsdycgexcnibpo")
public suspend fun fileUploadLimitInMb(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.fileUploadLimitInMb = mapped
}
/**
* @param value To scrub sensitive log fields
*/
@JvmName("hxmfpvqintnxbsbp")
public suspend fun logScrubbing(`value`: PolicySettingsLogScrubbingArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.logScrubbing = mapped
}
/**
* @param argument To scrub sensitive log fields
*/
@JvmName("lrxxiuobeovcrgaa")
public suspend fun logScrubbing(argument: suspend PolicySettingsLogScrubbingArgsBuilder.() -> Unit) {
val toBeMapped = PolicySettingsLogScrubbingArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.logScrubbing = mapped
}
/**
* @param value Maximum request body size in Kb for WAF.
*/
@JvmName("esliqmhfnndfjvwt")
public suspend fun maxRequestBodySizeInKb(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.maxRequestBodySizeInKb = mapped
}
/**
* @param value The mode of the policy.
*/
@JvmName("ygqiladfmxbddyut")
public suspend fun mode(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.mode = mapped
}
/**
* @param value The mode of the policy.
*/
@JvmName("pprfkitnlvkykfxy")
public fun mode(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.mode = mapped
}
/**
* @param value The mode of the policy.
*/
@JvmName("vbcbhybcntsiaeoh")
public fun mode(`value`: WebApplicationFirewallMode) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.mode = mapped
}
/**
* @param value Whether to allow WAF to check request Body.
*/
@JvmName("ardqevnxwnybavuj")
public suspend fun requestBodyCheck(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.requestBodyCheck = mapped
}
/**
* @param value Whether allow WAF to enforce request body limits.
*/
@JvmName("dramcrxfwrkiipxu")
public suspend fun requestBodyEnforcement(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.requestBodyEnforcement = mapped
}
/**
* @param value Max inspection limit in KB for request body inspection for WAF.
*/
@JvmName("rqeruqodlpjnjlrg")
public suspend fun requestBodyInspectLimitInKB(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.requestBodyInspectLimitInKB = mapped
}
/**
* @param value The state of the policy.
*/
@JvmName("pkihvrganwevrlca")
public suspend fun state(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value The state of the policy.
*/
@JvmName("edtmjuyllsmhfsdh")
public fun state(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value The state of the policy.
*/
@JvmName("byhniiafssidfvgu")
public fun state(`value`: WebApplicationFirewallEnabledState) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
internal fun build(): PolicySettingsArgs = PolicySettingsArgs(
customBlockResponseBody = customBlockResponseBody,
customBlockResponseStatusCode = customBlockResponseStatusCode,
fileUploadEnforcement = fileUploadEnforcement,
fileUploadLimitInMb = fileUploadLimitInMb,
logScrubbing = logScrubbing,
maxRequestBodySizeInKb = maxRequestBodySizeInKb,
mode = mode,
requestBodyCheck = requestBodyCheck,
requestBodyEnforcement = requestBodyEnforcement,
requestBodyInspectLimitInKB = requestBodyInspectLimitInKB,
state = state,
)
}