EC2 NetworkInterface
The EC2 Network Interface type is an embedded property of the AWS::EC2::Instance type.
It specifies a network interface that is to be attached.
Syntax
JSON
{ "AssociatePublicIpAddress" :Boolean, "DeleteOnTermination" :Boolean, "Description" :String, "DeviceIndex" :String, "GroupSet" : [String, ...], "NetworkInterfaceId" :String, "Ipv6AddressCount" :Integer, "Ipv6Addresses" : [IPv6 Address Type, ...], "PrivateIpAddress" :String, "PrivateIpAddresses" : [PrivateIpAddressSpecification, ...], "SecondaryPrivateIpAddressCount" :Integer, "SubnetId" :String}
YAML
AssociatePublicIpAddress:BooleanDeleteOnTermination:BooleanDescription:StringDeviceIndex:StringGroupSet: -StringNetworkInterfaceId:StringIpv6AddressCount:IntegerIpv6Addresses: -IPv6 Address TypePrivateIpAddress:StringPrivateIpAddresses: -PrivateIpAddressSpecificationSecondaryPrivateIpAddressCount:IntegerSubnetId:String
Properties
AssociatePublicIpAddress-
Indicates whether the network interface receives a public IP address. You can associate a public IP address with a network interface only if it has a device index of
eth0and if it is a new network interface (not an existing one). In other words, if you specify true, don't specify a network interface ID. For more information, see Amazon EC2 Instance IP Addressing.Required: No
Type: Boolean.
DeleteOnTermination-
Whether to delete the network interface when the instance terminates.
Required: No
Type: Boolean.
Description-
The description of this network interface.
Required: No
Type: String
DeviceIndex-
The network interface's position in the attachment order.
Required: Yes
Type: String
GroupSet-
A list of security group IDs associated with this network interface.
Required: No
Type: List of strings.
NetworkInterfaceId-
An existing network interface ID.
Required: Conditional. If you don't specify the
SubnetIdproperty, you must specify this property.Type: String
Ipv6AddressCount-
The number of IPv6 addresses to associate with the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. To specify specific IPv6 addresses, use the
Ipv6Addressesproperty and don't specify this property.For restrictions on which instance types support IPv6 addresses, see the RunInstances action in the Amazon EC2 API Reference.
Required: No
Type: Integer
Ipv6Addresses-
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface. To specify a number of IPv6 addresses, use the
Ipv6AddressCountproperty and don't specify this property.For information about restrictions on which instance types support IPv6 addresses, see the RunInstances action in the Amazon EC2 API Reference.
Required: No
Type: List of EC2 NetworkInterface Ipv6Addresses
PrivateIpAddress-
Assigns a single private IP address to the network interface, which is used as the primary private IP address. If you want to specify multiple private IP address, use the
PrivateIpAddressesproperty.Required: No
Type: String
PrivateIpAddresses-
Assigns a list of private IP addresses to the network interface. You can specify a primary private IP address by setting the value of the
Primaryproperty totruein thePrivateIpAddressSpecificationproperty. If you want Amazon EC2 to automatically assign private IP addresses, use theSecondaryPrivateIpAddressCountproperty and do not specify this property.For information about the maximum number of private IP addresses, see Private IP Addresses Per ENI Per Instance Type in the Amazon EC2 User Guide for Linux Instances.
Required: No
Type: list of PrivateIpAddressSpecification
SecondaryPrivateIpAddressCount-
The number of secondary private IP addresses that Amazon EC2 auto assigns to the network interface. Amazon EC2 uses the value of the
PrivateIpAddressproperty as the primary private IP address. If you don't specify that property, Amazon EC2 auto assigns both the primary and secondary private IP addresses.If you want to specify your own list of private IP addresses, use the
PrivateIpAddressesproperty and do not specify this property.For information about the maximum number of private IP addresses, see Private IP Addresses Per ENI Per Instance Type in the Amazon EC2 User Guide for Linux Instances.
Required: No
Type: Integer.
SubnetId-
The ID of the subnet to associate with the network interface.
Required: Conditional. If you don't specify the
NetworkInterfaceIdproperty, you must specify this property.Type: String
