Class CfnNetworkInterfaceAttachment

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.ec2.CfnNetworkInterfaceAttachment
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:55:56.670Z") @Stability(Stable) public class CfnNetworkInterfaceAttachment extends CfnResource implements IInspectable
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.

Example:

 // 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.*;
 CfnNetworkInterfaceAttachment cfnNetworkInterfaceAttachment = CfnNetworkInterfaceAttachment.Builder.create(this, "MyCfnNetworkInterfaceAttachment")
         .deviceIndex("deviceIndex")
         .instanceId("instanceId")
         .networkInterfaceId("networkInterfaceId")
         // the properties below are optional
         .deleteOnTermination(false)
         .enaSrdSpecification(EnaSrdSpecificationProperty.builder()
                 .enaSrdEnabled(false)
                 .enaSrdUdpSpecification(EnaSrdUdpSpecificationProperty.builder()
                         .enaSrdUdpEnabled(false)
                         .build())
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnNetworkInterfaceAttachment

      protected CfnNetworkInterfaceAttachment(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnNetworkInterfaceAttachment

      protected CfnNetworkInterfaceAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnNetworkInterfaceAttachment

      @Stability(Stable) public CfnNetworkInterfaceAttachment(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnNetworkInterfaceAttachmentProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrAttachmentId

      @Stability(Stable) @NotNull public String getAttrAttachmentId()
      The ID of the network interface attachment.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getDeviceIndex

      @Stability(Stable) @NotNull public String getDeviceIndex()
      The network interface's position in the attachment order.
    • setDeviceIndex

      @Stability(Stable) public void setDeviceIndex(@NotNull String value)
      The network interface's position in the attachment order.
    • getInstanceId

      @Stability(Stable) @NotNull public String getInstanceId()
      The ID of the instance to which you will attach the ENI.
    • setInstanceId

      @Stability(Stable) public void setInstanceId(@NotNull String value)
      The ID of the instance to which you will attach the ENI.
    • getNetworkInterfaceId

      @Stability(Stable) @NotNull public String getNetworkInterfaceId()
      The ID of the ENI that you want to attach.
    • setNetworkInterfaceId

      @Stability(Stable) public void setNetworkInterfaceId(@NotNull String value)
      The ID of the ENI that you want to attach.
    • getDeleteOnTermination

      @Stability(Stable) @Nullable public Object getDeleteOnTermination()
      Whether to delete the network interface when the instance terminates.
    • setDeleteOnTermination

      @Stability(Stable) public void setDeleteOnTermination(@Nullable Boolean value)
      Whether to delete the network interface when the instance terminates.
    • setDeleteOnTermination

      @Stability(Stable) public void setDeleteOnTermination(@Nullable IResolvable value)
      Whether to delete the network interface when the instance terminates.
    • getEnaSrdSpecification

      @Stability(Stable) @Nullable public Object getEnaSrdSpecification()
      Configures ENA Express for the network interface that this action attaches to the instance.
    • setEnaSrdSpecification

      @Stability(Stable) public void setEnaSrdSpecification(@Nullable IResolvable value)
      Configures ENA Express for the network interface that this action attaches to the instance.
    • setEnaSrdSpecification

      @Stability(Stable) public void setEnaSrdSpecification(@Nullable CfnNetworkInterfaceAttachment.EnaSrdSpecificationProperty value)
      Configures ENA Express for the network interface that this action attaches to the instance.