// *** 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! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.Slb
{
    public static class GetApplicationLoadBalancers
    {
        /// <summary>
        /// This data source provides the server load balancers of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in 1.123.1+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Slb.GetApplicationLoadBalancers.Invoke(new()
        ///     {
        ///         NameRegex = "sample_slb",
        ///         Tags = 
        ///         {
        ///             { "tagKey1", "tagValue1" },
        ///             { "tagKey2", "tagValue2" },
        ///         },
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstSlbId"] = example.Apply(getApplicationLoadBalancersResult =&gt; getApplicationLoadBalancersResult.Balancers[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetApplicationLoadBalancersResult> InvokeAsync(GetApplicationLoadBalancersArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetApplicationLoadBalancersResult>("alicloud:slb/getApplicationLoadBalancers:getApplicationLoadBalancers", args ?? new GetApplicationLoadBalancersArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the server load balancers of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in 1.123.1+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Slb.GetApplicationLoadBalancers.Invoke(new()
        ///     {
        ///         NameRegex = "sample_slb",
        ///         Tags = 
        ///         {
        ///             { "tagKey1", "tagValue1" },
        ///             { "tagKey2", "tagValue2" },
        ///         },
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstSlbId"] = example.Apply(getApplicationLoadBalancersResult =&gt; getApplicationLoadBalancersResult.Balancers[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetApplicationLoadBalancersResult> Invoke(GetApplicationLoadBalancersInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetApplicationLoadBalancersResult>("alicloud:slb/getApplicationLoadBalancers:getApplicationLoadBalancers", args ?? new GetApplicationLoadBalancersInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetApplicationLoadBalancersArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Service address of the SLBs.
        /// </summary>
        [Input("address")]
        public string? Address { get; set; }

        /// <summary>
        /// The address ip version. Valid values `ipv4` and `ipv6`.
        /// </summary>
        [Input("addressIpVersion")]
        public string? AddressIpVersion { get; set; }

        /// <summary>
        /// The address type of the SLB. Valid values `internet` and `intranet`.
        /// </summary>
        [Input("addressType")]
        public string? AddressType { get; set; }

        [Input("enableDetails")]
        public bool? EnableDetails { get; set; }

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of SLBs IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The internet charge type. Valid values `PayByBandwidth` and `PayByTraffic`.
        /// </summary>
        [Input("internetChargeType")]
        public string? InternetChargeType { get; set; }

        /// <summary>
        /// The name of the SLB.
        /// </summary>
        [Input("loadBalancerName")]
        public string? LoadBalancerName { get; set; }

        /// <summary>
        /// The master zone id of the SLB.
        /// </summary>
        [Input("masterZoneId")]
        public string? MasterZoneId { get; set; }

        /// <summary>
        /// A regex string to filter results by SLB name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

        /// <summary>
        /// Network type of the SLBs. Valid values: `vpc` and `classic`.
        /// </summary>
        [Input("networkType")]
        public string? NetworkType { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

        [Input("pageNumber")]
        public int? PageNumber { get; set; }

        [Input("pageSize")]
        public int? PageSize { get; set; }

        /// <summary>
        /// The payment type of SLB. Valid values `PayAsYouGo` and `Subscription`.
        /// </summary>
        [Input("paymentType")]
        public string? PaymentType { get; set; }

        /// <summary>
        /// The Id of resource group which SLB belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public string? ResourceGroupId { get; set; }

        /// <summary>
        /// The server ID.
        /// </summary>
        [Input("serverId")]
        public string? ServerId { get; set; }

        /// <summary>
        /// The server intranet address.
        /// </summary>
        [Input("serverIntranetAddress")]
        public string? ServerIntranetAddress { get; set; }

        /// <summary>
        /// The slave zone id of the SLB.
        /// </summary>
        [Input("slaveZoneId")]
        public string? SlaveZoneId { get; set; }

        /// <summary>
        /// SLB current status. Possible values: `inactive`, `active` and `locked`.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

        [Input("tags")]
        private Dictionary<string, object>? _tags;

        /// <summary>
        /// A map of tags assigned to the SLB instances. The `tags` can have a maximum of 5 tag. It must be in the format:
        /// </summary>
        public Dictionary<string, object> Tags
        {
            get => _tags ?? (_tags = new Dictionary<string, object>());
            set => _tags = value;
        }

        /// <summary>
        /// ID of the VPC linked to the SLBs.
        /// </summary>
        [Input("vpcId")]
        public string? VpcId { get; set; }

        /// <summary>
        /// ID of the VSwitch linked to the SLBs.
        /// </summary>
        [Input("vswitchId")]
        public string? VswitchId { get; set; }

        public GetApplicationLoadBalancersArgs()
        {
        }
        public static new GetApplicationLoadBalancersArgs Empty => new GetApplicationLoadBalancersArgs();
    }

    public sealed class GetApplicationLoadBalancersInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Service address of the SLBs.
        /// </summary>
        [Input("address")]
        public Input<string>? Address { get; set; }

        /// <summary>
        /// The address ip version. Valid values `ipv4` and `ipv6`.
        /// </summary>
        [Input("addressIpVersion")]
        public Input<string>? AddressIpVersion { get; set; }

        /// <summary>
        /// The address type of the SLB. Valid values `internet` and `intranet`.
        /// </summary>
        [Input("addressType")]
        public Input<string>? AddressType { get; set; }

        [Input("enableDetails")]
        public Input<bool>? EnableDetails { get; set; }

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of SLBs IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The internet charge type. Valid values `PayByBandwidth` and `PayByTraffic`.
        /// </summary>
        [Input("internetChargeType")]
        public Input<string>? InternetChargeType { get; set; }

        /// <summary>
        /// The name of the SLB.
        /// </summary>
        [Input("loadBalancerName")]
        public Input<string>? LoadBalancerName { get; set; }

        /// <summary>
        /// The master zone id of the SLB.
        /// </summary>
        [Input("masterZoneId")]
        public Input<string>? MasterZoneId { get; set; }

        /// <summary>
        /// A regex string to filter results by SLB name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

        /// <summary>
        /// Network type of the SLBs. Valid values: `vpc` and `classic`.
        /// </summary>
        [Input("networkType")]
        public Input<string>? NetworkType { get; set; }

        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

        [Input("pageNumber")]
        public Input<int>? PageNumber { get; set; }

        [Input("pageSize")]
        public Input<int>? PageSize { get; set; }

        /// <summary>
        /// The payment type of SLB. Valid values `PayAsYouGo` and `Subscription`.
        /// </summary>
        [Input("paymentType")]
        public Input<string>? PaymentType { get; set; }

        /// <summary>
        /// The Id of resource group which SLB belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// The server ID.
        /// </summary>
        [Input("serverId")]
        public Input<string>? ServerId { get; set; }

        /// <summary>
        /// The server intranet address.
        /// </summary>
        [Input("serverIntranetAddress")]
        public Input<string>? ServerIntranetAddress { get; set; }

        /// <summary>
        /// The slave zone id of the SLB.
        /// </summary>
        [Input("slaveZoneId")]
        public Input<string>? SlaveZoneId { get; set; }

        /// <summary>
        /// SLB current status. Possible values: `inactive`, `active` and `locked`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A map of tags assigned to the SLB instances. The `tags` can have a maximum of 5 tag. It must be in the format:
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// ID of the VPC linked to the SLBs.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// ID of the VSwitch linked to the SLBs.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        public GetApplicationLoadBalancersInvokeArgs()
        {
        }
        public static new GetApplicationLoadBalancersInvokeArgs Empty => new GetApplicationLoadBalancersInvokeArgs();
    }


    [OutputType]
    public sealed class GetApplicationLoadBalancersResult
    {
        /// <summary>
        /// The IP address that the SLB instance uses to provide services.
        /// </summary>
        public readonly string? Address;
        /// <summary>
        /// The address ip version.
        /// </summary>
        public readonly string? AddressIpVersion;
        /// <summary>
        /// The address type.
        /// </summary>
        public readonly string? AddressType;
        /// <summary>
        /// A list of SLBs. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetApplicationLoadBalancersBalancerResult> Balancers;
        public readonly bool? EnableDetails;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of slb IDs.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        /// <summary>
        /// The billing method of the Internet-facing SLB instance.
        /// </summary>
        public readonly string? InternetChargeType;
        /// <summary>
        /// The name of the SLB.
        /// </summary>
        public readonly string? LoadBalancerName;
        /// <summary>
        /// Master availability zone of the SLBs.
        /// </summary>
        public readonly string? MasterZoneId;
        public readonly string? NameRegex;
        /// <summary>
        /// A list of slb names.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        /// <summary>
        /// Network type of the SLB. Possible values: `vpc` and `classic`.
        /// </summary>
        public readonly string? NetworkType;
        public readonly string? OutputFile;
        public readonly int? PageNumber;
        public readonly int? PageSize;
        public readonly string? PaymentType;
        /// <summary>
        /// The ID of the resource group.
        /// </summary>
        public readonly string? ResourceGroupId;
        /// <summary>
        /// The ID of the Elastic Compute Service (ECS) instance that is specified as a backend server of the CLB instance.
        /// </summary>
        public readonly string? ServerId;
        public readonly string? ServerIntranetAddress;
        /// <summary>
        /// Slave availability zone of the SLBs.
        /// </summary>
        public readonly string? SlaveZoneId;
        public readonly ImmutableArray<Outputs.GetApplicationLoadBalancersSlbResult> Slbs;
        /// <summary>
        /// SLB current status. Possible values: `inactive`, `active` and `locked`.
        /// </summary>
        public readonly string? Status;
        /// <summary>
        /// The tags of the SLB.
        /// </summary>
        public readonly ImmutableDictionary<string, object>? Tags;
        public readonly int TotalCount;
        /// <summary>
        /// ID of the VPC the SLB belongs to.
        /// </summary>
        public readonly string? VpcId;
        /// <summary>
        /// ID of the VSwitch the SLB belongs to.
        /// </summary>
        public readonly string? VswitchId;

        [OutputConstructor]
        private GetApplicationLoadBalancersResult(
            string? address,

            string? addressIpVersion,

            string? addressType,

            ImmutableArray<Outputs.GetApplicationLoadBalancersBalancerResult> balancers,

            bool? enableDetails,

            string id,

            ImmutableArray<string> ids,

            string? internetChargeType,

            string? loadBalancerName,

            string? masterZoneId,

            string? nameRegex,

            ImmutableArray<string> names,

            string? networkType,

            string? outputFile,

            int? pageNumber,

            int? pageSize,

            string? paymentType,

            string? resourceGroupId,

            string? serverId,

            string? serverIntranetAddress,

            string? slaveZoneId,

            ImmutableArray<Outputs.GetApplicationLoadBalancersSlbResult> slbs,

            string? status,

            ImmutableDictionary<string, object>? tags,

            int totalCount,

            string? vpcId,

            string? vswitchId)
        {
            Address = address;
            AddressIpVersion = addressIpVersion;
            AddressType = addressType;
            Balancers = balancers;
            EnableDetails = enableDetails;
            Id = id;
            Ids = ids;
            InternetChargeType = internetChargeType;
            LoadBalancerName = loadBalancerName;
            MasterZoneId = masterZoneId;
            NameRegex = nameRegex;
            Names = names;
            NetworkType = networkType;
            OutputFile = outputFile;
            PageNumber = pageNumber;
            PageSize = pageSize;
            PaymentType = paymentType;
            ResourceGroupId = resourceGroupId;
            ServerId = serverId;
            ServerIntranetAddress = serverIntranetAddress;
            SlaveZoneId = slaveZoneId;
            Slbs = slbs;
            Status = status;
            Tags = tags;
            TotalCount = totalCount;
            VpcId = vpcId;
            VswitchId = vswitchId;
        }
    }
}
