# 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__ = [
    'GetLoadBalancerResult',
    'AwaitableGetLoadBalancerResult',
    'get_load_balancer',
    'get_load_balancer_output',
]

@pulumi.output_type
class GetLoadBalancerResult:
    """
    A collection of values returned by getLoadBalancer.
    """
    def __init__(__self__, address_ip_version=None, bandwidth_package_id=None, business_status=None, create_time=None, delete_protection=None, deleted_time=None, description=None, dns_name=None, eip_billing_config=None, global_accelerator=None, id=None, ipv6_eip_billing_config=None, load_balancer_billing_type=None, load_balancer_edition=None, load_balancer_id=None, load_balancer_name=None, lock_reason=None, modification_protection_reason=None, modification_protection_status=None, overdue_time=None, project_name=None, status=None, tags=None, type=None, update_time=None, vpc_id=None, waf_instance_id=None, waf_protected_domain=None, waf_protection_enabled=None, zone_mappings=None):
        if address_ip_version and not isinstance(address_ip_version, str):
            raise TypeError("Expected argument 'address_ip_version' to be a str")
        pulumi.set(__self__, "address_ip_version", address_ip_version)
        if bandwidth_package_id and not isinstance(bandwidth_package_id, str):
            raise TypeError("Expected argument 'bandwidth_package_id' to be a str")
        pulumi.set(__self__, "bandwidth_package_id", bandwidth_package_id)
        if business_status and not isinstance(business_status, str):
            raise TypeError("Expected argument 'business_status' to be a str")
        pulumi.set(__self__, "business_status", business_status)
        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 delete_protection and not isinstance(delete_protection, str):
            raise TypeError("Expected argument 'delete_protection' to be a str")
        pulumi.set(__self__, "delete_protection", delete_protection)
        if deleted_time and not isinstance(deleted_time, str):
            raise TypeError("Expected argument 'deleted_time' to be a str")
        pulumi.set(__self__, "deleted_time", deleted_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if dns_name and not isinstance(dns_name, str):
            raise TypeError("Expected argument 'dns_name' to be a str")
        pulumi.set(__self__, "dns_name", dns_name)
        if eip_billing_config and not isinstance(eip_billing_config, dict):
            raise TypeError("Expected argument 'eip_billing_config' to be a dict")
        pulumi.set(__self__, "eip_billing_config", eip_billing_config)
        if global_accelerator and not isinstance(global_accelerator, dict):
            raise TypeError("Expected argument 'global_accelerator' to be a dict")
        pulumi.set(__self__, "global_accelerator", global_accelerator)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ipv6_eip_billing_config and not isinstance(ipv6_eip_billing_config, dict):
            raise TypeError("Expected argument 'ipv6_eip_billing_config' to be a dict")
        pulumi.set(__self__, "ipv6_eip_billing_config", ipv6_eip_billing_config)
        if load_balancer_billing_type and not isinstance(load_balancer_billing_type, int):
            raise TypeError("Expected argument 'load_balancer_billing_type' to be a int")
        pulumi.set(__self__, "load_balancer_billing_type", load_balancer_billing_type)
        if load_balancer_edition and not isinstance(load_balancer_edition, str):
            raise TypeError("Expected argument 'load_balancer_edition' to be a str")
        pulumi.set(__self__, "load_balancer_edition", load_balancer_edition)
        if load_balancer_id and not isinstance(load_balancer_id, str):
            raise TypeError("Expected argument 'load_balancer_id' to be a str")
        pulumi.set(__self__, "load_balancer_id", load_balancer_id)
        if load_balancer_name and not isinstance(load_balancer_name, str):
            raise TypeError("Expected argument 'load_balancer_name' to be a str")
        pulumi.set(__self__, "load_balancer_name", load_balancer_name)
        if lock_reason and not isinstance(lock_reason, str):
            raise TypeError("Expected argument 'lock_reason' to be a str")
        pulumi.set(__self__, "lock_reason", lock_reason)
        if modification_protection_reason and not isinstance(modification_protection_reason, str):
            raise TypeError("Expected argument 'modification_protection_reason' to be a str")
        pulumi.set(__self__, "modification_protection_reason", modification_protection_reason)
        if modification_protection_status and not isinstance(modification_protection_status, str):
            raise TypeError("Expected argument 'modification_protection_status' to be a str")
        pulumi.set(__self__, "modification_protection_status", modification_protection_status)
        if overdue_time and not isinstance(overdue_time, str):
            raise TypeError("Expected argument 'overdue_time' to be a str")
        pulumi.set(__self__, "overdue_time", overdue_time)
        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 status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)
        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)
        if vpc_id and not isinstance(vpc_id, str):
            raise TypeError("Expected argument 'vpc_id' to be a str")
        pulumi.set(__self__, "vpc_id", vpc_id)
        if waf_instance_id and not isinstance(waf_instance_id, str):
            raise TypeError("Expected argument 'waf_instance_id' to be a str")
        pulumi.set(__self__, "waf_instance_id", waf_instance_id)
        if waf_protected_domain and not isinstance(waf_protected_domain, str):
            raise TypeError("Expected argument 'waf_protected_domain' to be a str")
        pulumi.set(__self__, "waf_protected_domain", waf_protected_domain)
        if waf_protection_enabled and not isinstance(waf_protection_enabled, str):
            raise TypeError("Expected argument 'waf_protection_enabled' to be a str")
        pulumi.set(__self__, "waf_protection_enabled", waf_protection_enabled)
        if zone_mappings and not isinstance(zone_mappings, list):
            raise TypeError("Expected argument 'zone_mappings' to be a list")
        pulumi.set(__self__, "zone_mappings", zone_mappings)

    @property
    @pulumi.getter(name="addressIpVersion")
    def address_ip_version(self) -> builtins.str:
        """
        ALB 实例的 IP 类型。IPv4：IPv4 类型；DualStack：IPv4&IPv6 双栈类型。
        """
        return pulumi.get(self, "address_ip_version")

    @property
    @pulumi.getter(name="bandwidthPackageId")
    def bandwidth_package_id(self) -> builtins.str:
        """
        绑定的共享带宽包ID，可实现带宽共享。
        """
        return pulumi.get(self, "bandwidth_package_id")

    @property
    @pulumi.getter(name="businessStatus")
    def business_status(self) -> builtins.str:
        """
        ALB 实例的服务状态。Normal：正常；FinancialLocked：因欠费被锁定。
        """
        return pulumi.get(self, "business_status")

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> builtins.str:
        """
        ALB 实例的创建时间。
        """
        return pulumi.get(self, "create_time")

    @property
    @pulumi.getter(name="deleteProtection")
    def delete_protection(self) -> builtins.str:
        """
        删除保护开关。on：开启；off：关闭。
        """
        return pulumi.get(self, "delete_protection")

    @property
    @pulumi.getter(name="deletedTime")
    def deleted_time(self) -> builtins.str:
        """
        ALB 实例的预期回收时间。该参数只有实例处于 FinancialLocked 状态时有返回值。
        """
        return pulumi.get(self, "deleted_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        ALB 实例的描述。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="dnsName")
    def dns_name(self) -> builtins.str:
        """
        DNS域名。
        """
        return pulumi.get(self, "dns_name")

    @property
    @pulumi.getter(name="eipBillingConfig")
    def eip_billing_config(self) -> 'outputs.GetLoadBalancerEipBillingConfigResult':
        """
        公网IP的计费配置，仅适用于公网实例。
        """
        return pulumi.get(self, "eip_billing_config")

    @property
    @pulumi.getter(name="globalAccelerator")
    def global_accelerator(self) -> 'outputs.GetLoadBalancerGlobalAcceleratorResult':
        """
        全球加速器配置，用于提升跨地域访问速度。
        """
        return pulumi.get(self, "global_accelerator")

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

    @property
    @pulumi.getter(name="ipv6EipBillingConfig")
    def ipv6_eip_billing_config(self) -> 'outputs.GetLoadBalancerIpv6EipBillingConfigResult':
        """
        IPv6公网IP的计費配置，仅适用于公网实例。
        """
        return pulumi.get(self, "ipv6_eip_billing_config")

    @property
    @pulumi.getter(name="loadBalancerBillingType")
    def load_balancer_billing_type(self) -> builtins.int:
        """
        ALB实例计费类型，当前仅支持按量计费（取值为1）。
        """
        return pulumi.get(self, "load_balancer_billing_type")

    @property
    @pulumi.getter(name="loadBalancerEdition")
    def load_balancer_edition(self) -> builtins.str:
        """
        应用型负载均衡的版本。Basic：基础版；Standard：标准版。
        """
        return pulumi.get(self, "load_balancer_edition")

    @property
    @pulumi.getter(name="loadBalancerId")
    def load_balancer_id(self) -> builtins.str:
        """
        ALB 实例 ID。
        """
        return pulumi.get(self, "load_balancer_id")

    @property
    @pulumi.getter(name="loadBalancerName")
    def load_balancer_name(self) -> builtins.str:
        """
        ALB 实例的名称。
        """
        return pulumi.get(self, "load_balancer_name")

    @property
    @pulumi.getter(name="lockReason")
    def lock_reason(self) -> builtins.str:
        """
        ALB 实例被冻结的原因，例如 Financial（欠费）或 Security（安全原因）。仅在实例被锁定时返回。
        """
        return pulumi.get(self, "lock_reason")

    @property
    @pulumi.getter(name="modificationProtectionReason")
    def modification_protection_reason(self) -> builtins.str:
        """
        修改保护原因。仅在 ModificationProtectionStatus 为 ConsoleProtection 时，该参数有效且合法。
        """
        return pulumi.get(self, "modification_protection_reason")

    @property
    @pulumi.getter(name="modificationProtectionStatus")
    def modification_protection_status(self) -> builtins.str:
        """
        修改保护状态。NonProtection：不保护；ConsoleProtection：控制台修改保护，通过控制台无法修改实例配置。
        """
        return pulumi.get(self, "modification_protection_status")

    @property
    @pulumi.getter(name="overdueTime")
    def overdue_time(self) -> builtins.str:
        """
        ALB 实例的冻结时间。该参数只有实例处于 FinancialLocked 状态时有返回值。
        """
        return pulumi.get(self, "overdue_time")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        实例所属项目名称。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        ALB 实例状态：Active（运行中）、Provisioning（创建中）、Configuring（配置中）、Deleting（删除中）、CreateFailed（创建失败）、Inactive（已停止）。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetLoadBalancerTagResult']:
        """
        为实例绑定的标签列表，用于分类和计费。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def type(self) -> builtins.str:
        """
        ALB 实例的类型。取值是 public 或 private 。public：表示创建一个公网负载均衡实例，系统会分配一个公网IP地址和一个私网IP地址，可用于转发公网请求和私网请求。private：表示创建一个私网负载均衡实例，系统会分配一个私网IP地址，仅用于转发私网请求。
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter(name="updateTime")
    def update_time(self) -> builtins.str:
        """
        ALB 实例的最后更新时间。
        """
        return pulumi.get(self, "update_time")

    @property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> builtins.str:
        """
        负载均衡实例所属的私有网络（VPC）的ID。
        """
        return pulumi.get(self, "vpc_id")

    @property
    @pulumi.getter(name="wafInstanceId")
    def waf_instance_id(self) -> builtins.str:
        """
        ALB 实例绑定的 WAF 安全防护实例 ID。
        """
        return pulumi.get(self, "waf_instance_id")

    @property
    @pulumi.getter(name="wafProtectedDomain")
    def waf_protected_domain(self) -> builtins.str:
        """
        WAF防护的域名，用于精确匹配防护规则。
        """
        return pulumi.get(self, "waf_protected_domain")

    @property
    @pulumi.getter(name="wafProtectionEnabled")
    def waf_protection_enabled(self) -> builtins.str:
        """
        WAF 安全防护开关。on：开启；off：关闭。
        """
        return pulumi.get(self, "waf_protection_enabled")

    @property
    @pulumi.getter(name="zoneMappings")
    def zone_mappings(self) -> Sequence['outputs.GetLoadBalancerZoneMappingResult']:
        """
        可用区映射列表，定义了实例在哪些可用区提供服务。
        """
        return pulumi.get(self, "zone_mappings")


class AwaitableGetLoadBalancerResult(GetLoadBalancerResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetLoadBalancerResult(
            address_ip_version=self.address_ip_version,
            bandwidth_package_id=self.bandwidth_package_id,
            business_status=self.business_status,
            create_time=self.create_time,
            delete_protection=self.delete_protection,
            deleted_time=self.deleted_time,
            description=self.description,
            dns_name=self.dns_name,
            eip_billing_config=self.eip_billing_config,
            global_accelerator=self.global_accelerator,
            id=self.id,
            ipv6_eip_billing_config=self.ipv6_eip_billing_config,
            load_balancer_billing_type=self.load_balancer_billing_type,
            load_balancer_edition=self.load_balancer_edition,
            load_balancer_id=self.load_balancer_id,
            load_balancer_name=self.load_balancer_name,
            lock_reason=self.lock_reason,
            modification_protection_reason=self.modification_protection_reason,
            modification_protection_status=self.modification_protection_status,
            overdue_time=self.overdue_time,
            project_name=self.project_name,
            status=self.status,
            tags=self.tags,
            type=self.type,
            update_time=self.update_time,
            vpc_id=self.vpc_id,
            waf_instance_id=self.waf_instance_id,
            waf_protected_domain=self.waf_protected_domain,
            waf_protection_enabled=self.waf_protection_enabled,
            zone_mappings=self.zone_mappings)


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


    :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/getLoadBalancer:getLoadBalancer', __args__, opts=opts, typ=GetLoadBalancerResult).value

    return AwaitableGetLoadBalancerResult(
        address_ip_version=pulumi.get(__ret__, 'address_ip_version'),
        bandwidth_package_id=pulumi.get(__ret__, 'bandwidth_package_id'),
        business_status=pulumi.get(__ret__, 'business_status'),
        create_time=pulumi.get(__ret__, 'create_time'),
        delete_protection=pulumi.get(__ret__, 'delete_protection'),
        deleted_time=pulumi.get(__ret__, 'deleted_time'),
        description=pulumi.get(__ret__, 'description'),
        dns_name=pulumi.get(__ret__, 'dns_name'),
        eip_billing_config=pulumi.get(__ret__, 'eip_billing_config'),
        global_accelerator=pulumi.get(__ret__, 'global_accelerator'),
        id=pulumi.get(__ret__, 'id'),
        ipv6_eip_billing_config=pulumi.get(__ret__, 'ipv6_eip_billing_config'),
        load_balancer_billing_type=pulumi.get(__ret__, 'load_balancer_billing_type'),
        load_balancer_edition=pulumi.get(__ret__, 'load_balancer_edition'),
        load_balancer_id=pulumi.get(__ret__, 'load_balancer_id'),
        load_balancer_name=pulumi.get(__ret__, 'load_balancer_name'),
        lock_reason=pulumi.get(__ret__, 'lock_reason'),
        modification_protection_reason=pulumi.get(__ret__, 'modification_protection_reason'),
        modification_protection_status=pulumi.get(__ret__, 'modification_protection_status'),
        overdue_time=pulumi.get(__ret__, 'overdue_time'),
        project_name=pulumi.get(__ret__, 'project_name'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        type=pulumi.get(__ret__, 'type'),
        update_time=pulumi.get(__ret__, 'update_time'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'),
        waf_instance_id=pulumi.get(__ret__, 'waf_instance_id'),
        waf_protected_domain=pulumi.get(__ret__, 'waf_protected_domain'),
        waf_protection_enabled=pulumi.get(__ret__, 'waf_protection_enabled'),
        zone_mappings=pulumi.get(__ret__, 'zone_mappings'))
def get_load_balancer_output(id: Optional[pulumi.Input[builtins.str]] = None,
                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetLoadBalancerResult]:
    """
    Data Source schema for Byteplus::ALB::LoadBalancer


    :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/getLoadBalancer:getLoadBalancer', __args__, opts=opts, typ=GetLoadBalancerResult)
    return __ret__.apply(lambda __response__: GetLoadBalancerResult(
        address_ip_version=pulumi.get(__response__, 'address_ip_version'),
        bandwidth_package_id=pulumi.get(__response__, 'bandwidth_package_id'),
        business_status=pulumi.get(__response__, 'business_status'),
        create_time=pulumi.get(__response__, 'create_time'),
        delete_protection=pulumi.get(__response__, 'delete_protection'),
        deleted_time=pulumi.get(__response__, 'deleted_time'),
        description=pulumi.get(__response__, 'description'),
        dns_name=pulumi.get(__response__, 'dns_name'),
        eip_billing_config=pulumi.get(__response__, 'eip_billing_config'),
        global_accelerator=pulumi.get(__response__, 'global_accelerator'),
        id=pulumi.get(__response__, 'id'),
        ipv6_eip_billing_config=pulumi.get(__response__, 'ipv6_eip_billing_config'),
        load_balancer_billing_type=pulumi.get(__response__, 'load_balancer_billing_type'),
        load_balancer_edition=pulumi.get(__response__, 'load_balancer_edition'),
        load_balancer_id=pulumi.get(__response__, 'load_balancer_id'),
        load_balancer_name=pulumi.get(__response__, 'load_balancer_name'),
        lock_reason=pulumi.get(__response__, 'lock_reason'),
        modification_protection_reason=pulumi.get(__response__, 'modification_protection_reason'),
        modification_protection_status=pulumi.get(__response__, 'modification_protection_status'),
        overdue_time=pulumi.get(__response__, 'overdue_time'),
        project_name=pulumi.get(__response__, 'project_name'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        type=pulumi.get(__response__, 'type'),
        update_time=pulumi.get(__response__, 'update_time'),
        vpc_id=pulumi.get(__response__, 'vpc_id'),
        waf_instance_id=pulumi.get(__response__, 'waf_instance_id'),
        waf_protected_domain=pulumi.get(__response__, 'waf_protected_domain'),
        waf_protection_enabled=pulumi.get(__response__, 'waf_protection_enabled'),
        zone_mappings=pulumi.get(__response__, 'zone_mappings')))
