CfnNetworkInterfaceAttachmentProps

class aws_cdk.aws_ec2.CfnNetworkInterfaceAttachmentProps(*, device_index, instance_id, network_interface_id, delete_on_termination=None)

Bases: object

Properties for defining a CfnNetworkInterfaceAttachment.

Parameters:
  • device_index (str) – The network interface’s position in the attachment order. For example, the first attached network interface has a DeviceIndex of 0.

  • instance_id (str) – The ID of the instance to which you will attach the ENI.

  • network_interface_id (str) – The ID of the ENI that you want to attach.

  • delete_on_termination (Union[bool, IResolvable, None]) – Whether to delete the network interface when the instance terminates. By default, this value is set to true .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface-attachment.html

ExampleMetadata:

fixture=_generated

Example:

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

cfn_network_interface_attachment_props = ec2.CfnNetworkInterfaceAttachmentProps(
    device_index="deviceIndex",
    instance_id="instanceId",
    network_interface_id="networkInterfaceId",

    # the properties below are optional
    delete_on_termination=False
)

Attributes

delete_on_termination

Whether to delete the network interface when the instance terminates.

By default, this value is set to true .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface-attachment.html#cfn-ec2-network-interface-attachment-deleteonterm

device_index

The network interface’s position in the attachment order.

For example, the first attached network interface has a DeviceIndex of 0.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface-attachment.html#cfn-ec2-network-interface-attachment-deviceindex

instance_id

The ID of the instance to which you will attach the ENI.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface-attachment.html#cfn-ec2-network-interface-attachment-instanceid

network_interface_id

The ID of the ENI that you want to attach.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface-attachment.html#cfn-ec2-network-interface-attachment-networkinterfaceid