aws-cdk-lib.aws_ec2.CfnNetworkInterfaceAttachmentProps

interface CfnNetworkInterfaceAttachmentProps

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnNetworkInterfaceAttachmentProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnNetworkInterfaceAttachmentProps
Javasoftware.amazon.awscdk.services.ec2.CfnNetworkInterfaceAttachmentProps
Pythonaws_cdk.aws_ec2.CfnNetworkInterfaceAttachmentProps
TypeScript aws-cdk-lib » aws_ec2 » CfnNetworkInterfaceAttachmentProps

Properties for defining a CfnNetworkInterfaceAttachment.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnNetworkInterfaceAttachmentProps: ec2.CfnNetworkInterfaceAttachmentProps = {
  deviceIndex: 'deviceIndex',
  instanceId: 'instanceId',
  networkInterfaceId: 'networkInterfaceId',

  // the properties below are optional
  deleteOnTermination: false,
};

Properties

NameTypeDescription
deviceIndexstringThe network interface's position in the attachment order.
instanceIdstringThe ID of the instance to which you will attach the ENI.
networkInterfaceIdstringThe ID of the ENI that you want to attach.
deleteOnTermination?boolean | IResolvableWhether to delete the network interface when the instance terminates.

deviceIndex

Type: string

The network interface's position in the attachment order.

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


instanceId

Type: string

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


networkInterfaceId

Type: string

The ID of the ENI that you want to attach.


deleteOnTermination?

Type: boolean | IResolvable (optional)

Whether to delete the network interface when the instance terminates.

By default, this value is set to true .