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

com.pulumi.awsnative.vpclattice.kotlin.TargetGroupArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.vpclattice.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.vpclattice.TargetGroupArgs.builder
import com.pulumi.awsnative.vpclattice.kotlin.enums.TargetGroupType
import com.pulumi.awsnative.vpclattice.kotlin.inputs.TargetGroupConfigArgs
import com.pulumi.awsnative.vpclattice.kotlin.inputs.TargetGroupConfigArgsBuilder
import com.pulumi.awsnative.vpclattice.kotlin.inputs.TargetGroupTargetArgs
import com.pulumi.awsnative.vpclattice.kotlin.inputs.TargetGroupTargetArgsBuilder
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

/**
 * A target group is a collection of targets, or compute resources, that run your application or service. A target group can only be used by a single service.
 * @property config The target group configuration.
 * @property name The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
 * If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.
 * @property tags The tags for the target group.
 * @property targets Describes a target.
 * @property type The type of target group.
 */
public data class TargetGroupArgs(
    public val config: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
    public val targets: Output>? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.vpclattice.TargetGroupArgs =
        com.pulumi.awsnative.vpclattice.TargetGroupArgs.builder()
            .config(config?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .targets(
                targets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .type(type?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [TargetGroupArgs].
 */
@PulumiTagMarker
public class TargetGroupArgsBuilder internal constructor() {
    private var config: Output? = null

    private var name: Output? = null

    private var tags: Output>? = null

    private var targets: Output>? = null

    private var type: Output? = null

    /**
     * @param value The target group configuration.
     */
    @JvmName("efernnfmbtkopayd")
    public suspend fun config(`value`: Output) {
        this.config = value
    }

    /**
     * @param value The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
     * If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.
     */
    @JvmName("yasqxcrugblgajwt")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The tags for the target group.
     */
    @JvmName("ccfftjbdcvbtmoqe")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values The tags for the target group.
     */
    @JvmName("mnvuqapmohdpassr")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Describes a target.
     */
    @JvmName("ybtpvpvsxvhuqcry")
    public suspend fun targets(`value`: Output>) {
        this.targets = value
    }

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

    /**
     * @param values Describes a target.
     */
    @JvmName("reokafmwhbvpgiob")
    public suspend fun targets(values: List>) {
        this.targets = Output.all(values)
    }

    /**
     * @param value The type of target group.
     */
    @JvmName("sgajqtrsjifiecvn")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The target group configuration.
     */
    @JvmName("drmtxmjwiwockxwr")
    public suspend fun config(`value`: TargetGroupConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.config = mapped
    }

    /**
     * @param argument The target group configuration.
     */
    @JvmName("ggwvbtdchltvlftf")
    public suspend fun config(argument: suspend TargetGroupConfigArgsBuilder.() -> Unit) {
        val toBeMapped = TargetGroupConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.config = mapped
    }

    /**
     * @param value The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
     * If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.
     */
    @JvmName("kbytuipwijtvychc")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The tags for the target group.
     */
    @JvmName("cbsekdrihjwhyxny")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument The tags for the target group.
     */
    @JvmName("hoqveqdiabgyygnf")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tags for the target group.
     */
    @JvmName("awjaagfialwbxmot")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tags for the target group.
     */
    @JvmName("qgiqrgplemaohwcb")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values The tags for the target group.
     */
    @JvmName("prdnpqerpvwgubfy")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Describes a target.
     */
    @JvmName("qymvawmkeurjvvyg")
    public suspend fun targets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targets = mapped
    }

    /**
     * @param argument Describes a target.
     */
    @JvmName("sswknwtxevfbpsoi")
    public suspend fun targets(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TargetGroupTargetArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.targets = mapped
    }

    /**
     * @param argument Describes a target.
     */
    @JvmName("cnmmxnxmtgraflqo")
    public suspend fun targets(vararg argument: suspend TargetGroupTargetArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TargetGroupTargetArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.targets = mapped
    }

    /**
     * @param argument Describes a target.
     */
    @JvmName("yugjdjctddxqbwad")
    public suspend fun targets(argument: suspend TargetGroupTargetArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TargetGroupTargetArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.targets = mapped
    }

    /**
     * @param values Describes a target.
     */
    @JvmName("ohysuhiyoqhreolq")
    public suspend fun targets(vararg values: TargetGroupTargetArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targets = mapped
    }

    /**
     * @param value The type of target group.
     */
    @JvmName("hjtjpdecuefuihjd")
    public suspend fun type(`value`: TargetGroupType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): TargetGroupArgs = TargetGroupArgs(
        config = config,
        name = name,
        tags = tags,
        targets = targets,
        type = type,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy