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

com.pulumi.gcp.osconfig.kotlin.inputs.PatchDeploymentRolloutArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.osconfig.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRolloutArgs.builder
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 disruptionBudget The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up.
 * During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps.
 * A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget.
 * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone.
 * For example, if the disruption budget has a fixed value of 10, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
 * Structure is documented below.
 * @property mode Mode of the patch rollout.
 * Possible values are: `ZONE_BY_ZONE`, `CONCURRENT_ZONES`.
 */
public data class PatchDeploymentRolloutArgs(
    public val disruptionBudget: Output,
    public val mode: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.osconfig.inputs.PatchDeploymentRolloutArgs =
        com.pulumi.gcp.osconfig.inputs.PatchDeploymentRolloutArgs.builder()
            .disruptionBudget(disruptionBudget.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .mode(mode.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PatchDeploymentRolloutArgs].
 */
@PulumiTagMarker
public class PatchDeploymentRolloutArgsBuilder internal constructor() {
    private var disruptionBudget: Output? = null

    private var mode: Output? = null

    /**
     * @param value The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up.
     * During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps.
     * A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget.
     * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone.
     * For example, if the disruption budget has a fixed value of 10, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
     * Structure is documented below.
     */
    @JvmName("ohiqlrkeeqlfwsqf")
    public suspend fun disruptionBudget(`value`: Output) {
        this.disruptionBudget = value
    }

    /**
     * @param value Mode of the patch rollout.
     * Possible values are: `ZONE_BY_ZONE`, `CONCURRENT_ZONES`.
     */
    @JvmName("gynvmtsfusrxptni")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up.
     * During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps.
     * A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget.
     * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone.
     * For example, if the disruption budget has a fixed value of 10, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
     * Structure is documented below.
     */
    @JvmName("vipijslbhhppyxwy")
    public suspend fun disruptionBudget(`value`: PatchDeploymentRolloutDisruptionBudgetArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.disruptionBudget = mapped
    }

    /**
     * @param argument The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up.
     * During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps.
     * A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget.
     * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone.
     * For example, if the disruption budget has a fixed value of 10, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
     * Structure is documented below.
     */
    @JvmName("eahalpojrhrmshjj")
    public suspend fun disruptionBudget(argument: suspend PatchDeploymentRolloutDisruptionBudgetArgsBuilder.() -> Unit) {
        val toBeMapped = PatchDeploymentRolloutDisruptionBudgetArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.disruptionBudget = mapped
    }

    /**
     * @param value Mode of the patch rollout.
     * Possible values are: `ZONE_BY_ZONE`, `CONCURRENT_ZONES`.
     */
    @JvmName("kuausxrqknjlsdqe")
    public suspend fun mode(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    internal fun build(): PatchDeploymentRolloutArgs = PatchDeploymentRolloutArgs(
        disruptionBudget = disruptionBudget ?: throw PulumiNullFieldException("disruptionBudget"),
        mode = mode ?: throw PulumiNullFieldException("mode"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy