<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.Mns
{
    public static class GetQueues
    {
        /// <summary>
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var queues = AliCloud.Mns.GetQueues.Invoke(new()
        ///     {
        ///         NamePrefix = "tf-",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstQueueId"] = queues.Apply(getQueuesResult =&gt; getQueuesResult.Queues[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetQueuesResult> InvokeAsync(GetQueuesArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetQueuesResult>("alicloud:mns/getQueues:getQueues", args ?? new GetQueuesArgs(), options.WithDefaults());

        /// <summary>
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var queues = AliCloud.Mns.GetQueues.Invoke(new()
        ///     {
        ///         NamePrefix = "tf-",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstQueueId"] = queues.Apply(getQueuesResult =&gt; getQueuesResult.Queues[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetQueuesResult> Invoke(GetQueuesInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetQueuesResult>("alicloud:mns/getQueues:getQueues", args ?? new GetQueuesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetQueuesArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// A string to filter resulting queues by their name prefixs.
        /// </summary>
        [Input("namePrefix")]
        public string? NamePrefix { get; set; }

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

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

    public sealed class GetQueuesInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// A string to filter resulting queues by their name prefixs.
        /// </summary>
        [Input("namePrefix")]
        public Input<string>? NamePrefix { get; set; }

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

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


    [OutputType]
    public sealed class GetQueuesResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? NamePrefix;
        /// <summary>
        /// A list of queue names.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        /// <summary>
        /// A list of queues. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetQueuesQueueResult> Queues;

        [OutputConstructor]
        private GetQueuesResult(
            string id,

            string? namePrefix,

            ImmutableArray<string> names,

            string? outputFile,

            ImmutableArray<Outputs.GetQueuesQueueResult> queues)
        {
            Id = id;
            NamePrefix = namePrefix;
            Names = names;
            OutputFile = outputFile;
            Queues = queues;
        }
    }
}
