// *** 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
{
    /// <summary>
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var queue = new AliCloud.Mns.Queue("queue", new()
    ///     {
    ///         DelaySeconds = 0,
    ///         MaximumMessageSize = 65536,
    ///         MessageRetentionPeriod = 345600,
    ///         PollingWaitSeconds = 0,
    ///         VisibilityTimeout = 30,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// MNS QUEUE can be imported using the id or name, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:mns/queue:Queue queue queuename
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:mns/queue:Queue")]
    public partial class Queue : global::Pulumi.CustomResource
    {
        /// <summary>
        /// This attribute defines the length of time, in seconds, after which every message sent to the queue is dequeued. Valid value range: 0-604800 seconds, i.e., 0 to 7 days. Default value to 0.
        /// </summary>
        [Output("delaySeconds")]
        public Output<int?> DelaySeconds { get; private set; } = null!;

        /// <summary>
        /// This indicates the maximum length, in bytes, of any message body sent to the queue. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.
        /// </summary>
        [Output("maximumMessageSize")]
        public Output<int?> MaximumMessageSize { get; private set; } = null!;

        /// <summary>
        /// Messages are deleted from the queue after a specified length of time, whether they have been activated or not. This attribute defines the viability period, in seconds, for every message in the queue. Valid value range: 60-604800 seconds, i.e., 1 minutes to 7 days. Default value to 345600.
        /// </summary>
        [Output("messageRetentionPeriod")]
        public Output<int?> MessageRetentionPeriod { get; private set; } = null!;

        /// <summary>
        /// Two queues on a single account in the same region cannot have the same name. A queue name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters .
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Long polling is measured in seconds. When this attribute is set to 0, long polling is disabled. When it is not set to 0, long polling is enabled and message dequeue requests will be processed only when valid messages are received or when long polling times out. Valid value range: 0-30 seconds. Default value to 0.
        /// </summary>
        [Output("pollingWaitSeconds")]
        public Output<int?> PollingWaitSeconds { get; private set; } = null!;

        /// <summary>
        /// The VisibilityTimeout attribute of the queue. A dequeued messages will change from active (visible) status to inactive (invisible) status, and this attribute defines the length of time, in seconds, that messages remain invisible. Messages return to active status after the set period. Valid value range: 1-43200 seconds, i.e., 1 seconds to 12 hours. Default value to 30.
        /// </summary>
        [Output("visibilityTimeout")]
        public Output<int?> VisibilityTimeout { get; private set; } = null!;


        /// <summary>
        /// Create a Queue resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Queue(string name, QueueArgs? args = null, CustomResourceOptions? options = null)
            : base("alicloud:mns/queue:Queue", name, args ?? new QueueArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Queue(string name, Input<string> id, QueueState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:mns/queue:Queue", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing Queue resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static Queue Get(string name, Input<string> id, QueueState? state = null, CustomResourceOptions? options = null)
        {
            return new Queue(name, id, state, options);
        }
    }

    public sealed class QueueArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// This attribute defines the length of time, in seconds, after which every message sent to the queue is dequeued. Valid value range: 0-604800 seconds, i.e., 0 to 7 days. Default value to 0.
        /// </summary>
        [Input("delaySeconds")]
        public Input<int>? DelaySeconds { get; set; }

        /// <summary>
        /// This indicates the maximum length, in bytes, of any message body sent to the queue. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.
        /// </summary>
        [Input("maximumMessageSize")]
        public Input<int>? MaximumMessageSize { get; set; }

        /// <summary>
        /// Messages are deleted from the queue after a specified length of time, whether they have been activated or not. This attribute defines the viability period, in seconds, for every message in the queue. Valid value range: 60-604800 seconds, i.e., 1 minutes to 7 days. Default value to 345600.
        /// </summary>
        [Input("messageRetentionPeriod")]
        public Input<int>? MessageRetentionPeriod { get; set; }

        /// <summary>
        /// Two queues on a single account in the same region cannot have the same name. A queue name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters .
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Long polling is measured in seconds. When this attribute is set to 0, long polling is disabled. When it is not set to 0, long polling is enabled and message dequeue requests will be processed only when valid messages are received or when long polling times out. Valid value range: 0-30 seconds. Default value to 0.
        /// </summary>
        [Input("pollingWaitSeconds")]
        public Input<int>? PollingWaitSeconds { get; set; }

        /// <summary>
        /// The VisibilityTimeout attribute of the queue. A dequeued messages will change from active (visible) status to inactive (invisible) status, and this attribute defines the length of time, in seconds, that messages remain invisible. Messages return to active status after the set period. Valid value range: 1-43200 seconds, i.e., 1 seconds to 12 hours. Default value to 30.
        /// </summary>
        [Input("visibilityTimeout")]
        public Input<int>? VisibilityTimeout { get; set; }

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

    public sealed class QueueState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// This attribute defines the length of time, in seconds, after which every message sent to the queue is dequeued. Valid value range: 0-604800 seconds, i.e., 0 to 7 days. Default value to 0.
        /// </summary>
        [Input("delaySeconds")]
        public Input<int>? DelaySeconds { get; set; }

        /// <summary>
        /// This indicates the maximum length, in bytes, of any message body sent to the queue. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.
        /// </summary>
        [Input("maximumMessageSize")]
        public Input<int>? MaximumMessageSize { get; set; }

        /// <summary>
        /// Messages are deleted from the queue after a specified length of time, whether they have been activated or not. This attribute defines the viability period, in seconds, for every message in the queue. Valid value range: 60-604800 seconds, i.e., 1 minutes to 7 days. Default value to 345600.
        /// </summary>
        [Input("messageRetentionPeriod")]
        public Input<int>? MessageRetentionPeriod { get; set; }

        /// <summary>
        /// Two queues on a single account in the same region cannot have the same name. A queue name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters .
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Long polling is measured in seconds. When this attribute is set to 0, long polling is disabled. When it is not set to 0, long polling is enabled and message dequeue requests will be processed only when valid messages are received or when long polling times out. Valid value range: 0-30 seconds. Default value to 0.
        /// </summary>
        [Input("pollingWaitSeconds")]
        public Input<int>? PollingWaitSeconds { get; set; }

        /// <summary>
        /// The VisibilityTimeout attribute of the queue. A dequeued messages will change from active (visible) status to inactive (invisible) status, and this attribute defines the length of time, in seconds, that messages remain invisible. Messages return to active status after the set period. Valid value range: 1-43200 seconds, i.e., 1 seconds to 12 hours. Default value to 30.
        /// </summary>
        [Input("visibilityTimeout")]
        public Input<int>? VisibilityTimeout { get; set; }

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