<gh_stars>0// *** 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 GetAcls
    {
        /// <summary>
        /// This data source provides the acls in the region.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var sampleDs = AliCloud.Slb.GetAcls.Invoke();
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstSlbAclId"] = sampleDs.Apply(getAclsResult =&gt; getAclsResult.Acls[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// ## Entry Block
        /// 
        /// The entry mapping supports the following:
        /// 
        /// * `entry`   - An IP addresses or CIDR blocks.
        /// * `comment` - the comment of the entry.
        /// 
        /// ## Listener Block
        /// 
        /// The Listener mapping supports the following:
        /// 
        /// * `load_balancer_id` - the id of load balancer instance, the listener belongs to.
        /// * `frontend_port` - the listener port.
        /// * `protocol`      - the listener protocol (such as tcp/udp/http/https, etc).
        /// * `acl_type`      - the type of acl (such as white/black).
        /// </summary>
        public static Task<GetAclsResult> InvokeAsync(GetAclsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetAclsResult>("alicloud:slb/getAcls:getAcls", args ?? new GetAclsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the acls in the region.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var sampleDs = AliCloud.Slb.GetAcls.Invoke();
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstSlbAclId"] = sampleDs.Apply(getAclsResult =&gt; getAclsResult.Acls[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// ## Entry Block
        /// 
        /// The entry mapping supports the following:
        /// 
        /// * `entry`   - An IP addresses or CIDR blocks.
        /// * `comment` - the comment of the entry.
        /// 
        /// ## Listener Block
        /// 
        /// The Listener mapping supports the following:
        /// 
        /// * `load_balancer_id` - the id of load balancer instance, the listener belongs to.
        /// * `frontend_port` - the listener port.
        /// * `protocol`      - the listener protocol (such as tcp/udp/http/https, etc).
        /// * `acl_type`      - the type of acl (such as white/black).
        /// </summary>
        public static Output<GetAclsResult> Invoke(GetAclsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetAclsResult>("alicloud:slb/getAcls:getAcls", args ?? new GetAclsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAclsArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private List<string>? _ids;

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

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

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

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

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

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public Dictionary<string, object> Tags
        {
            get => _tags ?? (_tags = new Dictionary<string, object>());
            set => _tags = value;
        }

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

    public sealed class GetAclsInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private InputList<string>? _ids;

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

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

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

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

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

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

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


    [OutputType]
    public sealed class GetAclsResult
    {
        /// <summary>
        /// A list of SLB  acls. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetAclsAclResult> Acls;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of SLB acls IDs.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        public readonly string? NameRegex;
        /// <summary>
        /// A list of SLB acls names.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        /// <summary>
        /// Resource group ID.
        /// </summary>
        public readonly string? ResourceGroupId;
        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public readonly ImmutableDictionary<string, object>? Tags;

        [OutputConstructor]
        private GetAclsResult(
            ImmutableArray<Outputs.GetAclsAclResult> acls,

            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            string? resourceGroupId,

            ImmutableDictionary<string, object>? tags)
        {
            Acls = acls;
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            ResourceGroupId = resourceGroupId;
            Tags = tags;
        }
    }
}
