# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities

__all__ = [
    'GetReservedIpv6Result',
    'AwaitableGetReservedIpv6Result',
    'get_reserved_ipv6',
    'get_reserved_ipv6_output',
]

@pulumi.output_type
class GetReservedIpv6Result:
    """
    A collection of values returned by getReservedIpv6.
    """
    def __init__(__self__, droplet_id=None, id=None, ip=None, region_slug=None, urn=None):
        if droplet_id and not isinstance(droplet_id, int):
            raise TypeError("Expected argument 'droplet_id' to be a int")
        pulumi.set(__self__, "droplet_id", droplet_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ip and not isinstance(ip, str):
            raise TypeError("Expected argument 'ip' to be a str")
        pulumi.set(__self__, "ip", ip)
        if region_slug and not isinstance(region_slug, str):
            raise TypeError("Expected argument 'region_slug' to be a str")
        pulumi.set(__self__, "region_slug", region_slug)
        if urn and not isinstance(urn, str):
            raise TypeError("Expected argument 'urn' to be a str")
        pulumi.set(__self__, "urn", urn)

    @_builtins.property
    @pulumi.getter(name="dropletId")
    def droplet_id(self) -> _builtins.int:
        """
        The Droplet id that the reserved IP has been assigned to.
        """
        return pulumi.get(self, "droplet_id")

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

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

    @_builtins.property
    @pulumi.getter(name="regionSlug")
    def region_slug(self) -> _builtins.str:
        """
        The region that the reserved IPv6 is reserved to.
        """
        return pulumi.get(self, "region_slug")

    @_builtins.property
    @pulumi.getter
    def urn(self) -> _builtins.str:
        """
        The uniform resource name of the reserved IPv6.
        """
        return pulumi.get(self, "urn")


class AwaitableGetReservedIpv6Result(GetReservedIpv6Result):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetReservedIpv6Result(
            droplet_id=self.droplet_id,
            id=self.id,
            ip=self.ip,
            region_slug=self.region_slug,
            urn=self.urn)


def get_reserved_ipv6(ip: Optional[_builtins.str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetReservedIpv6Result:
    """
    ## Example Usage

    Get the reserved IPv6:

    ```python
    import pulumi
    import pulumi_digitalocean as digitalocean

    foo = digitalocean.ReservedIpv6("foo", region_slug="nyc3")
    foobar = digitalocean.get_reserved_ipv6_output(ip=foo.ip)
    ```


    :param _builtins.str ip: The allocated IPv6 address of the specific reserved IPv6 to retrieve.
    """
    __args__ = dict()
    __args__['ip'] = ip
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('digitalocean:index/getReservedIpv6:getReservedIpv6', __args__, opts=opts, typ=GetReservedIpv6Result).value

    return AwaitableGetReservedIpv6Result(
        droplet_id=pulumi.get(__ret__, 'droplet_id'),
        id=pulumi.get(__ret__, 'id'),
        ip=pulumi.get(__ret__, 'ip'),
        region_slug=pulumi.get(__ret__, 'region_slug'),
        urn=pulumi.get(__ret__, 'urn'))
def get_reserved_ipv6_output(ip: Optional[pulumi.Input[_builtins.str]] = None,
                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetReservedIpv6Result]:
    """
    ## Example Usage

    Get the reserved IPv6:

    ```python
    import pulumi
    import pulumi_digitalocean as digitalocean

    foo = digitalocean.ReservedIpv6("foo", region_slug="nyc3")
    foobar = digitalocean.get_reserved_ipv6_output(ip=foo.ip)
    ```


    :param _builtins.str ip: The allocated IPv6 address of the specific reserved IPv6 to retrieve.
    """
    __args__ = dict()
    __args__['ip'] = ip
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getReservedIpv6:getReservedIpv6', __args__, opts=opts, typ=GetReservedIpv6Result)
    return __ret__.apply(lambda __response__: GetReservedIpv6Result(
        droplet_id=pulumi.get(__response__, 'droplet_id'),
        id=pulumi.get(__response__, 'id'),
        ip=pulumi.get(__response__, 'ip'),
        region_slug=pulumi.get(__response__, 'region_slug'),
        urn=pulumi.get(__response__, 'urn')))
