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

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

package com.pulumi.awsnative.codedeploy.kotlin.inputs

import com.pulumi.awsnative.codedeploy.inputs.DeploymentConfigTrafficRoutingConfigArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property timeBasedCanary A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments. The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.
 * @property timeBasedLinear A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions or Amazon ECS task sets are specified in the deployment's AppSpec file.
 * @property type The type of traffic shifting ( `TimeBasedCanary` or `TimeBasedLinear` ) used by a deployment configuration.
 */
public data class DeploymentConfigTrafficRoutingConfigArgs(
    public val timeBasedCanary: Output? = null,
    public val timeBasedLinear: Output? = null,
    public val type: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.codedeploy.inputs.DeploymentConfigTrafficRoutingConfigArgs =
        com.pulumi.awsnative.codedeploy.inputs.DeploymentConfigTrafficRoutingConfigArgs.builder()
            .timeBasedCanary(timeBasedCanary?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .timeBasedLinear(timeBasedLinear?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DeploymentConfigTrafficRoutingConfigArgs].
 */
@PulumiTagMarker
public class DeploymentConfigTrafficRoutingConfigArgsBuilder internal constructor() {
    private var timeBasedCanary: Output? = null

    private var timeBasedLinear: Output? = null

    private var type: Output? = null

    /**
     * @param value A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments. The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.
     */
    @JvmName("codrfxxudrswolgl")
    public suspend fun timeBasedCanary(`value`: Output) {
        this.timeBasedCanary = value
    }

    /**
     * @param value A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions or Amazon ECS task sets are specified in the deployment's AppSpec file.
     */
    @JvmName("iretxcruiikipyac")
    public suspend fun timeBasedLinear(`value`: Output) {
        this.timeBasedLinear = value
    }

    /**
     * @param value The type of traffic shifting ( `TimeBasedCanary` or `TimeBasedLinear` ) used by a deployment configuration.
     */
    @JvmName("odhveqjeganvohki")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments. The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.
     */
    @JvmName("kghosikixohorgvi")
    public suspend fun timeBasedCanary(`value`: DeploymentConfigTimeBasedCanaryArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeBasedCanary = mapped
    }

    /**
     * @param argument A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments. The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.
     */
    @JvmName("cixemfglkjyoheqv")
    public suspend fun timeBasedCanary(argument: suspend DeploymentConfigTimeBasedCanaryArgsBuilder.() -> Unit) {
        val toBeMapped = DeploymentConfigTimeBasedCanaryArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeBasedCanary = mapped
    }

    /**
     * @param value A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions or Amazon ECS task sets are specified in the deployment's AppSpec file.
     */
    @JvmName("gyhsbqdyikblfkom")
    public suspend fun timeBasedLinear(`value`: DeploymentConfigTimeBasedLinearArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeBasedLinear = mapped
    }

    /**
     * @param argument A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions or Amazon ECS task sets are specified in the deployment's AppSpec file.
     */
    @JvmName("blrxqsatclhnvolx")
    public suspend fun timeBasedLinear(argument: suspend DeploymentConfigTimeBasedLinearArgsBuilder.() -> Unit) {
        val toBeMapped = DeploymentConfigTimeBasedLinearArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeBasedLinear = mapped
    }

    /**
     * @param value The type of traffic shifting ( `TimeBasedCanary` or `TimeBasedLinear` ) used by a deployment configuration.
     */
    @JvmName("xwgosgikxgigxnsp")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): DeploymentConfigTrafficRoutingConfigArgs =
        DeploymentConfigTrafficRoutingConfigArgs(
            timeBasedCanary = timeBasedCanary,
            timeBasedLinear = timeBasedLinear,
            type = type ?: throw PulumiNullFieldException("type"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy