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

com.pulumi.awsnative.route53recoverycontrol.kotlin.inputs.SafetyRuleGatingRuleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.route53recoverycontrol.kotlin.inputs

import com.pulumi.awsnative.route53recoverycontrol.inputs.SafetyRuleGatingRuleArgs.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 kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A gating rule verifies that a set of gating controls evaluates as true, based on a rule configuration that you specify. If the gating rule evaluates to true, Amazon Route 53 Application Recovery Controller allows a set of routing control state changes to run and complete against the set of target controls.
 * @property gatingControls The gating controls for the gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
 * @property targetControls Routing controls that can only be set or unset if the specified RuleConfig evaluates to true for the specified GatingControls. For example, say you have three gating controls, one for each of three AWS Regions. Now you specify AtLeast 2 as your RuleConfig. With these settings, you can only change (set or unset) the routing controls that you have specified as TargetControls if that rule evaluates to true.
 * In other words, your ability to change the routing controls that you have specified as TargetControls is gated by the rule that you set for the routing controls in GatingControls.
 * @property waitPeriodMs An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent "flapping" of state. The wait period is 5000 ms by default, but you can choose a custom value.
 */
public data class SafetyRuleGatingRuleArgs(
    public val gatingControls: Output>,
    public val targetControls: Output>,
    public val waitPeriodMs: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.route53recoverycontrol.inputs.SafetyRuleGatingRuleArgs = com.pulumi.awsnative.route53recoverycontrol.inputs.SafetyRuleGatingRuleArgs.builder()
        .gatingControls(gatingControls.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .targetControls(targetControls.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .waitPeriodMs(waitPeriodMs.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SafetyRuleGatingRuleArgs].
 */
@PulumiTagMarker
public class SafetyRuleGatingRuleArgsBuilder internal constructor() {
    private var gatingControls: Output>? = null

    private var targetControls: Output>? = null

    private var waitPeriodMs: Output? = null

    /**
     * @param value The gating controls for the gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
     */
    @JvmName("xxlchgigxectouyo")
    public suspend fun gatingControls(`value`: Output>) {
        this.gatingControls = value
    }

    @JvmName("rftrdfhfhvespwki")
    public suspend fun gatingControls(vararg values: Output) {
        this.gatingControls = Output.all(values.asList())
    }

    /**
     * @param values The gating controls for the gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
     */
    @JvmName("ibqdfjgwhgioxwce")
    public suspend fun gatingControls(values: List>) {
        this.gatingControls = Output.all(values)
    }

    /**
     * @param value Routing controls that can only be set or unset if the specified RuleConfig evaluates to true for the specified GatingControls. For example, say you have three gating controls, one for each of three AWS Regions. Now you specify AtLeast 2 as your RuleConfig. With these settings, you can only change (set or unset) the routing controls that you have specified as TargetControls if that rule evaluates to true.
     * In other words, your ability to change the routing controls that you have specified as TargetControls is gated by the rule that you set for the routing controls in GatingControls.
     */
    @JvmName("wtrmuqcvkxfqxqnf")
    public suspend fun targetControls(`value`: Output>) {
        this.targetControls = value
    }

    @JvmName("capwmsoffoxtcnvo")
    public suspend fun targetControls(vararg values: Output) {
        this.targetControls = Output.all(values.asList())
    }

    /**
     * @param values Routing controls that can only be set or unset if the specified RuleConfig evaluates to true for the specified GatingControls. For example, say you have three gating controls, one for each of three AWS Regions. Now you specify AtLeast 2 as your RuleConfig. With these settings, you can only change (set or unset) the routing controls that you have specified as TargetControls if that rule evaluates to true.
     * In other words, your ability to change the routing controls that you have specified as TargetControls is gated by the rule that you set for the routing controls in GatingControls.
     */
    @JvmName("inrwghwsuutrnsok")
    public suspend fun targetControls(values: List>) {
        this.targetControls = Output.all(values)
    }

    /**
     * @param value An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent "flapping" of state. The wait period is 5000 ms by default, but you can choose a custom value.
     */
    @JvmName("dumqdejlsjtxvtvf")
    public suspend fun waitPeriodMs(`value`: Output) {
        this.waitPeriodMs = value
    }

    /**
     * @param value The gating controls for the gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
     */
    @JvmName("kptmldbtsoogcpos")
    public suspend fun gatingControls(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.gatingControls = mapped
    }

    /**
     * @param values The gating controls for the gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
     */
    @JvmName("opyxirjvcdcphobw")
    public suspend fun gatingControls(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.gatingControls = mapped
    }

    /**
     * @param value Routing controls that can only be set or unset if the specified RuleConfig evaluates to true for the specified GatingControls. For example, say you have three gating controls, one for each of three AWS Regions. Now you specify AtLeast 2 as your RuleConfig. With these settings, you can only change (set or unset) the routing controls that you have specified as TargetControls if that rule evaluates to true.
     * In other words, your ability to change the routing controls that you have specified as TargetControls is gated by the rule that you set for the routing controls in GatingControls.
     */
    @JvmName("fopmqxfvmnixmiqg")
    public suspend fun targetControls(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetControls = mapped
    }

    /**
     * @param values Routing controls that can only be set or unset if the specified RuleConfig evaluates to true for the specified GatingControls. For example, say you have three gating controls, one for each of three AWS Regions. Now you specify AtLeast 2 as your RuleConfig. With these settings, you can only change (set or unset) the routing controls that you have specified as TargetControls if that rule evaluates to true.
     * In other words, your ability to change the routing controls that you have specified as TargetControls is gated by the rule that you set for the routing controls in GatingControls.
     */
    @JvmName("tebjejsdjcndlict")
    public suspend fun targetControls(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetControls = mapped
    }

    /**
     * @param value An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent "flapping" of state. The wait period is 5000 ms by default, but you can choose a custom value.
     */
    @JvmName("wgfvanplaekosmuw")
    public suspend fun waitPeriodMs(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.waitPeriodMs = mapped
    }

    internal fun build(): SafetyRuleGatingRuleArgs = SafetyRuleGatingRuleArgs(
        gatingControls = gatingControls ?: throw PulumiNullFieldException("gatingControls"),
        targetControls = targetControls ?: throw PulumiNullFieldException("targetControls"),
        waitPeriodMs = waitPeriodMs ?: throw PulumiNullFieldException("waitPeriodMs"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy