# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = ['EipArgs', 'Eip']

@pulumi.input_type
class EipArgs:
    def __init__(__self__, *,
                 address: Optional[pulumi.Input[str]] = None,
                 associate_with_private_ip: Optional[pulumi.Input[str]] = None,
                 customer_owned_ipv4_pool: Optional[pulumi.Input[str]] = None,
                 instance: Optional[pulumi.Input[str]] = None,
                 network_border_group: Optional[pulumi.Input[str]] = None,
                 network_interface: Optional[pulumi.Input[str]] = None,
                 public_ipv4_pool: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 vpc: Optional[pulumi.Input[bool]] = None):
        """
        The set of arguments for constructing a Eip resource.
        :param pulumi.Input[str] address: IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
        :param pulumi.Input[str] associate_with_private_ip: User-specified 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.
        :param pulumi.Input[str] customer_owned_ipv4_pool: ID  of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing).
        :param pulumi.Input[str] instance: EC2 instance ID.
        :param pulumi.Input[str] network_border_group: Location from which the IP address is advertised. Use this parameter to limit the address to this location.
        :param pulumi.Input[str] network_interface: Network interface ID to associate with.
        :param pulumi.Input[str] public_ipv4_pool: EC2 IPv4 address pool identifier or `amazon`. This option is only available for VPC EIPs.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[bool] vpc: Boolean if the EIP is in a VPC or not.
        """
        if address is not None:
            pulumi.set(__self__, "address", address)
        if associate_with_private_ip is not None:
            pulumi.set(__self__, "associate_with_private_ip", associate_with_private_ip)
        if customer_owned_ipv4_pool is not None:
            pulumi.set(__self__, "customer_owned_ipv4_pool", customer_owned_ipv4_pool)
        if instance is not None:
            pulumi.set(__self__, "instance", instance)
        if network_border_group is not None:
            pulumi.set(__self__, "network_border_group", network_border_group)
        if network_interface is not None:
            pulumi.set(__self__, "network_interface", network_interface)
        if public_ipv4_pool is not None:
            pulumi.set(__self__, "public_ipv4_pool", public_ipv4_pool)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if vpc is not None:
            pulumi.set(__self__, "vpc", vpc)

    @property
    @pulumi.getter
    def address(self) -> Optional[pulumi.Input[str]]:
        """
        IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
        """
        return pulumi.get(self, "address")

    @address.setter
    def address(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "address", value)

    @property
    @pulumi.getter(name="associateWithPrivateIp")
    def associate_with_private_ip(self) -> Optional[pulumi.Input[str]]:
        """
        User-specified 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.
        """
        return pulumi.get(self, "associate_with_private_ip")

    @associate_with_private_ip.setter
    def associate_with_private_ip(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "associate_with_private_ip", value)

    @property
    @pulumi.getter(name="customerOwnedIpv4Pool")
    def customer_owned_ipv4_pool(self) -> Optional[pulumi.Input[str]]:
        """
        ID  of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing).
        """
        return pulumi.get(self, "customer_owned_ipv4_pool")

    @customer_owned_ipv4_pool.setter
    def customer_owned_ipv4_pool(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "customer_owned_ipv4_pool", value)

    @property
    @pulumi.getter
    def instance(self) -> Optional[pulumi.Input[str]]:
        """
        EC2 instance ID.
        """
        return pulumi.get(self, "instance")

    @instance.setter
    def instance(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "instance", value)

    @property
    @pulumi.getter(name="networkBorderGroup")
    def network_border_group(self) -> Optional[pulumi.Input[str]]:
        """
        Location from which the IP address is advertised. Use this parameter to limit the address to this location.
        """
        return pulumi.get(self, "network_border_group")

    @network_border_group.setter
    def network_border_group(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "network_border_group", value)

    @property
    @pulumi.getter(name="networkInterface")
    def network_interface(self) -> Optional[pulumi.Input[str]]:
        """
        Network interface ID to associate with.
        """
        return pulumi.get(self, "network_interface")

    @network_interface.setter
    def network_interface(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "network_interface", value)

    @property
    @pulumi.getter(name="publicIpv4Pool")
    def public_ipv4_pool(self) -> Optional[pulumi.Input[str]]:
        """
        EC2 IPv4 address pool identifier or `amazon`. This option is only available for VPC EIPs.
        """
        return pulumi.get(self, "public_ipv4_pool")

    @public_ipv4_pool.setter
    def public_ipv4_pool(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "public_ipv4_pool", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter
    def vpc(self) -> Optional[pulumi.Input[bool]]:
        """
        Boolean if the EIP is in a VPC or not.
        """
        return pulumi.get(self, "vpc")

    @vpc.setter
    def vpc(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "vpc", value)


@pulumi.input_type
class _EipState:
    def __init__(__self__, *,
                 address: Optional[pulumi.Input[str]] = None,
                 allocation_id: Optional[pulumi.Input[str]] = None,
                 associate_with_private_ip: Optional[pulumi.Input[str]] = None,
                 association_id: Optional[pulumi.Input[str]] = None,
                 carrier_ip: Optional[pulumi.Input[str]] = None,
                 customer_owned_ip: Optional[pulumi.Input[str]] = None,
                 customer_owned_ipv4_pool: Optional[pulumi.Input[str]] = None,
                 domain: Optional[pulumi.Input[str]] = None,
                 instance: Optional[pulumi.Input[str]] = None,
                 network_border_group: Optional[pulumi.Input[str]] = None,
                 network_interface: Optional[pulumi.Input[str]] = None,
                 private_dns: Optional[pulumi.Input[str]] = None,
                 private_ip: Optional[pulumi.Input[str]] = None,
                 public_dns: Optional[pulumi.Input[str]] = None,
                 public_ip: Optional[pulumi.Input[str]] = None,
                 public_ipv4_pool: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 vpc: Optional[pulumi.Input[bool]] = None):
        """
        Input properties used for looking up and filtering Eip resources.
        :param pulumi.Input[str] address: IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
        :param pulumi.Input[str] allocation_id: ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
        :param pulumi.Input[str] associate_with_private_ip: User-specified 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.
        :param pulumi.Input[str] association_id: ID representing the association of the address with an instance in a VPC.
        :param pulumi.Input[str] carrier_ip: Carrier IP address.
        :param pulumi.Input[str] customer_owned_ip: Customer owned IP.
        :param pulumi.Input[str] customer_owned_ipv4_pool: ID  of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing).
        :param pulumi.Input[str] domain: Indicates if this EIP is for use in VPC (`vpc`) or EC2 Classic (`standard`).
        :param pulumi.Input[str] instance: EC2 instance ID.
        :param pulumi.Input[str] network_border_group: Location from which the IP address is advertised. Use this parameter to limit the address to this location.
        :param pulumi.Input[str] network_interface: Network interface ID to associate with.
        :param pulumi.Input[str] private_dns: The Private DNS associated with the Elastic IP address (if in VPC).
        :param pulumi.Input[str] private_ip: Contains the private IP address (if in VPC).
        :param pulumi.Input[str] public_dns: Public DNS associated with the Elastic IP address.
        :param pulumi.Input[str] public_ip: Contains the public IP address.
        :param pulumi.Input[str] public_ipv4_pool: EC2 IPv4 address pool identifier or `amazon`. This option is only available for VPC EIPs.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        :param pulumi.Input[bool] vpc: Boolean if the EIP is in a VPC or not.
        """
        if address is not None:
            pulumi.set(__self__, "address", address)
        if allocation_id is not None:
            pulumi.set(__self__, "allocation_id", allocation_id)
        if associate_with_private_ip is not None:
            pulumi.set(__self__, "associate_with_private_ip", associate_with_private_ip)
        if association_id is not None:
            pulumi.set(__self__, "association_id", association_id)
        if carrier_ip is not None:
            pulumi.set(__self__, "carrier_ip", carrier_ip)
        if customer_owned_ip is not None:
            pulumi.set(__self__, "customer_owned_ip", customer_owned_ip)
        if customer_owned_ipv4_pool is not None:
            pulumi.set(__self__, "customer_owned_ipv4_pool", customer_owned_ipv4_pool)
        if domain is not None:
            pulumi.set(__self__, "domain", domain)
        if instance is not None:
            pulumi.set(__self__, "instance", instance)
        if network_border_group is not None:
            pulumi.set(__self__, "network_border_group", network_border_group)
        if network_interface is not None:
            pulumi.set(__self__, "network_interface", network_interface)
        if private_dns is not None:
            pulumi.set(__self__, "private_dns", private_dns)
        if private_ip is not None:
            pulumi.set(__self__, "private_ip", private_ip)
        if public_dns is not None:
            pulumi.set(__self__, "public_dns", public_dns)
        if public_ip is not None:
            pulumi.set(__self__, "public_ip", public_ip)
        if public_ipv4_pool is not None:
            pulumi.set(__self__, "public_ipv4_pool", public_ipv4_pool)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if tags_all is not None:
            pulumi.set(__self__, "tags_all", tags_all)
        if vpc is not None:
            pulumi.set(__self__, "vpc", vpc)

    @property
    @pulumi.getter
    def address(self) -> Optional[pulumi.Input[str]]:
        """
        IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
        """
        return pulumi.get(self, "address")

    @address.setter
    def address(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "address", value)

    @property
    @pulumi.getter(name="allocationId")
    def allocation_id(self) -> Optional[pulumi.Input[str]]:
        """
        ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
        """
        return pulumi.get(self, "allocation_id")

    @allocation_id.setter
    def allocation_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "allocation_id", value)

    @property
    @pulumi.getter(name="associateWithPrivateIp")
    def associate_with_private_ip(self) -> Optional[pulumi.Input[str]]:
        """
        User-specified 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.
        """
        return pulumi.get(self, "associate_with_private_ip")

    @associate_with_private_ip.setter
    def associate_with_private_ip(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "associate_with_private_ip", value)

    @property
    @pulumi.getter(name="associationId")
    def association_id(self) -> Optional[pulumi.Input[str]]:
        """
        ID representing the association of the address with an instance in a VPC.
        """
        return pulumi.get(self, "association_id")

    @association_id.setter
    def association_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "association_id", value)

    @property
    @pulumi.getter(name="carrierIp")
    def carrier_ip(self) -> Optional[pulumi.Input[str]]:
        """
        Carrier IP address.
        """
        return pulumi.get(self, "carrier_ip")

    @carrier_ip.setter
    def carrier_ip(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "carrier_ip", value)

    @property
    @pulumi.getter(name="customerOwnedIp")
    def customer_owned_ip(self) -> Optional[pulumi.Input[str]]:
        """
        Customer owned IP.
        """
        return pulumi.get(self, "customer_owned_ip")

    @customer_owned_ip.setter
    def customer_owned_ip(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "customer_owned_ip", value)

    @property
    @pulumi.getter(name="customerOwnedIpv4Pool")
    def customer_owned_ipv4_pool(self) -> Optional[pulumi.Input[str]]:
        """
        ID  of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing).
        """
        return pulumi.get(self, "customer_owned_ipv4_pool")

    @customer_owned_ipv4_pool.setter
    def customer_owned_ipv4_pool(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "customer_owned_ipv4_pool", value)

    @property
    @pulumi.getter
    def domain(self) -> Optional[pulumi.Input[str]]:
        """
        Indicates if this EIP is for use in VPC (`vpc`) or EC2 Classic (`standard`).
        """
        return pulumi.get(self, "domain")

    @domain.setter
    def domain(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "domain", value)

    @property
    @pulumi.getter
    def instance(self) -> Optional[pulumi.Input[str]]:
        """
        EC2 instance ID.
        """
        return pulumi.get(self, "instance")

    @instance.setter
    def instance(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "instance", value)

    @property
    @pulumi.getter(name="networkBorderGroup")
    def network_border_group(self) -> Optional[pulumi.Input[str]]:
        """
        Location from which the IP address is advertised. Use this parameter to limit the address to this location.
        """
        return pulumi.get(self, "network_border_group")

    @network_border_group.setter
    def network_border_group(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "network_border_group", value)

    @property
    @pulumi.getter(name="networkInterface")
    def network_interface(self) -> Optional[pulumi.Input[str]]:
        """
        Network interface ID to associate with.
        """
        return pulumi.get(self, "network_interface")

    @network_interface.setter
    def network_interface(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "network_interface", value)

    @property
    @pulumi.getter(name="privateDns")
    def private_dns(self) -> Optional[pulumi.Input[str]]:
        """
        The Private DNS associated with the Elastic IP address (if in VPC).
        """
        return pulumi.get(self, "private_dns")

    @private_dns.setter
    def private_dns(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "private_dns", value)

    @property
    @pulumi.getter(name="privateIp")
    def private_ip(self) -> Optional[pulumi.Input[str]]:
        """
        Contains the private IP address (if in VPC).
        """
        return pulumi.get(self, "private_ip")

    @private_ip.setter
    def private_ip(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "private_ip", value)

    @property
    @pulumi.getter(name="publicDns")
    def public_dns(self) -> Optional[pulumi.Input[str]]:
        """
        Public DNS associated with the Elastic IP address.
        """
        return pulumi.get(self, "public_dns")

    @public_dns.setter
    def public_dns(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "public_dns", value)

    @property
    @pulumi.getter(name="publicIp")
    def public_ip(self) -> Optional[pulumi.Input[str]]:
        """
        Contains the public IP address.
        """
        return pulumi.get(self, "public_ip")

    @public_ip.setter
    def public_ip(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "public_ip", value)

    @property
    @pulumi.getter(name="publicIpv4Pool")
    def public_ipv4_pool(self) -> Optional[pulumi.Input[str]]:
        """
        EC2 IPv4 address pool identifier or `amazon`. This option is only available for VPC EIPs.
        """
        return pulumi.get(self, "public_ipv4_pool")

    @public_ipv4_pool.setter
    def public_ipv4_pool(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "public_ipv4_pool", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter(name="tagsAll")
    def tags_all(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        """
        return pulumi.get(self, "tags_all")

    @tags_all.setter
    def tags_all(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "tags_all", value)

    @property
    @pulumi.getter
    def vpc(self) -> Optional[pulumi.Input[bool]]:
        """
        Boolean if the EIP is in a VPC or not.
        """
        return pulumi.get(self, "vpc")

    @vpc.setter
    def vpc(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "vpc", value)


class Eip(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 address: Optional[pulumi.Input[str]] = None,
                 associate_with_private_ip: Optional[pulumi.Input[str]] = None,
                 customer_owned_ipv4_pool: Optional[pulumi.Input[str]] = None,
                 instance: Optional[pulumi.Input[str]] = None,
                 network_border_group: Optional[pulumi.Input[str]] = None,
                 network_interface: Optional[pulumi.Input[str]] = None,
                 public_ipv4_pool: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 vpc: Optional[pulumi.Input[bool]] = None,
                 __props__=None):
        """
        Provides an Elastic IP resource.

        > **Note:** EIP may require IGW to exist prior to association. Use `depends_on` to set an explicit dependency on the IGW.

        > **Note:** Do not use `network_interface` to associate the EIP to `lb.LoadBalancer` or `ec2.NatGateway` resources. Instead use the `allocation_id` available in those resources to allow AWS to manage the association, otherwise you will see `AuthFailure` errors.

        ## Example Usage
        ### Single EIP associated with an instance

        ```python
        import pulumi
        import pulumi_aws as aws

        lb = aws.ec2.Eip("lb",
            instance=aws_instance["web"]["id"],
            vpc=True)
        ```
        ### Multiple EIPs associated with a single network interface

        ```python
        import pulumi
        import pulumi_aws as aws

        multi_ip = aws.ec2.NetworkInterface("multi-ip",
            subnet_id=aws_subnet["main"]["id"],
            private_ips=[
                "10.0.0.10",
                "10.0.0.11",
            ])
        one = aws.ec2.Eip("one",
            vpc=True,
            network_interface=multi_ip.id,
            associate_with_private_ip="10.0.0.10")
        two = aws.ec2.Eip("two",
            vpc=True,
            network_interface=multi_ip.id,
            associate_with_private_ip="10.0.0.11")
        ```
        ### Attaching an EIP to an Instance with a pre-assigned private ip (VPC Only)

        ```python
        import pulumi
        import pulumi_aws as aws

        default = aws.ec2.Vpc("default",
            cidr_block="10.0.0.0/16",
            enable_dns_hostnames=True)
        gw = aws.ec2.InternetGateway("gw", vpc_id=default.id)
        tf_test_subnet = aws.ec2.Subnet("tfTestSubnet",
            vpc_id=default.id,
            cidr_block="10.0.0.0/24",
            map_public_ip_on_launch=True,
            opts=pulumi.ResourceOptions(depends_on=[gw]))
        foo = aws.ec2.Instance("foo",
            ami="ami-5189a661",
            instance_type="t2.micro",
            private_ip="10.0.0.12",
            subnet_id=tf_test_subnet.id)
        bar = aws.ec2.Eip("bar",
            vpc=True,
            instance=foo.id,
            associate_with_private_ip="10.0.0.12",
            opts=pulumi.ResourceOptions(depends_on=[gw]))
        ```
        ### Allocating EIP from the BYOIP pool

        ```python
        import pulumi
        import pulumi_aws as aws

        byoip_ip = aws.ec2.Eip("byoip-ip",
            public_ipv4_pool="ipv4pool-ec2-012345",
            vpc=True)
        ```

        ## Import

        EIPs in a VPC can be imported using their Allocation ID, e.g.,

        ```sh
         $ pulumi import aws:ec2/eip:Eip bar eipalloc-00a10e96
        ```

         EIPs in EC2 Classic can be imported using their Public IP, e.g.,

        ```sh
         $ pulumi import aws:ec2/eip:Eip bar 52.0.0.0
        ```

         [1]https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateAddress.html

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] address: IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
        :param pulumi.Input[str] associate_with_private_ip: User-specified 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.
        :param pulumi.Input[str] customer_owned_ipv4_pool: ID  of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing).
        :param pulumi.Input[str] instance: EC2 instance ID.
        :param pulumi.Input[str] network_border_group: Location from which the IP address is advertised. Use this parameter to limit the address to this location.
        :param pulumi.Input[str] network_interface: Network interface ID to associate with.
        :param pulumi.Input[str] public_ipv4_pool: EC2 IPv4 address pool identifier or `amazon`. This option is only available for VPC EIPs.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[bool] vpc: Boolean if the EIP is in a VPC or not.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[EipArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Provides an Elastic IP resource.

        > **Note:** EIP may require IGW to exist prior to association. Use `depends_on` to set an explicit dependency on the IGW.

        > **Note:** Do not use `network_interface` to associate the EIP to `lb.LoadBalancer` or `ec2.NatGateway` resources. Instead use the `allocation_id` available in those resources to allow AWS to manage the association, otherwise you will see `AuthFailure` errors.

        ## Example Usage
        ### Single EIP associated with an instance

        ```python
        import pulumi
        import pulumi_aws as aws

        lb = aws.ec2.Eip("lb",
            instance=aws_instance["web"]["id"],
            vpc=True)
        ```
        ### Multiple EIPs associated with a single network interface

        ```python
        import pulumi
        import pulumi_aws as aws

        multi_ip = aws.ec2.NetworkInterface("multi-ip",
            subnet_id=aws_subnet["main"]["id"],
            private_ips=[
                "10.0.0.10",
                "10.0.0.11",
            ])
        one = aws.ec2.Eip("one",
            vpc=True,
            network_interface=multi_ip.id,
            associate_with_private_ip="10.0.0.10")
        two = aws.ec2.Eip("two",
            vpc=True,
            network_interface=multi_ip.id,
            associate_with_private_ip="10.0.0.11")
        ```
        ### Attaching an EIP to an Instance with a pre-assigned private ip (VPC Only)

        ```python
        import pulumi
        import pulumi_aws as aws

        default = aws.ec2.Vpc("default",
            cidr_block="10.0.0.0/16",
            enable_dns_hostnames=True)
        gw = aws.ec2.InternetGateway("gw", vpc_id=default.id)
        tf_test_subnet = aws.ec2.Subnet("tfTestSubnet",
            vpc_id=default.id,
            cidr_block="10.0.0.0/24",
            map_public_ip_on_launch=True,
            opts=pulumi.ResourceOptions(depends_on=[gw]))
        foo = aws.ec2.Instance("foo",
            ami="ami-5189a661",
            instance_type="t2.micro",
            private_ip="10.0.0.12",
            subnet_id=tf_test_subnet.id)
        bar = aws.ec2.Eip("bar",
            vpc=True,
            instance=foo.id,
            associate_with_private_ip="10.0.0.12",
            opts=pulumi.ResourceOptions(depends_on=[gw]))
        ```
        ### Allocating EIP from the BYOIP pool

        ```python
        import pulumi
        import pulumi_aws as aws

        byoip_ip = aws.ec2.Eip("byoip-ip",
            public_ipv4_pool="ipv4pool-ec2-012345",
            vpc=True)
        ```

        ## Import

        EIPs in a VPC can be imported using their Allocation ID, e.g.,

        ```sh
         $ pulumi import aws:ec2/eip:Eip bar eipalloc-00a10e96
        ```

         EIPs in EC2 Classic can be imported using their Public IP, e.g.,

        ```sh
         $ pulumi import aws:ec2/eip:Eip bar 52.0.0.0
        ```

         [1]https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateAddress.html

        :param str resource_name: The name of the resource.
        :param EipArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(EipArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 address: Optional[pulumi.Input[str]] = None,
                 associate_with_private_ip: Optional[pulumi.Input[str]] = None,
                 customer_owned_ipv4_pool: Optional[pulumi.Input[str]] = None,
                 instance: Optional[pulumi.Input[str]] = None,
                 network_border_group: Optional[pulumi.Input[str]] = None,
                 network_interface: Optional[pulumi.Input[str]] = None,
                 public_ipv4_pool: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 vpc: Optional[pulumi.Input[bool]] = None,
                 __props__=None):
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = EipArgs.__new__(EipArgs)

            __props__.__dict__["address"] = address
            __props__.__dict__["associate_with_private_ip"] = associate_with_private_ip
            __props__.__dict__["customer_owned_ipv4_pool"] = customer_owned_ipv4_pool
            __props__.__dict__["instance"] = instance
            __props__.__dict__["network_border_group"] = network_border_group
            __props__.__dict__["network_interface"] = network_interface
            __props__.__dict__["public_ipv4_pool"] = public_ipv4_pool
            __props__.__dict__["tags"] = tags
            __props__.__dict__["vpc"] = vpc
            __props__.__dict__["allocation_id"] = None
            __props__.__dict__["association_id"] = None
            __props__.__dict__["carrier_ip"] = None
            __props__.__dict__["customer_owned_ip"] = None
            __props__.__dict__["domain"] = None
            __props__.__dict__["private_dns"] = None
            __props__.__dict__["private_ip"] = None
            __props__.__dict__["public_dns"] = None
            __props__.__dict__["public_ip"] = None
            __props__.__dict__["tags_all"] = None
        super(Eip, __self__).__init__(
            'aws:ec2/eip:Eip',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            address: Optional[pulumi.Input[str]] = None,
            allocation_id: Optional[pulumi.Input[str]] = None,
            associate_with_private_ip: Optional[pulumi.Input[str]] = None,
            association_id: Optional[pulumi.Input[str]] = None,
            carrier_ip: Optional[pulumi.Input[str]] = None,
            customer_owned_ip: Optional[pulumi.Input[str]] = None,
            customer_owned_ipv4_pool: Optional[pulumi.Input[str]] = None,
            domain: Optional[pulumi.Input[str]] = None,
            instance: Optional[pulumi.Input[str]] = None,
            network_border_group: Optional[pulumi.Input[str]] = None,
            network_interface: Optional[pulumi.Input[str]] = None,
            private_dns: Optional[pulumi.Input[str]] = None,
            private_ip: Optional[pulumi.Input[str]] = None,
            public_dns: Optional[pulumi.Input[str]] = None,
            public_ip: Optional[pulumi.Input[str]] = None,
            public_ipv4_pool: Optional[pulumi.Input[str]] = None,
            tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            vpc: Optional[pulumi.Input[bool]] = None) -> 'Eip':
        """
        Get an existing Eip resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] address: IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
        :param pulumi.Input[str] allocation_id: ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
        :param pulumi.Input[str] associate_with_private_ip: User-specified 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.
        :param pulumi.Input[str] association_id: ID representing the association of the address with an instance in a VPC.
        :param pulumi.Input[str] carrier_ip: Carrier IP address.
        :param pulumi.Input[str] customer_owned_ip: Customer owned IP.
        :param pulumi.Input[str] customer_owned_ipv4_pool: ID  of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing).
        :param pulumi.Input[str] domain: Indicates if this EIP is for use in VPC (`vpc`) or EC2 Classic (`standard`).
        :param pulumi.Input[str] instance: EC2 instance ID.
        :param pulumi.Input[str] network_border_group: Location from which the IP address is advertised. Use this parameter to limit the address to this location.
        :param pulumi.Input[str] network_interface: Network interface ID to associate with.
        :param pulumi.Input[str] private_dns: The Private DNS associated with the Elastic IP address (if in VPC).
        :param pulumi.Input[str] private_ip: Contains the private IP address (if in VPC).
        :param pulumi.Input[str] public_dns: Public DNS associated with the Elastic IP address.
        :param pulumi.Input[str] public_ip: Contains the public IP address.
        :param pulumi.Input[str] public_ipv4_pool: EC2 IPv4 address pool identifier or `amazon`. This option is only available for VPC EIPs.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        :param pulumi.Input[bool] vpc: Boolean if the EIP is in a VPC or not.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _EipState.__new__(_EipState)

        __props__.__dict__["address"] = address
        __props__.__dict__["allocation_id"] = allocation_id
        __props__.__dict__["associate_with_private_ip"] = associate_with_private_ip
        __props__.__dict__["association_id"] = association_id
        __props__.__dict__["carrier_ip"] = carrier_ip
        __props__.__dict__["customer_owned_ip"] = customer_owned_ip
        __props__.__dict__["customer_owned_ipv4_pool"] = customer_owned_ipv4_pool
        __props__.__dict__["domain"] = domain
        __props__.__dict__["instance"] = instance
        __props__.__dict__["network_border_group"] = network_border_group
        __props__.__dict__["network_interface"] = network_interface
        __props__.__dict__["private_dns"] = private_dns
        __props__.__dict__["private_ip"] = private_ip
        __props__.__dict__["public_dns"] = public_dns
        __props__.__dict__["public_ip"] = public_ip
        __props__.__dict__["public_ipv4_pool"] = public_ipv4_pool
        __props__.__dict__["tags"] = tags
        __props__.__dict__["tags_all"] = tags_all
        __props__.__dict__["vpc"] = vpc
        return Eip(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def address(self) -> pulumi.Output[Optional[str]]:
        """
        IP address from an EC2 BYOIP pool. This option is only available for VPC EIPs.
        """
        return pulumi.get(self, "address")

    @property
    @pulumi.getter(name="allocationId")
    def allocation_id(self) -> pulumi.Output[str]:
        """
        ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
        """
        return pulumi.get(self, "allocation_id")

    @property
    @pulumi.getter(name="associateWithPrivateIp")
    def associate_with_private_ip(self) -> pulumi.Output[Optional[str]]:
        """
        User-specified 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.
        """
        return pulumi.get(self, "associate_with_private_ip")

    @property
    @pulumi.getter(name="associationId")
    def association_id(self) -> pulumi.Output[str]:
        """
        ID representing the association of the address with an instance in a VPC.
        """
        return pulumi.get(self, "association_id")

    @property
    @pulumi.getter(name="carrierIp")
    def carrier_ip(self) -> pulumi.Output[str]:
        """
        Carrier IP address.
        """
        return pulumi.get(self, "carrier_ip")

    @property
    @pulumi.getter(name="customerOwnedIp")
    def customer_owned_ip(self) -> pulumi.Output[str]:
        """
        Customer owned IP.
        """
        return pulumi.get(self, "customer_owned_ip")

    @property
    @pulumi.getter(name="customerOwnedIpv4Pool")
    def customer_owned_ipv4_pool(self) -> pulumi.Output[Optional[str]]:
        """
        ID  of a customer-owned address pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing).
        """
        return pulumi.get(self, "customer_owned_ipv4_pool")

    @property
    @pulumi.getter
    def domain(self) -> pulumi.Output[str]:
        """
        Indicates if this EIP is for use in VPC (`vpc`) or EC2 Classic (`standard`).
        """
        return pulumi.get(self, "domain")

    @property
    @pulumi.getter
    def instance(self) -> pulumi.Output[str]:
        """
        EC2 instance ID.
        """
        return pulumi.get(self, "instance")

    @property
    @pulumi.getter(name="networkBorderGroup")
    def network_border_group(self) -> pulumi.Output[str]:
        """
        Location from which the IP address is advertised. Use this parameter to limit the address to this location.
        """
        return pulumi.get(self, "network_border_group")

    @property
    @pulumi.getter(name="networkInterface")
    def network_interface(self) -> pulumi.Output[str]:
        """
        Network interface ID to associate with.
        """
        return pulumi.get(self, "network_interface")

    @property
    @pulumi.getter(name="privateDns")
    def private_dns(self) -> pulumi.Output[str]:
        """
        The Private DNS associated with the Elastic IP address (if in VPC).
        """
        return pulumi.get(self, "private_dns")

    @property
    @pulumi.getter(name="privateIp")
    def private_ip(self) -> pulumi.Output[str]:
        """
        Contains the private IP address (if in VPC).
        """
        return pulumi.get(self, "private_ip")

    @property
    @pulumi.getter(name="publicDns")
    def public_dns(self) -> pulumi.Output[str]:
        """
        Public DNS associated with the Elastic IP address.
        """
        return pulumi.get(self, "public_dns")

    @property
    @pulumi.getter(name="publicIp")
    def public_ip(self) -> pulumi.Output[str]:
        """
        Contains the public IP address.
        """
        return pulumi.get(self, "public_ip")

    @property
    @pulumi.getter(name="publicIpv4Pool")
    def public_ipv4_pool(self) -> pulumi.Output[str]:
        """
        EC2 IPv4 address pool identifier or `amazon`. This option is only available for VPC EIPs.
        """
        return pulumi.get(self, "public_ipv4_pool")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        """
        Map of tags to assign to the resource. Tags can only be applied to EIPs in a VPC. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="tagsAll")
    def tags_all(self) -> pulumi.Output[Mapping[str, str]]:
        """
        A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        """
        return pulumi.get(self, "tags_all")

    @property
    @pulumi.getter
    def vpc(self) -> pulumi.Output[bool]:
        """
        Boolean if the EIP is in a VPC or not.
        """
        return pulumi.get(self, "vpc")

