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

com.pulumi.aws.ec2.kotlin.SubnetArgs.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

import com.pulumi.aws.ec2.SubnetArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides an VPC subnet resource.
 * > **NOTE:** Due to [AWS Lambda improved VPC networking changes that began deploying in September 2019](https://aws.amazon.com/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/), subnets associated with Lambda Functions can take up to 45 minutes to successfully delete. To allow for successful deletion, the provider will wait for at least 45 minutes even if a shorter delete timeout is specified.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const main = new aws.ec2.Subnet("main", {
 *     vpcId: mainAwsVpc.id,
 *     cidrBlock: "10.0.1.0/24",
 *     tags: {
 *         Name: "Main",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * main = aws.ec2.Subnet("main",
 *     vpc_id=main_aws_vpc["id"],
 *     cidr_block="10.0.1.0/24",
 *     tags={
 *         "Name": "Main",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var main = new Aws.Ec2.Subnet("main", new()
 *     {
 *         VpcId = mainAwsVpc.Id,
 *         CidrBlock = "10.0.1.0/24",
 *         Tags =
 *         {
 *             { "Name", "Main" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ec2.NewSubnet(ctx, "main", &ec2.SubnetArgs{
 * 			VpcId:     pulumi.Any(mainAwsVpc.Id),
 * 			CidrBlock: pulumi.String("10.0.1.0/24"),
 * 			Tags: pulumi.StringMap{
 * 				"Name": pulumi.String("Main"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.Subnet;
 * import com.pulumi.aws.ec2.SubnetArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var main = new Subnet("main", SubnetArgs.builder()
 *             .vpcId(mainAwsVpc.id())
 *             .cidrBlock("10.0.1.0/24")
 *             .tags(Map.of("Name", "Main"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   main:
 *     type: aws:ec2:Subnet
 *     properties:
 *       vpcId: ${mainAwsVpc.id}
 *       cidrBlock: 10.0.1.0/24
 *       tags:
 *         Name: Main
 * ```
 * 
 * ### Subnets In Secondary VPC CIDR Blocks
 * When managing subnets in one of a VPC's secondary CIDR blocks created using a `aws.ec2.VpcIpv4CidrBlockAssociation`
 * resource, it is recommended to reference that resource's `vpc_id` attribute to ensure correct dependency ordering.
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const secondaryCidr = new aws.ec2.VpcIpv4CidrBlockAssociation("secondary_cidr", {
 *     vpcId: main.id,
 *     cidrBlock: "172.20.0.0/16",
 * });
 * const inSecondaryCidr = new aws.ec2.Subnet("in_secondary_cidr", {
 *     vpcId: secondaryCidr.vpcId,
 *     cidrBlock: "172.20.0.0/24",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * secondary_cidr = aws.ec2.VpcIpv4CidrBlockAssociation("secondary_cidr",
 *     vpc_id=main["id"],
 *     cidr_block="172.20.0.0/16")
 * in_secondary_cidr = aws.ec2.Subnet("in_secondary_cidr",
 *     vpc_id=secondary_cidr.vpc_id,
 *     cidr_block="172.20.0.0/24")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var secondaryCidr = new Aws.Ec2.VpcIpv4CidrBlockAssociation("secondary_cidr", new()
 *     {
 *         VpcId = main.Id,
 *         CidrBlock = "172.20.0.0/16",
 *     });
 *     var inSecondaryCidr = new Aws.Ec2.Subnet("in_secondary_cidr", new()
 *     {
 *         VpcId = secondaryCidr.VpcId,
 *         CidrBlock = "172.20.0.0/24",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		secondaryCidr, err := ec2.NewVpcIpv4CidrBlockAssociation(ctx, "secondary_cidr", &ec2.VpcIpv4CidrBlockAssociationArgs{
 * 			VpcId:     pulumi.Any(main.Id),
 * 			CidrBlock: pulumi.String("172.20.0.0/16"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = ec2.NewSubnet(ctx, "in_secondary_cidr", &ec2.SubnetArgs{
 * 			VpcId:     secondaryCidr.VpcId,
 * 			CidrBlock: pulumi.String("172.20.0.0/24"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ec2.VpcIpv4CidrBlockAssociation;
 * import com.pulumi.aws.ec2.VpcIpv4CidrBlockAssociationArgs;
 * import com.pulumi.aws.ec2.Subnet;
 * import com.pulumi.aws.ec2.SubnetArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var secondaryCidr = new VpcIpv4CidrBlockAssociation("secondaryCidr", VpcIpv4CidrBlockAssociationArgs.builder()
 *             .vpcId(main.id())
 *             .cidrBlock("172.20.0.0/16")
 *             .build());
 *         var inSecondaryCidr = new Subnet("inSecondaryCidr", SubnetArgs.builder()
 *             .vpcId(secondaryCidr.vpcId())
 *             .cidrBlock("172.20.0.0/24")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   secondaryCidr:
 *     type: aws:ec2:VpcIpv4CidrBlockAssociation
 *     name: secondary_cidr
 *     properties:
 *       vpcId: ${main.id}
 *       cidrBlock: 172.20.0.0/16
 *   inSecondaryCidr:
 *     type: aws:ec2:Subnet
 *     name: in_secondary_cidr
 *     properties:
 *       vpcId: ${secondaryCidr.vpcId}
 *       cidrBlock: 172.20.0.0/24
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import subnets using the subnet `id`. For example:
 * ```sh
 * $ pulumi import aws:ec2/subnet:Subnet public_subnet subnet-9d4a7b6c
 * ```
 * @property assignIpv6AddressOnCreation Specify true to indicate
 * that network interfaces created in the specified subnet should be
 * assigned an IPv6 address. Default is `false`
 * @property availabilityZone AZ for the subnet.
 * @property availabilityZoneId AZ ID of the subnet. This argument is not supported in all regions or partitions. If necessary, use `availability_zone` instead.
 * @property cidrBlock The IPv4 CIDR block for the subnet.
 * @property customerOwnedIpv4Pool The customer owned IPv4 address pool. Typically used with the `map_customer_owned_ip_on_launch` argument. The `outpost_arn` argument must be specified when configured.
 * @property enableDns64 Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. Default: `false`.
 * @property enableLniAtDeviceIndex Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
 * @property enableResourceNameDnsARecordOnLaunch Indicates whether to respond to DNS queries for instance hostnames with DNS A records. Default: `false`.
 * @property enableResourceNameDnsAaaaRecordOnLaunch Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. Default: `false`.
 * @property ipv6CidrBlock The IPv6 network range for the subnet,
 * in CIDR notation. The subnet size must use a /64 prefix length.
 * @property ipv6Native Indicates whether to create an IPv6-only subnet. Default: `false`.
 * @property mapCustomerOwnedIpOnLaunch Specify `true` to indicate that network interfaces created in the subnet should be assigned a customer owned IP address. The `customer_owned_ipv4_pool` and `outpost_arn` arguments must be specified when set to `true`. Default is `false`.
 * @property mapPublicIpOnLaunch Specify true to indicate
 * that instances launched into the subnet should be assigned
 * a public IP address. Default is `false`.
 * @property outpostArn The Amazon Resource Name (ARN) of the Outpost.
 * @property privateDnsHostnameTypeOnLaunch The type of hostnames to assign to instances in the subnet at launch. For IPv6-only subnets, an instance DNS name must be based on the instance ID. For dual-stack and IPv4-only subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: `ip-name`, `resource-name`.
 * @property tags A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property vpcId The VPC ID.
 */
public data class SubnetArgs(
    public val assignIpv6AddressOnCreation: Output? = null,
    public val availabilityZone: Output? = null,
    public val availabilityZoneId: Output? = null,
    public val cidrBlock: Output? = null,
    public val customerOwnedIpv4Pool: Output? = null,
    public val enableDns64: Output? = null,
    public val enableLniAtDeviceIndex: Output? = null,
    public val enableResourceNameDnsARecordOnLaunch: Output? = null,
    public val enableResourceNameDnsAaaaRecordOnLaunch: Output? = null,
    public val ipv6CidrBlock: Output? = null,
    public val ipv6Native: Output? = null,
    public val mapCustomerOwnedIpOnLaunch: Output? = null,
    public val mapPublicIpOnLaunch: Output? = null,
    public val outpostArn: Output? = null,
    public val privateDnsHostnameTypeOnLaunch: Output? = null,
    public val tags: Output>? = null,
    public val vpcId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ec2.SubnetArgs = com.pulumi.aws.ec2.SubnetArgs.builder()
        .assignIpv6AddressOnCreation(assignIpv6AddressOnCreation?.applyValue({ args0 -> args0 }))
        .availabilityZone(availabilityZone?.applyValue({ args0 -> args0 }))
        .availabilityZoneId(availabilityZoneId?.applyValue({ args0 -> args0 }))
        .cidrBlock(cidrBlock?.applyValue({ args0 -> args0 }))
        .customerOwnedIpv4Pool(customerOwnedIpv4Pool?.applyValue({ args0 -> args0 }))
        .enableDns64(enableDns64?.applyValue({ args0 -> args0 }))
        .enableLniAtDeviceIndex(enableLniAtDeviceIndex?.applyValue({ args0 -> args0 }))
        .enableResourceNameDnsARecordOnLaunch(
            enableResourceNameDnsARecordOnLaunch?.applyValue({ args0 ->
                args0
            }),
        )
        .enableResourceNameDnsAaaaRecordOnLaunch(
            enableResourceNameDnsAaaaRecordOnLaunch?.applyValue({ args0 ->
                args0
            }),
        )
        .ipv6CidrBlock(ipv6CidrBlock?.applyValue({ args0 -> args0 }))
        .ipv6Native(ipv6Native?.applyValue({ args0 -> args0 }))
        .mapCustomerOwnedIpOnLaunch(mapCustomerOwnedIpOnLaunch?.applyValue({ args0 -> args0 }))
        .mapPublicIpOnLaunch(mapPublicIpOnLaunch?.applyValue({ args0 -> args0 }))
        .outpostArn(outpostArn?.applyValue({ args0 -> args0 }))
        .privateDnsHostnameTypeOnLaunch(privateDnsHostnameTypeOnLaunch?.applyValue({ args0 -> args0 }))
        .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
        .vpcId(vpcId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SubnetArgs].
 */
@PulumiTagMarker
public class SubnetArgsBuilder internal constructor() {
    private var assignIpv6AddressOnCreation: Output? = null

    private var availabilityZone: Output? = null

    private var availabilityZoneId: Output? = null

    private var cidrBlock: Output? = null

    private var customerOwnedIpv4Pool: Output? = null

    private var enableDns64: Output? = null

    private var enableLniAtDeviceIndex: Output? = null

    private var enableResourceNameDnsARecordOnLaunch: Output? = null

    private var enableResourceNameDnsAaaaRecordOnLaunch: Output? = null

    private var ipv6CidrBlock: Output? = null

    private var ipv6Native: Output? = null

    private var mapCustomerOwnedIpOnLaunch: Output? = null

    private var mapPublicIpOnLaunch: Output? = null

    private var outpostArn: Output? = null

    private var privateDnsHostnameTypeOnLaunch: Output? = null

    private var tags: Output>? = null

    private var vpcId: Output? = null

    /**
     * @param value Specify true to indicate
     * that network interfaces created in the specified subnet should be
     * assigned an IPv6 address. Default is `false`
     */
    @JvmName("xlqvgrraoofiicjx")
    public suspend fun assignIpv6AddressOnCreation(`value`: Output) {
        this.assignIpv6AddressOnCreation = value
    }

    /**
     * @param value AZ for the subnet.
     */
    @JvmName("pifqfitfihxrusgl")
    public suspend fun availabilityZone(`value`: Output) {
        this.availabilityZone = value
    }

    /**
     * @param value AZ ID of the subnet. This argument is not supported in all regions or partitions. If necessary, use `availability_zone` instead.
     */
    @JvmName("foxjmhknyvsaxhyx")
    public suspend fun availabilityZoneId(`value`: Output) {
        this.availabilityZoneId = value
    }

    /**
     * @param value The IPv4 CIDR block for the subnet.
     */
    @JvmName("lqqhlpjqqnounrdk")
    public suspend fun cidrBlock(`value`: Output) {
        this.cidrBlock = value
    }

    /**
     * @param value The customer owned IPv4 address pool. Typically used with the `map_customer_owned_ip_on_launch` argument. The `outpost_arn` argument must be specified when configured.
     */
    @JvmName("fmrtigubivthhdwe")
    public suspend fun customerOwnedIpv4Pool(`value`: Output) {
        this.customerOwnedIpv4Pool = value
    }

    /**
     * @param value Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. Default: `false`.
     */
    @JvmName("enpkriehljxxcquy")
    public suspend fun enableDns64(`value`: Output) {
        this.enableDns64 = value
    }

    /**
     * @param value Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
     */
    @JvmName("segmtoclhismdpql")
    public suspend fun enableLniAtDeviceIndex(`value`: Output) {
        this.enableLniAtDeviceIndex = value
    }

    /**
     * @param value Indicates whether to respond to DNS queries for instance hostnames with DNS A records. Default: `false`.
     */
    @JvmName("tfissybfvuxcacaa")
    public suspend fun enableResourceNameDnsARecordOnLaunch(`value`: Output) {
        this.enableResourceNameDnsARecordOnLaunch = value
    }

    /**
     * @param value Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. Default: `false`.
     */
    @JvmName("okhvcxfsgajsorek")
    public suspend fun enableResourceNameDnsAaaaRecordOnLaunch(`value`: Output) {
        this.enableResourceNameDnsAaaaRecordOnLaunch = value
    }

    /**
     * @param value The IPv6 network range for the subnet,
     * in CIDR notation. The subnet size must use a /64 prefix length.
     */
    @JvmName("tekibkflpnvfvoai")
    public suspend fun ipv6CidrBlock(`value`: Output) {
        this.ipv6CidrBlock = value
    }

    /**
     * @param value Indicates whether to create an IPv6-only subnet. Default: `false`.
     */
    @JvmName("ivlxgliyyflcvuwb")
    public suspend fun ipv6Native(`value`: Output) {
        this.ipv6Native = value
    }

    /**
     * @param value Specify `true` to indicate that network interfaces created in the subnet should be assigned a customer owned IP address. The `customer_owned_ipv4_pool` and `outpost_arn` arguments must be specified when set to `true`. Default is `false`.
     */
    @JvmName("mciprbfnyasepyhq")
    public suspend fun mapCustomerOwnedIpOnLaunch(`value`: Output) {
        this.mapCustomerOwnedIpOnLaunch = value
    }

    /**
     * @param value Specify true to indicate
     * that instances launched into the subnet should be assigned
     * a public IP address. Default is `false`.
     */
    @JvmName("jjqkehegiovfmxvx")
    public suspend fun mapPublicIpOnLaunch(`value`: Output) {
        this.mapPublicIpOnLaunch = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the Outpost.
     */
    @JvmName("oottutpmdpmkayhk")
    public suspend fun outpostArn(`value`: Output) {
        this.outpostArn = value
    }

    /**
     * @param value The type of hostnames to assign to instances in the subnet at launch. For IPv6-only subnets, an instance DNS name must be based on the instance ID. For dual-stack and IPv4-only subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: `ip-name`, `resource-name`.
     */
    @JvmName("traxvxkxfrxylwbn")
    public suspend fun privateDnsHostnameTypeOnLaunch(`value`: Output) {
        this.privateDnsHostnameTypeOnLaunch = value
    }

    /**
     * @param value A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("fyrvndxklndyvodx")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The VPC ID.
     */
    @JvmName("njavydgnnbyqdorg")
    public suspend fun vpcId(`value`: Output) {
        this.vpcId = value
    }

    /**
     * @param value Specify true to indicate
     * that network interfaces created in the specified subnet should be
     * assigned an IPv6 address. Default is `false`
     */
    @JvmName("tysjenelpwasnwst")
    public suspend fun assignIpv6AddressOnCreation(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.assignIpv6AddressOnCreation = mapped
    }

    /**
     * @param value AZ for the subnet.
     */
    @JvmName("epsnprutuwqphndv")
    public suspend fun availabilityZone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.availabilityZone = mapped
    }

    /**
     * @param value AZ ID of the subnet. This argument is not supported in all regions or partitions. If necessary, use `availability_zone` instead.
     */
    @JvmName("hxvtyvtvrkdbrwrl")
    public suspend fun availabilityZoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.availabilityZoneId = mapped
    }

    /**
     * @param value The IPv4 CIDR block for the subnet.
     */
    @JvmName("kevdbssvxfitpnxr")
    public suspend fun cidrBlock(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cidrBlock = mapped
    }

    /**
     * @param value The customer owned IPv4 address pool. Typically used with the `map_customer_owned_ip_on_launch` argument. The `outpost_arn` argument must be specified when configured.
     */
    @JvmName("qjlgbegoyxptbosg")
    public suspend fun customerOwnedIpv4Pool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerOwnedIpv4Pool = mapped
    }

    /**
     * @param value Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. Default: `false`.
     */
    @JvmName("yuisuasqsisgyvwn")
    public suspend fun enableDns64(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableDns64 = mapped
    }

    /**
     * @param value Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
     */
    @JvmName("gvjdtjvpdbhowhmn")
    public suspend fun enableLniAtDeviceIndex(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableLniAtDeviceIndex = mapped
    }

    /**
     * @param value Indicates whether to respond to DNS queries for instance hostnames with DNS A records. Default: `false`.
     */
    @JvmName("vbtsfbxllllnnugi")
    public suspend fun enableResourceNameDnsARecordOnLaunch(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableResourceNameDnsARecordOnLaunch = mapped
    }

    /**
     * @param value Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. Default: `false`.
     */
    @JvmName("riitoilstmgfccnc")
    public suspend fun enableResourceNameDnsAaaaRecordOnLaunch(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableResourceNameDnsAaaaRecordOnLaunch = mapped
    }

    /**
     * @param value The IPv6 network range for the subnet,
     * in CIDR notation. The subnet size must use a /64 prefix length.
     */
    @JvmName("dgdwmnwemajpsuqe")
    public suspend fun ipv6CidrBlock(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6CidrBlock = mapped
    }

    /**
     * @param value Indicates whether to create an IPv6-only subnet. Default: `false`.
     */
    @JvmName("ypyuhbwftswpvbxe")
    public suspend fun ipv6Native(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6Native = mapped
    }

    /**
     * @param value Specify `true` to indicate that network interfaces created in the subnet should be assigned a customer owned IP address. The `customer_owned_ipv4_pool` and `outpost_arn` arguments must be specified when set to `true`. Default is `false`.
     */
    @JvmName("ykgnjujkrhlusflp")
    public suspend fun mapCustomerOwnedIpOnLaunch(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mapCustomerOwnedIpOnLaunch = mapped
    }

    /**
     * @param value Specify true to indicate
     * that instances launched into the subnet should be assigned
     * a public IP address. Default is `false`.
     */
    @JvmName("snmiujykipqrjvll")
    public suspend fun mapPublicIpOnLaunch(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mapPublicIpOnLaunch = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the Outpost.
     */
    @JvmName("frseuujjlpykeoia")
    public suspend fun outpostArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outpostArn = mapped
    }

    /**
     * @param value The type of hostnames to assign to instances in the subnet at launch. For IPv6-only subnets, an instance DNS name must be based on the instance ID. For dual-stack and IPv4-only subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: `ip-name`, `resource-name`.
     */
    @JvmName("xbgskgnnuupxicqc")
    public suspend fun privateDnsHostnameTypeOnLaunch(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateDnsHostnameTypeOnLaunch = mapped
    }

    /**
     * @param value A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("khvrhmcexoxqiekl")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("vcckhwokfjthtfxc")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

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

    internal fun build(): SubnetArgs = SubnetArgs(
        assignIpv6AddressOnCreation = assignIpv6AddressOnCreation,
        availabilityZone = availabilityZone,
        availabilityZoneId = availabilityZoneId,
        cidrBlock = cidrBlock,
        customerOwnedIpv4Pool = customerOwnedIpv4Pool,
        enableDns64 = enableDns64,
        enableLniAtDeviceIndex = enableLniAtDeviceIndex,
        enableResourceNameDnsARecordOnLaunch = enableResourceNameDnsARecordOnLaunch,
        enableResourceNameDnsAaaaRecordOnLaunch = enableResourceNameDnsAaaaRecordOnLaunch,
        ipv6CidrBlock = ipv6CidrBlock,
        ipv6Native = ipv6Native,
        mapCustomerOwnedIpOnLaunch = mapCustomerOwnedIpOnLaunch,
        mapPublicIpOnLaunch = mapPublicIpOnLaunch,
        outpostArn = outpostArn,
        privateDnsHostnameTypeOnLaunch = privateDnsHostnameTypeOnLaunch,
        tags = tags,
        vpcId = vpcId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy