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

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

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

package com.pulumi.awsnative.ec2.kotlin

import com.pulumi.awsnative.ec2.SecurityGroupArgs.builder
import com.pulumi.awsnative.ec2.kotlin.inputs.SecurityGroupEgressArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.SecurityGroupEgressArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.SecurityGroupIngressArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.SecurityGroupIngressArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
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

/**
 * Resource Type definition for AWS::EC2::SecurityGroup
 * @property groupDescription A description for the security group.
 * @property groupName The name of the security group.
 * @property securityGroupEgress [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
 * @property securityGroupIngress The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
 * @property tags Any tags assigned to the security group.
 * @property vpcId The ID of the VPC for the security group.
 */
public data class SecurityGroupArgs(
    public val groupDescription: Output? = null,
    public val groupName: Output? = null,
    public val securityGroupEgress: Output>? = null,
    public val securityGroupIngress: Output>? = null,
    public val tags: Output>? = null,
    public val vpcId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.SecurityGroupArgs =
        com.pulumi.awsnative.ec2.SecurityGroupArgs.builder()
            .groupDescription(groupDescription?.applyValue({ args0 -> args0 }))
            .groupName(groupName?.applyValue({ args0 -> args0 }))
            .securityGroupEgress(
                securityGroupEgress?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .securityGroupIngress(
                securityGroupIngress?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .vpcId(vpcId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SecurityGroupArgs].
 */
@PulumiTagMarker
public class SecurityGroupArgsBuilder internal constructor() {
    private var groupDescription: Output? = null

    private var groupName: Output? = null

    private var securityGroupEgress: Output>? = null

    private var securityGroupIngress: Output>? = null

    private var tags: Output>? = null

    private var vpcId: Output? = null

    /**
     * @param value A description for the security group.
     */
    @JvmName("qfyxjsijknrnubfv")
    public suspend fun groupDescription(`value`: Output) {
        this.groupDescription = value
    }

    /**
     * @param value The name of the security group.
     */
    @JvmName("gokhkojdvkluaafx")
    public suspend fun groupName(`value`: Output) {
        this.groupName = value
    }

    /**
     * @param value [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("tepbytyabypwdncw")
    public suspend fun securityGroupEgress(`value`: Output>) {
        this.securityGroupEgress = value
    }

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

    /**
     * @param values [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("qqcluopmhtwdnjud")
    public suspend fun securityGroupEgress(values: List>) {
        this.securityGroupEgress = Output.all(values)
    }

    /**
     * @param value The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("vqqrneodonftqjcs")
    public suspend fun securityGroupIngress(`value`: Output>) {
        this.securityGroupIngress = value
    }

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

    /**
     * @param values The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("itxymjvsyevrtexm")
    public suspend fun securityGroupIngress(values: List>) {
        this.securityGroupIngress = Output.all(values)
    }

    /**
     * @param value Any tags assigned to the security group.
     */
    @JvmName("pcifxmyhgsrrafjy")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Any tags assigned to the security group.
     */
    @JvmName("bxffcocibntpdmvo")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The ID of the VPC for the security group.
     */
    @JvmName("qldyvpekouxiwjga")
    public suspend fun vpcId(`value`: Output) {
        this.vpcId = value
    }

    /**
     * @param value A description for the security group.
     */
    @JvmName("ftywcrmhrvwrwrcj")
    public suspend fun groupDescription(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupDescription = mapped
    }

    /**
     * @param value The name of the security group.
     */
    @JvmName("qolkvvmrimuohbbt")
    public suspend fun groupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupName = mapped
    }

    /**
     * @param value [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("qwcdmqxfrmknlfxr")
    public suspend fun securityGroupEgress(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroupEgress = mapped
    }

    /**
     * @param argument [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("mgfpxukqwbviohhp")
    public suspend fun securityGroupEgress(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SecurityGroupEgressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.securityGroupEgress = mapped
    }

    /**
     * @param argument [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("vredwqkhmmklihop")
    public suspend fun securityGroupEgress(vararg argument: suspend SecurityGroupEgressArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SecurityGroupEgressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.securityGroupEgress = mapped
    }

    /**
     * @param argument [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("incyxjhkopqkkrdj")
    public suspend fun securityGroupEgress(argument: suspend SecurityGroupEgressArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SecurityGroupEgressArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.securityGroupEgress = mapped
    }

    /**
     * @param values [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("jtoviowtdvtdkros")
    public suspend fun securityGroupEgress(vararg values: SecurityGroupEgressArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroupEgress = mapped
    }

    /**
     * @param value The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("jkulcdjnhbnaxifd")
    public suspend fun securityGroupIngress(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroupIngress = mapped
    }

    /**
     * @param argument The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("cufqruqhlwtdknjy")
    public suspend fun securityGroupIngress(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SecurityGroupIngressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.securityGroupIngress = mapped
    }

    /**
     * @param argument The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("piybsjjuqcfyducf")
    public suspend fun securityGroupIngress(vararg argument: suspend SecurityGroupIngressArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SecurityGroupIngressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.securityGroupIngress = mapped
    }

    /**
     * @param argument The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("hsnfndykmslqrmlc")
    public suspend fun securityGroupIngress(argument: suspend SecurityGroupIngressArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SecurityGroupIngressArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.securityGroupIngress = mapped
    }

    /**
     * @param values The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
     */
    @JvmName("sadxjiabmbpeojoh")
    public suspend fun securityGroupIngress(vararg values: SecurityGroupIngressArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroupIngress = mapped
    }

    /**
     * @param value Any tags assigned to the security group.
     */
    @JvmName("gppdugtkbopiuqts")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Any tags assigned to the security group.
     */
    @JvmName("pujejpfkcapgcfxw")
    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 Any tags assigned to the security group.
     */
    @JvmName("inromgoxchsjqloi")
    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 Any tags assigned to the security group.
     */
    @JvmName("ffnxckepiykhklbu")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Any tags assigned to the security group.
     */
    @JvmName("rvqcfqkrueqtirnr")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The ID of the VPC for the security group.
     */
    @JvmName("lvforpfxmfsselpy")
    public suspend fun vpcId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcId = mapped
    }

    internal fun build(): SecurityGroupArgs = SecurityGroupArgs(
        groupDescription = groupDescription,
        groupName = groupName,
        securityGroupEgress = securityGroupEgress,
        securityGroupIngress = securityGroupIngress,
        tags = tags,
        vpcId = vpcId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy