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

com.pulumi.awsnative.stepfunctions.kotlin.inputs.StateMachineAliasDeploymentPreferenceArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.stepfunctions.kotlin.inputs

import com.pulumi.awsnative.stepfunctions.inputs.StateMachineAliasDeploymentPreferenceArgs.builder
import com.pulumi.awsnative.stepfunctions.kotlin.enums.StateMachineAliasDeploymentPreferenceType
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

/**
 * The settings to enable gradual state machine deployments.
 * @property alarms A list of CloudWatch alarm names that will be monitored during the deployment. The deployment will fail and rollback if any alarms go into ALARM state.
 * @property interval The time in minutes between each traffic shifting increment.
 * @property percentage The percentage of traffic to shift to the new version in each increment.
 * @property stateMachineVersionArn The Amazon Resource Name (ARN) of the [`AWS::StepFunctions::StateMachineVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html) resource that will be the final version to which the alias points to when the traffic shifting is complete.
 * While performing gradual deployments, you can only provide a single state machine version ARN. To explicitly set version weights in a CloudFormation template, use `RoutingConfiguration` instead.
 * @property type The type of deployment to perform.
 */
public data class StateMachineAliasDeploymentPreferenceArgs(
    public val alarms: Output>? = null,
    public val interval: Output? = null,
    public val percentage: Output? = null,
    public val stateMachineVersionArn: Output,
    public val type: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.stepfunctions.inputs.StateMachineAliasDeploymentPreferenceArgs =
        com.pulumi.awsnative.stepfunctions.inputs.StateMachineAliasDeploymentPreferenceArgs.builder()
            .alarms(alarms?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .interval(interval?.applyValue({ args0 -> args0 }))
            .percentage(percentage?.applyValue({ args0 -> args0 }))
            .stateMachineVersionArn(stateMachineVersionArn.applyValue({ args0 -> args0 }))
            .type(type.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var interval: Output? = null

    private var percentage: Output? = null

    private var stateMachineVersionArn: Output? = null

    private var type: Output? = null

    /**
     * @param value A list of CloudWatch alarm names that will be monitored during the deployment. The deployment will fail and rollback if any alarms go into ALARM state.
     */
    @JvmName("svlguydmujpvdokp")
    public suspend fun alarms(`value`: Output>) {
        this.alarms = value
    }

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

    /**
     * @param values A list of CloudWatch alarm names that will be monitored during the deployment. The deployment will fail and rollback if any alarms go into ALARM state.
     */
    @JvmName("aybvjovbgjcngywy")
    public suspend fun alarms(values: List>) {
        this.alarms = Output.all(values)
    }

    /**
     * @param value The time in minutes between each traffic shifting increment.
     */
    @JvmName("yfdtqcfsimatkswm")
    public suspend fun interval(`value`: Output) {
        this.interval = value
    }

    /**
     * @param value The percentage of traffic to shift to the new version in each increment.
     */
    @JvmName("qwyeiulvfkpesukf")
    public suspend fun percentage(`value`: Output) {
        this.percentage = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the [`AWS::StepFunctions::StateMachineVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html) resource that will be the final version to which the alias points to when the traffic shifting is complete.
     * While performing gradual deployments, you can only provide a single state machine version ARN. To explicitly set version weights in a CloudFormation template, use `RoutingConfiguration` instead.
     */
    @JvmName("mguxitqoepbfyngl")
    public suspend fun stateMachineVersionArn(`value`: Output) {
        this.stateMachineVersionArn = value
    }

    /**
     * @param value The type of deployment to perform.
     */
    @JvmName("dlarorxaweappabq")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value A list of CloudWatch alarm names that will be monitored during the deployment. The deployment will fail and rollback if any alarms go into ALARM state.
     */
    @JvmName("cuqwtemkvlojinse")
    public suspend fun alarms(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarms = mapped
    }

    /**
     * @param values A list of CloudWatch alarm names that will be monitored during the deployment. The deployment will fail and rollback if any alarms go into ALARM state.
     */
    @JvmName("tfsalhdhyatgufcq")
    public suspend fun alarms(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.alarms = mapped
    }

    /**
     * @param value The time in minutes between each traffic shifting increment.
     */
    @JvmName("ffsjqrwtoqubasqi")
    public suspend fun interval(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interval = mapped
    }

    /**
     * @param value The percentage of traffic to shift to the new version in each increment.
     */
    @JvmName("okuaydqfkawkxbvt")
    public suspend fun percentage(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.percentage = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the [`AWS::StepFunctions::StateMachineVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html) resource that will be the final version to which the alias points to when the traffic shifting is complete.
     * While performing gradual deployments, you can only provide a single state machine version ARN. To explicitly set version weights in a CloudFormation template, use `RoutingConfiguration` instead.
     */
    @JvmName("rxnathbkkmqwpljc")
    public suspend fun stateMachineVersionArn(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.stateMachineVersionArn = mapped
    }

    /**
     * @param value The type of deployment to perform.
     */
    @JvmName("ncyfvsrycsudcibb")
    public suspend fun type(`value`: StateMachineAliasDeploymentPreferenceType) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): StateMachineAliasDeploymentPreferenceArgs =
        StateMachineAliasDeploymentPreferenceArgs(
            alarms = alarms,
            interval = interval,
            percentage = percentage,
            stateMachineVersionArn = stateMachineVersionArn ?: throw
                PulumiNullFieldException("stateMachineVersionArn"),
            type = type ?: throw PulumiNullFieldException("type"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy