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

com.pulumi.azurenative.compute.kotlin.inputs.ScaleInPolicyArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.compute.kotlin.inputs

import com.pulumi.azurenative.compute.inputs.ScaleInPolicyArgs.builder
import com.pulumi.azurenative.compute.kotlin.enums.VirtualMachineScaleSetScaleInRules
import com.pulumi.core.Either
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.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Describes a scale-in policy for a virtual machine scale set.
 * @property forceDeletion This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview)
 * @property rules The rules to be followed when scaling-in a virtual machine scale set. 

Possible values are:

**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

*/ public data class ScaleInPolicyArgs( public val forceDeletion: Output? = null, public val rules: Output>>? = null, ) : ConvertibleToJava { override fun toJava(): com.pulumi.azurenative.compute.inputs.ScaleInPolicyArgs = com.pulumi.azurenative.compute.inputs.ScaleInPolicyArgs.builder() .forceDeletion(forceDeletion?.applyValue({ args0 -> args0 })) .rules( rules?.applyValue({ args0 -> args0.map({ args0 -> args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) }) }) }), ).build() } /** * Builder for [ScaleInPolicyArgs]. */ @PulumiTagMarker public class ScaleInPolicyArgsBuilder internal constructor() { private var forceDeletion: Output? = null private var rules: Output>>? = null /** * @param value This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview) */ @JvmName("veydpnlffphxisco") public suspend fun forceDeletion(`value`: Output) { this.forceDeletion = value } /** * @param value The rules to be followed when scaling-in a virtual machine scale set.

Possible values are:

**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

*/ @JvmName("ufyjjsypkmwfvkkj") public suspend fun rules(`value`: Output>>) { this.rules = value } @JvmName("rjlykibodoevnhai") public suspend fun rules(vararg values: Output>) { this.rules = Output.all(values.asList()) } /** * @param values The rules to be followed when scaling-in a virtual machine scale set.

Possible values are:

**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

*/ @JvmName("qjehuhukmkmlmkut") public suspend fun rules(values: List>>) { this.rules = Output.all(values) } /** * @param value This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview) */ @JvmName("gemsxpydunkqxpua") public suspend fun forceDeletion(`value`: Boolean?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.forceDeletion = mapped } /** * @param value The rules to be followed when scaling-in a virtual machine scale set.

Possible values are:

**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

*/ @JvmName("ibjiwwnkfballisy") public suspend fun rules(`value`: List>?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.rules = mapped } /** * @param values The rules to be followed when scaling-in a virtual machine scale set.

Possible values are:

**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

*/ @JvmName("jqwnvxkffaxammpi") public suspend fun rules(vararg values: Either) { val toBeMapped = values.toList() val mapped = toBeMapped.let({ args0 -> of(args0) }) this.rules = mapped } internal fun build(): ScaleInPolicyArgs = ScaleInPolicyArgs( forceDeletion = forceDeletion, rules = rules, ) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy