1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ec2
  5. getEip

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.ec2.getEip

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

Specifies an Elastic IP (EIP) address and can, optionally, associate it with an Amazon EC2 instance. You can allocate an Elastic IP address from an address pool owned by AWS or from an address pool created from a public IPv4 address range that you have brought to AWS for use with your AWS resources using bring your own IP addresses (BYOIP). For more information, see Bring Your Own IP Addresses (BYOIP) in the Amazon EC2 User Guide. For more information, see Elastic IP Addresses in the Amazon EC2 User Guide.

Using getEip

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getEip(args: GetEipArgs, opts?: InvokeOptions): Promise<GetEipResult>
function getEipOutput(args: GetEipOutputArgs, opts?: InvokeOptions): Output<GetEipResult>
Copy
def get_eip(allocation_id: Optional[str] = None,
            public_ip: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetEipResult
def get_eip_output(allocation_id: Optional[pulumi.Input[str]] = None,
            public_ip: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[GetEipResult]
Copy
func LookupEip(ctx *Context, args *LookupEipArgs, opts ...InvokeOption) (*LookupEipResult, error)
func LookupEipOutput(ctx *Context, args *LookupEipOutputArgs, opts ...InvokeOption) LookupEipResultOutput
Copy

> Note: This function is named LookupEip in the Go SDK.

public static class GetEip 
{
    public static Task<GetEipResult> InvokeAsync(GetEipArgs args, InvokeOptions? opts = null)
    public static Output<GetEipResult> Invoke(GetEipInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEipResult> getEip(GetEipArgs args, InvokeOptions options)
public static Output<GetEipResult> getEip(GetEipArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws-native:ec2:getEip
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AllocationId This property is required. string
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
PublicIp This property is required. string
The Elastic IP address.
AllocationId This property is required. string
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
PublicIp This property is required. string
The Elastic IP address.
allocationId This property is required. String
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
publicIp This property is required. String
The Elastic IP address.
allocationId This property is required. string
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
publicIp This property is required. string
The Elastic IP address.
allocation_id This property is required. str
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
public_ip This property is required. str
The Elastic IP address.
allocationId This property is required. String
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
publicIp This property is required. String
The Elastic IP address.

getEip Result

The following output properties are available:

AllocationId string
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
InstanceId string
The ID of the instance. Updates to the InstanceId property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
PublicIp string
The Elastic IP address.
PublicIpv4Pool string
The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. Updates to the PublicIpv4Pool property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
Tags List<Pulumi.AwsNative.Outputs.Tag>
Any tags assigned to the Elastic IP address. Updates to the Tags property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
AllocationId string
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
InstanceId string
The ID of the instance. Updates to the InstanceId property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
PublicIp string
The Elastic IP address.
PublicIpv4Pool string
The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. Updates to the PublicIpv4Pool property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
Tags Tag
Any tags assigned to the Elastic IP address. Updates to the Tags property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
allocationId String
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
instanceId String
The ID of the instance. Updates to the InstanceId property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
publicIp String
The Elastic IP address.
publicIpv4Pool String
The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. Updates to the PublicIpv4Pool property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
tags List<Tag>
Any tags assigned to the Elastic IP address. Updates to the Tags property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
allocationId string
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
instanceId string
The ID of the instance. Updates to the InstanceId property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
publicIp string
The Elastic IP address.
publicIpv4Pool string
The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. Updates to the PublicIpv4Pool property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
tags Tag[]
Any tags assigned to the Elastic IP address. Updates to the Tags property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
allocation_id str
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
instance_id str
The ID of the instance. Updates to the InstanceId property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
public_ip str
The Elastic IP address.
public_ipv4_pool str
The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. Updates to the PublicIpv4Pool property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
tags Sequence[root_Tag]
Any tags assigned to the Elastic IP address. Updates to the Tags property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
allocationId String
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
instanceId String
The ID of the instance. Updates to the InstanceId property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
publicIp String
The Elastic IP address.
publicIpv4Pool String
The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. Updates to the PublicIpv4Pool property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.
tags List<Property Map>
Any tags assigned to the Elastic IP address. Updates to the Tags property may require some interruptions. Updates on an EIP reassociates the address on its associated resource.

Supporting Types

Tag

Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag
key This property is required. string
The key name of the tag
value This property is required. string
The value of the tag
key This property is required. str
The key name of the tag
value This property is required. str
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi