Interface ICfnNetworkInterfaceProps
Properties for defining a CfnNetworkInterface
.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnNetworkInterfaceProps
Syntax (vb)
Public Interface ICfnNetworkInterfaceProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html
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 cfnNetworkInterfaceProps = new CfnNetworkInterfaceProps {
SubnetId = "subnetId",
// the properties below are optional
ConnectionTrackingSpecification = new ConnectionTrackingSpecificationProperty {
TcpEstablishedTimeout = 123,
UdpStreamTimeout = 123,
UdpTimeout = 123
},
Description = "description",
EnablePrimaryIpv6 = false,
GroupSet = new [] { "groupSet" },
InterfaceType = "interfaceType",
Ipv4PrefixCount = 123,
Ipv4Prefixes = new [] { new Ipv4PrefixSpecificationProperty {
Ipv4Prefix = "ipv4Prefix"
} },
Ipv6AddressCount = 123,
Ipv6Addresses = new [] { new InstanceIpv6AddressProperty {
Ipv6Address = "ipv6Address"
} },
Ipv6PrefixCount = 123,
Ipv6Prefixes = new [] { new Ipv6PrefixSpecificationProperty {
Ipv6Prefix = "ipv6Prefix"
} },
PrivateIpAddress = "privateIpAddress",
PrivateIpAddresses = new [] { new PrivateIpAddressSpecificationProperty {
Primary = false,
PrivateIpAddress = "privateIpAddress"
} },
SecondaryPrivateIpAddressCount = 123,
SourceDestCheck = false,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Properties
ConnectionTrackingSpecification | A connection tracking specification for the network interface. |
Description | A description for the network interface. |
EnablePrimaryIpv6 | If you’re modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address. |
GroupSet | The IDs of the security groups associated with this network interface. |
InterfaceType | The type of network interface. |
Ipv4PrefixCount | The number of IPv4 prefixes to be automatically assigned to the network interface. |
Ipv4Prefixes | The IPv4 delegated prefixes that are assigned to the network interface. |
Ipv6AddressCount | The number of IPv6 addresses to assign to the network interface. |
Ipv6Addresses | The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface. |
Ipv6PrefixCount | The number of IPv6 prefixes to be automatically assigned to the network interface. |
Ipv6Prefixes | The IPv6 delegated prefixes that are assigned to the network interface. |
PrivateIpAddress | The private IPv4 address to assign to the network interface as the primary private IP address. |
PrivateIpAddresses | The private IPv4 addresses to assign to the network interface. |
SecondaryPrivateIpAddressCount | The number of secondary private IPv4 addresses to assign to a network interface. |
SourceDestCheck | Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. |
SubnetId | The ID of the subnet to associate with the network interface. |
Tags | The tags to apply to the network interface. |
Properties
ConnectionTrackingSpecification
A connection tracking specification for the network interface.
virtual object ConnectionTrackingSpecification { get; }
Property Value
System.Object
Remarks
Description
A description for the network interface.
virtual string Description { get; }
Property Value
System.String
Remarks
EnablePrimaryIpv6
If you’re modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address.
virtual object EnablePrimaryIpv6 { get; }
Property Value
System.Object
Remarks
A primary IPv6 address is an IPv6 GUA address associated with an ENI that you have enabled to use a primary IPv6 address. Use this option if the instance that this ENI will be attached to relies on its IPv6 address not changing. AWS will automatically assign an IPv6 address associated with the ENI attached to your instance to be the primary IPv6 address. Once you enable an IPv6 GUA address to be a primary IPv6, you cannot disable it. 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. If you have multiple IPv6 addresses associated with an ENI attached to your instance and you enable a primary IPv6 address, the first IPv6 GUA address associated with the ENI becomes the primary IPv6 address.
GroupSet
The IDs of the security groups associated with this network interface.
virtual string[] GroupSet { get; }
Property Value
System.String[]
Remarks
InterfaceType
The type of network interface.
virtual string InterfaceType { get; }
Property Value
System.String
Remarks
The default is interface
. The supported values are efa
and trunk
.
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
When creating a network interface, you can't specify a count of IPv4 prefixes if you've specified one of the following: specific IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
Ipv4Prefixes
The IPv4 delegated prefixes that are assigned to the network interface.
virtual object Ipv4Prefixes { get; }
Property Value
System.Object
Remarks
When creating a network interface, you can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
Ipv6AddressCount
The number of IPv6 addresses to assign to the 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. To specify specific IPv6 addresses, use the Ipv6Addresses
property and don't specify this property.
When creating a network interface, you can't specify a count of IPv6 addresses if you've specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
Ipv6Addresses
The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.
virtual object Ipv6Addresses { get; }
Property Value
System.Object
Remarks
If you're specifying a number of IPv6 addresses, use the Ipv6AddressCount
property and don't specify this property.
When creating a network interface, you can't specify IPv6 addresses if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
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
When creating a network interface, you can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
Ipv6Prefixes
The IPv6 delegated prefixes that are assigned to the network interface.
virtual object Ipv6Prefixes { get; }
Property Value
System.Object
Remarks
When creating a network interface, you can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
PrivateIpAddress
The private IPv4 address to assign to the network interface as the primary private IP address.
virtual string PrivateIpAddress { get; }
Property Value
System.String
Remarks
If you want to specify multiple private IP addresses, use the PrivateIpAddresses
property.
PrivateIpAddresses
The private IPv4 addresses to assign to the network interface.
virtual object PrivateIpAddresses { get; }
Property Value
System.Object
Remarks
You can specify a primary private IP address by setting the value of the Primary
property to true
in the PrivateIpAddressSpecification
property. If you want EC2 to automatically assign private IP addresses, use the SecondaryPrivateIpAddressCount
property and do not specify this property.
When creating a network interface, you can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
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
When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses
.
When creating a Network Interface, you can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
SourceDestCheck
Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.
virtual object SourceDestCheck { get; }
Property Value
System.Object
Remarks
If the value is true
, source/destination checks are enabled; otherwise, they are disabled. The default value is true
. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.
SubnetId
The ID of the subnet to associate with the network interface.
string SubnetId { get; }
Property Value
System.String
Remarks
Tags
The tags to apply to the network interface.
virtual ICfnTag[] Tags { get; }
Property Value
ICfnTag[]