This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
sqs¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.
- class
pulumi_aws.sqs.AwaitableGetQueueResult(arn=None, id=None, name=None, tags=None, url=None)¶
- class
pulumi_aws.sqs.GetQueueResult(arn=None, id=None, name=None, tags=None, url=None)¶ A collection of values returned by getQueue.
arn= None¶The Amazon Resource Name (ARN) of the queue.
id= None¶The provider-assigned unique ID for this managed resource.
A map of tags for the resource.
url= None¶The URL of the queue.
- class
pulumi_aws.sqs.Queue(resource_name, opts=None, content_based_deduplication=None, delay_seconds=None, fifo_queue=None, kms_data_key_reuse_period_seconds=None, kms_master_key_id=None, max_message_size=None, message_retention_seconds=None, name=None, name_prefix=None, policy=None, receive_wait_time_seconds=None, redrive_policy=None, tags=None, visibility_timeout_seconds=None, __props__=None, __name__=None, __opts__=None)¶ import pulumi import json import pulumi_aws as aws queue = aws.sqs.Queue("queue", delay_seconds=90, max_message_size=2048, message_retention_seconds=86400, receive_wait_time_seconds=10, redrive_policy=json.dumps({ "deadLetterTargetArn": aws_sqs_queue["queue_deadletter"]["arn"], "maxReceiveCount": 4, }), tags={ "Environment": "production", })
import pulumi import pulumi_aws as aws queue = aws.sqs.Queue("queue", content_based_deduplication=True, fifo_queue=True)
import pulumi import pulumi_aws as aws queue = aws.sqs.Queue("queue", kms_data_key_reuse_period_seconds=300, kms_master_key_id="alias/aws/sqs")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
content_based_deduplication (pulumi.Input[bool]) – Enables content-based deduplication for FIFO queues. For more information, see the related documentation
delay_seconds (pulumi.Input[float]) – 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.
fifo_queue (pulumi.Input[bool]) – Boolean designating a FIFO queue. If not set, it defaults to
falsemaking it standard.kms_data_key_reuse_period_seconds (pulumi.Input[float]) – 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).
kms_master_key_id (pulumi.Input[str]) – The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.
max_message_size (pulumi.Input[float]) – 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).
message_retention_seconds (pulumi.Input[float]) – 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).
name (pulumi.Input[str]) – This is the human-readable name of the queue. If omitted, this provider will assign a random name.
name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.policy (pulumi.Input[str]) – The JSON policy for the SQS queue.
receive_wait_time_seconds (pulumi.Input[float]) – 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.
redrive_policy (pulumi.Input[str]) – 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 ("5").tags (pulumi.Input[dict]) – A map of tags to assign to the queue.
visibility_timeout_seconds (pulumi.Input[float]) –
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.
arn: pulumi.Output[str] = None¶The ARN of the SQS queue
content_based_deduplication: pulumi.Output[bool] = None¶Enables content-based deduplication for FIFO queues. For more information, see the related documentation
delay_seconds: pulumi.Output[float] = None¶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.
fifo_queue: pulumi.Output[bool] = None¶Boolean designating a FIFO queue. If not set, it defaults to
falsemaking it standard.
kms_data_key_reuse_period_seconds: pulumi.Output[float] = None¶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).
kms_master_key_id: pulumi.Output[str] = None¶The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.
max_message_size: pulumi.Output[float] = None¶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).
message_retention_seconds: pulumi.Output[float] = None¶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).
name: pulumi.Output[str] = None¶This is the human-readable name of the queue. If omitted, this provider will assign a random name.
name_prefix: pulumi.Output[str] = None¶Creates a unique name beginning with the specified prefix. Conflicts with
name.
policy: pulumi.Output[str] = None¶The JSON policy for the SQS queue.
receive_wait_time_seconds: pulumi.Output[float] = None¶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.
redrive_policy: pulumi.Output[str] = None¶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 ("5").
A map of tags to assign to the queue.
visibility_timeout_seconds: pulumi.Output[float] = None¶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.
- static
get(resource_name, id, opts=None, arn=None, content_based_deduplication=None, delay_seconds=None, fifo_queue=None, kms_data_key_reuse_period_seconds=None, kms_master_key_id=None, max_message_size=None, message_retention_seconds=None, name=None, name_prefix=None, policy=None, receive_wait_time_seconds=None, redrive_policy=None, tags=None, visibility_timeout_seconds=None)¶ Get an existing Queue resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
arn (pulumi.Input[str]) – The ARN of the SQS queue
content_based_deduplication (pulumi.Input[bool]) –
Enables content-based deduplication for FIFO queues. For more information, see the related documentation
delay_seconds (pulumi.Input[float]) – 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.
fifo_queue (pulumi.Input[bool]) – Boolean designating a FIFO queue. If not set, it defaults to
falsemaking it standard.kms_data_key_reuse_period_seconds (pulumi.Input[float]) – 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).
kms_master_key_id (pulumi.Input[str]) –
The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.
max_message_size (pulumi.Input[float]) – 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).
message_retention_seconds (pulumi.Input[float]) – 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).
name (pulumi.Input[str]) – This is the human-readable name of the queue. If omitted, this provider will assign a random name.
name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.policy (pulumi.Input[str]) – The JSON policy for the SQS queue.
receive_wait_time_seconds (pulumi.Input[float]) – 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.
redrive_policy (pulumi.Input[str]) –
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 ("5").tags (pulumi.Input[dict]) – A map of tags to assign to the queue.
visibility_timeout_seconds (pulumi.Input[float]) –
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.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.sqs.QueuePolicy(resource_name, opts=None, policy=None, queue_url=None, __props__=None, __name__=None, __opts__=None)¶ Allows you to set a policy of an SQS Queue while referencing ARN of the queue within the policy.
import pulumi import pulumi_aws as aws queue = aws.sqs.Queue("queue") test = aws.sqs.QueuePolicy("test", policy=queue.arn.apply(lambda arn: f"""{{ "Version": "2012-10-17", "Id": "sqspolicy", "Statement": [ {{ "Sid": "First", "Effect": "Allow", "Principal": "*", "Action": "sqs:SendMessage", "Resource": "{arn}", "Condition": {{ "ArnEquals": {{ "aws:SourceArn": "{aws_sns_topic["example"]["arn"]}" }} }} }} ] }} """), queue_url=queue.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
policy (pulumi.Input[str]) – The JSON policy for the SQS queue.
queue_url (pulumi.Input[str]) – The URL of the SQS Queue to which to attach the policy
policy: pulumi.Output[str] = None¶The JSON policy for the SQS queue.
queue_url: pulumi.Output[str] = None¶The URL of the SQS Queue to which to attach the policy
- static
get(resource_name, id, opts=None, policy=None, queue_url=None)¶ Get an existing QueuePolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
policy (pulumi.Input[str]) – The JSON policy for the SQS queue.
queue_url (pulumi.Input[str]) – The URL of the SQS Queue to which to attach the policy
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
pulumi_aws.sqs.get_queue(name=None, tags=None, opts=None)¶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.
import pulumi import pulumi_aws as aws example = aws.sqs.get_queue(name="queue")
- Parameters
name (str) – The name of the queue to match.
tags (dict) – A map of tags for the resource.