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

com.pulumi.awsnative.ec2.kotlin.PlacementGroupArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.ec2.kotlin

import com.pulumi.awsnative.ec2.PlacementGroupArgs.builder
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgs
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgsBuilder
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::EC2::PlacementGroup
 * @property partitionCount The number of partitions. Valid only when **Strategy** is set to `partition`
 * @property spreadLevel The Spread Level of Placement Group is an enum where it accepts either host or rack when strategy is spread
 * @property strategy The placement strategy.
 * @property tags An array of key-value pairs to apply to this resource.
 */
public data class PlacementGroupArgs(
    public val partitionCount: Output? = null,
    public val spreadLevel: Output? = null,
    public val strategy: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.PlacementGroupArgs =
        com.pulumi.awsnative.ec2.PlacementGroupArgs.builder()
            .partitionCount(partitionCount?.applyValue({ args0 -> args0 }))
            .spreadLevel(spreadLevel?.applyValue({ args0 -> args0 }))
            .strategy(strategy?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [PlacementGroupArgs].
 */
@PulumiTagMarker
public class PlacementGroupArgsBuilder internal constructor() {
    private var partitionCount: Output? = null

    private var spreadLevel: Output? = null

    private var strategy: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The number of partitions. Valid only when **Strategy** is set to `partition`
     */
    @JvmName("jkjtaompfiutsurh")
    public suspend fun partitionCount(`value`: Output) {
        this.partitionCount = value
    }

    /**
     * @param value The Spread Level of Placement Group is an enum where it accepts either host or rack when strategy is spread
     */
    @JvmName("pkvceppmmdltbojh")
    public suspend fun spreadLevel(`value`: Output) {
        this.spreadLevel = value
    }

    /**
     * @param value The placement strategy.
     */
    @JvmName("ppdecdbfdqejdhuj")
    public suspend fun strategy(`value`: Output) {
        this.strategy = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("ilepjwnpbtkxlxmm")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("pbskkqrfkjmhypgi")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The number of partitions. Valid only when **Strategy** is set to `partition`
     */
    @JvmName("pvgvcbkjtbceriif")
    public suspend fun partitionCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.partitionCount = mapped
    }

    /**
     * @param value The Spread Level of Placement Group is an enum where it accepts either host or rack when strategy is spread
     */
    @JvmName("jylkxxaqdjhxxnqn")
    public suspend fun spreadLevel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.spreadLevel = mapped
    }

    /**
     * @param value The placement strategy.
     */
    @JvmName("yircrjybruglkbbd")
    public suspend fun strategy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.strategy = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("mqdroxlummvvgbnr")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("mucvqcpxbfgaqvfr")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("gsnbvfdoolstsadq")
    public suspend fun tags(vararg argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("jyyffvupcabqodvi")
    public suspend fun tags(argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CreateOnlyTagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("ssawjukjthebxiao")
    public suspend fun tags(vararg values: CreateOnlyTagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): PlacementGroupArgs = PlacementGroupArgs(
        partitionCount = partitionCount,
        spreadLevel = spreadLevel,
        strategy = strategy,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy