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

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

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

package com.pulumi.awsnative.ec2.kotlin

import com.pulumi.awsnative.ec2.VpcArgs.builder
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.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Specifies a virtual private cloud (VPC).
 *  To add an IPv6 CIDR block to the VPC, see [AWS::EC2::VPCCidrBlock](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html).
 *  For more information, see [Virtual private clouds (VPC)](https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html) in the *Amazon VPC User Guide*.
 * @property cidrBlock The IPv4 network range for the VPC, in CIDR notation. For example, ``10.0.0.0/16``. We modify the specified CIDR block to its canonical form; for example, if you specify ``100.68.0.18/18``, we modify it to ``100.68.0.0/18``.
 *  You must specify either``CidrBlock`` or ``Ipv4IpamPoolId``.
 * @property enableDnsHostnames Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see [DNS attributes in your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-support).
 *  You can only enable DNS hostnames if you've enabled DNS support.
 * @property enableDnsSupport Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see [DNS attributes in your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-support).
 * @property instanceTenancy The allowed tenancy of instances launched into the VPC.
 *   +   ``default``: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.
 *   +   ``dedicated``: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy of ``host`` during instance launch. You cannot specify a tenancy of ``default`` during instance launch.
 *  Updating ``InstanceTenancy`` requires no replacement only if you are updating its value from ``dedicated`` to ``default``. Updating ``InstanceTenancy`` from ``default`` to ``dedicated`` requires replacement.
 * @property ipv4IpamPoolId The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide*.
 *  You must specify either``CidrBlock`` or ``Ipv4IpamPoolId``.
 * @property ipv4NetmaskLength The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide*.
 * @property tags The tags for the VPC.
 */
public data class VpcArgs(
    public val cidrBlock: Output? = null,
    public val enableDnsHostnames: Output? = null,
    public val enableDnsSupport: Output? = null,
    public val instanceTenancy: Output? = null,
    public val ipv4IpamPoolId: Output? = null,
    public val ipv4NetmaskLength: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.VpcArgs =
        com.pulumi.awsnative.ec2.VpcArgs.builder()
            .cidrBlock(cidrBlock?.applyValue({ args0 -> args0 }))
            .enableDnsHostnames(enableDnsHostnames?.applyValue({ args0 -> args0 }))
            .enableDnsSupport(enableDnsSupport?.applyValue({ args0 -> args0 }))
            .instanceTenancy(instanceTenancy?.applyValue({ args0 -> args0 }))
            .ipv4IpamPoolId(ipv4IpamPoolId?.applyValue({ args0 -> args0 }))
            .ipv4NetmaskLength(ipv4NetmaskLength?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [VpcArgs].
 */
@PulumiTagMarker
public class VpcArgsBuilder internal constructor() {
    private var cidrBlock: Output? = null

    private var enableDnsHostnames: Output? = null

    private var enableDnsSupport: Output? = null

    private var instanceTenancy: Output? = null

    private var ipv4IpamPoolId: Output? = null

    private var ipv4NetmaskLength: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The IPv4 network range for the VPC, in CIDR notation. For example, ``10.0.0.0/16``. We modify the specified CIDR block to its canonical form; for example, if you specify ``100.68.0.18/18``, we modify it to ``100.68.0.0/18``.
     *  You must specify either``CidrBlock`` or ``Ipv4IpamPoolId``.
     */
    @JvmName("dcftmwdppjustafd")
    public suspend fun cidrBlock(`value`: Output) {
        this.cidrBlock = value
    }

    /**
     * @param value Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see [DNS attributes in your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-support).
     *  You can only enable DNS hostnames if you've enabled DNS support.
     */
    @JvmName("dclovjfuvcaonnbi")
    public suspend fun enableDnsHostnames(`value`: Output) {
        this.enableDnsHostnames = value
    }

    /**
     * @param value Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see [DNS attributes in your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-support).
     */
    @JvmName("fvojhrveqatrutkl")
    public suspend fun enableDnsSupport(`value`: Output) {
        this.enableDnsSupport = value
    }

    /**
     * @param value The allowed tenancy of instances launched into the VPC.
     *   +   ``default``: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.
     *   +   ``dedicated``: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy of ``host`` during instance launch. You cannot specify a tenancy of ``default`` during instance launch.
     *  Updating ``InstanceTenancy`` requires no replacement only if you are updating its value from ``dedicated`` to ``default``. Updating ``InstanceTenancy`` from ``default`` to ``dedicated`` requires replacement.
     */
    @JvmName("gojlyqcqlisdkmft")
    public suspend fun instanceTenancy(`value`: Output) {
        this.instanceTenancy = value
    }

    /**
     * @param value The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide*.
     *  You must specify either``CidrBlock`` or ``Ipv4IpamPoolId``.
     */
    @JvmName("tuwaebhelbndifmg")
    public suspend fun ipv4IpamPoolId(`value`: Output) {
        this.ipv4IpamPoolId = value
    }

    /**
     * @param value The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide*.
     */
    @JvmName("loxhrxojxwfsmpaw")
    public suspend fun ipv4NetmaskLength(`value`: Output) {
        this.ipv4NetmaskLength = value
    }

    /**
     * @param value The tags for the VPC.
     */
    @JvmName("nsqydblcjljbxxka")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values The tags for the VPC.
     */
    @JvmName("yrituvclpadowpnr")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The IPv4 network range for the VPC, in CIDR notation. For example, ``10.0.0.0/16``. We modify the specified CIDR block to its canonical form; for example, if you specify ``100.68.0.18/18``, we modify it to ``100.68.0.0/18``.
     *  You must specify either``CidrBlock`` or ``Ipv4IpamPoolId``.
     */
    @JvmName("wkfdsjuvrtgiduxf")
    public suspend fun cidrBlock(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cidrBlock = mapped
    }

    /**
     * @param value Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see [DNS attributes in your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-support).
     *  You can only enable DNS hostnames if you've enabled DNS support.
     */
    @JvmName("qleyggvibxxlxuun")
    public suspend fun enableDnsHostnames(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableDnsHostnames = mapped
    }

    /**
     * @param value Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see [DNS attributes in your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-support).
     */
    @JvmName("otvwnlhlsyvoahuw")
    public suspend fun enableDnsSupport(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableDnsSupport = mapped
    }

    /**
     * @param value The allowed tenancy of instances launched into the VPC.
     *   +   ``default``: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.
     *   +   ``dedicated``: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy of ``host`` during instance launch. You cannot specify a tenancy of ``default`` during instance launch.
     *  Updating ``InstanceTenancy`` requires no replacement only if you are updating its value from ``dedicated`` to ``default``. Updating ``InstanceTenancy`` from ``default`` to ``dedicated`` requires replacement.
     */
    @JvmName("lwnfcyknpmwqbpne")
    public suspend fun instanceTenancy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceTenancy = mapped
    }

    /**
     * @param value The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide*.
     *  You must specify either``CidrBlock`` or ``Ipv4IpamPoolId``.
     */
    @JvmName("hrwymtasnotetiqq")
    public suspend fun ipv4IpamPoolId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv4IpamPoolId = mapped
    }

    /**
     * @param value The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide*.
     */
    @JvmName("tfsoortstrgbtcyh")
    public suspend fun ipv4NetmaskLength(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv4NetmaskLength = mapped
    }

    /**
     * @param value The tags for the VPC.
     */
    @JvmName("akbipcafrjdbbwxn")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument The tags for the VPC.
     */
    @JvmName("evmyjyocjvqjmgpc")
    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 The tags for the VPC.
     */
    @JvmName("ujdwwidubuhskuok")
    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 The tags for the VPC.
     */
    @JvmName("jddoavormpvhyxoj")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values The tags for the VPC.
     */
    @JvmName("danwihabydmxbtwn")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): VpcArgs = VpcArgs(
        cidrBlock = cidrBlock,
        enableDnsHostnames = enableDnsHostnames,
        enableDnsSupport = enableDnsSupport,
        instanceTenancy = instanceTenancy,
        ipv4IpamPoolId = ipv4IpamPoolId,
        ipv4NetmaskLength = ipv4NetmaskLength,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy