Show / Hide Table of Contents

Class Queue

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var queue = new Aws.Sqs.Queue("queue", new Aws.Sqs.QueueArgs
    {
        DelaySeconds = 90,
        MaxMessageSize = 2048,
        MessageRetentionSeconds = 86400,
        ReceiveWaitTimeSeconds = 10,
        RedrivePolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            { "deadLetterTargetArn", aws_sqs_queue.Queue_deadletter.Arn },
            { "maxReceiveCount", 4 },
        }),
        Tags = 
        {
            { "Environment", "production" },
        },
    });
}

}

FIFO queue

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var queue = new Aws.Sqs.Queue("queue", new Aws.Sqs.QueueArgs
    {
        ContentBasedDeduplication = true,
        FifoQueue = true,
    });
}

}

Server-side encryption (SSE)

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var queue = new Aws.Sqs.Queue("queue", new Aws.Sqs.QueueArgs
    {
        KmsDataKeyReusePeriodSeconds = 300,
        KmsMasterKeyId = "alias/aws/sqs",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Queue
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Sqs
Assembly: Pulumi.Aws.dll
Syntax
public class Queue : CustomResource

Constructors

View Source

Queue(String, QueueArgs, CustomResourceOptions)

Create a Queue resource with the given unique name, arguments, and options.

Declaration
public Queue(string name, QueueArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

QueueArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The ARN of the SQS queue

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

ContentBasedDeduplication

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

Declaration
public Output<bool?> ContentBasedDeduplication { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

DelaySeconds

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

Declaration
public Output<int?> DelaySeconds { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

FifoQueue

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

Declaration
public Output<bool?> FifoQueue { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

KmsDataKeyReusePeriodSeconds

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

Declaration
public Output<int> KmsDataKeyReusePeriodSeconds { get; }
Property Value
Type Description
Output<System.Int32>
View Source

KmsMasterKeyId

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

Declaration
public Output<string> KmsMasterKeyId { get; }
Property Value
Type Description
Output<System.String>
View Source

MaxMessageSize

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

Declaration
public Output<int?> MaxMessageSize { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

MessageRetentionSeconds

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

Declaration
public Output<int?> MessageRetentionSeconds { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Name

This is the human-readable name of the queue. If omitted, this provider will assign a random name.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

NamePrefix

Creates a unique name beginning with the specified prefix. Conflicts with name.

Declaration
public Output<string> NamePrefix { get; }
Property Value
Type Description
Output<System.String>
View Source

Policy

The JSON policy for the SQS queue.

Declaration
public Output<string> Policy { get; }
Property Value
Type Description
Output<System.String>
View Source

ReceiveWaitTimeSeconds

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

Declaration
public Output<int?> ReceiveWaitTimeSeconds { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

RedrivePolicy

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string (&quot;5&quot;).

Declaration
public Output<string> RedrivePolicy { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

A map of tags to assign to the queue.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

VisibilityTimeoutSeconds

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

Declaration
public Output<int?> VisibilityTimeoutSeconds { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>

Methods

View Source

Get(String, Input<String>, QueueState, CustomResourceOptions)

Get an existing Queue resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Queue Get(string name, Input<string> id, QueueState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

QueueState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Queue
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.