Interface CfnLaunchTemplate.INetworkInterfaceProperty
Specifies the parameters for a network interface.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.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,
DeleteOnTermination = false,
Description = "description",
DeviceIndex = 123,
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",
PrivateIpAddress = "privateIpAddress",
PrivateIpAddresses = new [] { new PrivateIpAddProperty {
Primary = false,
PrivateIpAddress = "privateIpAddress"
} },
SecondaryPrivateIpAddressCount = 123,
SubnetId = "subnetId"
};
Synopsis
Properties
AssociateCarrierIpAddress | Indicates whether to associate a Carrier IP address with eth0 for a new network interface. |
AssociatePublicIpAddress | Associates a public IPv4 address with eth0 for a new 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. |
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. |
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
Indicates whether to associate 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
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
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
. 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.
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
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