Class CfnLaunchTemplate.NetworkInterfaceProperty
Specifies the parameters for a network interface.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class NetworkInterfaceProperty : Object, CfnLaunchTemplate.INetworkInterfaceProperty
Syntax (vb)
Public Class NetworkInterfaceProperty
Inherits Object
Implements CfnLaunchTemplate.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
Constructors
NetworkInterfaceProperty() |
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. |
Constructors
NetworkInterfaceProperty()
public NetworkInterfaceProperty()
Properties
AssociateCarrierIpAddress
Associates a Carrier IP address with eth0 for a new network interface.
public object AssociateCarrierIpAddress { get; set; }
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.
public object AssociatePublicIpAddress { get; set; }
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.
public object ConnectionTrackingSpecification { get; set; }
Property Value
System.Object
Remarks
DeleteOnTermination
Indicates whether the network interface is deleted when the instance is terminated.
public object DeleteOnTermination { get; set; }
Property Value
System.Object
Remarks
Description
A description for the network interface.
public string Description { get; set; }
Property Value
System.String
Remarks
DeviceIndex
The device index for the network interface attachment.
public Nullable<double> DeviceIndex { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
EnaSrdSpecification
The ENA Express configuration for the network interface.
public object EnaSrdSpecification { get; set; }
Property Value
System.Object
Remarks
Groups
The IDs of one or more security groups.
public string[] Groups { get; set; }
Property Value
System.String[]
Remarks
InterfaceType
The type of network interface.
public string InterfaceType { get; set; }
Property Value
System.String
Remarks
To create an Elastic Fabric Adapter (EFA), specify efa
. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide .
If you are not creating an EFA, specify interface
or omit this parameter.
Valid values: interface
| efa
Ipv4PrefixCount
The number of IPv4 prefixes to be automatically assigned to the network interface.
public Nullable<double> Ipv4PrefixCount { get; set; }
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.
public object Ipv4Prefixes { get; set; }
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.
public Nullable<double> Ipv6AddressCount { get; set; }
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.
public object Ipv6Addresses { get; set; }
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.
public Nullable<double> Ipv6PrefixCount { get; set; }
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.
public object Ipv6Prefixes { get; set; }
Property Value
System.Object
Remarks
You cannot use this option if you use the Ipv6PrefixCount
option.
NetworkCardIndex
The index of the network card.
public Nullable<double> NetworkCardIndex { get; set; }
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.
public string NetworkInterfaceId { get; set; }
Property Value
System.String
Remarks
PrimaryIpv6
The primary IPv6 address of the network interface.
public object PrimaryIpv6 { get; set; }
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.
public string PrivateIpAddress { get; set; }
Property Value
System.String
Remarks
PrivateIpAddresses
One or more private IPv4 addresses.
public object PrivateIpAddresses { get; set; }
Property Value
System.Object
Remarks
SecondaryPrivateIpAddressCount
The number of secondary private IPv4 addresses to assign to a network interface.
public Nullable<double> SecondaryPrivateIpAddressCount { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
SubnetId
The ID of the subnet for the network interface.
public string SubnetId { get; set; }
Property Value
System.String