1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ec2
  5. NetworkInterfaceAttachment

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.ec2.NetworkInterfaceAttachment

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

Attaches an elastic network interface (ENI) to an Amazon EC2 instance. You can use this resource type to attach additional network interfaces to an instance without interruption.

Create NetworkInterfaceAttachment Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new NetworkInterfaceAttachment(name: string, args: NetworkInterfaceAttachmentArgs, opts?: CustomResourceOptions);
@overload
def NetworkInterfaceAttachment(resource_name: str,
                               args: NetworkInterfaceAttachmentArgs,
                               opts: Optional[ResourceOptions] = None)

@overload
def NetworkInterfaceAttachment(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               device_index: Optional[str] = None,
                               instance_id: Optional[str] = None,
                               network_interface_id: Optional[str] = None,
                               delete_on_termination: Optional[bool] = None,
                               ena_srd_specification: Optional[NetworkInterfaceAttachmentEnaSrdSpecificationArgs] = None)
func NewNetworkInterfaceAttachment(ctx *Context, name string, args NetworkInterfaceAttachmentArgs, opts ...ResourceOption) (*NetworkInterfaceAttachment, error)
public NetworkInterfaceAttachment(string name, NetworkInterfaceAttachmentArgs args, CustomResourceOptions? opts = null)
public NetworkInterfaceAttachment(String name, NetworkInterfaceAttachmentArgs args)
public NetworkInterfaceAttachment(String name, NetworkInterfaceAttachmentArgs args, CustomResourceOptions options)
type: aws-native:ec2:NetworkInterfaceAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NetworkInterfaceAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NetworkInterfaceAttachmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkInterfaceAttachmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkInterfaceAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NetworkInterfaceAttachmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

NetworkInterfaceAttachment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The NetworkInterfaceAttachment resource accepts the following input properties:

DeviceIndex This property is required. string
The network interface's position in the attachment order. For example, the first attached network interface has a DeviceIndex of 0.
InstanceId This property is required. string
The ID of the instance to which you will attach the ENI.
NetworkInterfaceId This property is required. string
The ID of the ENI that you want to attach.
DeleteOnTermination bool
Whether to delete the network interface when the instance terminates. By default, this value is set to true.
EnaSrdSpecification Pulumi.AwsNative.Ec2.Inputs.NetworkInterfaceAttachmentEnaSrdSpecification
Configures ENA Express for the network interface that this action attaches to the instance.
DeviceIndex This property is required. string
The network interface's position in the attachment order. For example, the first attached network interface has a DeviceIndex of 0.
InstanceId This property is required. string
The ID of the instance to which you will attach the ENI.
NetworkInterfaceId This property is required. string
The ID of the ENI that you want to attach.
DeleteOnTermination bool
Whether to delete the network interface when the instance terminates. By default, this value is set to true.
EnaSrdSpecification NetworkInterfaceAttachmentEnaSrdSpecificationArgs
Configures ENA Express for the network interface that this action attaches to the instance.
deviceIndex This property is required. String
The network interface's position in the attachment order. For example, the first attached network interface has a DeviceIndex of 0.
instanceId This property is required. String
The ID of the instance to which you will attach the ENI.
networkInterfaceId This property is required. String
The ID of the ENI that you want to attach.
deleteOnTermination Boolean
Whether to delete the network interface when the instance terminates. By default, this value is set to true.
enaSrdSpecification NetworkInterfaceAttachmentEnaSrdSpecification
Configures ENA Express for the network interface that this action attaches to the instance.
deviceIndex This property is required. string
The network interface's position in the attachment order. For example, the first attached network interface has a DeviceIndex of 0.
instanceId This property is required. string
The ID of the instance to which you will attach the ENI.
networkInterfaceId This property is required. string
The ID of the ENI that you want to attach.
deleteOnTermination boolean
Whether to delete the network interface when the instance terminates. By default, this value is set to true.
enaSrdSpecification NetworkInterfaceAttachmentEnaSrdSpecification
Configures ENA Express for the network interface that this action attaches to the instance.
device_index This property is required. str
The network interface's position in the attachment order. For example, the first attached network interface has a DeviceIndex of 0.
instance_id This property is required. str
The ID of the instance to which you will attach the ENI.
network_interface_id This property is required. str
The ID of the ENI that you want to attach.
delete_on_termination bool
Whether to delete the network interface when the instance terminates. By default, this value is set to true.
ena_srd_specification NetworkInterfaceAttachmentEnaSrdSpecificationArgs
Configures ENA Express for the network interface that this action attaches to the instance.
deviceIndex This property is required. String
The network interface's position in the attachment order. For example, the first attached network interface has a DeviceIndex of 0.
instanceId This property is required. String
The ID of the instance to which you will attach the ENI.
networkInterfaceId This property is required. String
The ID of the ENI that you want to attach.
deleteOnTermination Boolean
Whether to delete the network interface when the instance terminates. By default, this value is set to true.
enaSrdSpecification Property Map
Configures ENA Express for the network interface that this action attaches to the instance.

Outputs

All input properties are implicitly available as output properties. Additionally, the NetworkInterfaceAttachment resource produces the following output properties:

AttachmentId string
The ID of the network interface attachment.
Id string
The provider-assigned unique ID for this managed resource.
AttachmentId string
The ID of the network interface attachment.
Id string
The provider-assigned unique ID for this managed resource.
attachmentId String
The ID of the network interface attachment.
id String
The provider-assigned unique ID for this managed resource.
attachmentId string
The ID of the network interface attachment.
id string
The provider-assigned unique ID for this managed resource.
attachment_id str
The ID of the network interface attachment.
id str
The provider-assigned unique ID for this managed resource.
attachmentId String
The ID of the network interface attachment.
id String
The provider-assigned unique ID for this managed resource.

Supporting Types

NetworkInterfaceAttachmentEnaSrdSpecification
, NetworkInterfaceAttachmentEnaSrdSpecificationArgs

EnaSrdEnabled bool
Indicates whether ENA Express is enabled for the network interface.
EnaSrdUdpSpecification Pulumi.AwsNative.Ec2.Inputs.NetworkInterfaceAttachmentEnaSrdSpecificationEnaSrdUdpSpecificationProperties
Configures ENA Express for UDP network traffic.
EnaSrdEnabled bool
Indicates whether ENA Express is enabled for the network interface.
EnaSrdUdpSpecification NetworkInterfaceAttachmentEnaSrdSpecificationEnaSrdUdpSpecificationProperties
Configures ENA Express for UDP network traffic.
enaSrdEnabled Boolean
Indicates whether ENA Express is enabled for the network interface.
enaSrdUdpSpecification NetworkInterfaceAttachmentEnaSrdSpecificationEnaSrdUdpSpecificationProperties
Configures ENA Express for UDP network traffic.
enaSrdEnabled boolean
Indicates whether ENA Express is enabled for the network interface.
enaSrdUdpSpecification NetworkInterfaceAttachmentEnaSrdSpecificationEnaSrdUdpSpecificationProperties
Configures ENA Express for UDP network traffic.
ena_srd_enabled bool
Indicates whether ENA Express is enabled for the network interface.
ena_srd_udp_specification NetworkInterfaceAttachmentEnaSrdSpecificationEnaSrdUdpSpecificationProperties
Configures ENA Express for UDP network traffic.
enaSrdEnabled Boolean
Indicates whether ENA Express is enabled for the network interface.
enaSrdUdpSpecification Property Map
Configures ENA Express for UDP network traffic.

NetworkInterfaceAttachmentEnaSrdSpecificationEnaSrdUdpSpecificationProperties
, NetworkInterfaceAttachmentEnaSrdSpecificationEnaSrdUdpSpecificationPropertiesArgs

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi