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

__all__ = [
    'GetHealthCheckTemplateResult',
    'AwaitableGetHealthCheckTemplateResult',
    'get_health_check_template',
    'get_health_check_template_output',
]

@pulumi.output_type
class GetHealthCheckTemplateResult:
    """
    A collection of values returned by getHealthCheckTemplate.
    """
    def __init__(__self__, create_time=None, description=None, health_check_domain=None, health_check_http_code=None, health_check_http_version=None, health_check_interval=None, health_check_method=None, health_check_port=None, health_check_protocol=None, health_check_template_id=None, health_check_template_name=None, health_check_timeout=None, health_check_uri=None, healthy_threshold=None, id=None, project_name=None, tags=None, unhealthy_threshold=None, update_time=None):
        if create_time and not isinstance(create_time, str):
            raise TypeError("Expected argument 'create_time' to be a str")
        pulumi.set(__self__, "create_time", create_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if health_check_domain and not isinstance(health_check_domain, str):
            raise TypeError("Expected argument 'health_check_domain' to be a str")
        pulumi.set(__self__, "health_check_domain", health_check_domain)
        if health_check_http_code and not isinstance(health_check_http_code, str):
            raise TypeError("Expected argument 'health_check_http_code' to be a str")
        pulumi.set(__self__, "health_check_http_code", health_check_http_code)
        if health_check_http_version and not isinstance(health_check_http_version, str):
            raise TypeError("Expected argument 'health_check_http_version' to be a str")
        pulumi.set(__self__, "health_check_http_version", health_check_http_version)
        if health_check_interval and not isinstance(health_check_interval, int):
            raise TypeError("Expected argument 'health_check_interval' to be a int")
        pulumi.set(__self__, "health_check_interval", health_check_interval)
        if health_check_method and not isinstance(health_check_method, str):
            raise TypeError("Expected argument 'health_check_method' to be a str")
        pulumi.set(__self__, "health_check_method", health_check_method)
        if health_check_port and not isinstance(health_check_port, int):
            raise TypeError("Expected argument 'health_check_port' to be a int")
        pulumi.set(__self__, "health_check_port", health_check_port)
        if health_check_protocol and not isinstance(health_check_protocol, str):
            raise TypeError("Expected argument 'health_check_protocol' to be a str")
        pulumi.set(__self__, "health_check_protocol", health_check_protocol)
        if health_check_template_id and not isinstance(health_check_template_id, str):
            raise TypeError("Expected argument 'health_check_template_id' to be a str")
        pulumi.set(__self__, "health_check_template_id", health_check_template_id)
        if health_check_template_name and not isinstance(health_check_template_name, str):
            raise TypeError("Expected argument 'health_check_template_name' to be a str")
        pulumi.set(__self__, "health_check_template_name", health_check_template_name)
        if health_check_timeout and not isinstance(health_check_timeout, int):
            raise TypeError("Expected argument 'health_check_timeout' to be a int")
        pulumi.set(__self__, "health_check_timeout", health_check_timeout)
        if health_check_uri and not isinstance(health_check_uri, str):
            raise TypeError("Expected argument 'health_check_uri' to be a str")
        pulumi.set(__self__, "health_check_uri", health_check_uri)
        if healthy_threshold and not isinstance(healthy_threshold, int):
            raise TypeError("Expected argument 'healthy_threshold' to be a int")
        pulumi.set(__self__, "healthy_threshold", healthy_threshold)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if unhealthy_threshold and not isinstance(unhealthy_threshold, int):
            raise TypeError("Expected argument 'unhealthy_threshold' to be a int")
        pulumi.set(__self__, "unhealthy_threshold", unhealthy_threshold)
        if update_time and not isinstance(update_time, str):
            raise TypeError("Expected argument 'update_time' to be a str")
        pulumi.set(__self__, "update_time", update_time)

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> builtins.str:
        """
        健康检查模版的创建时间。
        """
        return pulumi.get(self, "create_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        健康检查描述。不能以http://或https://开头。必须以字母或中文开头，可包含数字、英文逗号（,）、点号（.）、下划线（_）、空格（ ）、等号（=）、短横线（-）、中文逗号（，）、中文句号（。） 。长度限制为1 ～ 255个字符。不填默认为空字符串。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="healthCheckDomain")
    def health_check_domain(self) -> builtins.str:
        """
        健康检查的域名。只有 HealthCheckProtocol 设置为 HTTP 时，该参数才生效。要求如下：需至少包含一个‘.’，且不允许以‘.’开头结尾。单个字符串由字母、数字、‘-’、‘.’字符组成，‘-’不得出现在字符串的头部或尾部。长度限制为1 ～ 128个字符。不填则此参数为空，负载均衡默认使用各后端服务器的私网IP地址进行健康检查。
        """
        return pulumi.get(self, "health_check_domain")

    @property
    @pulumi.getter(name="healthCheckHttpCode")
    def health_check_http_code(self) -> builtins.str:
        """
        健康检查正常的HTTP状态码。多个状态码用以半角逗号分隔，只有 HealthCheckProtocol 设置为 HTTP 时，该参数才生效。取值如下：http*2xx（默认）。http*3xx（默认） 。http*4xx 。http*5xx 。
        """
        return pulumi.get(self, "health_check_http_code")

    @property
    @pulumi.getter(name="healthCheckHttpVersion")
    def health_check_http_version(self) -> builtins.str:
        """
        健康检查HTTP协议版本。只有 HealthCheckProtocol 设置为 HTTP 时，该参数才生效。取值如下：HTTP1.0（默认值）。HTTP1.1。
        """
        return pulumi.get(self, "health_check_http_version")

    @property
    @pulumi.getter(name="healthCheckInterval")
    def health_check_interval(self) -> builtins.int:
        """
        执行健康检查的时间间隔，默认为2，取值1-300s 。
        """
        return pulumi.get(self, "health_check_interval")

    @property
    @pulumi.getter(name="healthCheckMethod")
    def health_check_method(self) -> builtins.str:
        """
        健康检查的方法。只有 HealthCheckProtocol 设置为 HTTP 时，该参数才生效。取值如下：GETHEAD（默认方法）
        """
        return pulumi.get(self, "health_check_method")

    @property
    @pulumi.getter(name="healthCheckPort")
    def health_check_port(self) -> builtins.int:
        """
        健康检查端口。取值如下：0：使用后端服务器端口进行健康检查。1-65535：使用您指定的端口进行健康检查。
        """
        return pulumi.get(self, "health_check_port")

    @property
    @pulumi.getter(name="healthCheckProtocol")
    def health_check_protocol(self) -> builtins.str:
        """
        健康检查的协议。HTTPTCP。
        """
        return pulumi.get(self, "health_check_protocol")

    @property
    @pulumi.getter(name="healthCheckTemplateId")
    def health_check_template_id(self) -> builtins.str:
        """
        健康检查模板 ID。
        """
        return pulumi.get(self, "health_check_template_id")

    @property
    @pulumi.getter(name="healthCheckTemplateName")
    def health_check_template_name(self) -> builtins.str:
        """
        健康检查模板的名称。不能以http://或https://开头。必须以字母或中文开头，可包含数字、点（.）、下划线（_）和短横线（-）。长度限制在1～128字符之间。
        """
        return pulumi.get(self, "health_check_template_name")

    @property
    @pulumi.getter(name="healthCheckTimeout")
    def health_check_timeout(self) -> builtins.int:
        """
        健康检查的响应超时时间，默认为2，取值1-60s 。
        """
        return pulumi.get(self, "health_check_timeout")

    @property
    @pulumi.getter(name="healthCheckUri")
    def health_check_uri(self) -> builtins.str:
        """
        健康检查的路径。只有 HealthCheckProtocol 设置为 HTTP 时，该参数才生效。要求如下：必须以字符‘/’开头。仅包含字母、数字、‘-’、‘_’、‘/’、‘.’、‘%’、‘?’、‘#’、‘&’、‘＝’字符。长度限制为1 ～ 128个字符。不填默认为“/”。
        """
        return pulumi.get(self, "health_check_uri")

    @property
    @pulumi.getter(name="healthyThreshold")
    def healthy_threshold(self) -> builtins.int:
        """
        健康检查的健康阈值，默认为3，取值2-10次。
        """
        return pulumi.get(self, "healthy_threshold")

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

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        健康检查模板所属项目名称。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetHealthCheckTemplateTagResult']:
        """
        健康检查模板关联的标签列表。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="unhealthyThreshold")
    def unhealthy_threshold(self) -> builtins.int:
        """
        健康检查的不健康阈值，默认为3，取值2-10次。
        """
        return pulumi.get(self, "unhealthy_threshold")

    @property
    @pulumi.getter(name="updateTime")
    def update_time(self) -> builtins.str:
        """
        健康检查模版最近一次的操作时间。
        """
        return pulumi.get(self, "update_time")


class AwaitableGetHealthCheckTemplateResult(GetHealthCheckTemplateResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetHealthCheckTemplateResult(
            create_time=self.create_time,
            description=self.description,
            health_check_domain=self.health_check_domain,
            health_check_http_code=self.health_check_http_code,
            health_check_http_version=self.health_check_http_version,
            health_check_interval=self.health_check_interval,
            health_check_method=self.health_check_method,
            health_check_port=self.health_check_port,
            health_check_protocol=self.health_check_protocol,
            health_check_template_id=self.health_check_template_id,
            health_check_template_name=self.health_check_template_name,
            health_check_timeout=self.health_check_timeout,
            health_check_uri=self.health_check_uri,
            healthy_threshold=self.healthy_threshold,
            id=self.id,
            project_name=self.project_name,
            tags=self.tags,
            unhealthy_threshold=self.unhealthy_threshold,
            update_time=self.update_time)


def get_health_check_template(id: Optional[builtins.str] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetHealthCheckTemplateResult:
    """
    Data Source schema for Byteplus::ALB::HealthCheckTemplate


    :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:alb/getHealthCheckTemplate:getHealthCheckTemplate', __args__, opts=opts, typ=GetHealthCheckTemplateResult).value

    return AwaitableGetHealthCheckTemplateResult(
        create_time=pulumi.get(__ret__, 'create_time'),
        description=pulumi.get(__ret__, 'description'),
        health_check_domain=pulumi.get(__ret__, 'health_check_domain'),
        health_check_http_code=pulumi.get(__ret__, 'health_check_http_code'),
        health_check_http_version=pulumi.get(__ret__, 'health_check_http_version'),
        health_check_interval=pulumi.get(__ret__, 'health_check_interval'),
        health_check_method=pulumi.get(__ret__, 'health_check_method'),
        health_check_port=pulumi.get(__ret__, 'health_check_port'),
        health_check_protocol=pulumi.get(__ret__, 'health_check_protocol'),
        health_check_template_id=pulumi.get(__ret__, 'health_check_template_id'),
        health_check_template_name=pulumi.get(__ret__, 'health_check_template_name'),
        health_check_timeout=pulumi.get(__ret__, 'health_check_timeout'),
        health_check_uri=pulumi.get(__ret__, 'health_check_uri'),
        healthy_threshold=pulumi.get(__ret__, 'healthy_threshold'),
        id=pulumi.get(__ret__, 'id'),
        project_name=pulumi.get(__ret__, 'project_name'),
        tags=pulumi.get(__ret__, 'tags'),
        unhealthy_threshold=pulumi.get(__ret__, 'unhealthy_threshold'),
        update_time=pulumi.get(__ret__, 'update_time'))
def get_health_check_template_output(id: Optional[pulumi.Input[builtins.str]] = None,
                                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetHealthCheckTemplateResult]:
    """
    Data Source schema for Byteplus::ALB::HealthCheckTemplate


    :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:alb/getHealthCheckTemplate:getHealthCheckTemplate', __args__, opts=opts, typ=GetHealthCheckTemplateResult)
    return __ret__.apply(lambda __response__: GetHealthCheckTemplateResult(
        create_time=pulumi.get(__response__, 'create_time'),
        description=pulumi.get(__response__, 'description'),
        health_check_domain=pulumi.get(__response__, 'health_check_domain'),
        health_check_http_code=pulumi.get(__response__, 'health_check_http_code'),
        health_check_http_version=pulumi.get(__response__, 'health_check_http_version'),
        health_check_interval=pulumi.get(__response__, 'health_check_interval'),
        health_check_method=pulumi.get(__response__, 'health_check_method'),
        health_check_port=pulumi.get(__response__, 'health_check_port'),
        health_check_protocol=pulumi.get(__response__, 'health_check_protocol'),
        health_check_template_id=pulumi.get(__response__, 'health_check_template_id'),
        health_check_template_name=pulumi.get(__response__, 'health_check_template_name'),
        health_check_timeout=pulumi.get(__response__, 'health_check_timeout'),
        health_check_uri=pulumi.get(__response__, 'health_check_uri'),
        healthy_threshold=pulumi.get(__response__, 'healthy_threshold'),
        id=pulumi.get(__response__, 'id'),
        project_name=pulumi.get(__response__, 'project_name'),
        tags=pulumi.get(__response__, 'tags'),
        unhealthy_threshold=pulumi.get(__response__, 'unhealthy_threshold'),
        update_time=pulumi.get(__response__, 'update_time')))
