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

com.pulumi.awsnative.codedeploy.kotlin.inputs.DeploymentConfigMinimumHealthyHostsArgs.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.codedeploy.kotlin.inputs

import com.pulumi.awsnative.codedeploy.inputs.DeploymentConfigMinimumHealthyHostsArgs.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.jvm.JvmName

/**
 *
 * @property type The minimum healthy instance type:
 * - HOST_COUNT: The minimum number of healthy instance as an absolute value.
 * - FLEET_PERCENT: The minimum number of healthy instance as a percentage of the total number of instance in the deployment.
 * In an example of nine instance, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment is successful if six or more instances are deployed to successfully. Otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment is successful if four or more instance are deployed to successfully. Otherwise, the deployment fails.
 * > In a call to `GetDeploymentConfig` , CodeDeployDefault.OneAtATime returns a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy attempts to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment is still successful.
 * For more information, see [AWS CodeDeploy Instance Health](https://docs.aws.amazon.com//codedeploy/latest/userguide/instances-health.html) in the *AWS CodeDeploy User Guide* .
 * @property value The minimum healthy instance value.
 */
public data class DeploymentConfigMinimumHealthyHostsArgs(
    public val type: Output,
    public val `value`: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.codedeploy.inputs.DeploymentConfigMinimumHealthyHostsArgs =
        com.pulumi.awsnative.codedeploy.inputs.DeploymentConfigMinimumHealthyHostsArgs.builder()
            .type(type.applyValue({ args0 -> args0 }))
            .`value`(`value`.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DeploymentConfigMinimumHealthyHostsArgs].
 */
@PulumiTagMarker
public class DeploymentConfigMinimumHealthyHostsArgsBuilder internal constructor() {
    private var type: Output? = null

    private var `value`: Output? = null

    /**
     * @param value The minimum healthy instance type:
     * - HOST_COUNT: The minimum number of healthy instance as an absolute value.
     * - FLEET_PERCENT: The minimum number of healthy instance as a percentage of the total number of instance in the deployment.
     * In an example of nine instance, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment is successful if six or more instances are deployed to successfully. Otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment is successful if four or more instance are deployed to successfully. Otherwise, the deployment fails.
     * > In a call to `GetDeploymentConfig` , CodeDeployDefault.OneAtATime returns a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy attempts to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment is still successful.
     * For more information, see [AWS CodeDeploy Instance Health](https://docs.aws.amazon.com//codedeploy/latest/userguide/instances-health.html) in the *AWS CodeDeploy User Guide* .
     */
    @JvmName("swnromkmlqjamkig")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The minimum healthy instance value.
     */
    @JvmName("slsjrksobyhuqpph")
    public suspend fun `value`(`value`: Output) {
        this.`value` = value
    }

    /**
     * @param value The minimum healthy instance type:
     * - HOST_COUNT: The minimum number of healthy instance as an absolute value.
     * - FLEET_PERCENT: The minimum number of healthy instance as a percentage of the total number of instance in the deployment.
     * In an example of nine instance, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment is successful if six or more instances are deployed to successfully. Otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment is successful if four or more instance are deployed to successfully. Otherwise, the deployment fails.
     * > In a call to `GetDeploymentConfig` , CodeDeployDefault.OneAtATime returns a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy attempts to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment is still successful.
     * For more information, see [AWS CodeDeploy Instance Health](https://docs.aws.amazon.com//codedeploy/latest/userguide/instances-health.html) in the *AWS CodeDeploy User Guide* .
     */
    @JvmName("usxoocvcogxmdqhe")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The minimum healthy instance value.
     */
    @JvmName("eukbkvprikjynfpu")
    public suspend fun `value`(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`value` = mapped
    }

    internal fun build(): DeploymentConfigMinimumHealthyHostsArgs =
        DeploymentConfigMinimumHealthyHostsArgs(
            type = type ?: throw PulumiNullFieldException("type"),
            `value` = `value` ?: throw PulumiNullFieldException("value"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy