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

com.pulumi.awsnative.ecs.kotlin.ClusterCapacityProviderAssociationsArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.ecs.kotlin

import com.pulumi.awsnative.ecs.ClusterCapacityProviderAssociationsArgs.builder
import com.pulumi.awsnative.ecs.kotlin.enums.ClusterCapacityProviderAssociationsCapacityProvider
import com.pulumi.awsnative.ecs.kotlin.inputs.ClusterCapacityProviderAssociationsCapacityProviderStrategyArgs
import com.pulumi.awsnative.ecs.kotlin.inputs.ClusterCapacityProviderAssociationsCapacityProviderStrategyArgsBuilder
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 com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Associate a set of ECS Capacity Providers with a specified ECS Cluster
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * @property capacityProviders The capacity providers to associate with the cluster.
 * @property cluster The cluster the capacity provider association is the target of.
 * @property defaultCapacityProviderStrategy The default capacity provider strategy to associate with the cluster.
 */
public data class ClusterCapacityProviderAssociationsArgs(
    public val capacityProviders: Output>>? = null,
    public val cluster: Output? = null,
    public val defaultCapacityProviderStrategy: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ecs.ClusterCapacityProviderAssociationsArgs =
        com.pulumi.awsnative.ecs.ClusterCapacityProviderAssociationsArgs.builder()
            .capacityProviders(
                capacityProviders?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform({ args0 -> args0.let({ args0 -> args0.toJava() }) }, { args0 -> args0 })
                    })
                }),
            )
            .cluster(cluster?.applyValue({ args0 -> args0 }))
            .defaultCapacityProviderStrategy(
                defaultCapacityProviderStrategy?.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            ).build()
}

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

    private var cluster: Output? = null

    private var defaultCapacityProviderStrategy:
        Output>? = null

    /**
     * @param value The capacity providers to associate with the cluster.
     */
    @JvmName("ouarsskommwwhlwg")
    public suspend fun capacityProviders(`value`: Output>>) {
        this.capacityProviders = value
    }

    @JvmName("lvfoofqqwkygyuac")
    public suspend fun capacityProviders(vararg values: Output>) {
        this.capacityProviders = Output.all(values.asList())
    }

    /**
     * @param values The capacity providers to associate with the cluster.
     */
    @JvmName("qjibtkkpkaflgaux")
    public suspend fun capacityProviders(values: List>>) {
        this.capacityProviders = Output.all(values)
    }

    /**
     * @param value The cluster the capacity provider association is the target of.
     */
    @JvmName("efftrappjhvkuknx")
    public suspend fun cluster(`value`: Output) {
        this.cluster = value
    }

    /**
     * @param value The default capacity provider strategy to associate with the cluster.
     */
    @JvmName("sivbfylevqciwjde")
    public suspend fun defaultCapacityProviderStrategy(`value`: Output>) {
        this.defaultCapacityProviderStrategy = value
    }

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

    /**
     * @param values The default capacity provider strategy to associate with the cluster.
     */
    @JvmName("elwdldvuwtuohhur")
    public suspend fun defaultCapacityProviderStrategy(values: List>) {
        this.defaultCapacityProviderStrategy = Output.all(values)
    }

    /**
     * @param value The capacity providers to associate with the cluster.
     */
    @JvmName("pusbrejbhlcknoxh")
    public suspend fun capacityProviders(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacityProviders = mapped
    }

    /**
     * @param values The capacity providers to associate with the cluster.
     */
    @JvmName("pdelmehqcjqyddfg")
    public suspend fun capacityProviders(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.capacityProviders = mapped
    }

    /**
     * @param value The cluster the capacity provider association is the target of.
     */
    @JvmName("vlpsondtgbycifib")
    public suspend fun cluster(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cluster = mapped
    }

    /**
     * @param value The default capacity provider strategy to associate with the cluster.
     */
    @JvmName("irlnfnxaycfkvagb")
    public suspend fun defaultCapacityProviderStrategy(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultCapacityProviderStrategy = mapped
    }

    /**
     * @param argument The default capacity provider strategy to associate with the cluster.
     */
    @JvmName("brihehfhlpvjvjyr")
    public suspend fun defaultCapacityProviderStrategy(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterCapacityProviderAssociationsCapacityProviderStrategyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.defaultCapacityProviderStrategy = mapped
    }

    /**
     * @param argument The default capacity provider strategy to associate with the cluster.
     */
    @JvmName("jjxpcbakkrjjuasp")
    public suspend fun defaultCapacityProviderStrategy(vararg argument: suspend ClusterCapacityProviderAssociationsCapacityProviderStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterCapacityProviderAssociationsCapacityProviderStrategyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.defaultCapacityProviderStrategy = mapped
    }

    /**
     * @param argument The default capacity provider strategy to associate with the cluster.
     */
    @JvmName("sjgulxpnssokaeup")
    public suspend fun defaultCapacityProviderStrategy(argument: suspend ClusterCapacityProviderAssociationsCapacityProviderStrategyArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                ClusterCapacityProviderAssociationsCapacityProviderStrategyArgsBuilder().applySuspend
                    { argument() }.build(),
            )
        val mapped = of(toBeMapped)
        this.defaultCapacityProviderStrategy = mapped
    }

    /**
     * @param values The default capacity provider strategy to associate with the cluster.
     */
    @JvmName("eraihvwwqccyysqs")
    public suspend fun defaultCapacityProviderStrategy(vararg values: ClusterCapacityProviderAssociationsCapacityProviderStrategyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultCapacityProviderStrategy = mapped
    }

    internal fun build(): ClusterCapacityProviderAssociationsArgs =
        ClusterCapacityProviderAssociationsArgs(
            capacityProviders = capacityProviders,
            cluster = cluster,
            defaultCapacityProviderStrategy = defaultCapacityProviderStrategy,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy