Interface CfnLaunchTemplate.INetworkInterfaceProperty
Specifies the parameters for a network interface.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface INetworkInterfaceProperty
Syntax (vb)
Public Interface INetworkInterfaceProperty
Remarks
NetworkInterface
is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var networkInterfaceProperty = new NetworkInterfaceProperty {
AssociateCarrierIpAddress = false,
AssociatePublicIpAddress = false,
ConnectionTrackingSpecification = new ConnectionTrackingSpecificationProperty {
TcpEstablishedTimeout = 123,
UdpStreamTimeout = 123,
UdpTimeout = 123
},
DeleteOnTermination = false,
Description = "description",
DeviceIndex = 123,
EnaSrdSpecification = new EnaSrdSpecificationProperty {
EnaSrdEnabled = false,
EnaSrdUdpSpecification = new EnaSrdUdpSpecificationProperty {
EnaSrdUdpEnabled = false
}
},
Groups = new [] { "groups" },
InterfaceType = "interfaceType",
Ipv4PrefixCount = 123,
Ipv4Prefixes = new [] { new Ipv4PrefixSpecificationProperty {
Ipv4Prefix = "ipv4Prefix"
} },
Ipv6AddressCount = 123,
Ipv6Addresses = new [] { new Ipv6AddProperty {
Ipv6Address = "ipv6Address"
} },
Ipv6PrefixCount = 123,
Ipv6Prefixes = new [] { new Ipv6PrefixSpecificationProperty {
Ipv6Prefix = "ipv6Prefix"
} },
NetworkCardIndex = 123,
NetworkInterfaceId = "networkInterfaceId",
PrimaryIpv6 = false,
PrivateIpAddress = "privateIpAddress",
PrivateIpAddresses = new [] { new PrivateIpAddProperty {
Primary = false,
PrivateIpAddress = "privateIpAddress"
} },
SecondaryPrivateIpAddressCount = 123,
SubnetId = "subnetId"
};
Synopsis
Properties
AssociateCarrierIpAddress | Associates a Carrier IP address with eth0 for a new network interface. |
AssociatePublicIpAddress | Associates a public IPv4 address with eth0 for a new network interface. |
ConnectionTrackingSpecification | A connection tracking specification for the network interface. |
DeleteOnTermination | Indicates whether the network interface is deleted when the instance is terminated. |
Description | A description for the network interface. |
DeviceIndex | The device index for the network interface attachment. |
EnaSrdSpecification | The ENA Express configuration for the network interface. |
Groups | The IDs of one or more security groups. |
InterfaceType | The type of network interface. |
Ipv4PrefixCount | The number of IPv4 prefixes to be automatically assigned to the network interface. |
Ipv4Prefixes | One or more IPv4 prefixes to be assigned to the network interface. |
Ipv6AddressCount | The number of IPv6 addresses to assign to a network interface. |
Ipv6Addresses | One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. |
Ipv6PrefixCount | The number of IPv6 prefixes to be automatically assigned to the network interface. |
Ipv6Prefixes | One or more IPv6 prefixes to be assigned to the network interface. |
NetworkCardIndex | The index of the network card. |
NetworkInterfaceId | The ID of the network interface. |
PrimaryIpv6 | The primary IPv6 address of the network interface. |
PrivateIpAddress | The primary private IPv4 address of the network interface. |
PrivateIpAddresses | One or more private IPv4 addresses. |
SecondaryPrivateIpAddressCount | The number of secondary private IPv4 addresses to assign to a network interface. |
SubnetId | The ID of the subnet for the network interface. |
Properties
AssociateCarrierIpAddress
Associates a Carrier IP address with eth0 for a new network interface.
virtual object AssociateCarrierIpAddress { get; }
Property Value
System.Object
Remarks
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 .
AssociatePublicIpAddress
Associates a public IPv4 address with eth0 for a new network interface.
virtual object AssociatePublicIpAddress { get; }
Property Value
System.Object
Remarks
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 .
ConnectionTrackingSpecification
A connection tracking specification for the network interface.
virtual object ConnectionTrackingSpecification { get; }
Property Value
System.Object
Remarks
DeleteOnTermination
Indicates whether the network interface is deleted when the instance is terminated.
virtual object DeleteOnTermination { get; }
Property Value
System.Object
Remarks
Description
A description for the network interface.
virtual string Description { get; }
Property Value
System.String
Remarks
DeviceIndex
The device index for the network interface attachment.
virtual Nullable<double> DeviceIndex { get; }
Property Value
System.Nullable<System.Double>
Remarks
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 LaunchTemplate
property of AWS::EC2::Instance
, then you must include a primary network interface using the NetworkInterfaces
property of AWS::EC2::Instance
.
EnaSrdSpecification
The ENA Express configuration for the network interface.
virtual object EnaSrdSpecification { get; }
Property Value
System.Object
Remarks
Groups
The IDs of one or more security groups.
virtual string[] Groups { get; }
Property Value
System.String[]
Remarks
InterfaceType
The type of network interface.
virtual string InterfaceType { get; }
Property Value
System.String
Remarks
To create an Elastic Fabric Adapter (EFA), specify efa
or efa
. 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 interface
or 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
Ipv4PrefixCount
The number of IPv4 prefixes to be automatically assigned to the network interface.
virtual Nullable<double> Ipv4PrefixCount { get; }
Property Value
System.Nullable<System.Double>
Remarks
You cannot use this option if you use the Ipv4Prefix
option.
Ipv4Prefixes
One or more IPv4 prefixes to be assigned to the network interface.
virtual object Ipv4Prefixes { get; }
Property Value
System.Object
Remarks
You cannot use this option if you use the Ipv4PrefixCount
option.
Ipv6AddressCount
The number of IPv6 addresses to assign to a network interface.
virtual Nullable<double> Ipv6AddressCount { get; }
Property Value
System.Nullable<System.Double>
Remarks
Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.
Ipv6Addresses
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet.
virtual object Ipv6Addresses { get; }
Property Value
System.Object
Remarks
You can't use this option if you're specifying a number of IPv6 addresses.
Ipv6PrefixCount
The number of IPv6 prefixes to be automatically assigned to the network interface.
virtual Nullable<double> Ipv6PrefixCount { get; }
Property Value
System.Nullable<System.Double>
Remarks
You cannot use this option if you use the Ipv6Prefix
option.
Ipv6Prefixes
One or more IPv6 prefixes to be assigned to the network interface.
virtual object Ipv6Prefixes { get; }
Property Value
System.Object
Remarks
You cannot use this option if you use the Ipv6PrefixCount
option.
NetworkCardIndex
The index of the network card.
virtual Nullable<double> NetworkCardIndex { get; }
Property Value
System.Nullable<System.Double>
Remarks
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.
NetworkInterfaceId
The ID of the network interface.
virtual string NetworkInterfaceId { get; }
Property Value
System.String
Remarks
PrimaryIpv6
The primary IPv6 address of the network interface.
virtual object PrimaryIpv6 { get; }
Property Value
System.Object
Remarks
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 .
PrivateIpAddress
The primary private IPv4 address of the network interface.
virtual string PrivateIpAddress { get; }
Property Value
System.String
Remarks
PrivateIpAddresses
One or more private IPv4 addresses.
virtual object PrivateIpAddresses { get; }
Property Value
System.Object
Remarks
SecondaryPrivateIpAddressCount
The number of secondary private IPv4 addresses to assign to a network interface.
virtual Nullable<double> SecondaryPrivateIpAddressCount { get; }
Property Value
System.Nullable<System.Double>
Remarks
SubnetId
The ID of the subnet for the network interface.
virtual string SubnetId { get; }
Property Value
System.String