# 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
from . import outputs

__all__ = [
    'GetEIPResult',
    'AwaitableGetEIPResult',
    'get_eip',
]

@pulumi.output_type
class GetEIPResult:
    """
    A collection of values returned by getEIP.
    """
    def __init__(__self__, eips=None, id=None, ids=None, name_regex=None, output_file=None, total_count=None):
        if eips and not isinstance(eips, list):
            raise TypeError("Expected argument 'eips' to be a list")
        pulumi.set(__self__, "eips", eips)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ids and not isinstance(ids, list):
            raise TypeError("Expected argument 'ids' to be a list")
        pulumi.set(__self__, "ids", ids)
        if name_regex and not isinstance(name_regex, str):
            raise TypeError("Expected argument 'name_regex' to be a str")
        pulumi.set(__self__, "name_regex", name_regex)
        if output_file and not isinstance(output_file, str):
            raise TypeError("Expected argument 'output_file' to be a str")
        pulumi.set(__self__, "output_file", output_file)
        if total_count and not isinstance(total_count, int):
            raise TypeError("Expected argument 'total_count' to be a int")
        pulumi.set(__self__, "total_count", total_count)

    @property
    @pulumi.getter
    def eips(self) -> Sequence['outputs.GetEIPEipResult']:
        """
        It is a nested type which documented below.
        """
        return pulumi.get(self, "eips")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def ids(self) -> Sequence[str]:
        return pulumi.get(self, "ids")

    @property
    @pulumi.getter(name="nameRegex")
    def name_regex(self) -> Optional[str]:
        return pulumi.get(self, "name_regex")

    @property
    @pulumi.getter(name="outputFile")
    def output_file(self) -> Optional[str]:
        return pulumi.get(self, "output_file")

    @property
    @pulumi.getter(name="totalCount")
    def total_count(self) -> int:
        """
        Total number of Elastic IPs that satisfy the condition.
        """
        return pulumi.get(self, "total_count")


class AwaitableGetEIPResult(GetEIPResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetEIPResult(
            eips=self.eips,
            id=self.id,
            ids=self.ids,
            name_regex=self.name_regex,
            output_file=self.output_file,
            total_count=self.total_count)


def get_eip(ids: Optional[Sequence[str]] = None,
            name_regex: Optional[str] = None,
            output_file: Optional[str] = None,
            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEIPResult:
    """
    This data source provides a list of EIP resources (Elastic IP address) according to their EIP ID.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ucloud as ucloud

    example = ucloud.unet.get_eip()
    pulumi.export("first", example.eips[0].ip_sets[0].ip)
    ```


    :param Sequence[str] ids: A list of Elastic IP IDs, all the EIPs belong to this region will be retrieved if the ID is `[]`.
    :param str name_regex: A regex string to filter resulting eips by name.
    """
    __args__ = dict()
    __args__['ids'] = ids
    __args__['nameRegex'] = name_regex
    __args__['outputFile'] = output_file
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('ucloud:unet/getEIP:getEIP', __args__, opts=opts, typ=GetEIPResult).value

    return AwaitableGetEIPResult(
        eips=__ret__.eips,
        id=__ret__.id,
        ids=__ret__.ids,
        name_regex=__ret__.name_regex,
        output_file=__ret__.output_file,
        total_count=__ret__.total_count)

# 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
from . import outputs

__all__ = [
    'GetEIPResult',
    'AwaitableGetEIPResult',
    'get_eip',
]

@pulumi.output_type
class GetEIPResult:
    """
    A collection of values returned by getEIP.
    """
    def __init__(__self__, eips=None, id=None, ids=None, name_regex=None, output_file=None, total_count=None):
        if eips and not isinstance(eips, list):
            raise TypeError("Expected argument 'eips' to be a list")
        pulumi.set(__self__, "eips", eips)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ids and not isinstance(ids, list):
            raise TypeError("Expected argument 'ids' to be a list")
        pulumi.set(__self__, "ids", ids)
        if name_regex and not isinstance(name_regex, str):
            raise TypeError("Expected argument 'name_regex' to be a str")
        pulumi.set(__self__, "name_regex", name_regex)
        if output_file and not isinstance(output_file, str):
            raise TypeError("Expected argument 'output_file' to be a str")
        pulumi.set(__self__, "output_file", output_file)
        if total_count and not isinstance(total_count, int):
            raise TypeError("Expected argument 'total_count' to be a int")
        pulumi.set(__self__, "total_count", total_count)

    @property
    @pulumi.getter
    def eips(self) -> Sequence['outputs.GetEIPEipResult']:
        """
        It is a nested type which documented below.
        """
        return pulumi.get(self, "eips")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def ids(self) -> Sequence[str]:
        return pulumi.get(self, "ids")

    @property
    @pulumi.getter(name="nameRegex")
    def name_regex(self) -> Optional[str]:
        return pulumi.get(self, "name_regex")

    @property
    @pulumi.getter(name="outputFile")
    def output_file(self) -> Optional[str]:
        return pulumi.get(self, "output_file")

    @property
    @pulumi.getter(name="totalCount")
    def total_count(self) -> int:
        """
        Total number of Elastic IPs that satisfy the condition.
        """
        return pulumi.get(self, "total_count")


class AwaitableGetEIPResult(GetEIPResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetEIPResult(
            eips=self.eips,
            id=self.id,
            ids=self.ids,
            name_regex=self.name_regex,
            output_file=self.output_file,
            total_count=self.total_count)


def get_eip(ids: Optional[Sequence[str]] = None,
            name_regex: Optional[str] = None,
            output_file: Optional[str] = None,
            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEIPResult:
    """
    This data source provides a list of EIP resources (Elastic IP address) according to their EIP ID.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ucloud as ucloud

    example = ucloud.unet.get_eip()
    pulumi.export("first", example.eips[0].ip_sets[0].ip)
    ```


    :param Sequence[str] ids: A list of Elastic IP IDs, all the EIPs belong to this region will be retrieved if the ID is `[]`.
    :param str name_regex: A regex string to filter resulting eips by name.
    """
    __args__ = dict()
    __args__['ids'] = ids
    __args__['nameRegex'] = name_regex
    __args__['outputFile'] = output_file
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('ucloud:unet/getEIP:getEIP', __args__, opts=opts, typ=GetEIPResult).value

    return AwaitableGetEIPResult(
        eips=__ret__.eips,
        id=__ret__.id,
        ids=__ret__.ids,
        name_regex=__ret__.name_regex,
        output_file=__ret__.output_file,
        total_count=__ret__.total_count)

# 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! *** A collection of values returned by getEIP. It is a nested type which documented below. The provider-assigned unique ID for this managed resource. Total number of Elastic IPs that satisfy the condition. # pylint: disable=using-constant-test This data source provides a list of EIP resources (Elastic IP address) according to their EIP ID.      ## Example Usage      ```python     import pulumi     import pulumi_ucloud as ucloud      example = ucloud.unet.get_eip()     pulumi.export("first", example.eips[0].ip_sets[0].ip)     ```       :param Sequence[str] ids: A list of Elastic IP IDs, all the EIPs belong to this region will be retrieved if the ID is `[]`.     :param str name_regex: A regex string to filter resulting eips by name.