aws_ddk_core.resources.SQSFactory

class aws_ddk_core.resources.SQSFactory

Class factory create and configure Simple Queue Service DDK resources, including Queues.

__init__()

Methods

__init__()

apply_secure_queue_policy(queue)

queue(scope, environment_id, id[, ...])

Create and configure SQS queue.

static queue(scope: constructs.Construct, environment_id: str, id: str, queue_name: Optional[str] = None, encryption: Optional[aws_cdk.aws_sqs.QueueEncryption] = None, removal_policy: Optional[aws_cdk.RemovalPolicy] = None, dead_letter_queue: Optional[aws_cdk.aws_sqs.DeadLetterQueue] = None, **queue_props: Any) aws_cdk.aws_sqs.IQueue

Create and configure SQS queue.

This construct allows to configure parameters of the queue using ddk.json configuration file depending on the environment_id in which the function is used. Supported parameters are: content_based_deduplication,`data_key_reuse`, delivery_delay, max_message_size_bytes, retention_period, visibility_timeout, receive_message_wait_time, and removal_policy.

Parameters
  • scope (Construct) – Scope within which this construct is defined

  • id (str) – Identifier of the queue

  • environment_id (str) – Identifier of the environment

  • queue_name (Optional[str]) – Name of the queue

  • encryption (Optional[QueueEncryption]) – Whether the contents of the queue are encrypted, and by what type of key. aws_cdk.aws_sqs.QueueEncryption.KMS_MANAGED by default.

  • removal_policy (Optional[RemovalPolicy]) – Policy to apply when the bucket is removed from this stack aws_cdk.RemovalPolicy.RETAIN by default.

  • dead_letter_queue (Optional[DeadLetterQueue]) – Send messages to this queue if they were unsuccessfully dequeued a number of times.

  • queue_props (Any) – Additional queue properties. For complete list of properties refer to CDK Documentation - SQS Queue: https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_sqs/Queue.html

Returns

queue – SQS queue

Return type

aws_cdk.aws_sqs.Queue