// *** 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.Yandex
{
    public static class GetMessageQueue
    {
        /// <summary>
        /// Get information about a Yandex Message Queue. For more information about Yandex Message Queue, see
        /// [Yandex.Cloud Message Queue](https://cloud.yandex.com/docs/message-queue).
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Yandex = Pulumi.Yandex;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var exampleQueue = Yandex.GetMessageQueue.Invoke(new()
        ///     {
        ///         Name = "ymq_terraform_example",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetMessageQueueResult> InvokeAsync(GetMessageQueueArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetMessageQueueResult>("yandex:index/getMessageQueue:getMessageQueue", args ?? new GetMessageQueueArgs(), options.WithDefaults());

        /// <summary>
        /// Get information about a Yandex Message Queue. For more information about Yandex Message Queue, see
        /// [Yandex.Cloud Message Queue](https://cloud.yandex.com/docs/message-queue).
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Yandex = Pulumi.Yandex;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var exampleQueue = Yandex.GetMessageQueue.Invoke(new()
        ///     {
        ///         Name = "ymq_terraform_example",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetMessageQueueResult> Invoke(GetMessageQueueInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetMessageQueueResult>("yandex:index/getMessageQueue:getMessageQueue", args ?? new GetMessageQueueInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetMessageQueueArgs : global::Pulumi.InvokeArgs
    {
        [Input("accessKey")]
        public string? AccessKey { get; set; }

        /// <summary>
        /// Queue name.
        /// </summary>
        [Input("name", required: true)]
        public string Name { get; set; } = null!;

        /// <summary>
        /// The region ID where the message queue is located.
        /// </summary>
        [Input("regionId")]
        public string? RegionId { get; set; }

        [Input("secretKey")]
        private string? _secretKey;
        public string? SecretKey
        {
            get => _secretKey;
            set => _secretKey = value;
        }

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

    public sealed class GetMessageQueueInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("accessKey")]
        public Input<string>? AccessKey { get; set; }

        /// <summary>
        /// Queue name.
        /// </summary>
        [Input("name", required: true)]
        public Input<string> Name { get; set; } = null!;

        /// <summary>
        /// The region ID where the message queue is located.
        /// </summary>
        [Input("regionId")]
        public Input<string>? RegionId { get; set; }

        [Input("secretKey")]
        private Input<string>? _secretKey;
        public Input<string>? SecretKey
        {
            get => _secretKey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _secretKey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

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


    [OutputType]
    public sealed class GetMessageQueueResult
    {
        public readonly string? AccessKey;
        /// <summary>
        /// ARN of the queue. It is used for setting up a [redrive policy](https://cloud.yandex.com/docs/message-queue/concepts/dlq). See [documentation](https://cloud.yandex.com/docs/message-queue/api-ref/queue/SetQueueAttributes).
        /// </summary>
        public readonly string Arn;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string Name;
        public readonly string? RegionId;
        public readonly string? SecretKey;
        /// <summary>
        /// URL of the queue.
        /// </summary>
        public readonly string Url;

        [OutputConstructor]
        private GetMessageQueueResult(
            string? accessKey,

            string arn,

            string id,

            string name,

            string? regionId,

            string? secretKey,

            string url)
        {
            AccessKey = accessKey;
            Arn = arn;
            Id = id;
            Name = name;
            RegionId = regionId;
            SecretKey = secretKey;
            Url = url;
        }
    }
}
