Skip to content
v2.278.0

CfnNetworkInterfaceAttachmentProps Struct ​

Properties for defining a CfnNetworkInterfaceAttachment.

Example ​

ts
// 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,
  enaQueueCount: 123,
  enaSrdSpecification: {
    enaSrdEnabled: false,
    enaSrdUdpSpecification: {
      enaSrdUdpEnabled: false,
    },
  },
};
python
# 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,
    ena_queue_count=123,
    ena_srd_specification=ec2.CfnNetworkInterfaceAttachment.EnaSrdSpecificationProperty(
        ena_srd_enabled=False,
        ena_srd_udp_specification=ec2.CfnNetworkInterfaceAttachment.EnaSrdUdpSpecificationProperty(
            ena_srd_udp_enabled=False
        )
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;

CfnNetworkInterfaceAttachmentProps cfnNetworkInterfaceAttachmentProps = CfnNetworkInterfaceAttachmentProps.builder()
        .deviceIndex("deviceIndex")
        .instanceId("instanceId")
        .networkInterfaceId("networkInterfaceId")

        // the properties below are optional
        .deleteOnTermination(false)
        .enaQueueCount(123)
        .enaSrdSpecification(EnaSrdSpecificationProperty.builder()
                .enaSrdEnabled(false)
                .enaSrdUdpSpecification(EnaSrdUdpSpecificationProperty.builder()
                        .enaSrdUdpEnabled(false)
                        .build())
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 cfnNetworkInterfaceAttachmentProps = new CfnNetworkInterfaceAttachmentProps {
    DeviceIndex = "deviceIndex",
    InstanceId = "instanceId",
    NetworkInterfaceId = "networkInterfaceId",

    // the properties below are optional
    DeleteOnTermination = false,
    EnaQueueCount = 123,
    EnaSrdSpecification = new EnaSrdSpecificationProperty {
        EnaSrdEnabled = false,
        EnaSrdUdpSpecification = new EnaSrdUdpSpecificationProperty {
            EnaSrdUdpEnabled = false
        }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnNetworkInterfaceAttachmentProps := &CfnNetworkInterfaceAttachmentProps{
	DeviceIndex: jsii.String("deviceIndex"),
	InstanceId: jsii.String("instanceId"),
	NetworkInterfaceId: jsii.String("networkInterfaceId"),

	// the properties below are optional
	DeleteOnTermination: jsii.Boolean(false),
	EnaQueueCount: jsii.Number(123),
	EnaSrdSpecification: &EnaSrdSpecificationProperty{
		EnaSrdEnabled: jsii.Boolean(false),
		EnaSrdUdpSpecification: &EnaSrdUdpSpecificationProperty{
			EnaSrdUdpEnabled: jsii.Boolean(false),
		},
	},
}

Properties ​

deleteOnTerminationoptionalboolean | IResolvabledelete_on_terminationoptionaltyping.Union[bool, IResolvable]deleteOnTerminationoptionalBooleanDeleteOnTerminationoptionalboolDeleteOnTerminationoptionalinterface{} = true #
Whether to delete the network interface when the instance terminates.

By default, this value is set to true .

deviceIndexstringdevice_indexstrdeviceIndexStringDeviceIndexstringDeviceIndex*string required #
The network interface's position in the attachment order.

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

enaQueueCountoptionalnumberena_queue_countoptionalint | floatenaQueueCountoptionalNumberEnaQueueCountoptionaldoubleEnaQueueCountoptional*float64 #
The number of ENA queues created with the instance.
enaSrdSpecificationoptionalIResolvable | CfnNetworkInterfaceAttachment.EnaSrdSpecificationPropertyena_srd_specificationoptionaltyping.Union[IResolvable, EnaSrdSpecificationProperty]enaSrdSpecificationoptionalIResolvableEnaSrdSpecificationoptionalIResolvableEnaSrdSpecificationoptionalinterface{} #
Configures ENA Express for the network interface that this action attaches to the instance.
instanceIdstringinstance_idstrinstanceIdStringInstanceIdstringInstanceId*string required #
The ID of the instance to which you will attach the ENI.
networkInterfaceIdstringnetwork_interface_idstrnetworkInterfaceIdStringNetworkInterfaceIdstringNetworkInterfaceId*string required #
The ID of the ENI that you want to attach.