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

com.pulumi.awsnative.scheduler.kotlin.inputs.ScheduleAwsVpcConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.scheduler.kotlin.inputs

import com.pulumi.awsnative.scheduler.inputs.ScheduleAwsVpcConfigurationArgs.builder
import com.pulumi.awsnative.scheduler.kotlin.enums.ScheduleAssignPublicIp
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.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * This structure specifies the VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.
 * @property assignPublicIp Specifies whether the task's elastic network interface receives a public IP address. You can specify `ENABLED` only when `LaunchType` in `EcsParameters` is set to `FARGATE` .
 * @property securityGroups Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
 * @property subnets Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
 */
public data class ScheduleAwsVpcConfigurationArgs(
    public val assignPublicIp: Output? = null,
    public val securityGroups: Output>? = null,
    public val subnets: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.scheduler.inputs.ScheduleAwsVpcConfigurationArgs =
        com.pulumi.awsnative.scheduler.inputs.ScheduleAwsVpcConfigurationArgs.builder()
            .assignPublicIp(assignPublicIp?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .securityGroups(securityGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .subnets(subnets.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var securityGroups: Output>? = null

    private var subnets: Output>? = null

    /**
     * @param value Specifies whether the task's elastic network interface receives a public IP address. You can specify `ENABLED` only when `LaunchType` in `EcsParameters` is set to `FARGATE` .
     */
    @JvmName("sjtdulcouhxheqvp")
    public suspend fun assignPublicIp(`value`: Output) {
        this.assignPublicIp = value
    }

    /**
     * @param value Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
     */
    @JvmName("cuupncywmimqarjx")
    public suspend fun securityGroups(`value`: Output>) {
        this.securityGroups = value
    }

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

    /**
     * @param values Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
     */
    @JvmName("bxprarufayobgfny")
    public suspend fun securityGroups(values: List>) {
        this.securityGroups = Output.all(values)
    }

    /**
     * @param value Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
     */
    @JvmName("rlmwtoiwisntebjd")
    public suspend fun subnets(`value`: Output>) {
        this.subnets = value
    }

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

    /**
     * @param values Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
     */
    @JvmName("wrvthhrqvfbwsvji")
    public suspend fun subnets(values: List>) {
        this.subnets = Output.all(values)
    }

    /**
     * @param value Specifies whether the task's elastic network interface receives a public IP address. You can specify `ENABLED` only when `LaunchType` in `EcsParameters` is set to `FARGATE` .
     */
    @JvmName("ytmjqhxxbyymgamd")
    public suspend fun assignPublicIp(`value`: ScheduleAssignPublicIp?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.assignPublicIp = mapped
    }

    /**
     * @param value Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
     */
    @JvmName("knlpokynfaucfkny")
    public suspend fun securityGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param values Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
     */
    @JvmName("eyhhegjjlvjnnoij")
    public suspend fun securityGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param value Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
     */
    @JvmName("nwthteeyqrhbskjp")
    public suspend fun subnets(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

    /**
     * @param values Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
     */
    @JvmName("ivsldtalbectwylf")
    public suspend fun subnets(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy