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

__all__ = [
    'GetRecordsResult',
    'AwaitableGetRecordsResult',
    'get_records',
    'get_records_output',
]

@pulumi.output_type
class GetRecordsResult:
    """
    A collection of values returned by getRecords.
    """
    def __init__(__self__, id=None, results=None, site=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if results and not isinstance(results, list):
            raise TypeError("Expected argument 'results' to be a list")
        pulumi.set(__self__, "results", results)
        if site and not isinstance(site, str):
            raise TypeError("Expected argument 'site' to be a str")
        pulumi.set(__self__, "site", site)

    @_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 results(self) -> Sequence['outputs.GetRecordsResultResult']:
        """
        The list of DNS records.
        """
        return pulumi.get(self, "results")

    @_builtins.property
    @pulumi.getter
    def site(self) -> _builtins.str:
        """
        The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
        """
        return pulumi.get(self, "site")


class AwaitableGetRecordsResult(GetRecordsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRecordsResult(
            id=self.id,
            results=self.results,
            site=self.site)


def get_records(site: Optional[_builtins.str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRecordsResult:
    """
    Retrieves information about a all DNS records.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_unifi as unifi

    default = unifi.dns.get_records()
    ```


    :param _builtins.str site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    """
    __args__ = dict()
    __args__['site'] = site
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('unifi:dns/getRecords:getRecords', __args__, opts=opts, typ=GetRecordsResult).value

    return AwaitableGetRecordsResult(
        id=pulumi.get(__ret__, 'id'),
        results=pulumi.get(__ret__, 'results'),
        site=pulumi.get(__ret__, 'site'))
def get_records_output(site: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                       opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRecordsResult]:
    """
    Retrieves information about a all DNS records.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_unifi as unifi

    default = unifi.dns.get_records()
    ```


    :param _builtins.str site: The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    """
    __args__ = dict()
    __args__['site'] = site
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('unifi:dns/getRecords:getRecords', __args__, opts=opts, typ=GetRecordsResult)
    return __ret__.apply(lambda __response__: GetRecordsResult(
        id=pulumi.get(__response__, 'id'),
        results=pulumi.get(__response__, 'results'),
        site=pulumi.get(__response__, 'site')))
