Class CfnNetworkInterfaceAttachment.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.CfnNetworkInterfaceAttachment.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnNetworkInterfaceAttachment>
Enclosing class:
CfnNetworkInterfaceAttachment

@Stability(Stable) public static final class CfnNetworkInterfaceAttachment.Builder extends Object implements software.amazon.jsii.Builder<CfnNetworkInterfaceAttachment>
A fluent builder for CfnNetworkInterfaceAttachment.
  • Method Details

    • create

      @Stability(Stable) public static CfnNetworkInterfaceAttachment.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnNetworkInterfaceAttachment.Builder.
    • deviceIndex

      @Stability(Stable) public CfnNetworkInterfaceAttachment.Builder deviceIndex(String deviceIndex)
      The network interface's position in the attachment order.

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

      Parameters:
      deviceIndex - The network interface's position in the attachment order. This parameter is required.
      Returns:
      this
    • instanceId

      @Stability(Stable) public CfnNetworkInterfaceAttachment.Builder instanceId(String instanceId)
      The ID of the instance to which you will attach the ENI.

      Parameters:
      instanceId - The ID of the instance to which you will attach the ENI. This parameter is required.
      Returns:
      this
    • networkInterfaceId

      @Stability(Stable) public CfnNetworkInterfaceAttachment.Builder networkInterfaceId(String networkInterfaceId)
      The ID of the ENI that you want to attach.

      Parameters:
      networkInterfaceId - The ID of the ENI that you want to attach. This parameter is required.
      Returns:
      this
    • deleteOnTermination

      @Stability(Stable) public CfnNetworkInterfaceAttachment.Builder deleteOnTermination(Boolean deleteOnTermination)
      Whether to delete the network interface when the instance terminates.

      By default, this value is set to true .

      Parameters:
      deleteOnTermination - Whether to delete the network interface when the instance terminates. This parameter is required.
      Returns:
      this
    • deleteOnTermination

      @Stability(Stable) public CfnNetworkInterfaceAttachment.Builder deleteOnTermination(IResolvable deleteOnTermination)
      Whether to delete the network interface when the instance terminates.

      By default, this value is set to true .

      Parameters:
      deleteOnTermination - Whether to delete the network interface when the instance terminates. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnNetworkInterfaceAttachment build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnNetworkInterfaceAttachment>
      Returns:
      a newly built instance of CfnNetworkInterfaceAttachment.