# 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

__all__ = [
    'LoadBalancerDeletionProtectionConfigArgs',
    'LoadBalancerModificationProtectionConfigArgs',
    'LoadBalancerZoneMappingArgs',
    'ServerGroupHealthCheckArgs',
]

@pulumi.input_type
class LoadBalancerDeletionProtectionConfigArgs:
    def __init__(__self__, *,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 enabled_time: Optional[pulumi.Input[str]] = None,
                 reason: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[bool] enabled: Delete protection enable.
        :param pulumi.Input[str] enabled_time: Opening time.
        :param pulumi.Input[str] reason: Reason for opening.
        """
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if enabled_time is not None:
            pulumi.set(__self__, "enabled_time", enabled_time)
        if reason is not None:
            pulumi.set(__self__, "reason", reason)

    @property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Delete protection enable.
        """
        return pulumi.get(self, "enabled")

    @enabled.setter
    def enabled(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "enabled", value)

    @property
    @pulumi.getter(name="enabledTime")
    def enabled_time(self) -> Optional[pulumi.Input[str]]:
        """
        Opening time.
        """
        return pulumi.get(self, "enabled_time")

    @enabled_time.setter
    def enabled_time(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "enabled_time", value)

    @property
    @pulumi.getter
    def reason(self) -> Optional[pulumi.Input[str]]:
        """
        Reason for opening.
        """
        return pulumi.get(self, "reason")

    @reason.setter
    def reason(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "reason", value)


@pulumi.input_type
class LoadBalancerModificationProtectionConfigArgs:
    def __init__(__self__, *,
                 enabled_time: Optional[pulumi.Input[str]] = None,
                 reason: Optional[pulumi.Input[str]] = None,
                 status: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] enabled_time: Opening time.
        :param pulumi.Input[str] reason: Reason for opening.
        :param pulumi.Input[str] status: ON.
        """
        if enabled_time is not None:
            pulumi.set(__self__, "enabled_time", enabled_time)
        if reason is not None:
            pulumi.set(__self__, "reason", reason)
        if status is not None:
            pulumi.set(__self__, "status", status)

    @property
    @pulumi.getter(name="enabledTime")
    def enabled_time(self) -> Optional[pulumi.Input[str]]:
        """
        Opening time.
        """
        return pulumi.get(self, "enabled_time")

    @enabled_time.setter
    def enabled_time(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "enabled_time", value)

    @property
    @pulumi.getter
    def reason(self) -> Optional[pulumi.Input[str]]:
        """
        Reason for opening.
        """
        return pulumi.get(self, "reason")

    @reason.setter
    def reason(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "reason", value)

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[str]]:
        """
        ON.
        """
        return pulumi.get(self, "status")

    @status.setter
    def status(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "status", value)


@pulumi.input_type
class LoadBalancerZoneMappingArgs:
    def __init__(__self__, *,
                 vswitch_id: pulumi.Input[str],
                 zone_id: pulumi.Input[str],
                 allocation_id: Optional[pulumi.Input[str]] = None,
                 eni_id: Optional[pulumi.Input[str]] = None,
                 ipv6_address: Optional[pulumi.Input[str]] = None,
                 private_ipv4_address: Optional[pulumi.Input[str]] = None,
                 public_ipv4_address: Optional[pulumi.Input[str]] = None,
                 status: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] vswitch_id: The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
        :param pulumi.Input[str] zone_id: The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
        :param pulumi.Input[str] allocation_id: The ID of the elastic IP address.
        :param pulumi.Input[str] eni_id: The ID of ENI.
        :param pulumi.Input[str] ipv6_address: The IPv6 address of a network-based server load balancer instance.
        :param pulumi.Input[str] private_ipv4_address: The private IPv4 address of a network-based server load balancer instance.
        :param pulumi.Input[str] public_ipv4_address: Public IPv4 address of a network-based server load balancer instance.
        :param pulumi.Input[str] status: Zone Status.
        """
        pulumi.set(__self__, "vswitch_id", vswitch_id)
        pulumi.set(__self__, "zone_id", zone_id)
        if allocation_id is not None:
            pulumi.set(__self__, "allocation_id", allocation_id)
        if eni_id is not None:
            pulumi.set(__self__, "eni_id", eni_id)
        if ipv6_address is not None:
            pulumi.set(__self__, "ipv6_address", ipv6_address)
        if private_ipv4_address is not None:
            pulumi.set(__self__, "private_ipv4_address", private_ipv4_address)
        if public_ipv4_address is not None:
            pulumi.set(__self__, "public_ipv4_address", public_ipv4_address)
        if status is not None:
            pulumi.set(__self__, "status", status)

    @property
    @pulumi.getter(name="vswitchId")
    def vswitch_id(self) -> pulumi.Input[str]:
        """
        The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
        """
        return pulumi.get(self, "vswitch_id")

    @vswitch_id.setter
    def vswitch_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "vswitch_id", value)

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> pulumi.Input[str]:
        """
        The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
        """
        return pulumi.get(self, "zone_id")

    @zone_id.setter
    def zone_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "zone_id", value)

    @property
    @pulumi.getter(name="allocationId")
    def allocation_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the elastic IP address.
        """
        return pulumi.get(self, "allocation_id")

    @allocation_id.setter
    def allocation_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "allocation_id", value)

    @property
    @pulumi.getter(name="eniId")
    def eni_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of ENI.
        """
        return pulumi.get(self, "eni_id")

    @eni_id.setter
    def eni_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "eni_id", value)

    @property
    @pulumi.getter(name="ipv6Address")
    def ipv6_address(self) -> Optional[pulumi.Input[str]]:
        """
        The IPv6 address of a network-based server load balancer instance.
        """
        return pulumi.get(self, "ipv6_address")

    @ipv6_address.setter
    def ipv6_address(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "ipv6_address", value)

    @property
    @pulumi.getter(name="privateIpv4Address")
    def private_ipv4_address(self) -> Optional[pulumi.Input[str]]:
        """
        The private IPv4 address of a network-based server load balancer instance.
        """
        return pulumi.get(self, "private_ipv4_address")

    @private_ipv4_address.setter
    def private_ipv4_address(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "private_ipv4_address", value)

    @property
    @pulumi.getter(name="publicIpv4Address")
    def public_ipv4_address(self) -> Optional[pulumi.Input[str]]:
        """
        Public IPv4 address of a network-based server load balancer instance.
        """
        return pulumi.get(self, "public_ipv4_address")

    @public_ipv4_address.setter
    def public_ipv4_address(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "public_ipv4_address", value)

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[str]]:
        """
        Zone Status.
        """
        return pulumi.get(self, "status")

    @status.setter
    def status(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "status", value)


@pulumi.input_type
class ServerGroupHealthCheckArgs:
    def __init__(__self__, *,
                 health_check_connect_port: Optional[pulumi.Input[int]] = None,
                 health_check_connect_timeout: Optional[pulumi.Input[int]] = None,
                 health_check_domain: Optional[pulumi.Input[str]] = None,
                 health_check_enabled: Optional[pulumi.Input[bool]] = None,
                 health_check_http_codes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 health_check_interval: Optional[pulumi.Input[int]] = None,
                 health_check_type: Optional[pulumi.Input[str]] = None,
                 health_check_url: Optional[pulumi.Input[str]] = None,
                 healthy_threshold: Optional[pulumi.Input[int]] = None,
                 http_check_method: Optional[pulumi.Input[str]] = None,
                 unhealthy_threshold: Optional[pulumi.Input[int]] = None):
        """
        :param pulumi.Input[int] health_check_connect_port: The port of the backend server for health checks. Valid values: **0** ~ **65535**. **0** indicates that the port of the backend server is used for health check.
        :param pulumi.Input[int] health_check_connect_timeout: Maximum timeout for health check responses. Unit: seconds. Valid values: **1** ~ **300**.
        :param pulumi.Input[str] health_check_domain: The domain name used for health check. Valid values:
               - **$SERVER_IP**: uses the intranet IP of the backend server.
               - **domain**: Specify a specific domain name. The length is limited to 1 to 80 characters. Only lowercase letters, numbers, dashes (-), and half-width periods (.) can be used.
               > **NOTE:**  This parameter takes effect only when **HealthCheckType** is **HTTP**.
        :param pulumi.Input[bool] health_check_enabled: Whether to enable health check. Valid values:
               - **true**: on.
               - **false**: closed.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] health_check_http_codes: Health status return code. Multiple status codes are separated by commas (,). Valid values: **http\\_2xx**, **http\\_3xx**, **http\\_4xx**, and **http\\_5xx**.
               > **NOTE:**  This parameter takes effect only when **HealthCheckType** is **HTTP**.
        :param pulumi.Input[int] health_check_interval: Time interval of health examination. Unit: seconds.  Valid values: **5** ~ **50**.
        :param pulumi.Input[str] health_check_type: Health check protocol. Valid values: **TCP** or **HTTP**.
        :param pulumi.Input[str] health_check_url: Health check path.
               > **NOTE:**  This parameter takes effect only when **HealthCheckType** is **HTTP**.
        :param pulumi.Input[int] healthy_threshold: After the health check is successful, the health check status of the backend server is determined from **failed** to **successful**.  Valid values: **2** to **10**.
        :param pulumi.Input[str] http_check_method: The health check method. Valid values: **GET** or **HEAD**.
               > **NOTE:**  This parameter takes effect only when **HealthCheckType** is **HTTP**.
        :param pulumi.Input[int] unhealthy_threshold: After the health check fails for many times in a row, the health check status of the backend server is determined from **Success** to **Failure**. Valid values: **2** to **10**.
        """
        if health_check_connect_port is not None:
            pulumi.set(__self__, "health_check_connect_port", health_check_connect_port)
        if health_check_connect_timeout is not None:
            pulumi.set(__self__, "health_check_connect_timeout", health_check_connect_timeout)
        if health_check_domain is not None:
            pulumi.set(__self__, "health_check_domain", health_check_domain)
        if health_check_enabled is not None:
            pulumi.set(__self__, "health_check_enabled", health_check_enabled)
        if health_check_http_codes is not None:
            pulumi.set(__self__, "health_check_http_codes", health_check_http_codes)
        if health_check_interval is not None:
            pulumi.set(__self__, "health_check_interval", health_check_interval)
        if health_check_type is not None:
            pulumi.set(__self__, "health_check_type", health_check_type)
        if health_check_url is not None:
            pulumi.set(__self__, "health_check_url", health_check_url)
        if healthy_threshold is not None:
            pulumi.set(__self__, "healthy_threshold", healthy_threshold)
        if http_check_method is not None:
            pulumi.set(__self__, "http_check_method", http_check_method)
        if unhealthy_threshold is not None:
            pulumi.set(__self__, "unhealthy_threshold", unhealthy_threshold)

    @property
    @pulumi.getter(name="healthCheckConnectPort")
    def health_check_connect_port(self) -> Optional[pulumi.Input[int]]:
        """
        The port of the backend server for health checks. Valid values: **0** ~ **65535**. **0** indicates that the port of the backend server is used for health check.
        """
        return pulumi.get(self, "health_check_connect_port")

    @health_check_connect_port.setter
    def health_check_connect_port(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "health_check_connect_port", value)

    @property
    @pulumi.getter(name="healthCheckConnectTimeout")
    def health_check_connect_timeout(self) -> Optional[pulumi.Input[int]]:
        """
        Maximum timeout for health check responses. Unit: seconds. Valid values: **1** ~ **300**.
        """
        return pulumi.get(self, "health_check_connect_timeout")

    @health_check_connect_timeout.setter
    def health_check_connect_timeout(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "health_check_connect_timeout", value)

    @property
    @pulumi.getter(name="healthCheckDomain")
    def health_check_domain(self) -> Optional[pulumi.Input[str]]:
        """
        The domain name used for health check. Valid values:
        - **$SERVER_IP**: uses the intranet IP of the backend server.
        - **domain**: Specify a specific domain name. The length is limited to 1 to 80 characters. Only lowercase letters, numbers, dashes (-), and half-width periods (.) can be used.
        > **NOTE:**  This parameter takes effect only when **HealthCheckType** is **HTTP**.
        """
        return pulumi.get(self, "health_check_domain")

    @health_check_domain.setter
    def health_check_domain(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "health_check_domain", value)

    @property
    @pulumi.getter(name="healthCheckEnabled")
    def health_check_enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to enable health check. Valid values:
        - **true**: on.
        - **false**: closed.
        """
        return pulumi.get(self, "health_check_enabled")

    @health_check_enabled.setter
    def health_check_enabled(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "health_check_enabled", value)

    @property
    @pulumi.getter(name="healthCheckHttpCodes")
    def health_check_http_codes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        Health status return code. Multiple status codes are separated by commas (,). Valid values: **http\\_2xx**, **http\\_3xx**, **http\\_4xx**, and **http\\_5xx**.
        > **NOTE:**  This parameter takes effect only when **HealthCheckType** is **HTTP**.
        """
        return pulumi.get(self, "health_check_http_codes")

    @health_check_http_codes.setter
    def health_check_http_codes(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "health_check_http_codes", value)

    @property
    @pulumi.getter(name="healthCheckInterval")
    def health_check_interval(self) -> Optional[pulumi.Input[int]]:
        """
        Time interval of health examination. Unit: seconds.  Valid values: **5** ~ **50**.
        """
        return pulumi.get(self, "health_check_interval")

    @health_check_interval.setter
    def health_check_interval(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "health_check_interval", value)

    @property
    @pulumi.getter(name="healthCheckType")
    def health_check_type(self) -> Optional[pulumi.Input[str]]:
        """
        Health check protocol. Valid values: **TCP** or **HTTP**.
        """
        return pulumi.get(self, "health_check_type")

    @health_check_type.setter
    def health_check_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "health_check_type", value)

    @property
    @pulumi.getter(name="healthCheckUrl")
    def health_check_url(self) -> Optional[pulumi.Input[str]]:
        """
        Health check path.
        > **NOTE:**  This parameter takes effect only when **HealthCheckType** is **HTTP**.
        """
        return pulumi.get(self, "health_check_url")

    @health_check_url.setter
    def health_check_url(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "health_check_url", value)

    @property
    @pulumi.getter(name="healthyThreshold")
    def healthy_threshold(self) -> Optional[pulumi.Input[int]]:
        """
        After the health check is successful, the health check status of the backend server is determined from **failed** to **successful**.  Valid values: **2** to **10**.
        """
        return pulumi.get(self, "healthy_threshold")

    @healthy_threshold.setter
    def healthy_threshold(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "healthy_threshold", value)

    @property
    @pulumi.getter(name="httpCheckMethod")
    def http_check_method(self) -> Optional[pulumi.Input[str]]:
        """
        The health check method. Valid values: **GET** or **HEAD**.
        > **NOTE:**  This parameter takes effect only when **HealthCheckType** is **HTTP**.
        """
        return pulumi.get(self, "http_check_method")

    @http_check_method.setter
    def http_check_method(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "http_check_method", value)

    @property
    @pulumi.getter(name="unhealthyThreshold")
    def unhealthy_threshold(self) -> Optional[pulumi.Input[int]]:
        """
        After the health check fails for many times in a row, the health check status of the backend server is determined from **Success** to **Failure**. Valid values: **2** to **10**.
        """
        return pulumi.get(self, "unhealthy_threshold")

    @unhealthy_threshold.setter
    def unhealthy_threshold(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "unhealthy_threshold", value)


