Class CfnEIPAssociation.Builder

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

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

    • create

      @Stability(Stable) public static CfnEIPAssociation.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 CfnEIPAssociation.Builder.
    • allocationId

      @Stability(Stable) public CfnEIPAssociation.Builder allocationId(String allocationId)
      The allocation ID.

      This is required.

      Parameters:
      allocationId - The allocation ID. This parameter is required.
      Returns:
      this
    • eip

      @Stability(Stable) public CfnEIPAssociation.Builder eip(String eip)
      Deprecated.

      Parameters:
      eip - Deprecated. This parameter is required.
      Returns:
      this
    • instanceId

      @Stability(Stable) public CfnEIPAssociation.Builder instanceId(String instanceId)
      The ID of the instance.

      The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.

      Parameters:
      instanceId - The ID of the instance. This parameter is required.
      Returns:
      this
    • networkInterfaceId

      @Stability(Stable) public CfnEIPAssociation.Builder networkInterfaceId(String networkInterfaceId)
      The ID of the network interface.

      If the instance has more than one network interface, you must specify a network interface ID.

      You can specify either the instance ID or the network interface ID, but not both.

      Parameters:
      networkInterfaceId - The ID of the network interface. This parameter is required.
      Returns:
      this
    • privateIpAddress

      @Stability(Stable) public CfnEIPAssociation.Builder privateIpAddress(String privateIpAddress)
      The primary or secondary private IP address to associate with the Elastic IP address.

      If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

      Parameters:
      privateIpAddress - The primary or secondary private IP address to associate with the Elastic IP address. This parameter is required.
      Returns:
      this
    • build

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