# 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__ = [
    'GetReservedIpResult',
    'AwaitableGetReservedIpResult',
    'get_reserved_ip',
    'get_reserved_ip_output',
]

@pulumi.output_type
class GetReservedIpResult:
    """
    A collection of values returned by getReservedIp.
    """
    def __init__(__self__, id=None, instance_id=None, instance_name=None, ip=None, name=None, region=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if instance_id and not isinstance(instance_id, str):
            raise TypeError("Expected argument 'instance_id' to be a str")
        pulumi.set(__self__, "instance_id", instance_id)
        if instance_name and not isinstance(instance_name, str):
            raise TypeError("Expected argument 'instance_name' to be a str")
        pulumi.set(__self__, "instance_name", instance_name)
        if ip and not isinstance(ip, str):
            raise TypeError("Expected argument 'ip' to be a str")
        pulumi.set(__self__, "ip", ip)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)

    @property
    @pulumi.getter
    def id(self) -> Optional[str]:
        """
        ID for the ip address
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> str:
        """
        The ID of the instance the IP is attached to
        """
        return pulumi.get(self, "instance_id")

    @property
    @pulumi.getter(name="instanceName")
    def instance_name(self) -> str:
        """
        The name of the instance the IP is attached to
        """
        return pulumi.get(self, "instance_name")

    @property
    @pulumi.getter
    def ip(self) -> str:
        """
        The IP Address requested
        """
        return pulumi.get(self, "ip")

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        """
        Name for the ip address
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def region(self) -> str:
        """
        The region the ip address is in
        """
        return pulumi.get(self, "region")


class AwaitableGetReservedIpResult(GetReservedIpResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetReservedIpResult(
            id=self.id,
            instance_id=self.instance_id,
            instance_name=self.instance_name,
            ip=self.ip,
            name=self.name,
            region=self.region)


def get_reserved_ip(id: Optional[str] = None,
                    name: Optional[str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetReservedIpResult:
    """
    Use this data source to access information about an existing resource.

    :param str id: ID for the ip address
    :param str name: Name for the ip address
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('civo:index/getReservedIp:getReservedIp', __args__, opts=opts, typ=GetReservedIpResult).value

    return AwaitableGetReservedIpResult(
        id=pulumi.get(__ret__, 'id'),
        instance_id=pulumi.get(__ret__, 'instance_id'),
        instance_name=pulumi.get(__ret__, 'instance_name'),
        ip=pulumi.get(__ret__, 'ip'),
        name=pulumi.get(__ret__, 'name'),
        region=pulumi.get(__ret__, 'region'))


@_utilities.lift_output_func(get_reserved_ip)
def get_reserved_ip_output(id: Optional[pulumi.Input[Optional[str]]] = None,
                           name: Optional[pulumi.Input[Optional[str]]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetReservedIpResult]:
    """
    Use this data source to access information about an existing resource.

    :param str id: ID for the ip address
    :param str name: Name for the ip address
    """
    ...
