Interface CfnLaunchTemplate.NetworkInterfaceProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnLaunchTemplate.NetworkInterfaceProperty.Jsii$Proxy
- Enclosing class:
CfnLaunchTemplate
NetworkInterface is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .
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.*;
NetworkInterfaceProperty networkInterfaceProperty = NetworkInterfaceProperty.builder()
.associateCarrierIpAddress(false)
.associatePublicIpAddress(false)
.connectionTrackingSpecification(ConnectionTrackingSpecificationProperty.builder()
.tcpEstablishedTimeout(123)
.udpStreamTimeout(123)
.udpTimeout(123)
.build())
.deleteOnTermination(false)
.description("description")
.deviceIndex(123)
.enaQueueCount(123)
.enaSrdSpecification(EnaSrdSpecificationProperty.builder()
.enaSrdEnabled(false)
.enaSrdUdpSpecification(EnaSrdUdpSpecificationProperty.builder()
.enaSrdUdpEnabled(false)
.build())
.build())
.groups(List.of("groups"))
.interfaceType("interfaceType")
.ipv4PrefixCount(123)
.ipv4Prefixes(List.of(Ipv4PrefixSpecificationProperty.builder()
.ipv4Prefix("ipv4Prefix")
.build()))
.ipv6AddressCount(123)
.ipv6Addresses(List.of(Ipv6AddProperty.builder()
.ipv6Address("ipv6Address")
.build()))
.ipv6PrefixCount(123)
.ipv6Prefixes(List.of(Ipv6PrefixSpecificationProperty.builder()
.ipv6Prefix("ipv6Prefix")
.build()))
.networkCardIndex(123)
.networkInterfaceId("networkInterfaceId")
.primaryIpv6(false)
.privateIpAddress("privateIpAddress")
.privateIpAddresses(List.of(PrivateIpAddProperty.builder()
.primary(false)
.privateIpAddress("privateIpAddress")
.build()))
.secondaryPrivateIpAddressCount(123)
.subnetId("subnetId")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnLaunchTemplate.NetworkInterfacePropertystatic final classAn implementation forCfnLaunchTemplate.NetworkInterfaceProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectAssociates a Carrier IP address with eth0 for a new network interface.default ObjectAssociates a public IPv4 address with eth0 for a new network interface.default ObjectA connection tracking specification for the network interface.default ObjectIndicates whether the network interface is deleted when the instance is terminated.default StringA description for the network interface.default NumberThe device index for the network interface attachment.default NumberThe number of ENA queues to be created with the instance.default ObjectThe ENA Express configuration for the network interface.The IDs of one or more security groups.default StringThe type of network interface.default NumberThe number of IPv4 prefixes to be automatically assigned to the network interface.default ObjectOne or more IPv4 prefixes to be assigned to the network interface.default NumberThe number of IPv6 addresses to assign to a network interface.default ObjectOne or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet.default NumberThe number of IPv6 prefixes to be automatically assigned to the network interface.default ObjectOne or more IPv6 prefixes to be assigned to the network interface.default NumberThe index of the network card.default StringThe ID of the network interface.default ObjectThe primary IPv6 address of the network interface.default StringThe primary private IPv4 address of the network interface.default ObjectOne or more private IPv4 addresses.default NumberThe number of secondary private IPv4 addresses to assign to a network interface.default StringThe ID of the subnet for the network interface.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAssociateCarrierIpAddress
Associates a Carrier IP address with eth0 for a new network interface.Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the AWS Wavelength Developer Guide .
Returns union: either
BooleanorIResolvable- See Also:
-
getAssociatePublicIpAddress
Associates a public IPv4 address with eth0 for a new network interface.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 Amazon VPC pricing page .
Returns union: either
BooleanorIResolvable- See Also:
-
getConnectionTrackingSpecification
A connection tracking specification for the network interface.Returns union: either
IResolvableorCfnLaunchTemplate.ConnectionTrackingSpecificationProperty- See Also:
-
getDeleteOnTermination
Indicates whether the network interface is deleted when the instance is terminated.Returns union: either
BooleanorIResolvable- See Also:
-
getDescription
A description for the network interface.- See Also:
-
getDeviceIndex
The device index for the network interface attachment.The primary network interface has a device index of 0. If the network interface is of type
interface, you must specify a device index.If you create a launch template that includes secondary network interfaces but no primary network interface, and you specify it using the
LaunchTemplateproperty ofAWS::EC2::Instance, then you must include a primary network interface using theNetworkInterfacesproperty ofAWS::EC2::Instance.- See Also:
-
getEnaQueueCount
The number of ENA queues to be created with the instance.- See Also:
-
getEnaSrdSpecification
The ENA Express configuration for the network interface.Returns union: either
IResolvableorCfnLaunchTemplate.EnaSrdSpecificationProperty- See Also:
-
getGroups
The IDs of one or more security groups.- See Also:
-
getInterfaceType
The type of network interface.To create an Elastic Fabric Adapter (EFA), specify
efaorefa. For more information, see Elastic Fabric Adapter for AI/ML and HPC workloads on Amazon EC2 in the Amazon EC2 User Guide .If you are not creating an EFA, specify
interfaceor omit this parameter.If you specify
efa-only, do not assign any IP addresses to the network interface. EFA-only network interfaces do not support IP addresses.Valid values:
interface|efa|efa-only- See Also:
-
getIpv4PrefixCount
The number of IPv4 prefixes to be automatically assigned to the network interface.You cannot use this option if you use the
Ipv4Prefixoption.- See Also:
-
getIpv4Prefixes
One or more IPv4 prefixes to be assigned to the network interface.You cannot use this option if you use the
Ipv4PrefixCountoption.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnLaunchTemplate.Ipv4PrefixSpecificationProperty>- See Also:
-
getIpv6AddressCount
The number of IPv6 addresses to assign to a network interface.Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.
- See Also:
-
getIpv6Addresses
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet.You can't use this option if you're specifying a number of IPv6 addresses.
Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnLaunchTemplate.Ipv6AddProperty>- See Also:
-
getIpv6PrefixCount
The number of IPv6 prefixes to be automatically assigned to the network interface.You cannot use this option if you use the
Ipv6Prefixoption.- See Also:
-
getIpv6Prefixes
One or more IPv6 prefixes to be assigned to the network interface.You cannot use this option if you use the
Ipv6PrefixCountoption.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnLaunchTemplate.Ipv6PrefixSpecificationProperty>- See Also:
-
getNetworkCardIndex
The index of the network card.Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
- See Also:
-
getNetworkInterfaceId
The ID of the network interface.- See Also:
-
getPrimaryIpv6
The primary IPv6 address of the network interface.When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. For more information about primary IPv6 addresses, see RunInstances .
Returns union: either
BooleanorIResolvable- See Also:
-
getPrivateIpAddress
The primary private IPv4 address of the network interface.- See Also:
-
getPrivateIpAddresses
One or more private IPv4 addresses.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnLaunchTemplate.PrivateIpAddProperty>- See Also:
-
getSecondaryPrivateIpAddressCount
The number of secondary private IPv4 addresses to assign to a network interface.- See Also:
-
getSubnetId
The ID of the subnet for the network interface.- See Also:
-
builder
-