<filename>sdk/dotnet/Vpc/GetNetworkAcls.cs// *** 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.Vpc
{
    public static class GetNetworkAcls
    {
        /// <summary>
        /// This data source provides the Network Acls of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.122.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Vpc.GetNetworkAcls.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "example_value",
        ///         },
        ///         NameRegex = "the_resource_name",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstNetworkAclId"] = example.Apply(getNetworkAclsResult =&gt; getNetworkAclsResult.Acls[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetNetworkAclsResult> InvokeAsync(GetNetworkAclsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetNetworkAclsResult>("alicloud:vpc/getNetworkAcls:getNetworkAcls", args ?? new GetNetworkAclsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Network Acls of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.122.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Vpc.GetNetworkAcls.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "example_value",
        ///         },
        ///         NameRegex = "the_resource_name",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstNetworkAclId"] = example.Apply(getNetworkAclsResult =&gt; getNetworkAclsResult.Acls[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetNetworkAclsResult> Invoke(GetNetworkAclsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetNetworkAclsResult>("alicloud:vpc/getNetworkAcls:getNetworkAcls", args ?? new GetNetworkAclsInvokeArgs(), options.WithDefaults());
    }


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

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

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

        /// <summary>
        /// The name of the network ACL.
        /// </summary>
        [Input("networkAclName")]
        public string? NetworkAclName { get; set; }

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

        /// <summary>
        /// The ID of the associated resource.
        /// </summary>
        [Input("resourceId")]
        public string? ResourceId { get; set; }

        /// <summary>
        /// The type of the associated resource.
        /// </summary>
        [Input("resourceType")]
        public string? ResourceType { get; set; }

        /// <summary>
        /// The state of the network ACL.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

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

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

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

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

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

        /// <summary>
        /// The name of the network ACL.
        /// </summary>
        [Input("networkAclName")]
        public Input<string>? NetworkAclName { get; set; }

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

        /// <summary>
        /// The ID of the associated resource.
        /// </summary>
        [Input("resourceId")]
        public Input<string>? ResourceId { get; set; }

        /// <summary>
        /// The type of the associated resource.
        /// </summary>
        [Input("resourceType")]
        public Input<string>? ResourceType { get; set; }

        /// <summary>
        /// The state of the network ACL.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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

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


    [OutputType]
    public sealed class GetNetworkAclsResult
    {
        public readonly ImmutableArray<Outputs.GetNetworkAclsAclResult> Acls;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string? NameRegex;
        public readonly ImmutableArray<string> Names;
        public readonly string? NetworkAclName;
        public readonly string? OutputFile;
        public readonly string? ResourceId;
        public readonly string? ResourceType;
        public readonly string? Status;
        public readonly string? VpcId;

        [OutputConstructor]
        private GetNetworkAclsResult(
            ImmutableArray<Outputs.GetNetworkAclsAclResult> acls,

            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names,

            string? networkAclName,

            string? outputFile,

            string? resourceId,

            string? resourceType,

            string? status,

            string? vpcId)
        {
            Acls = acls;
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
            NetworkAclName = networkAclName;
            OutputFile = outputFile;
            ResourceId = resourceId;
            ResourceType = resourceType;
            Status = status;
            VpcId = vpcId;
        }
    }
}
