aws.sqs-queue resource¶
Description¶
Queue manages an SQS queue, standard or FIFO. The queue name and the FIFO flag are fixed at create time -- a standard queue cannot become a FIFO queue or be renamed in place -- so a change to either replaces the queue; every other attribute is reconciled in place by Update through a single SetQueueAttributes call. An omitted optional input rides as absent and SQS applies its own default for it.
Name is required, since SQS does not generate a queue name and CreateQueue rejects an empty one. It must match the SQS name rules, which depend on the queue type: a FIFO name must match ^[0-9A-Za-z_-]{1,75}.fifo$ and a standard name ^[0-9A-Za-z_-]{1,80}$. That rule is a regular-expression and byte-length check enforced in Create rather than a declarative constraint.
Source: internal/service/sqs/queue_rsrc.go:67
Example usage:
imports: {
aws: 'github.com/cloudboss/unobin-library-aws'
}
resources: {
example: aws.sqs-queue {
# Set input fields here.
}
}
Inputs¶
name
string
fifo-queue
optional(boolean)
content-based-deduplication
optional(boolean)
deduplication-scope
optional(string)
fifo-throughput-limit
optional(string)
delay-seconds
optional(integer)
maximum-message-size
optional(integer)
message-retention-period
optional(integer)
receive-message-wait-time-seconds
optional(integer)
visibility-timeout
optional(integer)
kms-master-key-id
optional(string)
kms-data-key-reuse-period-seconds
optional(integer)
sqs-managed-sse-enabled
optional(boolean)
policy
optional(string)
redrive-policy
optional(string)
redrive-allow-policy
optional(string)
tags
map(string)
Input Constraints¶
Field combinations
At most one of kms-master-key-id or sqs-managed-sse-enabled.
Content based deduplication rules
content-based-deduplication requires fifo-queue to be true.
Rule logic
- When
input.content-based-deduplication == true- Require
input.fifo-queue == true
Deduplication scope rules
deduplication-scope must be messageGroup or queue.
Rule logic
- When
input.deduplication-scope != null- Require
input.deduplication-scope == 'messageGroup'
|| input.deduplication-scope == 'queue'
Fifo throughput limit rules
fifo-throughput-limit must be perQueue or perMessageGroupId.
Rule logic
- When
input.fifo-throughput-limit != null- Require
input.fifo-throughput-limit == 'perQueue'
|| input.fifo-throughput-limit == 'perMessageGroupId'
Delay seconds rules
delay-seconds must be between 0 and 900.
Rule logic
- When
input.delay-seconds != null- Require
(input.delay-seconds == null || input.delay-seconds >= 0)
&& (input.delay-seconds == null || input.delay-seconds <= 900)
Maximum message size rules
maximum-message-size must be between 1024 and 1048576.
Rule logic
- When
input.maximum-message-size != null- Require
(input.maximum-message-size == null || input.maximum-message-size >= 1024)
&& (input.maximum-message-size == null || input.maximum-message-size <= 1048576)
Message retention period rules
message-retention-period must be between 60 and 1209600.
Rule logic
- When
input.message-retention-period != null- Require
(input.message-retention-period == null || input.message-retention-period >= 60)
&& (input.message-retention-period == null || input.message-retention-period <= 1209600)
Receive message wait time seconds rules
receive-message-wait-time-seconds must be between 0 and 20.
Rule logic
- When
input.receive-message-wait-time-seconds != null- Require
(input.receive-message-wait-time-seconds == null || input.receive-message-wait-time-seconds >= 0)
&& (input.receive-message-wait-time-seconds == null || input.receive-message-wait-time-seconds <= 20)
Visibility timeout rules
visibility-timeout must be between 0 and 43200.
Rule logic
- When
input.visibility-timeout != null- Require
(input.visibility-timeout == null || input.visibility-timeout >= 0)
&& (input.visibility-timeout == null || input.visibility-timeout <= 43200)
Kms data key reuse period seconds rules
kms-data-key-reuse-period-seconds must be between 60 and 86400.
Rule logic
- When
input.kms-data-key-reuse-period-seconds != null- Require
(input.kms-data-key-reuse-period-seconds == null || input.kms-data-key-reuse-period-seconds >= 60)
&& (input.kms-data-key-reuse-period-seconds == null || input.kms-data-key-reuse-period-seconds <= 86400)
Outputs¶
arn
string
url
string