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

__all__ = [
    'GetGlobalDnsProviderResult',
    'AwaitableGetGlobalDnsProviderResult',
    'get_global_dns_provider',
    'get_global_dns_provider_output',
]

@pulumi.output_type
class GetGlobalDnsProviderResult:
    """
    A collection of values returned by getGlobalDnsProvider.
    """
    def __init__(__self__, alidns_config=None, annotations=None, cloudflare_config=None, dns_provider=None, id=None, labels=None, name=None, root_domain=None, route53_config=None):
        if alidns_config and not isinstance(alidns_config, dict):
            raise TypeError("Expected argument 'alidns_config' to be a dict")
        pulumi.set(__self__, "alidns_config", alidns_config)
        if annotations and not isinstance(annotations, dict):
            raise TypeError("Expected argument 'annotations' to be a dict")
        pulumi.set(__self__, "annotations", annotations)
        if cloudflare_config and not isinstance(cloudflare_config, dict):
            raise TypeError("Expected argument 'cloudflare_config' to be a dict")
        pulumi.set(__self__, "cloudflare_config", cloudflare_config)
        if dns_provider and not isinstance(dns_provider, str):
            raise TypeError("Expected argument 'dns_provider' to be a str")
        pulumi.set(__self__, "dns_provider", dns_provider)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if labels and not isinstance(labels, dict):
            raise TypeError("Expected argument 'labels' to be a dict")
        pulumi.set(__self__, "labels", labels)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if root_domain and not isinstance(root_domain, str):
            raise TypeError("Expected argument 'root_domain' to be a str")
        pulumi.set(__self__, "root_domain", root_domain)
        if route53_config and not isinstance(route53_config, dict):
            raise TypeError("Expected argument 'route53_config' to be a dict")
        pulumi.set(__self__, "route53_config", route53_config)

    @property
    @pulumi.getter(name="alidnsConfig")
    def alidns_config(self) -> 'outputs.GetGlobalDnsProviderAlidnsConfigResult':
        return pulumi.get(self, "alidns_config")

    @property
    @pulumi.getter
    def annotations(self) -> Mapping[str, Any]:
        """
        (Computed) Annotations of the resource (map)
        """
        return pulumi.get(self, "annotations")

    @property
    @pulumi.getter(name="cloudflareConfig")
    def cloudflare_config(self) -> 'outputs.GetGlobalDnsProviderCloudflareConfigResult':
        return pulumi.get(self, "cloudflare_config")

    @property
    @pulumi.getter(name="dnsProvider")
    def dns_provider(self) -> str:
        return pulumi.get(self, "dns_provider")

    @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 labels(self) -> Mapping[str, Any]:
        """
        (Computed) Labels of the resource (map)
        """
        return pulumi.get(self, "labels")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        (Computed) The name of the global DNS provider (string)
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="rootDomain")
    def root_domain(self) -> str:
        return pulumi.get(self, "root_domain")

    @property
    @pulumi.getter(name="route53Config")
    def route53_config(self) -> 'outputs.GetGlobalDnsProviderRoute53ConfigResult':
        return pulumi.get(self, "route53_config")


class AwaitableGetGlobalDnsProviderResult(GetGlobalDnsProviderResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGlobalDnsProviderResult(
            alidns_config=self.alidns_config,
            annotations=self.annotations,
            cloudflare_config=self.cloudflare_config,
            dns_provider=self.dns_provider,
            id=self.id,
            labels=self.labels,
            name=self.name,
            root_domain=self.root_domain,
            route53_config=self.route53_config)


def get_global_dns_provider(name: Optional[str] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGlobalDnsProviderResult:
    """
    Provides a Rancher V2 Global DNS Provider data source. Use this data source to retrieve information about a Rancher v2 global DNS provider

    ## Example Usage

    ```python
    import pulumi
    import pulumi_rancher2 as rancher2

    foo = rancher2.get_global_dns_provider(name="foo")
    ```


    :param str name: The name of the global DNS provider (string)
    """
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('rancher2:index/getGlobalDnsProvider:getGlobalDnsProvider', __args__, opts=opts, typ=GetGlobalDnsProviderResult).value

    return AwaitableGetGlobalDnsProviderResult(
        alidns_config=pulumi.get(__ret__, 'alidns_config'),
        annotations=pulumi.get(__ret__, 'annotations'),
        cloudflare_config=pulumi.get(__ret__, 'cloudflare_config'),
        dns_provider=pulumi.get(__ret__, 'dns_provider'),
        id=pulumi.get(__ret__, 'id'),
        labels=pulumi.get(__ret__, 'labels'),
        name=pulumi.get(__ret__, 'name'),
        root_domain=pulumi.get(__ret__, 'root_domain'),
        route53_config=pulumi.get(__ret__, 'route53_config'))


@_utilities.lift_output_func(get_global_dns_provider)
def get_global_dns_provider_output(name: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGlobalDnsProviderResult]:
    """
    Provides a Rancher V2 Global DNS Provider data source. Use this data source to retrieve information about a Rancher v2 global DNS provider

    ## Example Usage

    ```python
    import pulumi
    import pulumi_rancher2 as rancher2

    foo = rancher2.get_global_dns_provider(name="foo")
    ```


    :param str name: The name of the global DNS provider (string)
    """
    ...
