Class: AWSCDK::SQS::CfnQueueProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SQS::CfnQueueProps
- Defined in:
- sqs/cfn_queue_props.rb
Overview
Properties for defining a CfnQueue.
Instance Attribute Summary collapse
-
#content_based_deduplication ⇒ Boolean, ...
readonly
For first-in-first-out (FIFO) queues, specifies whether to enable content-based deduplication.
-
#deduplication_scope ⇒ String?
readonly
For high throughput for FIFO queues, specifies whether message deduplication occurs at the message group or queue level.
-
#delay_seconds ⇒ Numeric?
readonly
The time in seconds for which the delivery of all messages in the queue is delayed.
-
#fifo_queue ⇒ Boolean, ...
readonly
If set to true, creates a FIFO queue.
-
#fifo_throughput_limit ⇒ String?
readonly
For high throughput for FIFO queues, specifies whether the FIFO queue throughput quota applies to the entire queue or per message group.
-
#kms_data_key_reuse_period_seconds ⇒ Numeric?
readonly
The length of time in seconds for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS again.
-
#kms_master_key_id ⇒ String, ...
readonly
The ID of an AWS Key Management Service (KMS) for Amazon SQS , or a custom KMS.
-
#maximum_message_size ⇒ Numeric?
readonly
The limit of how many bytes that a message can contain before Amazon SQS rejects it.
-
#message_retention_period ⇒ Numeric?
readonly
The number of seconds that Amazon SQS retains a message.
-
#queue_name ⇒ String?
readonly
A name for the queue.
-
#receive_message_wait_time_seconds ⇒ Numeric?
readonly
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.
-
#redrive_allow_policy ⇒ Object?
readonly
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.
-
#redrive_policy ⇒ Object?
readonly
The string that includes the parameters for the dead-letter queue functionality of the source queue as a JSON object.
-
#sqs_managed_sse_enabled ⇒ Boolean, ...
readonly
Enables server-side queue encryption using SQS owned encryption keys.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags that you attach to this queue.
-
#visibility_timeout ⇒ Numeric?
readonly
The length of time during which a message will be unavailable after a message is delivered from the queue.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content_based_deduplication: nil, deduplication_scope: nil, delay_seconds: nil, fifo_queue: nil, fifo_throughput_limit: nil, kms_data_key_reuse_period_seconds: nil, kms_master_key_id: nil, maximum_message_size: nil, message_retention_period: nil, queue_name: nil, receive_message_wait_time_seconds: nil, redrive_allow_policy: nil, redrive_policy: nil, sqs_managed_sse_enabled: nil, tags: nil, visibility_timeout: nil) ⇒ CfnQueueProps
constructor
A new instance of CfnQueueProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content_based_deduplication: nil, deduplication_scope: nil, delay_seconds: nil, fifo_queue: nil, fifo_throughput_limit: nil, kms_data_key_reuse_period_seconds: nil, kms_master_key_id: nil, maximum_message_size: nil, message_retention_period: nil, queue_name: nil, receive_message_wait_time_seconds: nil, redrive_allow_policy: nil, redrive_policy: nil, sqs_managed_sse_enabled: nil, tags: nil, visibility_timeout: nil) ⇒ CfnQueueProps
Returns a new instance of CfnQueueProps.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'sqs/cfn_queue_props.rb', line 25 def initialize(content_based_deduplication: nil, deduplication_scope: nil, delay_seconds: nil, fifo_queue: nil, fifo_throughput_limit: nil, kms_data_key_reuse_period_seconds: nil, kms_master_key_id: nil, maximum_message_size: nil, message_retention_period: nil, queue_name: nil, receive_message_wait_time_seconds: nil, redrive_allow_policy: nil, redrive_policy: nil, sqs_managed_sse_enabled: nil, tags: nil, visibility_timeout: nil) @content_based_deduplication = content_based_deduplication Jsii::Type.check_type(@content_based_deduplication, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "contentBasedDeduplication") unless @content_based_deduplication.nil? @deduplication_scope = deduplication_scope Jsii::Type.check_type(@deduplication_scope, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deduplicationScope") unless @deduplication_scope.nil? @delay_seconds = delay_seconds Jsii::Type.check_type(@delay_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "delaySeconds") unless @delay_seconds.nil? @fifo_queue = fifo_queue Jsii::Type.check_type(@fifo_queue, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "fifoQueue") unless @fifo_queue.nil? @fifo_throughput_limit = fifo_throughput_limit Jsii::Type.check_type(@fifo_throughput_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fifoThroughputLimit") unless @fifo_throughput_limit.nil? @kms_data_key_reuse_period_seconds = kms_data_key_reuse_period_seconds Jsii::Type.check_type(@kms_data_key_reuse_period_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "kmsDataKeyReusePeriodSeconds") unless @kms_data_key_reuse_period_seconds.nil? @kms_master_key_id = kms_master_key_id Jsii::Type.check_type(@kms_master_key_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUFsaWFzUmVmIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9XX19")), "kmsMasterKeyId") unless @kms_master_key_id.nil? @maximum_message_size = Jsii::Type.check_type(@maximum_message_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumMessageSize") unless @maximum_message_size.nil? @message_retention_period = Jsii::Type.check_type(@message_retention_period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "messageRetentionPeriod") unless @message_retention_period.nil? @queue_name = queue_name Jsii::Type.check_type(@queue_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queueName") unless @queue_name.nil? @receive_message_wait_time_seconds = Jsii::Type.check_type(@receive_message_wait_time_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "receiveMessageWaitTimeSeconds") unless @receive_message_wait_time_seconds.nil? @redrive_allow_policy = redrive_allow_policy Jsii::Type.check_type(@redrive_allow_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "redriveAllowPolicy") unless @redrive_allow_policy.nil? @redrive_policy = redrive_policy Jsii::Type.check_type(@redrive_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "redrivePolicy") unless @redrive_policy.nil? @sqs_managed_sse_enabled = sqs_managed_sse_enabled Jsii::Type.check_type(@sqs_managed_sse_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "sqsManagedSseEnabled") unless @sqs_managed_sse_enabled.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @visibility_timeout = visibility_timeout Jsii::Type.check_type(@visibility_timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "visibilityTimeout") unless @visibility_timeout.nil? end |
Instance Attribute Details
#content_based_deduplication ⇒ Boolean, ... (readonly)
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 .
66 67 68 |
# File 'sqs/cfn_queue_props.rb', line 66 def content_based_deduplication @content_based_deduplication end |
#deduplication_scope ⇒ String? (readonly)
For high throughput for FIFO queues, specifies whether message deduplication occurs at the message group or queue level.
Valid values are message_group and queue .
To enable high throughput for a FIFO queue, set this attribute to message_group and set the FifoThroughputLimit attribute to per_message_group_id . 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 .
75 76 77 |
# File 'sqs/cfn_queue_props.rb', line 75 def deduplication_scope @deduplication_scope end |
#delay_seconds ⇒ Numeric? (readonly)
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 .
82 83 84 |
# File 'sqs/cfn_queue_props.rb', line 82 def delay_seconds @delay_seconds end |
#fifo_queue ⇒ Boolean, ... (readonly)
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 Amazon SQS FIFO queues in the Amazon SQS Developer Guide .
89 90 91 |
# File 'sqs/cfn_queue_props.rb', line 89 def fifo_queue @fifo_queue end |
#fifo_throughput_limit ⇒ String? (readonly)
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 per_queue and per_message_group_id .
To enable high throughput for a FIFO queue, set this attribute to per_message_group_id and set the DeduplicationScope attribute to message_group . 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 .
98 99 100 |
# File 'sqs/cfn_queue_props.rb', line 98 def fifo_throughput_limit @fifo_throughput_limit end |
#kms_data_key_reuse_period_seconds ⇒ Numeric? (readonly)
The length of time in seconds for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS again.
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 .
107 108 109 |
# File 'sqs/cfn_queue_props.rb', line 107 def kms_data_key_reuse_period_seconds @kms_data_key_reuse_period_seconds end |
#kms_master_key_id ⇒ String, ... (readonly)
The ID of an AWS Key Management Service (KMS) for Amazon SQS , or a custom KMS.
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
119 120 121 |
# File 'sqs/cfn_queue_props.rb', line 119 def kms_master_key_id @kms_master_key_id end |
#maximum_message_size ⇒ Numeric? (readonly)
The limit of how many bytes that a message can contain before Amazon SQS rejects it.
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).
127 128 129 |
# File 'sqs/cfn_queue_props.rb', line 127 def @maximum_message_size end |
#message_retention_period ⇒ Numeric? (readonly)
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).
134 135 136 |
# File 'sqs/cfn_queue_props.rb', line 134 def @message_retention_period end |
#queue_name ⇒ String? (readonly)
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 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.
145 146 147 |
# File 'sqs/cfn_queue_props.rb', line 145 def queue_name @queue_name end |
#receive_message_wait_time_seconds ⇒ Numeric? (readonly)
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 .
152 153 154 |
# File 'sqs/cfn_queue_props.rb', line 152 def @receive_message_wait_time_seconds end |
#redrive_allow_policy ⇒ Object? (readonly)
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:
redrive_permission: The permission type that defines which source queues can specify the current queue as the dead-letter queue. Valid values are:allow_all: (Default) Any source queues in this AWS account in the same Region can specify this queue as the dead-letter queue.deny_all: No source queues can specify this queue as the dead-letter queue.by_queue: Only queues specified by thesource_queue_arnsparameter can specify this queue as the dead-letter queue.source_queue_arns: 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 theredrive_permissionparameter is set toby_queue. You can specify up to 10 source queue ARNs. To allow more than 10 source queues to specify dead-letter queues, set theredrive_permissionparameter toallow_all.
165 166 167 |
# File 'sqs/cfn_queue_props.rb', line 165 def redrive_allow_policy @redrive_allow_policy end |
#redrive_policy ⇒ Object? (readonly)
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:
dead_letter_target_arn: The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value ofmax_receive_countis exceeded.max_receive_count: 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 themax_receive_countfor 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*
187 188 189 |
# File 'sqs/cfn_queue_props.rb', line 187 def redrive_policy @redrive_policy end |
#sqs_managed_sse_enabled ⇒ Boolean, ... (readonly)
194 195 196 |
# File 'sqs/cfn_queue_props.rb', line 194 def sqs_managed_sse_enabled @sqs_managed_sse_enabled end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags that you attach to this queue.
For more information, see Resource tag in the CloudFormation User Guide .
201 202 203 |
# File 'sqs/cfn_queue_props.rb', line 201 def @tags end |
#visibility_timeout ⇒ Numeric? (readonly)
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 .
212 213 214 |
# File 'sqs/cfn_queue_props.rb', line 212 def visibility_timeout @visibility_timeout end |
Class Method Details
.jsii_properties ⇒ Object
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'sqs/cfn_queue_props.rb', line 214 def self.jsii_properties { :content_based_deduplication => "contentBasedDeduplication", :deduplication_scope => "deduplicationScope", :delay_seconds => "delaySeconds", :fifo_queue => "fifoQueue", :fifo_throughput_limit => "fifoThroughputLimit", :kms_data_key_reuse_period_seconds => "kmsDataKeyReusePeriodSeconds", :kms_master_key_id => "kmsMasterKeyId", :maximum_message_size => "maximumMessageSize", :message_retention_period => "messageRetentionPeriod", :queue_name => "queueName", :receive_message_wait_time_seconds => "receiveMessageWaitTimeSeconds", :redrive_allow_policy => "redriveAllowPolicy", :redrive_policy => "redrivePolicy", :sqs_managed_sse_enabled => "sqsManagedSseEnabled", :tags => "tags", :visibility_timeout => "visibilityTimeout", } end |
Instance Method Details
#to_jsii ⇒ Object
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'sqs/cfn_queue_props.rb', line 235 def to_jsii result = {} result.merge!({ "contentBasedDeduplication" => @content_based_deduplication, "deduplicationScope" => @deduplication_scope, "delaySeconds" => @delay_seconds, "fifoQueue" => @fifo_queue, "fifoThroughputLimit" => @fifo_throughput_limit, "kmsDataKeyReusePeriodSeconds" => @kms_data_key_reuse_period_seconds, "kmsMasterKeyId" => @kms_master_key_id, "maximumMessageSize" => @maximum_message_size, "messageRetentionPeriod" => @message_retention_period, "queueName" => @queue_name, "receiveMessageWaitTimeSeconds" => @receive_message_wait_time_seconds, "redriveAllowPolicy" => @redrive_allow_policy, "redrivePolicy" => @redrive_policy, "sqsManagedSseEnabled" => @sqs_managed_sse_enabled, "tags" => @tags, "visibilityTimeout" => @visibility_timeout, }) result.compact end |