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

com.pulumi.awsnative.autoscaling.kotlin.inputs.AutoScalingGroupLaunchTemplateArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.autoscaling.kotlin.inputs

import com.pulumi.awsnative.autoscaling.inputs.AutoScalingGroupLaunchTemplateArgs.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.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Use this structure to specify the launch templates and instance types (overrides) for a mixed instances policy.
 *   ``LaunchTemplate`` is a property of the [AWS::AutoScaling::AutoScalingGroup MixedInstancesPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-mixedinstancespolicy.html) property type.
 * @property launchTemplateSpecification The launch template.
 * @property overrides Any properties that you specify override the same properties in the launch template.
 */
public data class AutoScalingGroupLaunchTemplateArgs(
    public val launchTemplateSpecification: Output,
    public val overrides: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.autoscaling.inputs.AutoScalingGroupLaunchTemplateArgs = com.pulumi.awsnative.autoscaling.inputs.AutoScalingGroupLaunchTemplateArgs.builder()
        .launchTemplateSpecification(
            launchTemplateSpecification.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .overrides(
            overrides?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        ).build()
}

/**
 * Builder for [AutoScalingGroupLaunchTemplateArgs].
 */
@PulumiTagMarker
public class AutoScalingGroupLaunchTemplateArgsBuilder internal constructor() {
    private var launchTemplateSpecification: Output? =
        null

    private var overrides: Output>? = null

    /**
     * @param value The launch template.
     */
    @JvmName("skowqgpejchkgrjo")
    public suspend fun launchTemplateSpecification(`value`: Output) {
        this.launchTemplateSpecification = value
    }

    /**
     * @param value Any properties that you specify override the same properties in the launch template.
     */
    @JvmName("gtrybdgjokxdqvbj")
    public suspend fun overrides(`value`: Output>) {
        this.overrides = value
    }

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

    /**
     * @param values Any properties that you specify override the same properties in the launch template.
     */
    @JvmName("weugwanbcfnmyryf")
    public suspend fun overrides(values: List>) {
        this.overrides = Output.all(values)
    }

    /**
     * @param value The launch template.
     */
    @JvmName("xnmhtqmtnkxdpvbk")
    public suspend fun launchTemplateSpecification(`value`: AutoScalingGroupLaunchTemplateSpecificationArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.launchTemplateSpecification = mapped
    }

    /**
     * @param argument The launch template.
     */
    @JvmName("wdsagyjtmbldkxby")
    public suspend fun launchTemplateSpecification(argument: suspend AutoScalingGroupLaunchTemplateSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = AutoScalingGroupLaunchTemplateSpecificationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.launchTemplateSpecification = mapped
    }

    /**
     * @param value Any properties that you specify override the same properties in the launch template.
     */
    @JvmName("oohohxreetqcsptn")
    public suspend fun overrides(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.overrides = mapped
    }

    /**
     * @param argument Any properties that you specify override the same properties in the launch template.
     */
    @JvmName("fgmtoygupwyfjifn")
    public suspend fun overrides(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AutoScalingGroupLaunchTemplateOverridesArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.overrides = mapped
    }

    /**
     * @param argument Any properties that you specify override the same properties in the launch template.
     */
    @JvmName("dormpramaioewrdt")
    public suspend fun overrides(vararg argument: suspend AutoScalingGroupLaunchTemplateOverridesArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AutoScalingGroupLaunchTemplateOverridesArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.overrides = mapped
    }

    /**
     * @param argument Any properties that you specify override the same properties in the launch template.
     */
    @JvmName("lkoajvcubipragoy")
    public suspend fun overrides(argument: suspend AutoScalingGroupLaunchTemplateOverridesArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AutoScalingGroupLaunchTemplateOverridesArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.overrides = mapped
    }

    /**
     * @param values Any properties that you specify override the same properties in the launch template.
     */
    @JvmName("iteskwdemwufugmp")
    public suspend fun overrides(vararg values: AutoScalingGroupLaunchTemplateOverridesArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.overrides = mapped
    }

    internal fun build(): AutoScalingGroupLaunchTemplateArgs = AutoScalingGroupLaunchTemplateArgs(
        launchTemplateSpecification = launchTemplateSpecification ?: throw
            PulumiNullFieldException("launchTemplateSpecification"),
        overrides = overrides,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy