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