CfnQueueProps

class aws_cdk.aws_sqs.CfnQueueProps(*, content_based_deduplication=None, deduplication_scope=None, delay_seconds=None, fifo_queue=None, fifo_throughput_limit=None, kms_data_key_reuse_period_seconds=None, kms_master_key_id=None, maximum_message_size=None, message_retention_period=None, queue_name=None, receive_message_wait_time_seconds=None, redrive_allow_policy=None, redrive_policy=None, sqs_managed_sse_enabled=None, tags=None, visibility_timeout=None)

Bases: object

Properties for defining a CfnQueue.

Parameters
  • content_based_deduplication (Union[bool, IResolvable, None]) – For first-in-first-out (FIFO) queues, specifies whether to enable content-based deduplication. 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 .

  • deduplication_scope (Optional[str]) – For high throughput for FIFO queues, specifies whether message deduplication occurs at the message group or queue level. 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 .

  • delay_seconds (Union[int, float, None]) – The time in seconds for which the delivery of all messages in the queue is delayed. You can specify an integer value of 0 to 900 (15 minutes). The default value is 0 .

  • fifo_queue (Union[bool, IResolvable, None]) – If set to true, creates a FIFO queue. If you don’t specify this property, Amazon SQS creates a standard queue. For more information, see FIFO queues in the Amazon SQS Developer Guide .

  • fifo_throughput_limit (Optional[str]) –

    For high throughput for FIFO queues, specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. 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 .

  • kms_data_key_reuse_period_seconds (Union[int, 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. The value must be an integer between 60 (1 minute) and 86,400 (24 hours). The default is 300 (5 minutes). .. epigraph:: A shorter time period provides better security, but results in more calls to AWS KMS , which might incur charges after Free Tier. For more information, see Encryption at rest in the Amazon SQS Developer Guide .

  • kms_master_key_id (Optional[str]) –

    The ID of an AWS managed customer master key (CMK) for Amazon SQS or a custom CMK. To use the AWS managed CMK for Amazon SQS , specify the (default) alias alias/aws/sqs . For more information, see the following: - Encryption at rest in the Amazon SQS Developer Guide - CreateQueue in the Amazon SQS API Reference - The Customer Master Keys section of the AWS Key Management Service Best Practices whitepaper

  • maximum_message_size (Union[int, float, None]) – The limit of how many bytes that a message can contain before Amazon SQS rejects it. You can specify an integer value from 1,024 bytes (1 KiB) to 262,144 bytes (256 KiB). The default value is 262,144 (256 KiB).

  • message_retention_period (Union[int, float, None]) – The number of seconds that Amazon SQS retains a message. 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).

  • queue_name (Optional[str]) –

    A name for the queue. To create a FIFO queue, the name of your FIFO queue must end with the .fifo suffix. For more information, see FIFO queues in the Amazon SQS Developer Guide . If you don’t specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the queue name. For more information, see Name type in the AWS CloudFormation User Guide . .. epigraph:: 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.

  • receive_message_wait_time_seconds (Union[int, float, None]) – Specifies the duration, in seconds, that the ReceiveMessage action call waits until a message is in the queue in order to include it in the response, rather than returning an empty response if a message isn’t yet available. 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 .

  • redrive_allow_policy (Optional[Any]) – The string that includes the parameters for the permissions for the dead-letter queue redrive permission and which source queues can specify dead-letter queues as a JSON object. 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 the sourceQueueArns parameter 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 the redrivePermission parameter is set to byQueue . You can specify up to 10 source queue ARNs. To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission parameter to allowAll .

  • redrive_policy (Optional[Any]) – The string that includes the parameters for the dead-letter queue functionality of the source queue as a JSON object. 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 of maxReceiveCount is exceeded. - maxReceiveCount : The number of times a message is delivered to the source queue before being moved to the dead-letter queue. When the ReceiveCount for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves the message to the dead-letter-queue. .. epigraph:: 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*

  • sqs_managed_sse_enabled (Union[bool, IResolvable, None]) – AWS::SQS::Queue.SqsManagedSseEnabled.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The tags that you attach to this queue. For more information, see Resource tag in the AWS CloudFormation User Guide .

  • visibility_timeout (Union[int, float, None]) – The length of time during which a message will be unavailable after a message is delivered from the queue. 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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.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
)

Attributes

content_based_deduplication

For first-in-first-out (FIFO) queues, specifies whether to enable content-based deduplication.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-contentbaseddeduplication

Return type

Union[bool, IResolvable, None]

deduplication_scope

For high throughput for FIFO queues, specifies whether message deduplication occurs at the message group or queue level.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-deduplicationscope

Return type

Optional[str]

delay_seconds

The time in seconds for which the delivery of all messages in the queue is delayed.

You can specify an integer value of 0 to 900 (15 minutes). The default value is 0 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-delayseconds

Return type

Union[int, float, None]

fifo_queue

If set to true, creates a FIFO queue.

If you don’t specify this property, Amazon SQS creates a standard queue. For more information, see FIFO queues in the Amazon SQS Developer Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-fifoqueue

Return type

Union[bool, IResolvable, None]

fifo_throughput_limit

For high throughput for FIFO queues, specifies whether the FIFO queue throughput quota applies to the entire queue or per message group.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-fifothroughputlimit

Return type

Optional[str]

kms_data_key_reuse_period_seconds

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.

The value must be an integer between 60 (1 minute) and 86,400 (24 hours). The default is 300 (5 minutes). .. epigraph:

A shorter time period provides better security, but results in more calls to AWS KMS , which might incur charges after Free Tier. For more information, see `Encryption at rest <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work>`_ in the *Amazon SQS Developer Guide* .
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-kmsdatakeyreuseperiodseconds

Return type

Union[int, float, None]

kms_master_key_id

The ID of an AWS managed customer master key (CMK) for Amazon SQS or a custom CMK.

To use the AWS managed CMK for Amazon SQS , specify the (default) alias alias/aws/sqs . For more information, see the following:

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-kmsmasterkeyid

Return type

Optional[str]

maximum_message_size

The limit of how many bytes that a message can contain before Amazon SQS rejects it.

You can specify an integer value from 1,024 bytes (1 KiB) to 262,144 bytes (256 KiB). The default value is 262,144 (256 KiB).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-maximummessagesize

Return type

Union[int, float, None]

message_retention_period

The number of seconds that Amazon SQS retains a message.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-messageretentionperiod

Return type

Union[int, float, None]

queue_name

A name for the queue.

To create a FIFO queue, the name of your FIFO queue must end with the .fifo suffix. For more information, see FIFO queues in the Amazon SQS Developer Guide .

If you don’t specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the queue name. For more information, see Name type in the AWS CloudFormation User Guide . .. epigraph:

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

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-queuename

Return type

Optional[str]

receive_message_wait_time_seconds

Specifies the duration, in seconds, that the ReceiveMessage action call waits until a message is in the queue in order to include it in the response, rather than returning an empty response if a message isn’t yet available.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-receivemessagewaittimeseconds

Return type

Union[int, float, None]

redrive_allow_policy

The string that includes the parameters for the permissions for the dead-letter queue redrive permission and which source queues can specify dead-letter queues as a JSON object.

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 the sourceQueueArns parameter 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 the redrivePermission parameter is set to byQueue . You can specify up to 10 source queue ARNs. To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission parameter to allowAll .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-redriveallowpolicy

Return type

Any

redrive_policy

The string that includes the parameters for the dead-letter queue functionality of the source queue as a JSON object.

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 of maxReceiveCount is exceeded.

  • maxReceiveCount : The number of times a message is delivered to the source queue before being moved to the dead-letter queue. When the ReceiveCount for a message exceeds the maxReceiveCount for 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*

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-redrivepolicy

Return type

Any

sqs_managed_sse_enabled

AWS::SQS::Queue.SqsManagedSseEnabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-sqsmanagedsseenabled

Return type

Union[bool, IResolvable, None]

tags

The tags that you attach to this queue.

For more information, see Resource tag in the AWS CloudFormation User Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-tags

Return type

Optional[List[CfnTag]]

visibility_timeout

The length of time during which a message will be unavailable after a message is delivered from the queue.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html#cfn-sqs-queue-visibilitytimeout

Return type

Union[int, float, None]