# 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__ = [
    'GetDomainConfigResult',
    'AwaitableGetDomainConfigResult',
    'get_domain_config',
    'get_domain_config_output',
]

@pulumi.output_type
class GetDomainConfigResult:
    """
    A collection of values returned by getDomainConfig.
    """
    def __init__(__self__, domain=None, id=None, project_id_or_name=None, recommended_cname=None, recommended_ipv4s=None, team_id=None):
        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 project_id_or_name and not isinstance(project_id_or_name, str):
            raise TypeError("Expected argument 'project_id_or_name' to be a str")
        pulumi.set(__self__, "project_id_or_name", project_id_or_name)
        if recommended_cname and not isinstance(recommended_cname, str):
            raise TypeError("Expected argument 'recommended_cname' to be a str")
        pulumi.set(__self__, "recommended_cname", recommended_cname)
        if recommended_ipv4s and not isinstance(recommended_ipv4s, list):
            raise TypeError("Expected argument 'recommended_ipv4s' to be a list")
        pulumi.set(__self__, "recommended_ipv4s", recommended_ipv4s)
        if team_id and not isinstance(team_id, str):
            raise TypeError("Expected argument 'team_id' to be a str")
        pulumi.set(__self__, "team_id", team_id)

    @_builtins.property
    @pulumi.getter
    def domain(self) -> _builtins.str:
        """
        The domain name to get configuration for.
        """
        return pulumi.get(self, "domain")

    @_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(name="projectIdOrName")
    def project_id_or_name(self) -> _builtins.str:
        """
        The project ID or name associated with the domain.
        """
        return pulumi.get(self, "project_id_or_name")

    @_builtins.property
    @pulumi.getter(name="recommendedCname")
    def recommended_cname(self) -> _builtins.str:
        """
        The recommended CNAME value for the domain.
        """
        return pulumi.get(self, "recommended_cname")

    @_builtins.property
    @pulumi.getter(name="recommendedIpv4s")
    def recommended_ipv4s(self) -> Sequence[_builtins.str]:
        """
        The recommended IPv4 values for the domain.
        """
        return pulumi.get(self, "recommended_ipv4s")

    @_builtins.property
    @pulumi.getter(name="teamId")
    def team_id(self) -> _builtins.str:
        """
        The ID of the team the domain config exists under. Required when configuring a team resource if a default team has not been set in the provider.
        """
        return pulumi.get(self, "team_id")


class AwaitableGetDomainConfigResult(GetDomainConfigResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDomainConfigResult(
            domain=self.domain,
            id=self.id,
            project_id_or_name=self.project_id_or_name,
            recommended_cname=self.recommended_cname,
            recommended_ipv4s=self.recommended_ipv4s,
            team_id=self.team_id)


def get_domain_config(domain: Optional[_builtins.str] = None,
                      project_id_or_name: Optional[_builtins.str] = None,
                      team_id: Optional[_builtins.str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDomainConfigResult:
    """
    Provides domain configuration information for a Vercel project.

    This data source returns configuration details for a domain associated with a specific project,
    including recommended CNAME and IPv4 values.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_aws as aws
    import pulumi_vercel as vercel
    import pulumiverse_vercel as vercel

    my_awesome_project = vercel.Project("my_awesome_project", name="my-awesome-project")
    # 
    # "vercel_domain_config" Usage
    # 
    example_com = vercel.get_domain_config_output(domain="example.com",
        project_id_or_name=my_awesome_project.id)
    www_example_com = vercel.get_domain_config_output(domain="www.example.com",
        project_id_or_name=my_awesome_project.id)
    #
    # External DNS provider example
    # 
    example_com_a = aws.index.Route53Record("example_com_a",
        zone_id=...zone_id_from_somewhere...,
        name=example_com.domain,
        type=A,
        ttl=300,
        records=example_com.recommended_ipv4s)
    www_example_com_cname = aws.index.Route53Record("www_example_com_cname",
        zone_id=...zone_id_from_somewhere...,
        name=www_example_com.domain,
        type=CNAME,
        ttl=300,
        records=[www_example_com.recommended_cname])
    ```


    :param _builtins.str domain: The domain name to get configuration for.
    :param _builtins.str project_id_or_name: The project ID or name associated with the domain.
    :param _builtins.str team_id: The ID of the team the domain config exists under. Required when configuring a team resource if a default team has not been set in the provider.
    """
    __args__ = dict()
    __args__['domain'] = domain
    __args__['projectIdOrName'] = project_id_or_name
    __args__['teamId'] = team_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vercel:index/getDomainConfig:getDomainConfig', __args__, opts=opts, typ=GetDomainConfigResult).value

    return AwaitableGetDomainConfigResult(
        domain=pulumi.get(__ret__, 'domain'),
        id=pulumi.get(__ret__, 'id'),
        project_id_or_name=pulumi.get(__ret__, 'project_id_or_name'),
        recommended_cname=pulumi.get(__ret__, 'recommended_cname'),
        recommended_ipv4s=pulumi.get(__ret__, 'recommended_ipv4s'),
        team_id=pulumi.get(__ret__, 'team_id'))
def get_domain_config_output(domain: Optional[pulumi.Input[_builtins.str]] = None,
                             project_id_or_name: Optional[pulumi.Input[_builtins.str]] = None,
                             team_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDomainConfigResult]:
    """
    Provides domain configuration information for a Vercel project.

    This data source returns configuration details for a domain associated with a specific project,
    including recommended CNAME and IPv4 values.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_aws as aws
    import pulumi_vercel as vercel
    import pulumiverse_vercel as vercel

    my_awesome_project = vercel.Project("my_awesome_project", name="my-awesome-project")
    # 
    # "vercel_domain_config" Usage
    # 
    example_com = vercel.get_domain_config_output(domain="example.com",
        project_id_or_name=my_awesome_project.id)
    www_example_com = vercel.get_domain_config_output(domain="www.example.com",
        project_id_or_name=my_awesome_project.id)
    #
    # External DNS provider example
    # 
    example_com_a = aws.index.Route53Record("example_com_a",
        zone_id=...zone_id_from_somewhere...,
        name=example_com.domain,
        type=A,
        ttl=300,
        records=example_com.recommended_ipv4s)
    www_example_com_cname = aws.index.Route53Record("www_example_com_cname",
        zone_id=...zone_id_from_somewhere...,
        name=www_example_com.domain,
        type=CNAME,
        ttl=300,
        records=[www_example_com.recommended_cname])
    ```


    :param _builtins.str domain: The domain name to get configuration for.
    :param _builtins.str project_id_or_name: The project ID or name associated with the domain.
    :param _builtins.str team_id: The ID of the team the domain config exists under. Required when configuring a team resource if a default team has not been set in the provider.
    """
    __args__ = dict()
    __args__['domain'] = domain
    __args__['projectIdOrName'] = project_id_or_name
    __args__['teamId'] = team_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('vercel:index/getDomainConfig:getDomainConfig', __args__, opts=opts, typ=GetDomainConfigResult)
    return __ret__.apply(lambda __response__: GetDomainConfigResult(
        domain=pulumi.get(__response__, 'domain'),
        id=pulumi.get(__response__, 'id'),
        project_id_or_name=pulumi.get(__response__, 'project_id_or_name'),
        recommended_cname=pulumi.get(__response__, 'recommended_cname'),
        recommended_ipv4s=pulumi.get(__response__, 'recommended_ipv4s'),
        team_id=pulumi.get(__response__, 'team_id')))
