Show / Hide Table of Contents

Class GetElasticIp

Inheritance
System.Object
GetElasticIp
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws
Assembly: Pulumi.Aws.dll
Syntax
public static class GetElasticIp

Methods

View Source

InvokeAsync(GetElasticIpArgs, InvokeOptions)

aws.ec2.Eip provides details about a specific Elastic IP.

{{% examples %}}

Example Usage

{{% example %}}

Search By Allocation ID (VPC only)

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var byAllocationId = Output.Create(Aws.GetElasticIp.InvokeAsync(new Aws.GetElasticIpArgs
    {
        Id = "eipalloc-12345678",
    }));
}

}

{{% /example %}} {{% example %}}

Search By Filters (EC2-Classic or VPC)

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var byFilter = Output.Create(Aws.GetElasticIp.InvokeAsync(new Aws.GetElasticIpArgs
    {
        Filters = 
        {
            new Aws.Inputs.GetElasticIpFilterArgs
            {
                Name = "tag:Name",
                Values = 
                {
                    "exampleNameTagValue",
                },
            },
        },
    }));
}

}

{{% /example %}} {{% example %}}

Search By Public IP (EC2-Classic or VPC)

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var byPublicIp = Output.Create(Aws.GetElasticIp.InvokeAsync(new Aws.GetElasticIpArgs
    {
        PublicIp = "1.2.3.4",
    }));
}

}

{{% /example %}} {{% example %}}

Search By Tags (EC2-Classic or VPC)

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var byTags = Output.Create(Aws.GetElasticIp.InvokeAsync(new Aws.GetElasticIpArgs
    {
        Tags = 
        {
            { "Name", "exampleNameTagValue" },
        },
    }));
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetElasticIpResult> InvokeAsync(GetElasticIpArgs args = null, InvokeOptions options = null)
Parameters
Type Name Description
GetElasticIpArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetElasticIpResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.