Package com.pulumi.aws.ec2
Class NetworkInterfaceAttachment
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ec2.NetworkInterfaceAttachment
-
public class NetworkInterfaceAttachment extends com.pulumi.resources.CustomResource
Attach an Elastic network interface (ENI) resource with EC2 instance. ## Example Usage <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ec2.NetworkInterfaceAttachment; import com.pulumi.aws.ec2.NetworkInterfaceAttachmentArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var test = new NetworkInterfaceAttachment("test", NetworkInterfaceAttachmentArgs.builder() .instanceId(testAwsInstance.id()) .networkInterfaceId(testAwsNetworkInterface.id()) .deviceIndex(0) .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import Elastic network interface (ENI) Attachments using its Attachment ID. For example: ```sh $ pulumi import aws:ec2/networkInterfaceAttachment:NetworkInterfaceAttachment secondary_nic eni-attach-0a33842b4ec347c4c ```
-
-
Constructor Summary
Constructors Constructor Description NetworkInterfaceAttachment(java.lang.String name)
NetworkInterfaceAttachment(java.lang.String name, NetworkInterfaceAttachmentArgs args)
NetworkInterfaceAttachment(java.lang.String name, NetworkInterfaceAttachmentArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
attachmentId()
com.pulumi.core.Output<java.lang.Integer>
deviceIndex()
static NetworkInterfaceAttachment
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, NetworkInterfaceAttachmentState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
instanceId()
com.pulumi.core.Output<java.lang.String>
networkInterfaceId()
com.pulumi.core.Output<java.lang.String>
status()
-
-
-
Constructor Detail
-
NetworkInterfaceAttachment
public NetworkInterfaceAttachment(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
NetworkInterfaceAttachment
public NetworkInterfaceAttachment(java.lang.String name, NetworkInterfaceAttachmentArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
NetworkInterfaceAttachment
public NetworkInterfaceAttachment(java.lang.String name, NetworkInterfaceAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
attachmentId
public com.pulumi.core.Output<java.lang.String> attachmentId()
- Returns:
- The ENI Attachment ID.
-
deviceIndex
public com.pulumi.core.Output<java.lang.Integer> deviceIndex()
- Returns:
- Network interface index (int).
-
instanceId
public com.pulumi.core.Output<java.lang.String> instanceId()
- Returns:
- Instance ID to attach.
-
networkInterfaceId
public com.pulumi.core.Output<java.lang.String> networkInterfaceId()
- Returns:
- ENI ID to attach.
-
status
public com.pulumi.core.Output<java.lang.String> status()
- Returns:
- The status of the Network Interface Attachment.
-
get
public static NetworkInterfaceAttachment get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable NetworkInterfaceAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-