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

com.pulumi.awsnative.vpclattice.kotlin.inputs.RuleActionArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.vpclattice.kotlin.inputs

import com.pulumi.awsnative.vpclattice.inputs.RuleActionArgs.builder
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.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property fixedResponse The fixed response action. The rule returns a custom HTTP response.
 * @property forward The forward action. Traffic that matches the rule is forwarded to the specified target groups.
 */
public data class RuleActionArgs(
    public val fixedResponse: Output? = null,
    public val forward: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.vpclattice.inputs.RuleActionArgs =
        com.pulumi.awsnative.vpclattice.inputs.RuleActionArgs.builder()
            .fixedResponse(fixedResponse?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .forward(forward?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [RuleActionArgs].
 */
@PulumiTagMarker
public class RuleActionArgsBuilder internal constructor() {
    private var fixedResponse: Output? = null

    private var forward: Output? = null

    /**
     * @param value The fixed response action. The rule returns a custom HTTP response.
     */
    @JvmName("nkuvayvyitbwvthy")
    public suspend fun fixedResponse(`value`: Output) {
        this.fixedResponse = value
    }

    /**
     * @param value The forward action. Traffic that matches the rule is forwarded to the specified target groups.
     */
    @JvmName("qsbhdcgyeqjwrkar")
    public suspend fun forward(`value`: Output) {
        this.forward = value
    }

    /**
     * @param value The fixed response action. The rule returns a custom HTTP response.
     */
    @JvmName("qxbvugumhwqtddnw")
    public suspend fun fixedResponse(`value`: RuleFixedResponseArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fixedResponse = mapped
    }

    /**
     * @param argument The fixed response action. The rule returns a custom HTTP response.
     */
    @JvmName("qflqgpbswowndjui")
    public suspend fun fixedResponse(argument: suspend RuleFixedResponseArgsBuilder.() -> Unit) {
        val toBeMapped = RuleFixedResponseArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.fixedResponse = mapped
    }

    /**
     * @param value The forward action. Traffic that matches the rule is forwarded to the specified target groups.
     */
    @JvmName("pbwnfpdinfkygqec")
    public suspend fun forward(`value`: RuleForwardArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forward = mapped
    }

    /**
     * @param argument The forward action. Traffic that matches the rule is forwarded to the specified target groups.
     */
    @JvmName("xalqeibmbffoemxe")
    public suspend fun forward(argument: suspend RuleForwardArgsBuilder.() -> Unit) {
        val toBeMapped = RuleForwardArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.forward = mapped
    }

    internal fun build(): RuleActionArgs = RuleActionArgs(
        fixedResponse = fixedResponse,
        forward = forward,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy