# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class GetLoadBalancersResult:
    """
    A collection of values returned by getLoadBalancers.
    """
    def __init__(__self__, address=None, id=None, ids=None, master_availability_zone=None, name_regex=None, names=None, network_type=None, output_file=None, resource_group_id=None, slave_availability_zone=None, slbs=None, tags=None, vpc_id=None, vswitch_id=None):
        if address and not isinstance(address, str):
            raise TypeError("Expected argument 'address' to be a str")
        __self__.address = address
        """
        Service address of the SLB.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """
        if ids and not isinstance(ids, list):
            raise TypeError("Expected argument 'ids' to be a list")
        __self__.ids = ids
        """
        A list of slb IDs.
        """
        if master_availability_zone and not isinstance(master_availability_zone, str):
            raise TypeError("Expected argument 'master_availability_zone' to be a str")
        __self__.master_availability_zone = master_availability_zone
        """
        Master availability zone of the SLBs.
        """
        if name_regex and not isinstance(name_regex, str):
            raise TypeError("Expected argument 'name_regex' to be a str")
        __self__.name_regex = name_regex
        if names and not isinstance(names, list):
            raise TypeError("Expected argument 'names' to be a list")
        __self__.names = names
        """
        A list of slb names.
        """
        if network_type and not isinstance(network_type, str):
            raise TypeError("Expected argument 'network_type' to be a str")
        __self__.network_type = network_type
        """
        Network type of the SLB. Possible values: `vpc` and `classic`.
        """
        if output_file and not isinstance(output_file, str):
            raise TypeError("Expected argument 'output_file' to be a str")
        __self__.output_file = output_file
        if resource_group_id and not isinstance(resource_group_id, str):
            raise TypeError("Expected argument 'resource_group_id' to be a str")
        __self__.resource_group_id = resource_group_id
        if slave_availability_zone and not isinstance(slave_availability_zone, str):
            raise TypeError("Expected argument 'slave_availability_zone' to be a str")
        __self__.slave_availability_zone = slave_availability_zone
        """
        Slave availability zone of the SLBs.
        """
        if slbs and not isinstance(slbs, list):
            raise TypeError("Expected argument 'slbs' to be a list")
        __self__.slbs = slbs
        """
        A list of SLBs. Each element contains the following attributes:
        """
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        __self__.tags = tags
        """
        A map of tags assigned to the SLB instance.
        """
        if vpc_id and not isinstance(vpc_id, str):
            raise TypeError("Expected argument 'vpc_id' to be a str")
        __self__.vpc_id = vpc_id
        """
        ID of the VPC the SLB belongs to.
        """
        if vswitch_id and not isinstance(vswitch_id, str):
            raise TypeError("Expected argument 'vswitch_id' to be a str")
        __self__.vswitch_id = vswitch_id
        """
        ID of the VSwitch the SLB belongs to.
        """
class AwaitableGetLoadBalancersResult(GetLoadBalancersResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetLoadBalancersResult(
            address=self.address,
            id=self.id,
            ids=self.ids,
            master_availability_zone=self.master_availability_zone,
            name_regex=self.name_regex,
            names=self.names,
            network_type=self.network_type,
            output_file=self.output_file,
            resource_group_id=self.resource_group_id,
            slave_availability_zone=self.slave_availability_zone,
            slbs=self.slbs,
            tags=self.tags,
            vpc_id=self.vpc_id,
            vswitch_id=self.vswitch_id)

def get_load_balancers(address=None,ids=None,master_availability_zone=None,name_regex=None,network_type=None,output_file=None,resource_group_id=None,slave_availability_zone=None,tags=None,vpc_id=None,vswitch_id=None,opts=None):
    """
    This data source provides the server load balancers of the current Alibaba Cloud user.

    > This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/d/slbs.html.markdown.


    :param str address: Service address of the SLBs.
    :param list ids: A list of SLBs IDs.
    :param str master_availability_zone: Master availability zone of the SLBs.
    :param str name_regex: A regex string to filter results by SLB name.
    :param str network_type: Network type of the SLBs. Valid values: `vpc` and `classic`.
    :param str resource_group_id: The Id of resource group which SLB belongs.
    :param str slave_availability_zone: Slave availability zone of the SLBs.
    :param dict tags: A map of tags assigned to the SLB instances. The `tags` can have a maximum of 5 tag. It must be in the format:
           ```
           data "slb.getLoadBalancers" "taggedInstances" {
           tags = {
           tagKey1 = "tagValue1",
           tagKey2 = "tagValue2"
           }
           }
           ```
    :param str vpc_id: ID of the VPC linked to the SLBs.
    :param str vswitch_id: ID of the VSwitch linked to the SLBs.
    """
    __args__ = dict()


    __args__['address'] = address
    __args__['ids'] = ids
    __args__['masterAvailabilityZone'] = master_availability_zone
    __args__['nameRegex'] = name_regex
    __args__['networkType'] = network_type
    __args__['outputFile'] = output_file
    __args__['resourceGroupId'] = resource_group_id
    __args__['slaveAvailabilityZone'] = slave_availability_zone
    __args__['tags'] = tags
    __args__['vpcId'] = vpc_id
    __args__['vswitchId'] = vswitch_id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('alicloud:slb/getLoadBalancers:getLoadBalancers', __args__, opts=opts).value

    return AwaitableGetLoadBalancersResult(
        address=__ret__.get('address'),
        id=__ret__.get('id'),
        ids=__ret__.get('ids'),
        master_availability_zone=__ret__.get('masterAvailabilityZone'),
        name_regex=__ret__.get('nameRegex'),
        names=__ret__.get('names'),
        network_type=__ret__.get('networkType'),
        output_file=__ret__.get('outputFile'),
        resource_group_id=__ret__.get('resourceGroupId'),
        slave_availability_zone=__ret__.get('slaveAvailabilityZone'),
        slbs=__ret__.get('slbs'),
        tags=__ret__.get('tags'),
        vpc_id=__ret__.get('vpcId'),
        vswitch_id=__ret__.get('vswitchId'))
