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

com.pulumi.aws.ec2.kotlin.inputs.DefaultSecurityGroupIngressArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.ec2.kotlin.inputs

import com.pulumi.aws.ec2.inputs.DefaultSecurityGroupIngressArgs.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property cidrBlocks List of CIDR blocks.
 * @property description Description of the security group.
 * @property fromPort Start port (or ICMP type number if protocol is `icmp`)
 * @property ipv6CidrBlocks List of IPv6 CIDR blocks.
 * @property prefixListIds List of prefix list IDs (for allowing access to VPC endpoints)
 * @property protocol Protocol. If you select a protocol of "-1" (semantically equivalent to `all`, which is not a valid value here), you must specify a `from_port` and `to_port` equal to `0`. If not `icmp`, `tcp`, `udp`, or `-1` use the [protocol number](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).
 * @property securityGroups List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID.
 * @property self Whether the security group itself will be added as a source to this egress rule.
 * @property toPort End range port (or ICMP code if protocol is `icmp`).
 */
public data class DefaultSecurityGroupIngressArgs(
    public val cidrBlocks: Output>? = null,
    public val description: Output? = null,
    public val fromPort: Output,
    public val ipv6CidrBlocks: Output>? = null,
    public val prefixListIds: Output>? = null,
    public val protocol: Output,
    public val securityGroups: Output>? = null,
    public val self: Output? = null,
    public val toPort: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ec2.inputs.DefaultSecurityGroupIngressArgs =
        com.pulumi.aws.ec2.inputs.DefaultSecurityGroupIngressArgs.builder()
            .cidrBlocks(cidrBlocks?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .fromPort(fromPort.applyValue({ args0 -> args0 }))
            .ipv6CidrBlocks(ipv6CidrBlocks?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .prefixListIds(prefixListIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .protocol(protocol.applyValue({ args0 -> args0 }))
            .securityGroups(securityGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .self(self?.applyValue({ args0 -> args0 }))
            .toPort(toPort.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DefaultSecurityGroupIngressArgs].
 */
@PulumiTagMarker
public class DefaultSecurityGroupIngressArgsBuilder internal constructor() {
    private var cidrBlocks: Output>? = null

    private var description: Output? = null

    private var fromPort: Output? = null

    private var ipv6CidrBlocks: Output>? = null

    private var prefixListIds: Output>? = null

    private var protocol: Output? = null

    private var securityGroups: Output>? = null

    private var self: Output? = null

    private var toPort: Output? = null

    /**
     * @param value List of CIDR blocks.
     */
    @JvmName("dmqygdeirwxgvugs")
    public suspend fun cidrBlocks(`value`: Output>) {
        this.cidrBlocks = value
    }

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

    /**
     * @param values List of CIDR blocks.
     */
    @JvmName("xecgkvrcagboljtn")
    public suspend fun cidrBlocks(values: List>) {
        this.cidrBlocks = Output.all(values)
    }

    /**
     * @param value Description of the security group.
     */
    @JvmName("scxphilxclexqxsv")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Start port (or ICMP type number if protocol is `icmp`)
     */
    @JvmName("wmklxagxcuaixmyx")
    public suspend fun fromPort(`value`: Output) {
        this.fromPort = value
    }

    /**
     * @param value List of IPv6 CIDR blocks.
     */
    @JvmName("riwukbxkrdinsdft")
    public suspend fun ipv6CidrBlocks(`value`: Output>) {
        this.ipv6CidrBlocks = value
    }

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

    /**
     * @param values List of IPv6 CIDR blocks.
     */
    @JvmName("ievxxdoggkgwgcrt")
    public suspend fun ipv6CidrBlocks(values: List>) {
        this.ipv6CidrBlocks = Output.all(values)
    }

    /**
     * @param value List of prefix list IDs (for allowing access to VPC endpoints)
     */
    @JvmName("ciqhlmkepguqpphe")
    public suspend fun prefixListIds(`value`: Output>) {
        this.prefixListIds = value
    }

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

    /**
     * @param values List of prefix list IDs (for allowing access to VPC endpoints)
     */
    @JvmName("slufeqxsywhewoax")
    public suspend fun prefixListIds(values: List>) {
        this.prefixListIds = Output.all(values)
    }

    /**
     * @param value Protocol. If you select a protocol of "-1" (semantically equivalent to `all`, which is not a valid value here), you must specify a `from_port` and `to_port` equal to `0`. If not `icmp`, `tcp`, `udp`, or `-1` use the [protocol number](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).
     */
    @JvmName("messcnpxcetfmduc")
    public suspend fun protocol(`value`: Output) {
        this.protocol = value
    }

    /**
     * @param value List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID.
     */
    @JvmName("ugpqcimrqfwgpipy")
    public suspend fun securityGroups(`value`: Output>) {
        this.securityGroups = value
    }

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

    /**
     * @param values List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID.
     */
    @JvmName("nvtmvjqrwcublswi")
    public suspend fun securityGroups(values: List>) {
        this.securityGroups = Output.all(values)
    }

    /**
     * @param value Whether the security group itself will be added as a source to this egress rule.
     */
    @JvmName("nbxteftiommxqvfj")
    public suspend fun self(`value`: Output) {
        this.self = value
    }

    /**
     * @param value End range port (or ICMP code if protocol is `icmp`).
     */
    @JvmName("adgkbnxyteplpsbq")
    public suspend fun toPort(`value`: Output) {
        this.toPort = value
    }

    /**
     * @param value List of CIDR blocks.
     */
    @JvmName("oudarmhovnrjnetm")
    public suspend fun cidrBlocks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cidrBlocks = mapped
    }

    /**
     * @param values List of CIDR blocks.
     */
    @JvmName("pwdgfgghgjitwtlc")
    public suspend fun cidrBlocks(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.cidrBlocks = mapped
    }

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

    /**
     * @param value Start port (or ICMP type number if protocol is `icmp`)
     */
    @JvmName("mjjhhvusqahiftep")
    public suspend fun fromPort(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fromPort = mapped
    }

    /**
     * @param value List of IPv6 CIDR blocks.
     */
    @JvmName("dnyojskfdkjwvtpb")
    public suspend fun ipv6CidrBlocks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6CidrBlocks = mapped
    }

    /**
     * @param values List of IPv6 CIDR blocks.
     */
    @JvmName("yxpppoqapqkvlsbx")
    public suspend fun ipv6CidrBlocks(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv6CidrBlocks = mapped
    }

    /**
     * @param value List of prefix list IDs (for allowing access to VPC endpoints)
     */
    @JvmName("cpbhialegfcavcyr")
    public suspend fun prefixListIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.prefixListIds = mapped
    }

    /**
     * @param values List of prefix list IDs (for allowing access to VPC endpoints)
     */
    @JvmName("hpmhgyqupeyexuuu")
    public suspend fun prefixListIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.prefixListIds = mapped
    }

    /**
     * @param value Protocol. If you select a protocol of "-1" (semantically equivalent to `all`, which is not a valid value here), you must specify a `from_port` and `to_port` equal to `0`. If not `icmp`, `tcp`, `udp`, or `-1` use the [protocol number](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).
     */
    @JvmName("nxdwduetbomnfjbf")
    public suspend fun protocol(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    /**
     * @param value List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID.
     */
    @JvmName("ussslrsqwhmngusr")
    public suspend fun securityGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param values List of security groups. A group name can be used relative to the default VPC. Otherwise, group ID.
     */
    @JvmName("ktmecqyrjdxreckq")
    public suspend fun securityGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param value Whether the security group itself will be added as a source to this egress rule.
     */
    @JvmName("seiuokbbeyvliryv")
    public suspend fun self(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.self = mapped
    }

    /**
     * @param value End range port (or ICMP code if protocol is `icmp`).
     */
    @JvmName("jclgnljvwckkfagc")
    public suspend fun toPort(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.toPort = mapped
    }

    internal fun build(): DefaultSecurityGroupIngressArgs = DefaultSecurityGroupIngressArgs(
        cidrBlocks = cidrBlocks,
        description = description,
        fromPort = fromPort ?: throw PulumiNullFieldException("fromPort"),
        ipv6CidrBlocks = ipv6CidrBlocks,
        prefixListIds = prefixListIds,
        protocol = protocol ?: throw PulumiNullFieldException("protocol"),
        securityGroups = securityGroups,
        self = self,
        toPort = toPort ?: throw PulumiNullFieldException("toPort"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy