com.pulumi.alicloud.alb.kotlin.RuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-alicloud-kotlin Show documentation
Show all versions of pulumi-alicloud-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.alicloud.alb.kotlin
import com.pulumi.alicloud.alb.RuleArgs.builder
import com.pulumi.alicloud.alb.kotlin.inputs.RuleRuleActionArgs
import com.pulumi.alicloud.alb.kotlin.inputs.RuleRuleActionArgsBuilder
import com.pulumi.alicloud.alb.kotlin.inputs.RuleRuleConditionArgs
import com.pulumi.alicloud.alb.kotlin.inputs.RuleRuleConditionArgsBuilder
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.collections.List
import kotlin.jvm.JvmName
/**
* Provides a Application Load Balancer (ALB) Rule resource.
* For information about Application Load Balancer (ALB) Rule and how to use it, see [What is Rule](https://www.alibabacloud.com/help/en/slb/application-load-balancer/developer-reference/api-alb-2020-06-16-createrule).
* > **NOTE:** Available since v1.133.0.
* > **NOTE:** This version only supports forwarding rules in the request direction.
* ## Import
* Application Load Balancer (ALB) Rule can be imported using the id, e.g.
* ```sh
* $ pulumi import alicloud:alb/rule:Rule example
* ```
* @property direction The direction to which the forwarding rule is applied. Default value: `Request`. Valid values:
* - `Request`: The forwarding rule is applied to the client requests received by ALB.
* - `Response`: The forwarding rule is applied to the responses returned by backend servers.
* @property dryRun Specifies whether to precheck this request.
* @property listenerId The ID of the listener to which the forwarding rule belongs.
* @property priority The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. **Note*:* The priority of each rule within the same listener must be unique.
* @property ruleActions The actions of the forwarding rules. See `rule_actions` below.
* @property ruleConditions The conditions of the forwarding rule. See `rule_conditions` below.
* @property ruleName The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
*/
public data class RuleArgs(
public val direction: Output? = null,
public val dryRun: Output? = null,
public val listenerId: Output? = null,
public val priority: Output? = null,
public val ruleActions: Output>? = null,
public val ruleConditions: Output>? = null,
public val ruleName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.alicloud.alb.RuleArgs =
com.pulumi.alicloud.alb.RuleArgs.builder()
.direction(direction?.applyValue({ args0 -> args0 }))
.dryRun(dryRun?.applyValue({ args0 -> args0 }))
.listenerId(listenerId?.applyValue({ args0 -> args0 }))
.priority(priority?.applyValue({ args0 -> args0 }))
.ruleActions(
ruleActions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.ruleConditions(
ruleConditions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.ruleName(ruleName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RuleArgs].
*/
@PulumiTagMarker
public class RuleArgsBuilder internal constructor() {
private var direction: Output? = null
private var dryRun: Output? = null
private var listenerId: Output? = null
private var priority: Output? = null
private var ruleActions: Output>? = null
private var ruleConditions: Output>? = null
private var ruleName: Output? = null
/**
* @param value The direction to which the forwarding rule is applied. Default value: `Request`. Valid values:
* - `Request`: The forwarding rule is applied to the client requests received by ALB.
* - `Response`: The forwarding rule is applied to the responses returned by backend servers.
*/
@JvmName("aapfeovqihripcch")
public suspend fun direction(`value`: Output) {
this.direction = value
}
/**
* @param value Specifies whether to precheck this request.
*/
@JvmName("dvglaimuqgtankqp")
public suspend fun dryRun(`value`: Output) {
this.dryRun = value
}
/**
* @param value The ID of the listener to which the forwarding rule belongs.
*/
@JvmName("lhfkwbwyyqolqspw")
public suspend fun listenerId(`value`: Output) {
this.listenerId = value
}
/**
* @param value The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. **Note*:* The priority of each rule within the same listener must be unique.
*/
@JvmName("docijeeycjevjwgm")
public suspend fun priority(`value`: Output) {
this.priority = value
}
/**
* @param value The actions of the forwarding rules. See `rule_actions` below.
*/
@JvmName("gubwipryoarjpmbp")
public suspend fun ruleActions(`value`: Output>) {
this.ruleActions = value
}
@JvmName("ptlnrwrigoekssie")
public suspend fun ruleActions(vararg values: Output) {
this.ruleActions = Output.all(values.asList())
}
/**
* @param values The actions of the forwarding rules. See `rule_actions` below.
*/
@JvmName("ekyruksreyhlbubh")
public suspend fun ruleActions(values: List