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

com.pulumi.awsnative.apigateway.kotlin.inputs.DeploymentCanarySettingsArgs.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.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.apigateway.kotlin.inputs

import com.pulumi.awsnative.apigateway.inputs.DeploymentCanarySettingsArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Double
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The ``DeploymentCanarySettings`` property type specifies settings for the canary deployment.
 * @property percentTraffic The percentage (0.0-100.0) of traffic routed to the canary deployment.
 * @property stageVariableOverrides A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. These stage variables are represented as a string-to-string map between stage variable names and their values.
 * @property useStageCache A Boolean flag to indicate whether the canary release deployment uses the stage cache or not.
 */
public data class DeploymentCanarySettingsArgs(
    public val percentTraffic: Output? = null,
    public val stageVariableOverrides: Output>? = null,
    public val useStageCache: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.apigateway.inputs.DeploymentCanarySettingsArgs =
        com.pulumi.awsnative.apigateway.inputs.DeploymentCanarySettingsArgs.builder()
            .percentTraffic(percentTraffic?.applyValue({ args0 -> args0 }))
            .stageVariableOverrides(
                stageVariableOverrides?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .useStageCache(useStageCache?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DeploymentCanarySettingsArgs].
 */
@PulumiTagMarker
public class DeploymentCanarySettingsArgsBuilder internal constructor() {
    private var percentTraffic: Output? = null

    private var stageVariableOverrides: Output>? = null

    private var useStageCache: Output? = null

    /**
     * @param value The percentage (0.0-100.0) of traffic routed to the canary deployment.
     */
    @JvmName("lygvfglklssqwqxg")
    public suspend fun percentTraffic(`value`: Output) {
        this.percentTraffic = value
    }

    /**
     * @param value A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. These stage variables are represented as a string-to-string map between stage variable names and their values.
     */
    @JvmName("ecsfbdfdrmeqxefi")
    public suspend fun stageVariableOverrides(`value`: Output>) {
        this.stageVariableOverrides = value
    }

    /**
     * @param value A Boolean flag to indicate whether the canary release deployment uses the stage cache or not.
     */
    @JvmName("jgbnfsisjjnltlqe")
    public suspend fun useStageCache(`value`: Output) {
        this.useStageCache = value
    }

    /**
     * @param value The percentage (0.0-100.0) of traffic routed to the canary deployment.
     */
    @JvmName("pxqggbfuagxluijh")
    public suspend fun percentTraffic(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.percentTraffic = mapped
    }

    /**
     * @param value A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. These stage variables are represented as a string-to-string map between stage variable names and their values.
     */
    @JvmName("dorvxxkbhiacitmr")
    public suspend fun stageVariableOverrides(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stageVariableOverrides = mapped
    }

    /**
     * @param values A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. These stage variables are represented as a string-to-string map between stage variable names and their values.
     */
    @JvmName("kqiwnbtcdbmnkpow")
    public fun stageVariableOverrides(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.stageVariableOverrides = mapped
    }

    /**
     * @param value A Boolean flag to indicate whether the canary release deployment uses the stage cache or not.
     */
    @JvmName("jsolhgckxgovypms")
    public suspend fun useStageCache(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.useStageCache = mapped
    }

    internal fun build(): DeploymentCanarySettingsArgs = DeploymentCanarySettingsArgs(
        percentTraffic = percentTraffic,
        stageVariableOverrides = stageVariableOverrides,
        useStageCache = useStageCache,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy