com.pulumi.cloudflare.kotlin.inputs.LoadBalancerRuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin.inputs
import com.pulumi.cloudflare.inputs.LoadBalancerRuleArgs.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
*
* @property condition The statement to evaluate to determine if this rule's effects should be applied. An empty condition is always true. See [load balancing rules](https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules).
* @property disabled A disabled rule will not be executed.
* @property fixedResponse Settings for a HTTP response to return directly to the eyeball if the condition is true. Note: `overrides` or `fixed_response` must be set.
* @property name Human readable name for this rule.
* @property overrides The load balancer settings to alter if this rule's `condition` is true. Note: `overrides` or `fixed_response` must be set.
* @property priority Priority used when determining the order of rule execution. Lower values are executed first. If not provided, the list order will be used.
* @property terminates Terminates indicates that if this rule is true no further rules should be executed. Note: setting a `fixed_response` forces this field to `true`.
*/
public data class LoadBalancerRuleArgs(
public val condition: Output? = null,
public val disabled: Output? = null,
public val fixedResponse: Output? = null,
public val name: Output,
public val overrides: Output>? = null,
public val priority: Output? = null,
public val terminates: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.inputs.LoadBalancerRuleArgs =
com.pulumi.cloudflare.inputs.LoadBalancerRuleArgs.builder()
.condition(condition?.applyValue({ args0 -> args0 }))
.disabled(disabled?.applyValue({ args0 -> args0 }))
.fixedResponse(fixedResponse?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name.applyValue({ args0 -> args0 }))
.overrides(
overrides?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.priority(priority?.applyValue({ args0 -> args0 }))
.terminates(terminates?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [LoadBalancerRuleArgs].
*/
@PulumiTagMarker
public class LoadBalancerRuleArgsBuilder internal constructor() {
private var condition: Output? = null
private var disabled: Output? = null
private var fixedResponse: Output? = null
private var name: Output? = null
private var overrides: Output>? = null
private var priority: Output? = null
private var terminates: Output? = null
/**
* @param value The statement to evaluate to determine if this rule's effects should be applied. An empty condition is always true. See [load balancing rules](https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules).
*/
@JvmName("ttqxipolhpqvjnjn")
public suspend fun condition(`value`: Output) {
this.condition = value
}
/**
* @param value A disabled rule will not be executed.
*/
@JvmName("rxhsrenthxhayqfe")
public suspend fun disabled(`value`: Output) {
this.disabled = value
}
/**
* @param value Settings for a HTTP response to return directly to the eyeball if the condition is true. Note: `overrides` or `fixed_response` must be set.
*/
@JvmName("qrusmyednqwmkfkg")
public suspend fun fixedResponse(`value`: Output) {
this.fixedResponse = value
}
/**
* @param value Human readable name for this rule.
*/
@JvmName("mxxmdubmrbcccnrw")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The load balancer settings to alter if this rule's `condition` is true. Note: `overrides` or `fixed_response` must be set.
*/
@JvmName("xtfugdxgqvhqrulm")
public suspend fun overrides(`value`: Output>) {
this.overrides = value
}
@JvmName("hyhmxuqmxccfnaqs")
public suspend fun overrides(vararg values: Output) {
this.overrides = Output.all(values.asList())
}
/**
* @param values The load balancer settings to alter if this rule's `condition` is true. Note: `overrides` or `fixed_response` must be set.
*/
@JvmName("vqxwiwnkwkoadyox")
public suspend fun overrides(values: List