Class NetworkInterfaceAttachment
Attach an Elastic network interface (ENI) resource with EC2 instance.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var test = new Aws.Ec2.NetworkInterfaceAttachment("test", new Aws.Ec2.NetworkInterfaceAttachmentArgs
{
DeviceIndex = 0,
InstanceId = aws_instance.Test.Id,
NetworkInterfaceId = aws_network_interface.Test.Id,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class NetworkInterfaceAttachment : CustomResource
Constructors
View SourceNetworkInterfaceAttachment(String, NetworkInterfaceAttachmentArgs, CustomResourceOptions)
Create a NetworkInterfaceAttachment resource with the given unique name, arguments, and options.
Declaration
public NetworkInterfaceAttachment(string name, NetworkInterfaceAttachmentArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| NetworkInterfaceAttachmentArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAttachmentId
The ENI Attachment ID.
Declaration
public Output<string> AttachmentId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeviceIndex
Network interface index (int).
Declaration
public Output<int> DeviceIndex { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
InstanceId
Instance ID to attach.
Declaration
public Output<string> InstanceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NetworkInterfaceId
ENI ID to attach.
Declaration
public Output<string> NetworkInterfaceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Status
The status of the Network Interface Attachment.
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, NetworkInterfaceAttachmentState, CustomResourceOptions)
Get an existing NetworkInterfaceAttachment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static NetworkInterfaceAttachment Get(string name, Input<string> id, NetworkInterfaceAttachmentState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| NetworkInterfaceAttachmentState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| NetworkInterfaceAttachment |