interface NetworkInterfaceProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.CfnLaunchTemplate.NetworkInterfaceProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnLaunchTemplate_NetworkInterfaceProperty |
Java | software.amazon.awscdk.services.ec2.CfnLaunchTemplate.NetworkInterfaceProperty |
Python | aws_cdk.aws_ec2.CfnLaunchTemplate.NetworkInterfaceProperty |
TypeScript | aws-cdk-lib » aws_ec2 » CfnLaunchTemplate » NetworkInterfaceProperty |
Specifies the parameters for a network interface.
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 { aws_ec2 as ec2 } from 'aws-cdk-lib';
const networkInterfaceProperty: ec2.CfnLaunchTemplate.NetworkInterfaceProperty = {
associateCarrierIpAddress: false,
associatePublicIpAddress: false,
connectionTrackingSpecification: {
tcpEstablishedTimeout: 123,
udpStreamTimeout: 123,
udpTimeout: 123,
},
deleteOnTermination: false,
description: 'description',
deviceIndex: 123,
enaSrdSpecification: {
enaSrdEnabled: false,
enaSrdUdpSpecification: {
enaSrdUdpEnabled: false,
},
},
groups: ['groups'],
interfaceType: 'interfaceType',
ipv4PrefixCount: 123,
ipv4Prefixes: [{
ipv4Prefix: 'ipv4Prefix',
}],
ipv6AddressCount: 123,
ipv6Addresses: [{
ipv6Address: 'ipv6Address',
}],
ipv6PrefixCount: 123,
ipv6Prefixes: [{
ipv6Prefix: 'ipv6Prefix',
}],
networkCardIndex: 123,
networkInterfaceId: 'networkInterfaceId',
primaryIpv6: false,
privateIpAddress: 'privateIpAddress',
privateIpAddresses: [{
primary: false,
privateIpAddress: 'privateIpAddress',
}],
secondaryPrivateIpAddressCount: 123,
subnetId: 'subnetId',
};
Properties
Name | Type | Description |
---|---|---|
associate | boolean | IResolvable | Associates a Carrier IP address with eth0 for a new network interface. |
associate | boolean | IResolvable | Associates a public IPv4 address with eth0 for a new network interface. |
connection | IResolvable | Connection | A connection tracking specification for the network interface. |
delete | boolean | IResolvable | Indicates whether the network interface is deleted when the instance is terminated. |
description? | string | A description for the network interface. |
device | number | The device index for the network interface attachment. |
ena | IResolvable | Ena | The ENA Express configuration for the network interface. |
groups? | string[] | The IDs of one or more security groups. |
interface | string | The type of network interface. |
ipv4 | number | The number of IPv4 prefixes to be automatically assigned to the network interface. |
ipv4 | IResolvable | IResolvable | Ipv4 [] | One or more IPv4 prefixes to be assigned to the network interface. |
ipv6 | number | The number of IPv6 addresses to assign to a network interface. |
ipv6 | IResolvable | IResolvable | Ipv6 [] | One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. |
ipv6 | number | The number of IPv6 prefixes to be automatically assigned to the network interface. |
ipv6 | IResolvable | IResolvable | Ipv6 [] | One or more IPv6 prefixes to be assigned to the network interface. |
network | number | The index of the network card. |
network | string | The ID of the network interface. |
primary | boolean | IResolvable | The primary IPv6 address of the network interface. |
private | string | The primary private IPv4 address of the network interface. |
private | IResolvable | IResolvable | Private [] | One or more private IPv4 addresses. |
secondary | number | The number of secondary private IPv4 addresses to assign to a network interface. |
subnet | string | The ID of the subnet for the network interface. |
associateCarrierIpAddress?
Type:
boolean |
IResolvable
(optional)
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 .
associatePublicIpAddress?
Type:
boolean |
IResolvable
(optional)
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 .
connectionTrackingSpecification?
Type:
IResolvable
|
Connection
(optional)
A connection tracking specification for the network interface.
deleteOnTermination?
Type:
boolean |
IResolvable
(optional)
Indicates whether the network interface is deleted when the instance is terminated.
description?
Type:
string
(optional)
A description for the network interface.
deviceIndex?
Type:
number
(optional)
The device index for the network interface attachment.
Each network interface requires a device index. If you create a launch template that includes secondary network interfaces but not a primary network interface, then you must add a primary network interface as a launch parameter when you launch an instance from the template.
enaSrdSpecification?
Type:
IResolvable
|
Ena
(optional)
The ENA Express configuration for the network interface.
groups?
Type:
string[]
(optional)
The IDs of one or more security groups.
interfaceType?
Type:
string
(optional)
The type of network interface.
To create an Elastic Fabric Adapter (EFA), specify efa
or efa
. For more information, see Elastic Fabric Adapter 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?
Type:
number
(optional)
The number of IPv4 prefixes to be automatically assigned to the network interface.
You cannot use this option if you use the Ipv4Prefix
option.
ipv4Prefixes?
Type:
IResolvable
|
IResolvable
|
Ipv4
[]
(optional)
One or more IPv4 prefixes to be assigned to the network interface.
You cannot use this option if you use the Ipv4PrefixCount
option.
ipv6AddressCount?
Type:
number
(optional)
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.
ipv6Addresses?
Type:
IResolvable
|
IResolvable
|
Ipv6
[]
(optional)
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.
ipv6PrefixCount?
Type:
number
(optional)
The number of IPv6 prefixes to be automatically assigned to the network interface.
You cannot use this option if you use the Ipv6Prefix
option.
ipv6Prefixes?
Type:
IResolvable
|
IResolvable
|
Ipv6
[]
(optional)
One or more IPv6 prefixes to be assigned to the network interface.
You cannot use this option if you use the Ipv6PrefixCount
option.
networkCardIndex?
Type:
number
(optional)
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.
networkInterfaceId?
Type:
string
(optional)
The ID of the network interface.
primaryIpv6?
Type:
boolean |
IResolvable
(optional)
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 .
privateIpAddress?
Type:
string
(optional)
The primary private IPv4 address of the network interface.
privateIpAddresses?
Type:
IResolvable
|
IResolvable
|
Private
[]
(optional)
One or more private IPv4 addresses.
secondaryPrivateIpAddressCount?
Type:
number
(optional)
The number of secondary private IPv4 addresses to assign to a network interface.
subnetId?
Type:
string
(optional)
The ID of the subnet for the network interface.