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 aDeviceIndex
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 totrue
. Default: - true
- See:
- 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_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
.
- device_index
The network interface’s position in the attachment order.
For example, the first attached network interface has a
DeviceIndex
of 0.
- instance_id
The ID of the instance to which you will attach the ENI.
- network_interface_id
The ID of the ENI that you want to attach.