CfnNetworkInterfaceProps

class aws_cdk.aws_ec2.CfnNetworkInterfaceProps(*, subnet_id, connection_tracking_specification=None, description=None, enable_primary_ipv6=None, group_set=None, interface_type=None, ipv4_prefix_count=None, ipv4_prefixes=None, ipv6_address_count=None, ipv6_addresses=None, ipv6_prefix_count=None, ipv6_prefixes=None, private_ip_address=None, private_ip_addresses=None, secondary_private_ip_address_count=None, source_dest_check=None, tags=None)

Bases: object

Properties for defining a CfnNetworkInterface.

Parameters:
  • subnet_id (str) – The ID of the subnet to associate with the network interface.

  • connection_tracking_specification (Union[IResolvable, ConnectionTrackingSpecificationProperty, Dict[str, Any], None]) – A connection tracking specification for the network interface.

  • description (Optional[str]) – A description for the network interface.

  • enable_primary_ipv6 (Union[bool, IResolvable, None]) – 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. 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.

  • group_set (Optional[Sequence[str]]) – The security group IDs associated with this network interface.

  • interface_type (Optional[str]) – The type of network interface. The default is interface . The supported values are efa and trunk .

  • ipv4_prefix_count (Union[int, float, None]) – The number of IPv4 prefixes to be automatically assigned to the network interface. 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.

  • ipv4_prefixes (Union[IResolvable, Sequence[Union[IResolvable, Ipv4PrefixSpecificationProperty, Dict[str, Any]]], None]) – The IPv4 delegated prefixes that are assigned to the network interface. 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.

  • ipv6_address_count (Union[int, float, None]) – The number of IPv6 addresses to assign to a network interface. 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.

  • ipv6_addresses (Union[IResolvable, Sequence[Union[IResolvable, InstanceIpv6AddressProperty, Dict[str, Any]]], None]) – One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface. 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.

  • ipv6_prefix_count (Union[int, float, None]) – The number of IPv6 prefixes to be automatically assigned to the network interface. 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.

  • ipv6_prefixes (Union[IResolvable, Sequence[Union[IResolvable, Ipv6PrefixSpecificationProperty, Dict[str, Any]]], None]) – The IPv6 delegated prefixes that are assigned to the network interface. 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.

  • private_ip_address (Optional[str]) – 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 PrivateIpAddresses property.

  • private_ip_addresses (Union[IResolvable, Sequence[Union[IResolvable, PrivateIpAddressSpecificationProperty, Dict[str, Any]]], None]) – Assigns private IP addresses to the network interface. 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.

  • secondary_private_ip_address_count (Union[int, float, None]) – The number of secondary private IPv4 addresses to assign to a network interface. 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.

  • source_dest_check (Union[bool, IResolvable, None]) – Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. 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.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An arbitrary set of tags (key-value pairs) for this network interface.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

cfn_network_interface_props = ec2.CfnNetworkInterfaceProps(
    subnet_id="subnetId",

    # the properties below are optional
    connection_tracking_specification=ec2.CfnNetworkInterface.ConnectionTrackingSpecificationProperty(
        tcp_established_timeout=123,
        udp_stream_timeout=123,
        udp_timeout=123
    ),
    description="description",
    enable_primary_ipv6=False,
    group_set=["groupSet"],
    interface_type="interfaceType",
    ipv4_prefix_count=123,
    ipv4_prefixes=[ec2.CfnNetworkInterface.Ipv4PrefixSpecificationProperty(
        ipv4_prefix="ipv4Prefix"
    )],
    ipv6_address_count=123,
    ipv6_addresses=[ec2.CfnNetworkInterface.InstanceIpv6AddressProperty(
        ipv6_address="ipv6Address"
    )],
    ipv6_prefix_count=123,
    ipv6_prefixes=[ec2.CfnNetworkInterface.Ipv6PrefixSpecificationProperty(
        ipv6_prefix="ipv6Prefix"
    )],
    private_ip_address="privateIpAddress",
    private_ip_addresses=[ec2.CfnNetworkInterface.PrivateIpAddressSpecificationProperty(
        primary=False,
        private_ip_address="privateIpAddress"
    )],
    secondary_private_ip_address_count=123,
    source_dest_check=False,
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

connection_tracking_specification

A connection tracking specification for the network interface.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-connectiontrackingspecification

description

A description for the network interface.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-description

enable_primary_ipv6

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.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-enableprimaryipv6

group_set

The security group IDs associated with this network interface.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-groupset

interface_type

The type of network interface.

The default is interface . The supported values are efa and trunk .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-interfacetype

ipv4_prefix_count

The number of IPv4 prefixes to be automatically assigned to the network interface.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv4prefixcount

ipv4_prefixes

The IPv4 delegated prefixes that are assigned to the network interface.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv4prefixes

ipv6_address_count

The number of IPv6 addresses to assign to a network interface.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv6addresscount

ipv6_addresses

One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv6addresses

ipv6_prefix_count

The number of IPv6 prefixes to be automatically assigned to the network interface.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv6prefixcount

ipv6_prefixes

The IPv6 delegated prefixes that are assigned to the network interface.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-ipv6prefixes

private_ip_address

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 PrivateIpAddresses property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-privateipaddress

private_ip_addresses

Assigns private IP addresses to the network interface.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-privateipaddresses

secondary_private_ip_address_count

The number of secondary private IPv4 addresses to assign to a network interface.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-secondaryprivateipaddresscount

source_dest_check

Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-sourcedestcheck

subnet_id

The ID of the subnet to associate with the network interface.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-subnetid

tags

An arbitrary set of tags (key-value pairs) for this network interface.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html#cfn-ec2-networkinterface-tags