CfnQueueProps Struct
Properties for defining a CfnQueue.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sqs as sqs } from 'aws-cdk-lib';
declare const redriveAllowPolicy: any;
declare const redrivePolicy: any;
const cfnQueueProps: sqs.CfnQueueProps = {
contentBasedDeduplication: false,
deduplicationScope: 'deduplicationScope',
delaySeconds: 123,
fifoQueue: false,
fifoThroughputLimit: 'fifoThroughputLimit',
kmsDataKeyReusePeriodSeconds: 123,
kmsMasterKeyId: 'kmsMasterKeyId',
maximumMessageSize: 123,
messageRetentionPeriod: 123,
queueName: 'queueName',
receiveMessageWaitTimeSeconds: 123,
redriveAllowPolicy: redriveAllowPolicy,
redrivePolicy: redrivePolicy,
sqsManagedSseEnabled: false,
tags: [{
key: 'key',
value: 'value',
}],
visibilityTimeout: 123,
};
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sqs as sqs
# redrive_allow_policy: Any
# redrive_policy: Any
cfn_queue_props = sqs.CfnQueueProps(
content_based_deduplication=False,
deduplication_scope="deduplicationScope",
delay_seconds=123,
fifo_queue=False,
fifo_throughput_limit="fifoThroughputLimit",
kms_data_key_reuse_period_seconds=123,
kms_master_key_id="kmsMasterKeyId",
maximum_message_size=123,
message_retention_period=123,
queue_name="queueName",
receive_message_wait_time_seconds=123,
redrive_allow_policy=redrive_allow_policy,
redrive_policy=redrive_policy,
sqs_managed_sse_enabled=False,
tags=[CfnTag(
key="key",
value="value"
)],
visibility_timeout=123
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sqs.*;
Object redriveAllowPolicy;
Object redrivePolicy;
CfnQueueProps cfnQueueProps = CfnQueueProps.builder()
.contentBasedDeduplication(false)
.deduplicationScope("deduplicationScope")
.delaySeconds(123)
.fifoQueue(false)
.fifoThroughputLimit("fifoThroughputLimit")
.kmsDataKeyReusePeriodSeconds(123)
.kmsMasterKeyId("kmsMasterKeyId")
.maximumMessageSize(123)
.messageRetentionPeriod(123)
.queueName("queueName")
.receiveMessageWaitTimeSeconds(123)
.redriveAllowPolicy(redriveAllowPolicy)
.redrivePolicy(redrivePolicy)
.sqsManagedSseEnabled(false)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.visibilityTimeout(123)
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SQS;
var redriveAllowPolicy;
var redrivePolicy;
var cfnQueueProps = new CfnQueueProps {
ContentBasedDeduplication = false,
DeduplicationScope = "deduplicationScope",
DelaySeconds = 123,
FifoQueue = false,
FifoThroughputLimit = "fifoThroughputLimit",
KmsDataKeyReusePeriodSeconds = 123,
KmsMasterKeyId = "kmsMasterKeyId",
MaximumMessageSize = 123,
MessageRetentionPeriod = 123,
QueueName = "queueName",
ReceiveMessageWaitTimeSeconds = 123,
RedriveAllowPolicy = redriveAllowPolicy,
RedrivePolicy = redrivePolicy,
SqsManagedSseEnabled = false,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VisibilityTimeout = 123
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var redriveAllowPolicy interface{}
var redrivePolicy interface{}
cfnQueueProps := &CfnQueueProps{
ContentBasedDeduplication: jsii.Boolean(false),
DeduplicationScope: jsii.String("deduplicationScope"),
DelaySeconds: jsii.Number(123),
FifoQueue: jsii.Boolean(false),
FifoThroughputLimit: jsii.String("fifoThroughputLimit"),
KmsDataKeyReusePeriodSeconds: jsii.Number(123),
KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
MaximumMessageSize: jsii.Number(123),
MessageRetentionPeriod: jsii.Number(123),
QueueName: jsii.String("queueName"),
ReceiveMessageWaitTimeSeconds: jsii.Number(123),
RedriveAllowPolicy: redriveAllowPolicy,
RedrivePolicy: redrivePolicy,
SqsManagedSseEnabled: jsii.Boolean(false),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
VisibilityTimeout: jsii.Number(123),
}
Properties
contentBasedDeduplicationoptionalboolean | IResolvablecontent_based_deduplicationoptionaltyping.Union[bool, IResolvable]contentBasedDeduplicationoptionalBooleanContentBasedDeduplicationoptionalboolContentBasedDeduplicationoptionalinterface{} #notes
During the deduplication interval, Amazon SQS treats messages that are sent with identical content as duplicates and delivers only one copy of the message. For more information, see the ContentBasedDeduplication attribute for the [CreateQueue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html) action in the Amazon SQS API Reference .
deduplicationScopeoptionalstringdeduplication_scopeoptionalstrdeduplicationScopeoptionalStringDeduplicationScopeoptionalstringDeduplicationScopeoptional*string #notes
Valid values are messageGroup and queue .
To enable high throughput for a FIFO queue, set this attribute to messageGroup and set the FifoThroughputLimit attribute to perMessageGroupId . If you set these attributes to anything other than these values, normal throughput is in effect and deduplication occurs as specified. For more information, see High throughput for FIFO queues and Quotas related to messages in the Amazon SQS Developer Guide .
delaySecondsoptionalnumberdelay_secondsoptionalint | floatdelaySecondsoptionalNumberDelaySecondsoptionaldoubleDelaySecondsoptional*float64 #You can specify an integer value of 0 to 900 (15 minutes). The default value is 0 .
fifoQueueoptionalboolean | IResolvablefifo_queueoptionaltyping.Union[bool, IResolvable]fifoQueueoptionalBooleanFifoQueueoptionalboolFifoQueueoptionalinterface{} #notes
If you don't specify this property, Amazon SQS creates a standard queue. For more information, see Amazon SQS FIFO queues in the Amazon SQS Developer Guide .
fifoThroughputLimitoptionalstringfifo_throughput_limitoptionalstrfifoThroughputLimitoptionalStringFifoThroughputLimitoptionalstringFifoThroughputLimitoptional*string #notes
Valid values are perQueue and perMessageGroupId .
To enable high throughput for a FIFO queue, set this attribute to perMessageGroupId and set the DeduplicationScope attribute to messageGroup . If you set these attributes to anything other than these values, normal throughput is in effect and deduplication occurs as specified. For more information, see High throughput for FIFO queues and Quotas related to messages in the Amazon SQS Developer Guide .
kmsDataKeyReusePeriodSecondsoptionalnumberkms_data_key_reuse_period_secondsoptionalint | floatkmsDataKeyReusePeriodSecondsoptionalNumberKmsDataKeyReusePeriodSecondsoptionaldoubleKmsDataKeyReusePeriodSecondsoptional*float64 #notes
The value must be an integer between 60 (1 minute) and 86,400 (24 hours). The default is 300 (5 minutes).
A shorter time period provides better security, but results in more calls to AWS , which might incur charges after Free Tier. For more information, see Encryption at rest in the Amazon SQS Developer Guide .
kmsMasterKeyIdoptionalstring | IAliasRef | IKeyRefkms_master_key_idoptionaltyping.Union[str, IAliasRef, IKeyRef]kmsMasterKeyIdoptionalStringKmsMasterKeyIdoptionalstringKmsMasterKeyIdoptionalinterface{} #notes
To use the AWS managed KMS for Amazon SQS , specify a (default) alias ARN, alias name (for example alias/aws/sqs ), key ARN, or key ID. For more information, see the following:
- Encryption at rest in the Amazon SQS Developer Guide
- CreateQueue in the Amazon SQS API Reference
- Request Parameters in the AWS Key Management Service API Reference
- The Key Management Service (KMS) section of the Security best practices for AWS Key Management Service in the AWS Key Management Service Developer Guide
maximumMessageSizeoptionalnumbermaximum_message_sizeoptionalint | floatmaximumMessageSizeoptionalNumberMaximumMessageSizeoptionaldoubleMaximumMessageSizeoptional*float64 #You can specify an integer from 1,024 bytes (1 KiB) to 1,048,576 bytes (1 MiB). Default: 1,048,576 bytes (1 MiB).
messageRetentionPeriodoptionalnumbermessage_retention_periodoptionalint | floatmessageRetentionPeriodoptionalNumberMessageRetentionPeriodoptionaldoubleMessageRetentionPeriodoptional*float64 #You can specify an integer value from 60 seconds (1 minute) to 1,209,600 seconds (14 days). The default value is 345,600 seconds (4 days).
queueNameoptionalstringqueue_nameoptionalstrqueueNameoptionalStringQueueNameoptionalstringQueueNameoptional*string #notes
To create a FIFO queue, the name of your FIFO queue must end with the .fifo suffix. For more information, see Amazon SQS FIFO queues in the Amazon SQS Developer Guide .
If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the queue name. For more information, see Name type in the CloudFormation User Guide .
If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
receiveMessageWaitTimeSecondsoptionalnumberreceive_message_wait_time_secondsoptionalint | floatreceiveMessageWaitTimeSecondsoptionalNumberReceiveMessageWaitTimeSecondsoptionaldoubleReceiveMessageWaitTimeSecondsoptional*float64 #notes
You can specify an integer from 1 to 20. Short polling is used as the default or when you specify 0 for this property. For more information, see Consuming messages using long polling in the Amazon SQS Developer Guide .
redriveAllowPolicyoptionalanyredrive_allow_policyoptionalAnyredriveAllowPolicyoptionalObjectRedriveAllowPolicyoptionalobjectRedriveAllowPolicyoptionalinterface{} #notes
The parameters are as follows:
redrivePermission: The permission type that defines which source queues can specify the current queue as the dead-letter queue. Valid values are:allowAll: (Default) Any source queues in this AWS account in the same Region can specify this queue as the dead-letter queue.denyAll: No source queues can specify this queue as the dead-letter queue.byQueue: Only queues specified by thesourceQueueArnsparameter can specify this queue as the dead-letter queue.sourceQueueArns: The Amazon Resource Names (ARN)s of the source queues that can specify this queue as the dead-letter queue and redrive messages. You can specify this parameter only when theredrivePermissionparameter is set tobyQueue. You can specify up to 10 source queue ARNs. To allow more than 10 source queues to specify dead-letter queues, set theredrivePermissionparameter toallowAll.
redrivePolicyoptionalanyredrive_policyoptionalAnyredrivePolicyoptionalObjectRedrivePolicyoptionalobjectRedrivePolicyoptionalinterface{} #notes
The parameters are as follows:
deadLetterTargetArn: The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value ofmaxReceiveCountis exceeded.maxReceiveCount: The number of times a message is received by a consumer of the source queue before being moved to the dead-letter queue. When theReceiveCountfor a message exceeds themaxReceiveCountfor a queue, Amazon SQS moves the message to the dead-letter-queue.
The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the dead-letter queue of a standard queue must also be a standard queue.
JSON
{ "deadLetterTargetArn" : *String* , "maxReceiveCount" : *Integer* }
YAML
deadLetterTargetArn : *String*
maxReceiveCount : *Integer*
sqsManagedSseEnabledoptionalboolean | IResolvablesqs_managed_sse_enabledoptionaltyping.Union[bool, IResolvable]sqsManagedSseEnabledoptionalBooleanSqsManagedSseEnabledoptionalboolSqsManagedSseEnabledoptionalinterface{} #tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #For more information, see Resource tag in the CloudFormation User Guide .
visibilityTimeoutoptionalnumbervisibility_timeoutoptionalint | floatvisibilityTimeoutoptionalNumberVisibilityTimeoutoptionaldoubleVisibilityTimeoutoptional*float64 #notes
This blocks other components from receiving the same message and gives the initial component time to process and delete the message from the queue.
Values must be from 0 to 43,200 seconds (12 hours). If you don't specify a value, AWS CloudFormation uses the default value of 30 seconds.
For more information about Amazon SQS queue visibility timeouts, see Visibility timeout in the Amazon SQS Developer Guide .