
com.pulumi.awsnative.ec2.kotlin.SubnetArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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. For more information, see [DNS64 and NAT64](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-nat64-dns64) 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 ipv6CidrBlocks The IPv6 network ranges for the subnet, in CIDR notation.
* @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 ipv6CidrBlocks: 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 }))
.ipv6CidrBlocks(ipv6CidrBlocks?.applyValue({ args0 -> args0.map({ 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 ipv6CidrBlocks: 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("nbvupemkypodvgim")
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("rjivdubgbenlaipm")
public suspend fun availabilityZone(`value`: Output) {
this.availabilityZone = value
}
/**
* @param value The AZ ID of the subnet.
*/
@JvmName("jlwnldoghyxpnthf")
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("cuepefxabcabpbcr")
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. For more information, see [DNS64 and NAT64](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-nat64-dns64) in the *User Guide*.
*/
@JvmName("vpsdtdietmbmmtyf")
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("jkwjhhxorgnhmljy")
public suspend fun enableLniAtDeviceIndex(`value`: Output) {
this.enableLniAtDeviceIndex = value
}
/**
* @param value An IPv4 IPAM pool ID for the subnet.
*/
@JvmName("btekymggfnjsjbqh")
public suspend fun ipv4IpamPoolId(`value`: Output) {
this.ipv4IpamPoolId = value
}
/**
* @param value An IPv4 netmask length for the subnet.
*/
@JvmName("fxujyquufqoegdku")
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("ddsdpqlwnagljxri")
public suspend fun ipv6CidrBlock(`value`: Output) {
this.ipv6CidrBlock = value
}
/**
* @param value The IPv6 network ranges for the subnet, in CIDR notation.
*/
@JvmName("dxqusvexmfvbfcku")
public suspend fun ipv6CidrBlocks(`value`: Output>) {
this.ipv6CidrBlocks = value
}
@JvmName("wruhggavfyefpvop")
public suspend fun ipv6CidrBlocks(vararg values: Output) {
this.ipv6CidrBlocks = Output.all(values.asList())
}
/**
* @param values The IPv6 network ranges for the subnet, in CIDR notation.
*/
@JvmName("njyqmwvapwqyoecl")
public suspend fun ipv6CidrBlocks(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy