# 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = [
    'GetIpResult',
    'AwaitableGetIpResult',
    'get_ip',
    'get_ip_output',
]

@pulumi.output_type
class GetIpResult:
    """
    A collection of values returned by getIp.
    """
    def __init__(__self__, address=None, app=None, id=None, region=None, type=None):
        if address and not isinstance(address, str):
            raise TypeError("Expected argument 'address' to be a str")
        pulumi.set(__self__, "address", address)
        if app and not isinstance(app, str):
            raise TypeError("Expected argument 'app' to be a str")
        pulumi.set(__self__, "app", app)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)

    @property
    @pulumi.getter
    def address(self) -> str:
        """
        IP address
        """
        return pulumi.get(self, "address")

    @property
    @pulumi.getter
    def app(self) -> str:
        """
        Name of app attached to
        """
        return pulumi.get(self, "app")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        ID of address
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def region(self) -> str:
        """
        region
        """
        return pulumi.get(self, "region")

    @property
    @pulumi.getter
    def type(self) -> str:
        """
        v4 or v6
        """
        return pulumi.get(self, "type")


class AwaitableGetIpResult(GetIpResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetIpResult(
            address=self.address,
            app=self.app,
            id=self.id,
            region=self.region,
            type=self.type)


def get_ip(address: Optional[str] = None,
           app: Optional[str] = None,
           opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetIpResult:
    """
    Fly ip data source


    :param str address: IP address
    :param str app: Name of app attached to
    """
    __args__ = dict()
    __args__['address'] = address
    __args__['app'] = app
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('fly:index/getIp:getIp', __args__, opts=opts, typ=GetIpResult).value

    return AwaitableGetIpResult(
        address=__ret__.address,
        app=__ret__.app,
        id=__ret__.id,
        region=__ret__.region,
        type=__ret__.type)


@_utilities.lift_output_func(get_ip)
def get_ip_output(address: Optional[pulumi.Input[str]] = None,
                  app: Optional[pulumi.Input[str]] = None,
                  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetIpResult]:
    """
    Fly ip data source


    :param str address: IP address
    :param str app: Name of app attached to
    """
    ...
