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

com.pulumi.aws.ecs.kotlin.inputs.ServiceNetworkConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.aws.ecs.kotlin.inputs

import com.pulumi.aws.ecs.inputs.ServiceNetworkConfigurationArgs.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 kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property assignPublicIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are `true` or `false`. Default `false`.
 * For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
 * @property securityGroups Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
 * @property subnets Subnets associated with the task or service.
 */
public data class ServiceNetworkConfigurationArgs(
    public val assignPublicIp: Output? = null,
    public val securityGroups: Output>? = null,
    public val subnets: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ecs.inputs.ServiceNetworkConfigurationArgs =
        com.pulumi.aws.ecs.inputs.ServiceNetworkConfigurationArgs.builder()
            .assignPublicIp(assignPublicIp?.applyValue({ args0 -> args0 }))
            .securityGroups(securityGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .subnets(subnets.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [ServiceNetworkConfigurationArgs].
 */
@PulumiTagMarker
public class ServiceNetworkConfigurationArgsBuilder internal constructor() {
    private var assignPublicIp: Output? = null

    private var securityGroups: Output>? = null

    private var subnets: Output>? = null

    /**
     * @param value Assign a public IP address to the ENI (Fargate launch type only). Valid values are `true` or `false`. Default `false`.
     * For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
     */
    @JvmName("llqoadsgufdictmm")
    public suspend fun assignPublicIp(`value`: Output) {
        this.assignPublicIp = value
    }

    /**
     * @param value Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
     */
    @JvmName("ijxxldmvnqgowoeb")
    public suspend fun securityGroups(`value`: Output>) {
        this.securityGroups = value
    }

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

    /**
     * @param values Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
     */
    @JvmName("vnarkpydjusxxbux")
    public suspend fun securityGroups(values: List>) {
        this.securityGroups = Output.all(values)
    }

    /**
     * @param value Subnets associated with the task or service.
     */
    @JvmName("cofennpbvwawxfmf")
    public suspend fun subnets(`value`: Output>) {
        this.subnets = value
    }

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

    /**
     * @param values Subnets associated with the task or service.
     */
    @JvmName("jibybbekmvydlfjo")
    public suspend fun subnets(values: List>) {
        this.subnets = Output.all(values)
    }

    /**
     * @param value Assign a public IP address to the ENI (Fargate launch type only). Valid values are `true` or `false`. Default `false`.
     * For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
     */
    @JvmName("jcgbncbcvihcvxyi")
    public suspend fun assignPublicIp(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.assignPublicIp = mapped
    }

    /**
     * @param value Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
     */
    @JvmName("pjkvuxphtlyxefib")
    public suspend fun securityGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param values Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
     */
    @JvmName("raieuaedueqgabdk")
    public suspend fun securityGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param value Subnets associated with the task or service.
     */
    @JvmName("eiyfqwxrhrgbeivy")
    public suspend fun subnets(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

    /**
     * @param values Subnets associated with the task or service.
     */
    @JvmName("mecpdqyracooseof")
    public suspend fun subnets(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

    internal fun build(): ServiceNetworkConfigurationArgs = ServiceNetworkConfigurationArgs(
        assignPublicIp = assignPublicIp,
        securityGroups = securityGroups,
        subnets = subnets ?: throw PulumiNullFieldException("subnets"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy