Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin
import com.pulumi.awsnative.ec2.SubnetArgs.builder
import com.pulumi.awsnative.ec2.kotlin.inputs.PrivateDnsNameOptionsOnLaunchPropertiesArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.PrivateDnsNameOptionsOnLaunchPropertiesArgsBuilder
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 subnet for the specified VPC.
* For an IPv4 only subnet, specify an IPv4 CIDR block. If the VPC has an IPv6 CIDR block, you can create an IPv6 only subnet or a dual stack subnet instead. For an IPv6 only subnet, specify an IPv6 CIDR block. For a dual stack subnet, specify both an IPv4 CIDR block and an IPv6 CIDR block.
* For more information, see [Subnets for your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html) in the *Amazon VPC User Guide*.
* @property assignIpv6AddressOnCreation Indicates whether a network interface created in this subnet receives an IPv6 address. The default value is ``false``.
* If you specify ``AssignIpv6AddressOnCreation``, you must also specify an IPv6 CIDR block.
* @property availabilityZone The Availability Zone of the subnet.
* If you update this property, you must also update the ``CidrBlock`` property.
* @property availabilityZoneId The AZ ID of the subnet.
* @property cidrBlock The IPv4 CIDR block assigned to the subnet.
* If you update this property, we create a new subnet, and then delete the existing one.
* @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.
* You must first configure a NAT gateway in a public subnet (separate from the subnet containing the IPv6-only workloads). For example, the subnet containing the NAT gateway should have a ``0.0.0.0/0`` route pointing to the internet gateway. For more information, see [Configure DNS64 and NAT64](https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-nat64-dns64.html#nat-gateway-nat64-dns64-walkthrough) in the *User Guide*.
* @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).
* @property ipv4IpamPoolId An IPv4 IPAM pool ID for the subnet.
* @property ipv4NetmaskLength An IPv4 netmask length for the subnet.
* @property ipv6CidrBlock The IPv6 CIDR block.
* If you specify ``AssignIpv6AddressOnCreation``, you must also specify an IPv6 CIDR block.
* @property ipv6IpamPoolId An IPv6 IPAM pool ID for the subnet.
* @property ipv6Native Indicates whether this is an IPv6 only subnet. For more information, see [Subnet basics](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#subnet-basics) in the *User Guide*.
* @property ipv6NetmaskLength An IPv6 netmask length for the subnet.
* @property mapPublicIpOnLaunch Indicates whether instances launched in this subnet receive a public IPv4 address. The default value is ``false``.
* AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the *Public IPv4 Address* tab on the [VPC pricing page](https://docs.aws.amazon.com/vpc/pricing/).
* @property outpostArn The Amazon Resource Name (ARN) of the Outpost.
* @property privateDnsNameOptionsOnLaunch The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries to the instances should be handled. For more information, see [Amazon EC2 instance hostname types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-naming.html) in the *User Guide*.
* Available options:
* + EnableResourceNameDnsAAAARecord (true | false)
* + EnableResourceNameDnsARecord (true | false)
* + HostnameType (ip-name | resource-name)
* @property tags Any tags assigned to the subnet.
* @property vpcId The ID of the VPC the subnet is in.
* If you update this property, you must also update the ``CidrBlock`` property.
*/
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 enableDns64: Output? = null,
public val enableLniAtDeviceIndex: Output? = null,
public val ipv4IpamPoolId: Output? = null,
public val ipv4NetmaskLength: Output? = null,
public val ipv6CidrBlock: Output? = null,
public val ipv6IpamPoolId: Output? = null,
public val ipv6Native: Output? = null,
public val ipv6NetmaskLength: Output? = null,
public val mapPublicIpOnLaunch: Output? = null,
public val outpostArn: Output? = null,
public val privateDnsNameOptionsOnLaunch: Output? =
null,
public val tags: Output>? = null,
public val vpcId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.ec2.SubnetArgs =
com.pulumi.awsnative.ec2.SubnetArgs.builder()
.assignIpv6AddressOnCreation(assignIpv6AddressOnCreation?.applyValue({ args0 -> args0 }))
.availabilityZone(availabilityZone?.applyValue({ args0 -> args0 }))
.availabilityZoneId(availabilityZoneId?.applyValue({ args0 -> args0 }))
.cidrBlock(cidrBlock?.applyValue({ args0 -> args0 }))
.enableDns64(enableDns64?.applyValue({ args0 -> args0 }))
.enableLniAtDeviceIndex(enableLniAtDeviceIndex?.applyValue({ args0 -> args0 }))
.ipv4IpamPoolId(ipv4IpamPoolId?.applyValue({ args0 -> args0 }))
.ipv4NetmaskLength(ipv4NetmaskLength?.applyValue({ args0 -> args0 }))
.ipv6CidrBlock(ipv6CidrBlock?.applyValue({ args0 -> args0 }))
.ipv6IpamPoolId(ipv6IpamPoolId?.applyValue({ args0 -> args0 }))
.ipv6Native(ipv6Native?.applyValue({ args0 -> args0 }))
.ipv6NetmaskLength(ipv6NetmaskLength?.applyValue({ args0 -> args0 }))
.mapPublicIpOnLaunch(mapPublicIpOnLaunch?.applyValue({ args0 -> args0 }))
.outpostArn(outpostArn?.applyValue({ args0 -> args0 }))
.privateDnsNameOptionsOnLaunch(
privateDnsNameOptionsOnLaunch?.applyValue({ 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 [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 enableDns64: Output? = null
private var enableLniAtDeviceIndex: Output? = null
private var ipv4IpamPoolId: Output? = null
private var ipv4NetmaskLength: Output? = null
private var ipv6CidrBlock: Output? = null
private var ipv6IpamPoolId: Output? = null
private var ipv6Native: Output? = null
private var ipv6NetmaskLength: Output? = null
private var mapPublicIpOnLaunch: Output? = null
private var outpostArn: Output? = null
private var privateDnsNameOptionsOnLaunch: Output? =
null
private var tags: Output>? = null
private var vpcId: Output? = null
/**
* @param value Indicates whether a network interface created in this subnet receives an IPv6 address. The default value is ``false``.
* If you specify ``AssignIpv6AddressOnCreation``, you must also specify an IPv6 CIDR block.
*/
@JvmName("egsrudmhnstljkpd")
public suspend fun assignIpv6AddressOnCreation(`value`: Output) {
this.assignIpv6AddressOnCreation = value
}
/**
* @param value The Availability Zone of the subnet.
* If you update this property, you must also update the ``CidrBlock`` property.
*/
@JvmName("yqoqusxebkamlirt")
public suspend fun availabilityZone(`value`: Output) {
this.availabilityZone = value
}
/**
* @param value The AZ ID of the subnet.
*/
@JvmName("fchaplgrkteslork")
public suspend fun availabilityZoneId(`value`: Output) {
this.availabilityZoneId = value
}
/**
* @param value The IPv4 CIDR block assigned to the subnet.
* If you update this property, we create a new subnet, and then delete the existing one.
*/
@JvmName("akeseubriadgncrq")
public suspend fun cidrBlock(`value`: Output) {
this.cidrBlock = 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.
* You must first configure a NAT gateway in a public subnet (separate from the subnet containing the IPv6-only workloads). For example, the subnet containing the NAT gateway should have a ``0.0.0.0/0`` route pointing to the internet gateway. For more information, see [Configure DNS64 and NAT64](https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-nat64-dns64.html#nat-gateway-nat64-dns64-walkthrough) in the *User Guide*.
*/
@JvmName("fitebbbnndgqdrtf")
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).
*/
@JvmName("jrscpnjjpibsbrnl")
public suspend fun enableLniAtDeviceIndex(`value`: Output) {
this.enableLniAtDeviceIndex = value
}
/**
* @param value An IPv4 IPAM pool ID for the subnet.
*/
@JvmName("iqvjgeywexeyrvgp")
public suspend fun ipv4IpamPoolId(`value`: Output) {
this.ipv4IpamPoolId = value
}
/**
* @param value An IPv4 netmask length for the subnet.
*/
@JvmName("vvgnvatcfsryndgm")
public suspend fun ipv4NetmaskLength(`value`: Output) {
this.ipv4NetmaskLength = value
}
/**
* @param value The IPv6 CIDR block.
* If you specify ``AssignIpv6AddressOnCreation``, you must also specify an IPv6 CIDR block.
*/
@JvmName("mchqdhxaxyyqrrxm")
public suspend fun ipv6CidrBlock(`value`: Output) {
this.ipv6CidrBlock = value
}
/**
* @param value An IPv6 IPAM pool ID for the subnet.
*/
@JvmName("xlugdoooqwdkpfqh")
public suspend fun ipv6IpamPoolId(`value`: Output) {
this.ipv6IpamPoolId = value
}
/**
* @param value Indicates whether this is an IPv6 only subnet. For more information, see [Subnet basics](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#subnet-basics) in the *User Guide*.
*/
@JvmName("nagljymdjhkcuqia")
public suspend fun ipv6Native(`value`: Output) {
this.ipv6Native = value
}
/**
* @param value An IPv6 netmask length for the subnet.
*/
@JvmName("kqsxdjplnjgofcsw")
public suspend fun ipv6NetmaskLength(`value`: Output) {
this.ipv6NetmaskLength = value
}
/**
* @param value Indicates whether instances launched in this subnet receive a public IPv4 address. The default value is ``false``.
* AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the *Public IPv4 Address* tab on the [VPC pricing page](https://docs.aws.amazon.com/vpc/pricing/).
*/
@JvmName("aqwvcgtwfimxkrtk")
public suspend fun mapPublicIpOnLaunch(`value`: Output) {
this.mapPublicIpOnLaunch = value
}
/**
* @param value The Amazon Resource Name (ARN) of the Outpost.
*/
@JvmName("cntswcvxmryauncx")
public suspend fun outpostArn(`value`: Output) {
this.outpostArn = value
}
/**
* @param value The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries to the instances should be handled. For more information, see [Amazon EC2 instance hostname types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-naming.html) in the *User Guide*.
* Available options:
* + EnableResourceNameDnsAAAARecord (true | false)
* + EnableResourceNameDnsARecord (true | false)
* + HostnameType (ip-name | resource-name)
*/
@JvmName("bfwnxenilqpsenju")
public suspend fun privateDnsNameOptionsOnLaunch(`value`: Output) {
this.privateDnsNameOptionsOnLaunch = value
}
/**
* @param value Any tags assigned to the subnet.
*/
@JvmName("dyotnfvslrckiagc")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
@JvmName("acvtxsiwllvevgkg")
public suspend fun tags(vararg values: Output) {
this.tags = Output.all(values.asList())
}
/**
* @param values Any tags assigned to the subnet.
*/
@JvmName("ogpcfuphpfintjol")
public suspend fun tags(values: List