interface NetworkInterfaceProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.CfnLaunchTemplate.NetworkInterfaceProperty |
Java | software.amazon.awscdk.services.ec2.CfnLaunchTemplate.NetworkInterfaceProperty |
Python | aws_cdk.aws_ec2.CfnLaunchTemplate.NetworkInterfaceProperty |
TypeScript | @aws-cdk/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 * as ec2 from '@aws-cdk/aws-ec2';
const networkInterfaceProperty: ec2.CfnLaunchTemplate.NetworkInterfaceProperty = {
associateCarrierIpAddress: false,
associatePublicIpAddress: false,
deleteOnTermination: false,
description: 'description',
deviceIndex: 123,
groups: ['groups'],
interfaceType: 'interfaceType',
ipv4PrefixCount: 123,
ipv4Prefixes: [{
ipv4Prefix: 'ipv4Prefix',
}],
ipv6AddressCount: 123,
ipv6Addresses: [{
ipv6Address: 'ipv6Address',
}],
ipv6PrefixCount: 123,
ipv6Prefixes: [{
ipv6Prefix: 'ipv6Prefix',
}],
networkCardIndex: 123,
networkInterfaceId: 'networkInterfaceId',
privateIpAddress: 'privateIpAddress',
privateIpAddresses: [{
primary: false,
privateIpAddress: 'privateIpAddress',
}],
secondaryPrivateIpAddressCount: 123,
subnetId: 'subnetId',
};
Properties
Name | Type | Description |
---|---|---|
associate | boolean | IResolvable | Indicates whether to associate 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. |
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. |
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. |
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)
Indicates whether to associate 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.
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.
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
. 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?
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.
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.