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

@pulumi.output_type
class GetCustomDomainResult:
    """
    A collection of values returned by getCustomDomain.
    """
    def __init__(__self__, certificate_id=None, comments=None, created_time=None, custom_domain_id=None, domain=None, id=None, protocols=None, service_id=None, ssl_redirect=None, status=None, updated_time=None):
        if certificate_id and not isinstance(certificate_id, str):
            raise TypeError("Expected argument 'certificate_id' to be a str")
        pulumi.set(__self__, "certificate_id", certificate_id)
        if comments and not isinstance(comments, str):
            raise TypeError("Expected argument 'comments' to be a str")
        pulumi.set(__self__, "comments", comments)
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if custom_domain_id and not isinstance(custom_domain_id, str):
            raise TypeError("Expected argument 'custom_domain_id' to be a str")
        pulumi.set(__self__, "custom_domain_id", custom_domain_id)
        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 protocols and not isinstance(protocols, list):
            raise TypeError("Expected argument 'protocols' to be a list")
        pulumi.set(__self__, "protocols", protocols)
        if service_id and not isinstance(service_id, str):
            raise TypeError("Expected argument 'service_id' to be a str")
        pulumi.set(__self__, "service_id", service_id)
        if ssl_redirect and not isinstance(ssl_redirect, bool):
            raise TypeError("Expected argument 'ssl_redirect' to be a bool")
        pulumi.set(__self__, "ssl_redirect", ssl_redirect)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)

    @property
    @pulumi.getter(name="certificateId")
    def certificate_id(self) -> builtins.str:
        """
        自定义域名证书ID。
        """
        return pulumi.get(self, "certificate_id")

    @property
    @pulumi.getter
    def comments(self) -> builtins.str:
        """
        备注。
        """
        return pulumi.get(self, "comments")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter(name="customDomainId")
    def custom_domain_id(self) -> builtins.str:
        """
        自定义域名ID。
        """
        return pulumi.get(self, "custom_domain_id")

    @property
    @pulumi.getter
    def domain(self) -> builtins.str:
        """
        自定义域名。
        """
        return pulumi.get(self, "domain")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def protocols(self) -> Sequence[builtins.str]:
        """
        协议，取值：HTTP。HTTPS。
        """
        return pulumi.get(self, "protocols")

    @property
    @pulumi.getter(name="serviceId")
    def service_id(self) -> builtins.str:
        """
        服务ID。
        """
        return pulumi.get(self, "service_id")

    @property
    @pulumi.getter(name="sslRedirect")
    def ssl_redirect(self) -> builtins.bool:
        """
        重定向到HTTPS。
        """
        return pulumi.get(self, "ssl_redirect")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        状态，取值：Creating：配置中。CreationFailed：配置失败。Deleting：删除中。DeletionFailed：删除失败。Verified：正常。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.str:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")


class AwaitableGetCustomDomainResult(GetCustomDomainResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetCustomDomainResult(
            certificate_id=self.certificate_id,
            comments=self.comments,
            created_time=self.created_time,
            custom_domain_id=self.custom_domain_id,
            domain=self.domain,
            id=self.id,
            protocols=self.protocols,
            service_id=self.service_id,
            ssl_redirect=self.ssl_redirect,
            status=self.status,
            updated_time=self.updated_time)


def get_custom_domain(id: Optional[builtins.str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCustomDomainResult:
    """
    Data Source schema for Byteplus::APIG::CustomDomain


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:apig/getCustomDomain:getCustomDomain', __args__, opts=opts, typ=GetCustomDomainResult).value

    return AwaitableGetCustomDomainResult(
        certificate_id=pulumi.get(__ret__, 'certificate_id'),
        comments=pulumi.get(__ret__, 'comments'),
        created_time=pulumi.get(__ret__, 'created_time'),
        custom_domain_id=pulumi.get(__ret__, 'custom_domain_id'),
        domain=pulumi.get(__ret__, 'domain'),
        id=pulumi.get(__ret__, 'id'),
        protocols=pulumi.get(__ret__, 'protocols'),
        service_id=pulumi.get(__ret__, 'service_id'),
        ssl_redirect=pulumi.get(__ret__, 'ssl_redirect'),
        status=pulumi.get(__ret__, 'status'),
        updated_time=pulumi.get(__ret__, 'updated_time'))
def get_custom_domain_output(id: Optional[pulumi.Input[builtins.str]] = None,
                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetCustomDomainResult]:
    """
    Data Source schema for Byteplus::APIG::CustomDomain


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:apig/getCustomDomain:getCustomDomain', __args__, opts=opts, typ=GetCustomDomainResult)
    return __ret__.apply(lambda __response__: GetCustomDomainResult(
        certificate_id=pulumi.get(__response__, 'certificate_id'),
        comments=pulumi.get(__response__, 'comments'),
        created_time=pulumi.get(__response__, 'created_time'),
        custom_domain_id=pulumi.get(__response__, 'custom_domain_id'),
        domain=pulumi.get(__response__, 'domain'),
        id=pulumi.get(__response__, 'id'),
        protocols=pulumi.get(__response__, 'protocols'),
        service_id=pulumi.get(__response__, 'service_id'),
        ssl_redirect=pulumi.get(__response__, 'ssl_redirect'),
        status=pulumi.get(__response__, 'status'),
        updated_time=pulumi.get(__response__, 'updated_time')))
