# 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__ = [
    'GetCustomDomainResult',
    'AwaitableGetCustomDomainResult',
    'get_custom_domain',
    'get_custom_domain_output',
]

@pulumi.output_type
class GetCustomDomainResult:
    """
    A collection of values returned by getCustomDomain.
    """
    def __init__(__self__, custom_client_ip_header=None, domain=None, id=None, origin_domain_name=None, primary=None, status=None, tls_policy=None, type=None, verifications=None):
        if custom_client_ip_header and not isinstance(custom_client_ip_header, str):
            raise TypeError("Expected argument 'custom_client_ip_header' to be a str")
        pulumi.set(__self__, "custom_client_ip_header", custom_client_ip_header)
        if domain and not isinstance(domain, str):
            raise TypeError("Expected argument 'domain' to be a str")
        pulumi.set(__self__, "domain", domain)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if origin_domain_name and not isinstance(origin_domain_name, str):
            raise TypeError("Expected argument 'origin_domain_name' to be a str")
        pulumi.set(__self__, "origin_domain_name", origin_domain_name)
        if primary and not isinstance(primary, bool):
            raise TypeError("Expected argument 'primary' to be a bool")
        pulumi.set(__self__, "primary", primary)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tls_policy and not isinstance(tls_policy, str):
            raise TypeError("Expected argument 'tls_policy' to be a str")
        pulumi.set(__self__, "tls_policy", tls_policy)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)
        if verifications and not isinstance(verifications, list):
            raise TypeError("Expected argument 'verifications' to be a list")
        pulumi.set(__self__, "verifications", verifications)

    @property
    @pulumi.getter(name="customClientIpHeader")
    def custom_client_ip_header(self) -> str:
        """
        The HTTP header to fetch the client's IP address. Cannot be set on auth0_managed domains.
        """
        return pulumi.get(self, "custom_client_ip_header")

    @property
    @pulumi.getter
    def domain(self) -> str:
        """
        Name of the custom domain.
        """
        return pulumi.get(self, "domain")

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

    @property
    @pulumi.getter(name="originDomainName")
    def origin_domain_name(self) -> str:
        """
        Once the configuration status is `ready`, the DNS name of the Auth0 origin server that handles traffic for the custom domain.
        """
        return pulumi.get(self, "origin_domain_name")

    @property
    @pulumi.getter
    def primary(self) -> bool:
        """
        Indicates whether this is a primary domain.
        """
        return pulumi.get(self, "primary")

    @property
    @pulumi.getter
    def status(self) -> str:
        """
        Configuration status for the custom domain. Options include `disabled`, `pending`, `pending_verification`, and `ready`.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="tlsPolicy")
    def tls_policy(self) -> str:
        """
        TLS policy for the custom domain. Available options are: `compatible` or `recommended`. Compatible includes TLS 1.0, 1.1, 1.2, and recommended only includes TLS 1.2. Cannot be set on self_managed domains.
        """
        return pulumi.get(self, "tls_policy")

    @property
    @pulumi.getter
    def type(self) -> str:
        """
        Provisioning type for the custom domain. Options include `auth0_managed_certs` and `self_managed_certs`.
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter
    def verifications(self) -> Sequence['outputs.GetCustomDomainVerificationResult']:
        """
        Configuration settings for verification.
        """
        return pulumi.get(self, "verifications")


class AwaitableGetCustomDomainResult(GetCustomDomainResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetCustomDomainResult(
            custom_client_ip_header=self.custom_client_ip_header,
            domain=self.domain,
            id=self.id,
            origin_domain_name=self.origin_domain_name,
            primary=self.primary,
            status=self.status,
            tls_policy=self.tls_policy,
            type=self.type,
            verifications=self.verifications)


def get_custom_domain(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCustomDomainResult:
    """
    Data source to retrieve the custom domain configuration.
    """
    __args__ = dict()
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('auth0:index/getCustomDomain:getCustomDomain', __args__, opts=opts, typ=GetCustomDomainResult).value

    return AwaitableGetCustomDomainResult(
        custom_client_ip_header=pulumi.get(__ret__, 'custom_client_ip_header'),
        domain=pulumi.get(__ret__, 'domain'),
        id=pulumi.get(__ret__, 'id'),
        origin_domain_name=pulumi.get(__ret__, 'origin_domain_name'),
        primary=pulumi.get(__ret__, 'primary'),
        status=pulumi.get(__ret__, 'status'),
        tls_policy=pulumi.get(__ret__, 'tls_policy'),
        type=pulumi.get(__ret__, 'type'),
        verifications=pulumi.get(__ret__, 'verifications'))


@_utilities.lift_output_func(get_custom_domain)
def get_custom_domain_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCustomDomainResult]:
    """
    Data source to retrieve the custom domain configuration.
    """
    ...
