Class CfnEIPAssociation

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:07.589Z") @Stability(Stable) public class CfnEIPAssociation extends CfnResource implements IInspectable
Associates an Elastic IP address with an instance or a network interface.

Before you can use an Elastic IP address, you must allocate it to your account. For more information about working with Elastic IP addresses, see Elastic IP address concepts and rules .

You must specify AllocationId and either InstanceId , NetworkInterfaceId , or PrivateIpAddress .

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.*;
 CfnEIPAssociation cfnEIPAssociation = CfnEIPAssociation.Builder.create(this, "MyCfnEIPAssociation")
         .allocationId("allocationId")
         .eip("eip")
         .instanceId("instanceId")
         .networkInterfaceId("networkInterfaceId")
         .privateIpAddress("privateIpAddress")
         .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

    • CfnEIPAssociation

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

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

      @Stability(Stable) public CfnEIPAssociation(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnEIPAssociationProps 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.
    • CfnEIPAssociation

      @Stability(Stable) public CfnEIPAssociation(@NotNull software.constructs.Construct scope, @NotNull String id)
      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.
  • 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.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID of the association.
    • getCfnProperties

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

      @Stability(Stable) @Nullable public String getAllocationId()
      The allocation ID.
    • setAllocationId

      @Stability(Stable) public void setAllocationId(@Nullable String value)
      The allocation ID.
    • getEip

      @Stability(Deprecated) @Deprecated @Nullable public String getEip()
      Deprecated.
      this property has been deprecated
    • setEip

      @Stability(Deprecated) @Deprecated public void setEip(@Nullable String value)
      Deprecated.
      this property has been deprecated
    • getInstanceId

      @Stability(Stable) @Nullable public String getInstanceId()
      The ID of the instance.
    • setInstanceId

      @Stability(Stable) public void setInstanceId(@Nullable String value)
      The ID of the instance.
    • getNetworkInterfaceId

      @Stability(Stable) @Nullable public String getNetworkInterfaceId()
      The ID of the network interface.
    • setNetworkInterfaceId

      @Stability(Stable) public void setNetworkInterfaceId(@Nullable String value)
      The ID of the network interface.
    • getPrivateIpAddress

      @Stability(Stable) @Nullable public String getPrivateIpAddress()
      The primary or secondary private IP address to associate with the Elastic IP address.
    • setPrivateIpAddress

      @Stability(Stable) public void setPrivateIpAddress(@Nullable String value)
      The primary or secondary private IP address to associate with the Elastic IP address.