sqs

package
v5.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetQueuesArgs added in v5.22.0

type GetQueuesArgs struct {
	// A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned. Queue URLs and names are case-sensitive.
	QueueNamePrefix *string `pulumi:"queueNamePrefix"`
}

A collection of arguments for invoking getQueues.

type GetQueuesOutputArgs added in v5.22.0

type GetQueuesOutputArgs struct {
	// A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned. Queue URLs and names are case-sensitive.
	QueueNamePrefix pulumi.StringPtrInput `pulumi:"queueNamePrefix"`
}

A collection of arguments for invoking getQueues.

func (GetQueuesOutputArgs) ElementType added in v5.22.0

func (GetQueuesOutputArgs) ElementType() reflect.Type

type GetQueuesResult added in v5.22.0

type GetQueuesResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id              string  `pulumi:"id"`
	QueueNamePrefix *string `pulumi:"queueNamePrefix"`
	// A list of queue URLs.
	QueueUrls []string `pulumi:"queueUrls"`
}

A collection of values returned by getQueues.

func GetQueues added in v5.22.0

func GetQueues(ctx *pulumi.Context, args *GetQueuesArgs, opts ...pulumi.InvokeOption) (*GetQueuesResult, error)

Data source for managing an AWS SQS (Simple Queue) Queues.

## Example Usage ### Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.GetQueues(ctx, &sqs.GetQueuesArgs{
			QueueNamePrefix: pulumi.StringRef("example"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetQueuesResultOutput added in v5.22.0

type GetQueuesResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getQueues.

func GetQueuesOutput added in v5.22.0

func GetQueuesOutput(ctx *pulumi.Context, args GetQueuesOutputArgs, opts ...pulumi.InvokeOption) GetQueuesResultOutput

func (GetQueuesResultOutput) ElementType added in v5.22.0

func (GetQueuesResultOutput) ElementType() reflect.Type

func (GetQueuesResultOutput) Id added in v5.22.0

The provider-assigned unique ID for this managed resource.

func (GetQueuesResultOutput) QueueNamePrefix added in v5.22.0

func (o GetQueuesResultOutput) QueueNamePrefix() pulumi.StringPtrOutput

func (GetQueuesResultOutput) QueueUrls added in v5.22.0

A list of queue URLs.

func (GetQueuesResultOutput) ToGetQueuesResultOutput added in v5.22.0

func (o GetQueuesResultOutput) ToGetQueuesResultOutput() GetQueuesResultOutput

func (GetQueuesResultOutput) ToGetQueuesResultOutputWithContext added in v5.22.0

func (o GetQueuesResultOutput) ToGetQueuesResultOutputWithContext(ctx context.Context) GetQueuesResultOutput

type LookupQueueArgs

type LookupQueueArgs struct {
	// Name of the queue to match.
	Name string `pulumi:"name"`
	// Map of tags for the resource.
	Tags map[string]string `pulumi:"tags"`
}

A collection of arguments for invoking getQueue.

type LookupQueueOutputArgs

type LookupQueueOutputArgs struct {
	// Name of the queue to match.
	Name pulumi.StringInput `pulumi:"name"`
	// Map of tags for the resource.
	Tags pulumi.StringMapInput `pulumi:"tags"`
}

A collection of arguments for invoking getQueue.

func (LookupQueueOutputArgs) ElementType

func (LookupQueueOutputArgs) ElementType() reflect.Type

type LookupQueueResult

type LookupQueueResult struct {
	// ARN of the queue.
	Arn string `pulumi:"arn"`
	// The provider-assigned unique ID for this managed resource.
	Id   string `pulumi:"id"`
	Name string `pulumi:"name"`
	// Map of tags for the resource.
	Tags map[string]string `pulumi:"tags"`
	// URL of the queue.
	Url string `pulumi:"url"`
}

A collection of values returned by getQueue.

func LookupQueue

func LookupQueue(ctx *pulumi.Context, args *LookupQueueArgs, opts ...pulumi.InvokeOption) (*LookupQueueResult, error)

Use this data source to get the ARN and URL of queue in AWS Simple Queue Service (SQS). By using this data source, you can reference SQS queues without having to hardcode the ARNs as input.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.LookupQueue(ctx, &sqs.LookupQueueArgs{
			Name: "queue",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type LookupQueueResultOutput

type LookupQueueResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getQueue.

func (LookupQueueResultOutput) Arn

ARN of the queue.

func (LookupQueueResultOutput) ElementType

func (LookupQueueResultOutput) ElementType() reflect.Type

func (LookupQueueResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (LookupQueueResultOutput) Name

func (LookupQueueResultOutput) Tags

Map of tags for the resource.

func (LookupQueueResultOutput) ToLookupQueueResultOutput

func (o LookupQueueResultOutput) ToLookupQueueResultOutput() LookupQueueResultOutput

func (LookupQueueResultOutput) ToLookupQueueResultOutputWithContext

func (o LookupQueueResultOutput) ToLookupQueueResultOutputWithContext(ctx context.Context) LookupQueueResultOutput

func (LookupQueueResultOutput) Url

URL of the queue.

type Queue

type Queue struct {
	pulumi.CustomResourceState

	// The ARN of the SQS queue
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Enables content-based deduplication for FIFO queues. For more information, see the [related documentation](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing)
	ContentBasedDeduplication pulumi.BoolPtrOutput `pulumi:"contentBasedDeduplication"`
	// Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue` (default).
	DeduplicationScope pulumi.StringOutput `pulumi:"deduplicationScope"`
	// 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.
	DelaySeconds pulumi.IntPtrOutput `pulumi:"delaySeconds"`
	// Boolean designating a FIFO queue. If not set, it defaults to `false` making it standard.
	FifoQueue pulumi.BoolPtrOutput `pulumi:"fifoQueue"`
	// Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` (default) and `perMessageGroupId`.
	FifoThroughputLimit pulumi.StringOutput `pulumi:"fifoThroughputLimit"`
	// 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).
	KmsDataKeyReusePeriodSeconds pulumi.IntOutput `pulumi:"kmsDataKeyReusePeriodSeconds"`
	// The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see [Key Terms](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms).
	KmsMasterKeyId pulumi.StringPtrOutput `pulumi:"kmsMasterKeyId"`
	// 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).
	MaxMessageSize pulumi.IntPtrOutput `pulumi:"maxMessageSize"`
	// 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).
	MessageRetentionSeconds pulumi.IntPtrOutput `pulumi:"messageRetentionSeconds"`
	// The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the `.fifo` suffix. If omitted, this provider will assign a random, unique name. Conflicts with `namePrefix`
	Name pulumi.StringOutput `pulumi:"name"`
	// Creates a unique name beginning with the specified prefix. Conflicts with `name`
	NamePrefix pulumi.StringOutput `pulumi:"namePrefix"`
	// The JSON policy for the SQS queue.
	Policy pulumi.StringOutput `pulumi:"policy"`
	// 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.
	ReceiveWaitTimeSeconds pulumi.IntPtrOutput `pulumi:"receiveWaitTimeSeconds"`
	// The JSON policy to set up the Dead Letter Queue redrive permission, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html).
	RedriveAllowPolicy pulumi.StringOutput `pulumi:"redriveAllowPolicy"`
	// The JSON policy to set up the Dead Letter Queue, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html). **Note:** when specifying `maxReceiveCount`, you must specify it as an integer (`5`), and not a string (`"5"`).
	RedrivePolicy pulumi.StringOutput `pulumi:"redrivePolicy"`
	// Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See [Encryption at rest](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html). The provider will only perform drift detection of its value when present in a configuration.
	SqsManagedSseEnabled pulumi.BoolOutput `pulumi:"sqsManagedSseEnabled"`
	// A map of tags to assign to the queue. If configured with a provider `defaultTags` configuration block) present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
	// Same as `id`: The URL for the created Amazon SQS queue.
	Url pulumi.StringOutput `pulumi:"url"`
	// 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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html).
	VisibilityTimeoutSeconds pulumi.IntPtrOutput `pulumi:"visibilityTimeoutSeconds"`
}

## Example Usage

```go package main

import (

"encoding/json"

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"deadLetterTargetArn": aws_sqs_queue.Queue_deadletter.Arn,
			"maxReceiveCount":     4,
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			DelaySeconds:            pulumi.Int(90),
			MaxMessageSize:          pulumi.Int(2048),
			MessageRetentionSeconds: pulumi.Int(86400),
			ReceiveWaitTimeSeconds:  pulumi.Int(10),
			RedrivePolicy:           pulumi.String(json0),
			Tags: pulumi.StringMap{
				"Environment": pulumi.String("production"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## FIFO queue

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			ContentBasedDeduplication: pulumi.Bool(true),
			FifoQueue:                 pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## High-throughput FIFO queue

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			DeduplicationScope:  pulumi.String("messageGroup"),
			FifoQueue:           pulumi.Bool(true),
			FifoThroughputLimit: pulumi.String("perMessageGroupId"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Dead-letter queue

```go package main

import (

"encoding/json"

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"redrivePermission": "byQueue",
			"sourceQueueArns": []interface{}{
				aws_sqs_queue.Example_queue.Arn,
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = sqs.NewQueue(ctx, "exampleQueueDeadletter", &sqs.QueueArgs{
			RedriveAllowPolicy: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Server-side encryption (SSE)

Using [SSE-SQS](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html):

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			SqsManagedSseEnabled: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

Using [SSE-KMS](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html):

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			KmsDataKeyReusePeriodSeconds: pulumi.Int(300),
			KmsMasterKeyId:               pulumi.String("alias/aws/sqs"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

SQS Queues can be imported using the `queue url`, e.g.,

```sh

$ pulumi import aws:sqs/queue:Queue public_queue https://queue.amazonaws.com/80398EXAMPLE/MyQueue

```

func GetQueue

func GetQueue(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *QueueState, opts ...pulumi.ResourceOption) (*Queue, error)

GetQueue gets an existing Queue resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewQueue

func NewQueue(ctx *pulumi.Context,
	name string, args *QueueArgs, opts ...pulumi.ResourceOption) (*Queue, error)

NewQueue registers a new resource with the given unique name, arguments, and options.

func (*Queue) ElementType

func (*Queue) ElementType() reflect.Type

func (*Queue) ToQueueOutput

func (i *Queue) ToQueueOutput() QueueOutput

func (*Queue) ToQueueOutputWithContext

func (i *Queue) ToQueueOutputWithContext(ctx context.Context) QueueOutput

type QueueArgs

type QueueArgs struct {
	// Enables content-based deduplication for FIFO queues. For more information, see the [related documentation](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing)
	ContentBasedDeduplication pulumi.BoolPtrInput
	// Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue` (default).
	DeduplicationScope pulumi.StringPtrInput
	// 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.
	DelaySeconds pulumi.IntPtrInput
	// Boolean designating a FIFO queue. If not set, it defaults to `false` making it standard.
	FifoQueue pulumi.BoolPtrInput
	// Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` (default) and `perMessageGroupId`.
	FifoThroughputLimit pulumi.StringPtrInput
	// 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).
	KmsDataKeyReusePeriodSeconds pulumi.IntPtrInput
	// The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see [Key Terms](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms).
	KmsMasterKeyId pulumi.StringPtrInput
	// 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).
	MaxMessageSize pulumi.IntPtrInput
	// 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).
	MessageRetentionSeconds pulumi.IntPtrInput
	// The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the `.fifo` suffix. If omitted, this provider will assign a random, unique name. Conflicts with `namePrefix`
	Name pulumi.StringPtrInput
	// Creates a unique name beginning with the specified prefix. Conflicts with `name`
	NamePrefix pulumi.StringPtrInput
	// The JSON policy for the SQS queue.
	Policy pulumi.StringPtrInput
	// 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.
	ReceiveWaitTimeSeconds pulumi.IntPtrInput
	// The JSON policy to set up the Dead Letter Queue redrive permission, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html).
	RedriveAllowPolicy pulumi.StringPtrInput
	// The JSON policy to set up the Dead Letter Queue, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html). **Note:** when specifying `maxReceiveCount`, you must specify it as an integer (`5`), and not a string (`"5"`).
	RedrivePolicy pulumi.StringPtrInput
	// Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See [Encryption at rest](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html). The provider will only perform drift detection of its value when present in a configuration.
	SqsManagedSseEnabled pulumi.BoolPtrInput
	// A map of tags to assign to the queue. If configured with a provider `defaultTags` configuration block) present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
	// 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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html).
	VisibilityTimeoutSeconds pulumi.IntPtrInput
}

The set of arguments for constructing a Queue resource.

func (QueueArgs) ElementType

func (QueueArgs) ElementType() reflect.Type

type QueueArray

type QueueArray []QueueInput

func (QueueArray) ElementType

func (QueueArray) ElementType() reflect.Type

func (QueueArray) ToQueueArrayOutput

func (i QueueArray) ToQueueArrayOutput() QueueArrayOutput

func (QueueArray) ToQueueArrayOutputWithContext

func (i QueueArray) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput

type QueueArrayInput

type QueueArrayInput interface {
	pulumi.Input

	ToQueueArrayOutput() QueueArrayOutput
	ToQueueArrayOutputWithContext(context.Context) QueueArrayOutput
}

QueueArrayInput is an input type that accepts QueueArray and QueueArrayOutput values. You can construct a concrete instance of `QueueArrayInput` via:

QueueArray{ QueueArgs{...} }

type QueueArrayOutput

type QueueArrayOutput struct{ *pulumi.OutputState }

func (QueueArrayOutput) ElementType

func (QueueArrayOutput) ElementType() reflect.Type

func (QueueArrayOutput) Index

func (QueueArrayOutput) ToQueueArrayOutput

func (o QueueArrayOutput) ToQueueArrayOutput() QueueArrayOutput

func (QueueArrayOutput) ToQueueArrayOutputWithContext

func (o QueueArrayOutput) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput

type QueueInput

type QueueInput interface {
	pulumi.Input

	ToQueueOutput() QueueOutput
	ToQueueOutputWithContext(ctx context.Context) QueueOutput
}

type QueueMap

type QueueMap map[string]QueueInput

func (QueueMap) ElementType

func (QueueMap) ElementType() reflect.Type

func (QueueMap) ToQueueMapOutput

func (i QueueMap) ToQueueMapOutput() QueueMapOutput

func (QueueMap) ToQueueMapOutputWithContext

func (i QueueMap) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput

type QueueMapInput

type QueueMapInput interface {
	pulumi.Input

	ToQueueMapOutput() QueueMapOutput
	ToQueueMapOutputWithContext(context.Context) QueueMapOutput
}

QueueMapInput is an input type that accepts QueueMap and QueueMapOutput values. You can construct a concrete instance of `QueueMapInput` via:

QueueMap{ "key": QueueArgs{...} }

type QueueMapOutput

type QueueMapOutput struct{ *pulumi.OutputState }

func (QueueMapOutput) ElementType

func (QueueMapOutput) ElementType() reflect.Type

func (QueueMapOutput) MapIndex

func (QueueMapOutput) ToQueueMapOutput

func (o QueueMapOutput) ToQueueMapOutput() QueueMapOutput

func (QueueMapOutput) ToQueueMapOutputWithContext

func (o QueueMapOutput) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput

type QueueOutput

type QueueOutput struct{ *pulumi.OutputState }

func (QueueOutput) Arn added in v5.4.0

The ARN of the SQS queue

func (QueueOutput) ContentBasedDeduplication added in v5.4.0

func (o QueueOutput) ContentBasedDeduplication() pulumi.BoolPtrOutput

Enables content-based deduplication for FIFO queues. For more information, see the [related documentation](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing)

func (QueueOutput) DeduplicationScope added in v5.4.0

func (o QueueOutput) DeduplicationScope() pulumi.StringOutput

Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue` (default).

func (QueueOutput) DelaySeconds added in v5.4.0

func (o QueueOutput) DelaySeconds() pulumi.IntPtrOutput

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.

func (QueueOutput) ElementType

func (QueueOutput) ElementType() reflect.Type

func (QueueOutput) FifoQueue added in v5.4.0

func (o QueueOutput) FifoQueue() pulumi.BoolPtrOutput

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

func (QueueOutput) FifoThroughputLimit added in v5.4.0

func (o QueueOutput) FifoThroughputLimit() pulumi.StringOutput

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` (default) and `perMessageGroupId`.

func (QueueOutput) KmsDataKeyReusePeriodSeconds added in v5.4.0

func (o QueueOutput) KmsDataKeyReusePeriodSeconds() pulumi.IntOutput

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).

func (QueueOutput) KmsMasterKeyId added in v5.4.0

func (o QueueOutput) KmsMasterKeyId() pulumi.StringPtrOutput

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see [Key Terms](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms).

func (QueueOutput) MaxMessageSize added in v5.4.0

func (o QueueOutput) MaxMessageSize() pulumi.IntPtrOutput

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).

func (QueueOutput) MessageRetentionSeconds added in v5.4.0

func (o QueueOutput) MessageRetentionSeconds() pulumi.IntPtrOutput

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).

func (QueueOutput) Name added in v5.4.0

func (o QueueOutput) Name() pulumi.StringOutput

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the `.fifo` suffix. If omitted, this provider will assign a random, unique name. Conflicts with `namePrefix`

func (QueueOutput) NamePrefix added in v5.4.0

func (o QueueOutput) NamePrefix() pulumi.StringOutput

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

func (QueueOutput) Policy added in v5.4.0

func (o QueueOutput) Policy() pulumi.StringOutput

The JSON policy for the SQS queue.

func (QueueOutput) ReceiveWaitTimeSeconds added in v5.4.0

func (o QueueOutput) ReceiveWaitTimeSeconds() pulumi.IntPtrOutput

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.

func (QueueOutput) RedriveAllowPolicy added in v5.4.0

func (o QueueOutput) RedriveAllowPolicy() pulumi.StringOutput

The JSON policy to set up the Dead Letter Queue redrive permission, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html).

func (QueueOutput) RedrivePolicy added in v5.4.0

func (o QueueOutput) RedrivePolicy() pulumi.StringOutput

The JSON policy to set up the Dead Letter Queue, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html). **Note:** when specifying `maxReceiveCount`, you must specify it as an integer (`5`), and not a string (`"5"`).

func (QueueOutput) SqsManagedSseEnabled added in v5.4.0

func (o QueueOutput) SqsManagedSseEnabled() pulumi.BoolOutput

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See [Encryption at rest](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html). The provider will only perform drift detection of its value when present in a configuration.

func (QueueOutput) Tags added in v5.4.0

A map of tags to assign to the queue. If configured with a provider `defaultTags` configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

func (QueueOutput) TagsAll added in v5.4.0

func (o QueueOutput) TagsAll() pulumi.StringMapOutput

A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.

func (QueueOutput) ToQueueOutput

func (o QueueOutput) ToQueueOutput() QueueOutput

func (QueueOutput) ToQueueOutputWithContext

func (o QueueOutput) ToQueueOutputWithContext(ctx context.Context) QueueOutput

func (QueueOutput) Url added in v5.4.0

Same as `id`: The URL for the created Amazon SQS queue.

func (QueueOutput) VisibilityTimeoutSeconds added in v5.4.0

func (o QueueOutput) VisibilityTimeoutSeconds() pulumi.IntPtrOutput

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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html).

type QueuePolicy

type QueuePolicy struct {
	pulumi.CustomResourceState

	// The JSON policy for the SQS queue.
	Policy pulumi.StringOutput `pulumi:"policy"`
	// The URL of the SQS Queue to which to attach the policy
	QueueUrl pulumi.StringOutput `pulumi:"queueUrl"`
}

Allows you to set a policy of an SQS Queue while referencing ARN of the queue within the policy.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { queue, err := sqs.NewQueue(ctx, "queue", nil) if err != nil { return err } testPolicyDocument := queue.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) { return iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{ Statements: []iam.GetPolicyDocumentStatement{ { Sid: "First", Effect: "Allow", Principals: []iam.GetPolicyDocumentStatementPrincipal{ { Type: "*", Identifiers: []string{ "*", }, }, }, Actions: []string{ "sqs:SendMessage", }, Resources: []string{ arn, }, Conditions: []iam.GetPolicyDocumentStatementCondition{ { Test: "ArnEquals", Variable: "aws:SourceArn", Values: interface{}{ aws_sns_topic.Example.Arn, }, }, }, }, }, }, nil), nil }).(iam.GetPolicyDocumentResultOutput) _, err = sqs.NewQueuePolicy(ctx, "testQueuePolicy", &sqs.QueuePolicyArgs{ QueueUrl: queue.ID(), Policy: testPolicyDocument.ApplyT(func(testPolicyDocument iam.GetPolicyDocumentResult) (*string, error) { return &testPolicyDocument.Json, nil }).(pulumi.StringPtrOutput), }) if err != nil { return err } return nil }) } ```

## Import

SQS Queue Policies can be imported using the queue URL, e.g.,

```sh

$ pulumi import aws:sqs/queuePolicy:QueuePolicy test https://queue.amazonaws.com/0123456789012/myqueue

```

func GetQueuePolicy

func GetQueuePolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *QueuePolicyState, opts ...pulumi.ResourceOption) (*QueuePolicy, error)

GetQueuePolicy gets an existing QueuePolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewQueuePolicy

func NewQueuePolicy(ctx *pulumi.Context,
	name string, args *QueuePolicyArgs, opts ...pulumi.ResourceOption) (*QueuePolicy, error)

NewQueuePolicy registers a new resource with the given unique name, arguments, and options.

func (*QueuePolicy) ElementType

func (*QueuePolicy) ElementType() reflect.Type

func (*QueuePolicy) ToQueuePolicyOutput

func (i *QueuePolicy) ToQueuePolicyOutput() QueuePolicyOutput

func (*QueuePolicy) ToQueuePolicyOutputWithContext

func (i *QueuePolicy) ToQueuePolicyOutputWithContext(ctx context.Context) QueuePolicyOutput

type QueuePolicyArgs

type QueuePolicyArgs struct {
	// The JSON policy for the SQS queue.
	Policy pulumi.Input
	// The URL of the SQS Queue to which to attach the policy
	QueueUrl pulumi.StringInput
}

The set of arguments for constructing a QueuePolicy resource.

func (QueuePolicyArgs) ElementType

func (QueuePolicyArgs) ElementType() reflect.Type

type QueuePolicyArray

type QueuePolicyArray []QueuePolicyInput

func (QueuePolicyArray) ElementType

func (QueuePolicyArray) ElementType() reflect.Type

func (QueuePolicyArray) ToQueuePolicyArrayOutput

func (i QueuePolicyArray) ToQueuePolicyArrayOutput() QueuePolicyArrayOutput

func (QueuePolicyArray) ToQueuePolicyArrayOutputWithContext

func (i QueuePolicyArray) ToQueuePolicyArrayOutputWithContext(ctx context.Context) QueuePolicyArrayOutput

type QueuePolicyArrayInput

type QueuePolicyArrayInput interface {
	pulumi.Input

	ToQueuePolicyArrayOutput() QueuePolicyArrayOutput
	ToQueuePolicyArrayOutputWithContext(context.Context) QueuePolicyArrayOutput
}

QueuePolicyArrayInput is an input type that accepts QueuePolicyArray and QueuePolicyArrayOutput values. You can construct a concrete instance of `QueuePolicyArrayInput` via:

QueuePolicyArray{ QueuePolicyArgs{...} }

type QueuePolicyArrayOutput

type QueuePolicyArrayOutput struct{ *pulumi.OutputState }

func (QueuePolicyArrayOutput) ElementType

func (QueuePolicyArrayOutput) ElementType() reflect.Type

func (QueuePolicyArrayOutput) Index

func (QueuePolicyArrayOutput) ToQueuePolicyArrayOutput

func (o QueuePolicyArrayOutput) ToQueuePolicyArrayOutput() QueuePolicyArrayOutput

func (QueuePolicyArrayOutput) ToQueuePolicyArrayOutputWithContext

func (o QueuePolicyArrayOutput) ToQueuePolicyArrayOutputWithContext(ctx context.Context) QueuePolicyArrayOutput

type QueuePolicyInput

type QueuePolicyInput interface {
	pulumi.Input

	ToQueuePolicyOutput() QueuePolicyOutput
	ToQueuePolicyOutputWithContext(ctx context.Context) QueuePolicyOutput
}

type QueuePolicyMap

type QueuePolicyMap map[string]QueuePolicyInput

func (QueuePolicyMap) ElementType

func (QueuePolicyMap) ElementType() reflect.Type

func (QueuePolicyMap) ToQueuePolicyMapOutput

func (i QueuePolicyMap) ToQueuePolicyMapOutput() QueuePolicyMapOutput

func (QueuePolicyMap) ToQueuePolicyMapOutputWithContext

func (i QueuePolicyMap) ToQueuePolicyMapOutputWithContext(ctx context.Context) QueuePolicyMapOutput

type QueuePolicyMapInput

type QueuePolicyMapInput interface {
	pulumi.Input

	ToQueuePolicyMapOutput() QueuePolicyMapOutput
	ToQueuePolicyMapOutputWithContext(context.Context) QueuePolicyMapOutput
}

QueuePolicyMapInput is an input type that accepts QueuePolicyMap and QueuePolicyMapOutput values. You can construct a concrete instance of `QueuePolicyMapInput` via:

QueuePolicyMap{ "key": QueuePolicyArgs{...} }

type QueuePolicyMapOutput

type QueuePolicyMapOutput struct{ *pulumi.OutputState }

func (QueuePolicyMapOutput) ElementType

func (QueuePolicyMapOutput) ElementType() reflect.Type

func (QueuePolicyMapOutput) MapIndex

func (QueuePolicyMapOutput) ToQueuePolicyMapOutput

func (o QueuePolicyMapOutput) ToQueuePolicyMapOutput() QueuePolicyMapOutput

func (QueuePolicyMapOutput) ToQueuePolicyMapOutputWithContext

func (o QueuePolicyMapOutput) ToQueuePolicyMapOutputWithContext(ctx context.Context) QueuePolicyMapOutput

type QueuePolicyOutput

type QueuePolicyOutput struct{ *pulumi.OutputState }

func (QueuePolicyOutput) ElementType

func (QueuePolicyOutput) ElementType() reflect.Type

func (QueuePolicyOutput) Policy added in v5.4.0

The JSON policy for the SQS queue.

func (QueuePolicyOutput) QueueUrl added in v5.4.0

func (o QueuePolicyOutput) QueueUrl() pulumi.StringOutput

The URL of the SQS Queue to which to attach the policy

func (QueuePolicyOutput) ToQueuePolicyOutput

func (o QueuePolicyOutput) ToQueuePolicyOutput() QueuePolicyOutput

func (QueuePolicyOutput) ToQueuePolicyOutputWithContext

func (o QueuePolicyOutput) ToQueuePolicyOutputWithContext(ctx context.Context) QueuePolicyOutput

type QueuePolicyState

type QueuePolicyState struct {
	// The JSON policy for the SQS queue.
	Policy pulumi.Input
	// The URL of the SQS Queue to which to attach the policy
	QueueUrl pulumi.StringPtrInput
}

func (QueuePolicyState) ElementType

func (QueuePolicyState) ElementType() reflect.Type

type QueueState

type QueueState struct {
	// The ARN of the SQS queue
	Arn pulumi.StringPtrInput
	// Enables content-based deduplication for FIFO queues. For more information, see the [related documentation](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing)
	ContentBasedDeduplication pulumi.BoolPtrInput
	// Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue` (default).
	DeduplicationScope pulumi.StringPtrInput
	// 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.
	DelaySeconds pulumi.IntPtrInput
	// Boolean designating a FIFO queue. If not set, it defaults to `false` making it standard.
	FifoQueue pulumi.BoolPtrInput
	// Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` (default) and `perMessageGroupId`.
	FifoThroughputLimit pulumi.StringPtrInput
	// 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).
	KmsDataKeyReusePeriodSeconds pulumi.IntPtrInput
	// The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see [Key Terms](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms).
	KmsMasterKeyId pulumi.StringPtrInput
	// 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).
	MaxMessageSize pulumi.IntPtrInput
	// 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).
	MessageRetentionSeconds pulumi.IntPtrInput
	// The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the `.fifo` suffix. If omitted, this provider will assign a random, unique name. Conflicts with `namePrefix`
	Name pulumi.StringPtrInput
	// Creates a unique name beginning with the specified prefix. Conflicts with `name`
	NamePrefix pulumi.StringPtrInput
	// The JSON policy for the SQS queue.
	Policy pulumi.StringPtrInput
	// 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.
	ReceiveWaitTimeSeconds pulumi.IntPtrInput
	// The JSON policy to set up the Dead Letter Queue redrive permission, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html).
	RedriveAllowPolicy pulumi.StringPtrInput
	// The JSON policy to set up the Dead Letter Queue, see [AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html). **Note:** when specifying `maxReceiveCount`, you must specify it as an integer (`5`), and not a string (`"5"`).
	RedrivePolicy pulumi.StringPtrInput
	// Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See [Encryption at rest](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html). The provider will only perform drift detection of its value when present in a configuration.
	SqsManagedSseEnabled pulumi.BoolPtrInput
	// A map of tags to assign to the queue. If configured with a provider `defaultTags` configuration block) present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	TagsAll pulumi.StringMapInput
	// Same as `id`: The URL for the created Amazon SQS queue.
	Url pulumi.StringPtrInput
	// 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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html).
	VisibilityTimeoutSeconds pulumi.IntPtrInput
}

func (QueueState) ElementType

func (QueueState) ElementType() reflect.Type

type RedriveAllowPolicy added in v5.15.0

type RedriveAllowPolicy struct {
	pulumi.CustomResourceState

	// The URL of the SQS Queue to which to attach the policy
	QueueUrl pulumi.StringOutput `pulumi:"queueUrl"`
	// The JSON redrive allow policy for the SQS queue. Learn more in the [Amazon SQS dead-letter queues documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).
	RedriveAllowPolicy pulumi.StringOutput `pulumi:"redriveAllowPolicy"`
}

Provides a SQS Queue Redrive Allow Policy resource.

## Example Usage

```go package main

import (

"encoding/json"

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleQueue, err := sqs.NewQueue(ctx, "exampleQueue", nil)
		if err != nil {
			return err
		}
		src, err := sqs.NewQueue(ctx, "src", &sqs.QueueArgs{
			RedrivePolicy: exampleQueue.Arn.ApplyT(func(arn string) (pulumi.String, error) {
				var _zero pulumi.String
				tmpJSON0, err := json.Marshal(map[string]interface{}{
					"deadLetterTargetArn": arn,
					"maxReceiveCount":     4,
				})
				if err != nil {
					return _zero, err
				}
				json0 := string(tmpJSON0)
				return pulumi.String(json0), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		_, err = sqs.NewRedriveAllowPolicy(ctx, "exampleRedriveAllowPolicy", &sqs.RedriveAllowPolicyArgs{
			QueueUrl: exampleQueue.ID(),
			RedriveAllowPolicy: src.Arn.ApplyT(func(arn string) (pulumi.String, error) {
				var _zero pulumi.String
				tmpJSON1, err := json.Marshal(map[string]interface{}{
					"redrivePermission": "byQueue",
					"sourceQueueArns": []string{
						arn,
					},
				})
				if err != nil {
					return _zero, err
				}
				json1 := string(tmpJSON1)
				return pulumi.String(json1), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

SQS Queue Redrive Allow Policies can be imported using the queue URL, e.g.,

```sh

$ pulumi import aws:sqs/redriveAllowPolicy:RedriveAllowPolicy test https://queue.amazonaws.com/0123456789012/myqueue

```

func GetRedriveAllowPolicy added in v5.15.0

func GetRedriveAllowPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RedriveAllowPolicyState, opts ...pulumi.ResourceOption) (*RedriveAllowPolicy, error)

GetRedriveAllowPolicy gets an existing RedriveAllowPolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewRedriveAllowPolicy added in v5.15.0

func NewRedriveAllowPolicy(ctx *pulumi.Context,
	name string, args *RedriveAllowPolicyArgs, opts ...pulumi.ResourceOption) (*RedriveAllowPolicy, error)

NewRedriveAllowPolicy registers a new resource with the given unique name, arguments, and options.

func (*RedriveAllowPolicy) ElementType added in v5.15.0

func (*RedriveAllowPolicy) ElementType() reflect.Type

func (*RedriveAllowPolicy) ToRedriveAllowPolicyOutput added in v5.15.0

func (i *RedriveAllowPolicy) ToRedriveAllowPolicyOutput() RedriveAllowPolicyOutput

func (*RedriveAllowPolicy) ToRedriveAllowPolicyOutputWithContext added in v5.15.0

func (i *RedriveAllowPolicy) ToRedriveAllowPolicyOutputWithContext(ctx context.Context) RedriveAllowPolicyOutput

type RedriveAllowPolicyArgs added in v5.15.0

type RedriveAllowPolicyArgs struct {
	// The URL of the SQS Queue to which to attach the policy
	QueueUrl pulumi.StringInput
	// The JSON redrive allow policy for the SQS queue. Learn more in the [Amazon SQS dead-letter queues documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).
	RedriveAllowPolicy pulumi.StringInput
}

The set of arguments for constructing a RedriveAllowPolicy resource.

func (RedriveAllowPolicyArgs) ElementType added in v5.15.0

func (RedriveAllowPolicyArgs) ElementType() reflect.Type

type RedriveAllowPolicyArray added in v5.15.0

type RedriveAllowPolicyArray []RedriveAllowPolicyInput

func (RedriveAllowPolicyArray) ElementType added in v5.15.0

func (RedriveAllowPolicyArray) ElementType() reflect.Type

func (RedriveAllowPolicyArray) ToRedriveAllowPolicyArrayOutput added in v5.15.0

func (i RedriveAllowPolicyArray) ToRedriveAllowPolicyArrayOutput() RedriveAllowPolicyArrayOutput

func (RedriveAllowPolicyArray) ToRedriveAllowPolicyArrayOutputWithContext added in v5.15.0

func (i RedriveAllowPolicyArray) ToRedriveAllowPolicyArrayOutputWithContext(ctx context.Context) RedriveAllowPolicyArrayOutput

type RedriveAllowPolicyArrayInput added in v5.15.0

type RedriveAllowPolicyArrayInput interface {
	pulumi.Input

	ToRedriveAllowPolicyArrayOutput() RedriveAllowPolicyArrayOutput
	ToRedriveAllowPolicyArrayOutputWithContext(context.Context) RedriveAllowPolicyArrayOutput
}

RedriveAllowPolicyArrayInput is an input type that accepts RedriveAllowPolicyArray and RedriveAllowPolicyArrayOutput values. You can construct a concrete instance of `RedriveAllowPolicyArrayInput` via:

RedriveAllowPolicyArray{ RedriveAllowPolicyArgs{...} }

type RedriveAllowPolicyArrayOutput added in v5.15.0

type RedriveAllowPolicyArrayOutput struct{ *pulumi.OutputState }

func (RedriveAllowPolicyArrayOutput) ElementType added in v5.15.0

func (RedriveAllowPolicyArrayOutput) Index added in v5.15.0

func (RedriveAllowPolicyArrayOutput) ToRedriveAllowPolicyArrayOutput added in v5.15.0

func (o RedriveAllowPolicyArrayOutput) ToRedriveAllowPolicyArrayOutput() RedriveAllowPolicyArrayOutput

func (RedriveAllowPolicyArrayOutput) ToRedriveAllowPolicyArrayOutputWithContext added in v5.15.0

func (o RedriveAllowPolicyArrayOutput) ToRedriveAllowPolicyArrayOutputWithContext(ctx context.Context) RedriveAllowPolicyArrayOutput

type RedriveAllowPolicyInput added in v5.15.0

type RedriveAllowPolicyInput interface {
	pulumi.Input

	ToRedriveAllowPolicyOutput() RedriveAllowPolicyOutput
	ToRedriveAllowPolicyOutputWithContext(ctx context.Context) RedriveAllowPolicyOutput
}

type RedriveAllowPolicyMap added in v5.15.0

type RedriveAllowPolicyMap map[string]RedriveAllowPolicyInput

func (RedriveAllowPolicyMap) ElementType added in v5.15.0

func (RedriveAllowPolicyMap) ElementType() reflect.Type

func (RedriveAllowPolicyMap) ToRedriveAllowPolicyMapOutput added in v5.15.0

func (i RedriveAllowPolicyMap) ToRedriveAllowPolicyMapOutput() RedriveAllowPolicyMapOutput

func (RedriveAllowPolicyMap) ToRedriveAllowPolicyMapOutputWithContext added in v5.15.0

func (i RedriveAllowPolicyMap) ToRedriveAllowPolicyMapOutputWithContext(ctx context.Context) RedriveAllowPolicyMapOutput

type RedriveAllowPolicyMapInput added in v5.15.0

type RedriveAllowPolicyMapInput interface {
	pulumi.Input

	ToRedriveAllowPolicyMapOutput() RedriveAllowPolicyMapOutput
	ToRedriveAllowPolicyMapOutputWithContext(context.Context) RedriveAllowPolicyMapOutput
}

RedriveAllowPolicyMapInput is an input type that accepts RedriveAllowPolicyMap and RedriveAllowPolicyMapOutput values. You can construct a concrete instance of `RedriveAllowPolicyMapInput` via:

RedriveAllowPolicyMap{ "key": RedriveAllowPolicyArgs{...} }

type RedriveAllowPolicyMapOutput added in v5.15.0

type RedriveAllowPolicyMapOutput struct{ *pulumi.OutputState }

func (RedriveAllowPolicyMapOutput) ElementType added in v5.15.0

func (RedriveAllowPolicyMapOutput) MapIndex added in v5.15.0

func (RedriveAllowPolicyMapOutput) ToRedriveAllowPolicyMapOutput added in v5.15.0

func (o RedriveAllowPolicyMapOutput) ToRedriveAllowPolicyMapOutput() RedriveAllowPolicyMapOutput

func (RedriveAllowPolicyMapOutput) ToRedriveAllowPolicyMapOutputWithContext added in v5.15.0

func (o RedriveAllowPolicyMapOutput) ToRedriveAllowPolicyMapOutputWithContext(ctx context.Context) RedriveAllowPolicyMapOutput

type RedriveAllowPolicyOutput added in v5.15.0

type RedriveAllowPolicyOutput struct{ *pulumi.OutputState }

func (RedriveAllowPolicyOutput) ElementType added in v5.15.0

func (RedriveAllowPolicyOutput) ElementType() reflect.Type

func (RedriveAllowPolicyOutput) QueueUrl added in v5.15.0

The URL of the SQS Queue to which to attach the policy

func (RedriveAllowPolicyOutput) RedriveAllowPolicy added in v5.15.0

func (o RedriveAllowPolicyOutput) RedriveAllowPolicy() pulumi.StringOutput

The JSON redrive allow policy for the SQS queue. Learn more in the [Amazon SQS dead-letter queues documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).

func (RedriveAllowPolicyOutput) ToRedriveAllowPolicyOutput added in v5.15.0

func (o RedriveAllowPolicyOutput) ToRedriveAllowPolicyOutput() RedriveAllowPolicyOutput

func (RedriveAllowPolicyOutput) ToRedriveAllowPolicyOutputWithContext added in v5.15.0

func (o RedriveAllowPolicyOutput) ToRedriveAllowPolicyOutputWithContext(ctx context.Context) RedriveAllowPolicyOutput

type RedriveAllowPolicyState added in v5.15.0

type RedriveAllowPolicyState struct {
	// The URL of the SQS Queue to which to attach the policy
	QueueUrl pulumi.StringPtrInput
	// The JSON redrive allow policy for the SQS queue. Learn more in the [Amazon SQS dead-letter queues documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).
	RedriveAllowPolicy pulumi.StringPtrInput
}

func (RedriveAllowPolicyState) ElementType added in v5.15.0

func (RedriveAllowPolicyState) ElementType() reflect.Type

type RedrivePolicy added in v5.15.0

type RedrivePolicy struct {
	pulumi.CustomResourceState

	// The URL of the SQS Queue to which to attach the policy
	QueueUrl pulumi.StringOutput `pulumi:"queueUrl"`
	// The JSON redrive policy for the SQS queue. Accepts two key/val pairs: `deadLetterTargetArn` and `maxReceiveCount`. Learn more in the [Amazon SQS dead-letter queues documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).
	RedrivePolicy pulumi.StringOutput `pulumi:"redrivePolicy"`
}

Allows you to set a redrive policy of an SQS Queue while referencing ARN of the dead letter queue inside the redrive policy.

This is useful when you want to set a dedicated dead letter queue for a standard or FIFO queue, but need the dead letter queue to exist before setting the redrive policy.

## Example Usage

```go package main

import (

"encoding/json"

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		queue, err := sqs.NewQueue(ctx, "queue", nil)
		if err != nil {
			return err
		}
		ddl, err := sqs.NewQueue(ctx, "ddl", &sqs.QueueArgs{
			RedriveAllowPolicy: queue.Arn.ApplyT(func(arn string) (pulumi.String, error) {
				var _zero pulumi.String
				tmpJSON0, err := json.Marshal(map[string]interface{}{
					"redrivePermission": "byQueue",
					"sourceQueueArns": []string{
						arn,
					},
				})
				if err != nil {
					return _zero, err
				}
				json0 := string(tmpJSON0)
				return pulumi.String(json0), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		_, err = sqs.NewRedrivePolicy(ctx, "redrivePolicy", &sqs.RedrivePolicyArgs{
			QueueUrl: queue.ID(),
			RedrivePolicy: ddl.Arn.ApplyT(func(arn string) (pulumi.String, error) {
				var _zero pulumi.String
				tmpJSON1, err := json.Marshal(map[string]interface{}{
					"deadLetterTargetArn": arn,
					"maxReceiveCount":     4,
				})
				if err != nil {
					return _zero, err
				}
				json1 := string(tmpJSON1)
				return pulumi.String(json1), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

SQS Queue Redrive Policies can be imported using the queue URL, e.g.,

```sh

$ pulumi import aws:sqs/redrivePolicy:RedrivePolicy test https://queue.amazonaws.com/0123456789012/myqueue

```

func GetRedrivePolicy added in v5.15.0

func GetRedrivePolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RedrivePolicyState, opts ...pulumi.ResourceOption) (*RedrivePolicy, error)

GetRedrivePolicy gets an existing RedrivePolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewRedrivePolicy added in v5.15.0

func NewRedrivePolicy(ctx *pulumi.Context,
	name string, args *RedrivePolicyArgs, opts ...pulumi.ResourceOption) (*RedrivePolicy, error)

NewRedrivePolicy registers a new resource with the given unique name, arguments, and options.

func (*RedrivePolicy) ElementType added in v5.15.0

func (*RedrivePolicy) ElementType() reflect.Type

func (*RedrivePolicy) ToRedrivePolicyOutput added in v5.15.0

func (i *RedrivePolicy) ToRedrivePolicyOutput() RedrivePolicyOutput

func (*RedrivePolicy) ToRedrivePolicyOutputWithContext added in v5.15.0

func (i *RedrivePolicy) ToRedrivePolicyOutputWithContext(ctx context.Context) RedrivePolicyOutput

type RedrivePolicyArgs added in v5.15.0

type RedrivePolicyArgs struct {
	// The URL of the SQS Queue to which to attach the policy
	QueueUrl pulumi.StringInput
	// The JSON redrive policy for the SQS queue. Accepts two key/val pairs: `deadLetterTargetArn` and `maxReceiveCount`. Learn more in the [Amazon SQS dead-letter queues documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).
	RedrivePolicy pulumi.StringInput
}

The set of arguments for constructing a RedrivePolicy resource.

func (RedrivePolicyArgs) ElementType added in v5.15.0

func (RedrivePolicyArgs) ElementType() reflect.Type

type RedrivePolicyArray added in v5.15.0

type RedrivePolicyArray []RedrivePolicyInput

func (RedrivePolicyArray) ElementType added in v5.15.0

func (RedrivePolicyArray) ElementType() reflect.Type

func (RedrivePolicyArray) ToRedrivePolicyArrayOutput added in v5.15.0

func (i RedrivePolicyArray) ToRedrivePolicyArrayOutput() RedrivePolicyArrayOutput

func (RedrivePolicyArray) ToRedrivePolicyArrayOutputWithContext added in v5.15.0

func (i RedrivePolicyArray) ToRedrivePolicyArrayOutputWithContext(ctx context.Context) RedrivePolicyArrayOutput

type RedrivePolicyArrayInput added in v5.15.0

type RedrivePolicyArrayInput interface {
	pulumi.Input

	ToRedrivePolicyArrayOutput() RedrivePolicyArrayOutput
	ToRedrivePolicyArrayOutputWithContext(context.Context) RedrivePolicyArrayOutput
}

RedrivePolicyArrayInput is an input type that accepts RedrivePolicyArray and RedrivePolicyArrayOutput values. You can construct a concrete instance of `RedrivePolicyArrayInput` via:

RedrivePolicyArray{ RedrivePolicyArgs{...} }

type RedrivePolicyArrayOutput added in v5.15.0

type RedrivePolicyArrayOutput struct{ *pulumi.OutputState }

func (RedrivePolicyArrayOutput) ElementType added in v5.15.0

func (RedrivePolicyArrayOutput) ElementType() reflect.Type

func (RedrivePolicyArrayOutput) Index added in v5.15.0

func (RedrivePolicyArrayOutput) ToRedrivePolicyArrayOutput added in v5.15.0

func (o RedrivePolicyArrayOutput) ToRedrivePolicyArrayOutput() RedrivePolicyArrayOutput

func (RedrivePolicyArrayOutput) ToRedrivePolicyArrayOutputWithContext added in v5.15.0

func (o RedrivePolicyArrayOutput) ToRedrivePolicyArrayOutputWithContext(ctx context.Context) RedrivePolicyArrayOutput

type RedrivePolicyInput added in v5.15.0

type RedrivePolicyInput interface {
	pulumi.Input

	ToRedrivePolicyOutput() RedrivePolicyOutput
	ToRedrivePolicyOutputWithContext(ctx context.Context) RedrivePolicyOutput
}

type RedrivePolicyMap added in v5.15.0

type RedrivePolicyMap map[string]RedrivePolicyInput

func (RedrivePolicyMap) ElementType added in v5.15.0

func (RedrivePolicyMap) ElementType() reflect.Type

func (RedrivePolicyMap) ToRedrivePolicyMapOutput added in v5.15.0

func (i RedrivePolicyMap) ToRedrivePolicyMapOutput() RedrivePolicyMapOutput

func (RedrivePolicyMap) ToRedrivePolicyMapOutputWithContext added in v5.15.0

func (i RedrivePolicyMap) ToRedrivePolicyMapOutputWithContext(ctx context.Context) RedrivePolicyMapOutput

type RedrivePolicyMapInput added in v5.15.0

type RedrivePolicyMapInput interface {
	pulumi.Input

	ToRedrivePolicyMapOutput() RedrivePolicyMapOutput
	ToRedrivePolicyMapOutputWithContext(context.Context) RedrivePolicyMapOutput
}

RedrivePolicyMapInput is an input type that accepts RedrivePolicyMap and RedrivePolicyMapOutput values. You can construct a concrete instance of `RedrivePolicyMapInput` via:

RedrivePolicyMap{ "key": RedrivePolicyArgs{...} }

type RedrivePolicyMapOutput added in v5.15.0

type RedrivePolicyMapOutput struct{ *pulumi.OutputState }

func (RedrivePolicyMapOutput) ElementType added in v5.15.0

func (RedrivePolicyMapOutput) ElementType() reflect.Type

func (RedrivePolicyMapOutput) MapIndex added in v5.15.0

func (RedrivePolicyMapOutput) ToRedrivePolicyMapOutput added in v5.15.0

func (o RedrivePolicyMapOutput) ToRedrivePolicyMapOutput() RedrivePolicyMapOutput

func (RedrivePolicyMapOutput) ToRedrivePolicyMapOutputWithContext added in v5.15.0

func (o RedrivePolicyMapOutput) ToRedrivePolicyMapOutputWithContext(ctx context.Context) RedrivePolicyMapOutput

type RedrivePolicyOutput added in v5.15.0

type RedrivePolicyOutput struct{ *pulumi.OutputState }

func (RedrivePolicyOutput) ElementType added in v5.15.0

func (RedrivePolicyOutput) ElementType() reflect.Type

func (RedrivePolicyOutput) QueueUrl added in v5.15.0

The URL of the SQS Queue to which to attach the policy

func (RedrivePolicyOutput) RedrivePolicy added in v5.15.0

func (o RedrivePolicyOutput) RedrivePolicy() pulumi.StringOutput

The JSON redrive policy for the SQS queue. Accepts two key/val pairs: `deadLetterTargetArn` and `maxReceiveCount`. Learn more in the [Amazon SQS dead-letter queues documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).

func (RedrivePolicyOutput) ToRedrivePolicyOutput added in v5.15.0

func (o RedrivePolicyOutput) ToRedrivePolicyOutput() RedrivePolicyOutput

func (RedrivePolicyOutput) ToRedrivePolicyOutputWithContext added in v5.15.0

func (o RedrivePolicyOutput) ToRedrivePolicyOutputWithContext(ctx context.Context) RedrivePolicyOutput

type RedrivePolicyState added in v5.15.0

type RedrivePolicyState struct {
	// The URL of the SQS Queue to which to attach the policy
	QueueUrl pulumi.StringPtrInput
	// The JSON redrive policy for the SQS queue. Accepts two key/val pairs: `deadLetterTargetArn` and `maxReceiveCount`. Learn more in the [Amazon SQS dead-letter queues documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).
	RedrivePolicy pulumi.StringPtrInput
}

func (RedrivePolicyState) ElementType added in v5.15.0

func (RedrivePolicyState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL