Interface SubnetMapping
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
SubnetMapping.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:05.504Z")
@Stability(Stable)
public interface SubnetMapping
extends software.amazon.jsii.JsiiSerializable
Specifies a subnet for a load balancer.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.elasticloadbalancingv2.*;
SourceNatIpv6Prefix sourceNatIpv6Prefix;
Subnet subnet;
SubnetMapping subnetMapping = SubnetMapping.builder()
.subnet(subnet)
// the properties below are optional
.allocationId("allocationId")
.ipv6Address("ipv6Address")
.privateIpv4Address("privateIpv4Address")
.sourceNatIpv6Prefix(sourceNatIpv6Prefix)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forSubnetMappingstatic final classAn implementation forSubnetMapping -
Method Summary
Modifier and TypeMethodDescriptionstatic SubnetMapping.Builderbuilder()default StringThe allocation ID of the Elastic IP address for an internet-facing load balancer.default StringThe IPv6 address.default StringThe private IPv4 address for an internal load balancer.default SourceNatIpv6PrefixThe IPv6 prefix to use for source NAT for a dual-stack network load balancer with UDP listeners.The subnet.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getSubnet
The subnet. -
getAllocationId
The allocation ID of the Elastic IP address for an internet-facing load balancer.Default: undefined - AWS default is to allocate a new IP address for internet-facing load balancers
-
getIpv6Address
The IPv6 address.Default: undefined - AWS default is to allocate an IPv6 address from the subnet's pool
-
getPrivateIpv4Address
The private IPv4 address for an internal load balancer.Default: undefined - AWS default is to allocate a private IPv4 address from the subnet's pool
-
getSourceNatIpv6Prefix
The IPv6 prefix to use for source NAT for a dual-stack network load balancer with UDP listeners.Specify an IPv6 prefix (/80 netmask) from the subnet CIDR block or
SourceNatIpv6Prefix.autoAssigned()to use an IPv6 prefix selected at random from the subnet CIDR block.Default: undefined - AWS default is `SourceNatIpv6Prefix.autoAssigned()` for IPv6 load balancers
-
builder
- Returns:
- a
SubnetMapping.BuilderofSubnetMapping
-