aws-sdk-sqs 1.27.1 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws-sdk-sqs.rb +4 -2
- data/lib/aws-sdk-sqs/client.rb +188 -111
- data/lib/aws-sdk-sqs/client_api.rb +22 -0
- data/lib/aws-sdk-sqs/customizations.rb +2 -0
- data/lib/aws-sdk-sqs/errors.rb +2 -0
- data/lib/aws-sdk-sqs/message.rb +4 -2
- data/lib/aws-sdk-sqs/plugins/md5s.rb +2 -0
- data/lib/aws-sdk-sqs/plugins/queue_urls.rb +2 -0
- data/lib/aws-sdk-sqs/queue.rb +59 -43
- data/lib/aws-sdk-sqs/queue_poller.rb +2 -0
- data/lib/aws-sdk-sqs/resource.rb +28 -24
- data/lib/aws-sdk-sqs/types.rb +208 -93
- metadata +2 -2
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -22,6 +24,7 @@ module Aws::SQS
|
|
22
24
|
Binary = Shapes::BlobShape.new(name: 'Binary')
|
23
25
|
BinaryList = Shapes::ListShape.new(name: 'BinaryList', flattened: true)
|
24
26
|
Boolean = Shapes::BooleanShape.new(name: 'Boolean')
|
27
|
+
BoxedInteger = Shapes::IntegerShape.new(name: 'BoxedInteger')
|
25
28
|
ChangeMessageVisibilityBatchRequest = Shapes::StructureShape.new(name: 'ChangeMessageVisibilityBatchRequest')
|
26
29
|
ChangeMessageVisibilityBatchRequestEntry = Shapes::StructureShape.new(name: 'ChangeMessageVisibilityBatchRequestEntry')
|
27
30
|
ChangeMessageVisibilityBatchRequestEntryList = Shapes::ListShape.new(name: 'ChangeMessageVisibilityBatchRequestEntryList', flattened: true)
|
@@ -96,6 +99,7 @@ module Aws::SQS
|
|
96
99
|
TagMap = Shapes::MapShape.new(name: 'TagMap', flattened: true)
|
97
100
|
TagQueueRequest = Shapes::StructureShape.new(name: 'TagQueueRequest')
|
98
101
|
TagValue = Shapes::StringShape.new(name: 'TagValue')
|
102
|
+
Token = Shapes::StringShape.new(name: 'Token')
|
99
103
|
TooManyEntriesInBatchRequest = Shapes::StructureShape.new(name: 'TooManyEntriesInBatchRequest')
|
100
104
|
UnsupportedOperation = Shapes::StructureShape.new(name: 'UnsupportedOperation')
|
101
105
|
UntagQueueRequest = Shapes::StructureShape.new(name: 'UntagQueueRequest')
|
@@ -210,9 +214,12 @@ module Aws::SQS
|
|
210
214
|
InvalidMessageContents.struct_class = Types::InvalidMessageContents
|
211
215
|
|
212
216
|
ListDeadLetterSourceQueuesRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
|
217
|
+
ListDeadLetterSourceQueuesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
|
218
|
+
ListDeadLetterSourceQueuesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: BoxedInteger, location_name: "MaxResults"))
|
213
219
|
ListDeadLetterSourceQueuesRequest.struct_class = Types::ListDeadLetterSourceQueuesRequest
|
214
220
|
|
215
221
|
ListDeadLetterSourceQueuesResult.add_member(:queue_urls, Shapes::ShapeRef.new(shape: QueueUrlList, required: true, location_name: "queueUrls"))
|
222
|
+
ListDeadLetterSourceQueuesResult.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
|
216
223
|
ListDeadLetterSourceQueuesResult.struct_class = Types::ListDeadLetterSourceQueuesResult
|
217
224
|
|
218
225
|
ListQueueTagsRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
|
@@ -222,9 +229,12 @@ module Aws::SQS
|
|
222
229
|
ListQueueTagsResult.struct_class = Types::ListQueueTagsResult
|
223
230
|
|
224
231
|
ListQueuesRequest.add_member(:queue_name_prefix, Shapes::ShapeRef.new(shape: String, location_name: "QueueNamePrefix"))
|
232
|
+
ListQueuesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
|
233
|
+
ListQueuesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: BoxedInteger, location_name: "MaxResults"))
|
225
234
|
ListQueuesRequest.struct_class = Types::ListQueuesRequest
|
226
235
|
|
227
236
|
ListQueuesResult.add_member(:queue_urls, Shapes::ShapeRef.new(shape: QueueUrlList, location_name: "QueueUrls"))
|
237
|
+
ListQueuesResult.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
|
228
238
|
ListQueuesResult.struct_class = Types::ListQueuesResult
|
229
239
|
|
230
240
|
Message.add_member(:message_id, Shapes::ShapeRef.new(shape: String, location_name: "MessageId"))
|
@@ -484,6 +494,12 @@ module Aws::SQS
|
|
484
494
|
o.input = Shapes::ShapeRef.new(shape: ListDeadLetterSourceQueuesRequest)
|
485
495
|
o.output = Shapes::ShapeRef.new(shape: ListDeadLetterSourceQueuesResult)
|
486
496
|
o.errors << Shapes::ShapeRef.new(shape: QueueDoesNotExist)
|
497
|
+
o[:pager] = Aws::Pager.new(
|
498
|
+
limit_key: "max_results",
|
499
|
+
tokens: {
|
500
|
+
"next_token" => "next_token"
|
501
|
+
}
|
502
|
+
)
|
487
503
|
end)
|
488
504
|
|
489
505
|
api.add_operation(:list_queue_tags, Seahorse::Model::Operation.new.tap do |o|
|
@@ -500,6 +516,12 @@ module Aws::SQS
|
|
500
516
|
o.http_request_uri = "/"
|
501
517
|
o.input = Shapes::ShapeRef.new(shape: ListQueuesRequest)
|
502
518
|
o.output = Shapes::ShapeRef.new(shape: ListQueuesResult)
|
519
|
+
o[:pager] = Aws::Pager.new(
|
520
|
+
limit_key: "max_results",
|
521
|
+
tokens: {
|
522
|
+
"next_token" => "next_token"
|
523
|
+
}
|
524
|
+
)
|
503
525
|
end)
|
504
526
|
|
505
527
|
api.add_operation(:purge_queue, Seahorse::Model::Operation.new.tap do |o|
|
data/lib/aws-sdk-sqs/errors.rb
CHANGED
data/lib/aws-sdk-sqs/message.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -107,7 +109,7 @@ module Aws::SQS
|
|
107
109
|
#
|
108
110
|
#
|
109
111
|
#
|
110
|
-
# [1]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-
|
112
|
+
# [1]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes
|
111
113
|
# @return [Hash<String,Types::MessageAttributeValue>]
|
112
114
|
def message_attributes
|
113
115
|
data[:message_attributes]
|
@@ -153,7 +155,7 @@ module Aws::SQS
|
|
153
155
|
# @param [Hash] options ({})
|
154
156
|
# @option options [required, Integer] :visibility_timeout
|
155
157
|
# The new value for the message's visibility timeout (in seconds).
|
156
|
-
# Values
|
158
|
+
# Values range: `0` to `43200`. Maximum: 12 hours.
|
157
159
|
# @return [EmptyStructure]
|
158
160
|
def change_visibility(options = {})
|
159
161
|
options = options.merge(
|
data/lib/aws-sdk-sqs/queue.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -205,15 +207,15 @@ module Aws::SQS
|
|
205
207
|
# A list of attributes that need to be returned along with each message.
|
206
208
|
# These attributes include:
|
207
209
|
#
|
208
|
-
# * `All`
|
210
|
+
# * `All` – Returns all values.
|
209
211
|
#
|
210
|
-
# * `ApproximateFirstReceiveTimestamp`
|
212
|
+
# * `ApproximateFirstReceiveTimestamp` – Returns the time the message
|
211
213
|
# was first received from the queue ([epoch time][1] in milliseconds).
|
212
214
|
#
|
213
|
-
# * `ApproximateReceiveCount`
|
214
|
-
# has been received
|
215
|
+
# * `ApproximateReceiveCount` – Returns the number of times a message
|
216
|
+
# has been received across all queues but not deleted.
|
215
217
|
#
|
216
|
-
# * `AWSTraceHeader`
|
218
|
+
# * `AWSTraceHeader` – Returns the AWS X-Ray trace header string.
|
217
219
|
#
|
218
220
|
# * `SenderId`
|
219
221
|
#
|
@@ -223,17 +225,17 @@ module Aws::SQS
|
|
223
225
|
# * For an IAM role, returns the IAM role ID, for example
|
224
226
|
# `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
|
225
227
|
#
|
226
|
-
# * `SentTimestamp`
|
228
|
+
# * `SentTimestamp` – Returns the time the message was sent to the queue
|
227
229
|
# ([epoch time][1] in milliseconds).
|
228
230
|
#
|
229
|
-
# * `MessageDeduplicationId`
|
231
|
+
# * `MessageDeduplicationId` – Returns the value provided by the
|
230
232
|
# producer that calls the ` SendMessage ` action.
|
231
233
|
#
|
232
|
-
# * `MessageGroupId`
|
234
|
+
# * `MessageGroupId` – Returns the value provided by the producer that
|
233
235
|
# calls the ` SendMessage ` action. Messages with the same
|
234
236
|
# `MessageGroupId` are returned in sequence.
|
235
237
|
#
|
236
|
-
# * `SequenceNumber`
|
238
|
+
# * `SequenceNumber` – Returns the value provided by Amazon SQS.
|
237
239
|
#
|
238
240
|
#
|
239
241
|
#
|
@@ -273,14 +275,25 @@ module Aws::SQS
|
|
273
275
|
# call returns sooner than `WaitTimeSeconds`. If no messages are
|
274
276
|
# available and the wait time expires, the call returns successfully
|
275
277
|
# with an empty list of messages.
|
278
|
+
#
|
279
|
+
# To avoid HTTP errors, ensure that the HTTP response timeout for
|
280
|
+
# `ReceiveMessage` requests is longer than the `WaitTimeSeconds`
|
281
|
+
# parameter. For example, with the Java SDK, you can set HTTP transport
|
282
|
+
# settings using the [ NettyNioAsyncHttpClient][1] for asynchronous
|
283
|
+
# clients, or the [ ApacheHttpClient][2] for synchronous clients.
|
284
|
+
#
|
285
|
+
#
|
286
|
+
#
|
287
|
+
# [1]: https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/nio/netty/NettyNioAsyncHttpClient.html
|
288
|
+
# [2]: https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/apache/ApacheHttpClient.html
|
276
289
|
# @option options [String] :receive_request_attempt_id
|
277
290
|
# This parameter applies only to FIFO (first-in-first-out) queues.
|
278
291
|
#
|
279
292
|
# The token used for deduplication of `ReceiveMessage` calls. If a
|
280
293
|
# networking issue occurs after a `ReceiveMessage` action, and instead
|
281
|
-
# of a response you receive a generic error,
|
282
|
-
# action with an identical `ReceiveRequestAttemptId` to retrieve
|
283
|
-
# same set of messages, even if their visibility timeout has not yet
|
294
|
+
# of a response you receive a generic error, it is possible to retry the
|
295
|
+
# same action with an identical `ReceiveRequestAttemptId` to retrieve
|
296
|
+
# the same set of messages, even if their visibility timeout has not yet
|
284
297
|
# expired.
|
285
298
|
#
|
286
299
|
# * You can use `ReceiveRequestAttemptId` only for 5 minutes after a
|
@@ -293,7 +306,7 @@ module Aws::SQS
|
|
293
306
|
# `ReceiveRequestAttemptId`, Amazon SQS generates a
|
294
307
|
# `ReceiveRequestAttemptId`.
|
295
308
|
#
|
296
|
-
# *
|
309
|
+
# * It is possible to retry the `ReceiveMessage` action with the same
|
297
310
|
# `ReceiveRequestAttemptId` if none of the messages have been modified
|
298
311
|
# (deleted or had their visibility changes).
|
299
312
|
#
|
@@ -324,7 +337,7 @@ module Aws::SQS
|
|
324
337
|
# visibility timeout expires. As a result, delays might occur but the
|
325
338
|
# messages in the queue remain in a strict order.
|
326
339
|
#
|
327
|
-
# The length of `ReceiveRequestAttemptId` is 128 characters.
|
340
|
+
# The maximum length of `ReceiveRequestAttemptId` is 128 characters.
|
328
341
|
# `ReceiveRequestAttemptId` can contain alphanumeric characters (`a-z`,
|
329
342
|
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~
|
330
343
|
# ``).
|
@@ -397,7 +410,8 @@ module Aws::SQS
|
|
397
410
|
# })
|
398
411
|
# @param [Hash] options ({})
|
399
412
|
# @option options [required, String] :message_body
|
400
|
-
# The message to send. The
|
413
|
+
# The message to send. The minimum size is one character. The maximum
|
414
|
+
# size is 256 KB.
|
401
415
|
#
|
402
416
|
# A message can include only XML, JSON, and unformatted text. The
|
403
417
|
# following Unicode characters are allowed:
|
@@ -429,14 +443,14 @@ module Aws::SQS
|
|
429
443
|
#
|
430
444
|
#
|
431
445
|
#
|
432
|
-
# [1]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-
|
446
|
+
# [1]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes
|
433
447
|
# @option options [Hash<String,Types::MessageSystemAttributeValue>] :message_system_attributes
|
434
448
|
# The message system attribute to send. Each message system attribute
|
435
449
|
# consists of a `Name`, `Type`, and `Value`.
|
436
450
|
#
|
437
451
|
# * Currently, the only supported message system attribute is
|
438
452
|
# `AWSTraceHeader`. Its type must be `String` and its value must be a
|
439
|
-
# correctly formatted AWS X-Ray trace string.
|
453
|
+
# correctly formatted AWS X-Ray trace header string.
|
440
454
|
#
|
441
455
|
# * The size of a message system attribute doesn't count towards the
|
442
456
|
# total size of a message.
|
@@ -488,7 +502,7 @@ module Aws::SQS
|
|
488
502
|
#
|
489
503
|
# </note>
|
490
504
|
#
|
491
|
-
# The length of `MessageDeduplicationId` is 128 characters.
|
505
|
+
# The maximum length of `MessageDeduplicationId` is 128 characters.
|
492
506
|
# `MessageDeduplicationId` can contain alphanumeric characters (`a-z`,
|
493
507
|
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~
|
494
508
|
# ``).
|
@@ -596,39 +610,39 @@ module Aws::SQS
|
|
596
610
|
# The following lists the names, descriptions, and values of the special
|
597
611
|
# request parameters that the `SetQueueAttributes` action uses:
|
598
612
|
#
|
599
|
-
# * `DelaySeconds`
|
613
|
+
# * `DelaySeconds` – The length of time, in seconds, for which the
|
600
614
|
# delivery of all messages in the queue is delayed. Valid values: An
|
601
615
|
# integer from 0 to 900 (15 minutes). Default: 0.
|
602
616
|
#
|
603
|
-
# * `MaximumMessageSize`
|
617
|
+
# * `MaximumMessageSize` – The limit of how many bytes a message can
|
604
618
|
# contain before Amazon SQS rejects it. Valid values: An integer from
|
605
619
|
# 1,024 bytes (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144
|
606
620
|
# (256 KiB).
|
607
621
|
#
|
608
|
-
# * `MessageRetentionPeriod`
|
622
|
+
# * `MessageRetentionPeriod` – The length of time, in seconds, for which
|
609
623
|
# Amazon SQS retains a message. Valid values: An integer representing
|
610
624
|
# seconds, from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600
|
611
625
|
# (4 days).
|
612
626
|
#
|
613
|
-
# * `Policy`
|
627
|
+
# * `Policy` – The queue's policy. A valid AWS policy. For more
|
614
628
|
# information about policy structure, see [Overview of AWS IAM
|
615
629
|
# Policies][1] in the *Amazon IAM User Guide*.
|
616
630
|
#
|
617
|
-
# * `ReceiveMessageWaitTimeSeconds`
|
631
|
+
# * `ReceiveMessageWaitTimeSeconds` – The length of time, in seconds,
|
618
632
|
# for which a ` ReceiveMessage ` action waits for a message to arrive.
|
619
|
-
# Valid values:
|
633
|
+
# Valid values: An integer from 0 to 20 (seconds). Default: 0.
|
620
634
|
#
|
621
|
-
# * `RedrivePolicy`
|
622
|
-
# dead-letter queue functionality of the source queue
|
623
|
-
# information about the redrive policy and
|
624
|
-
# [Using Amazon SQS Dead-Letter Queues][2] in
|
625
|
-
# Service Developer Guide*.
|
635
|
+
# * `RedrivePolicy` – The string that includes the parameters for the
|
636
|
+
# dead-letter queue functionality of the source queue as a JSON
|
637
|
+
# object. For more information about the redrive policy and
|
638
|
+
# dead-letter queues, see [Using Amazon SQS Dead-Letter Queues][2] in
|
639
|
+
# the *Amazon Simple Queue Service Developer Guide*.
|
626
640
|
#
|
627
|
-
# * `deadLetterTargetArn`
|
641
|
+
# * `deadLetterTargetArn` – The Amazon Resource Name (ARN) of the
|
628
642
|
# dead-letter queue to which Amazon SQS moves messages after the
|
629
643
|
# value of `maxReceiveCount` is exceeded.
|
630
644
|
#
|
631
|
-
# * `maxReceiveCount`
|
645
|
+
# * `maxReceiveCount` – The number of times a message is delivered to
|
632
646
|
# the source queue before being moved to the dead-letter queue. When
|
633
647
|
# the `ReceiveCount` for a message exceeds the `maxReceiveCount` for
|
634
648
|
# a queue, Amazon SQS moves the message to the dead-letter-queue.
|
@@ -639,22 +653,22 @@ module Aws::SQS
|
|
639
653
|
#
|
640
654
|
# </note>
|
641
655
|
#
|
642
|
-
# * `VisibilityTimeout`
|
643
|
-
# seconds. Valid values:
|
656
|
+
# * `VisibilityTimeout` – The visibility timeout for the queue, in
|
657
|
+
# seconds. Valid values: An integer from 0 to 43,200 (12 hours).
|
644
658
|
# Default: 30. For more information about the visibility timeout, see
|
645
659
|
# [Visibility Timeout][3] in the *Amazon Simple Queue Service
|
646
660
|
# Developer Guide*.
|
647
661
|
#
|
648
662
|
# The following attributes apply only to [server-side-encryption][4]\:
|
649
663
|
#
|
650
|
-
# * `KmsMasterKeyId`
|
664
|
+
# * `KmsMasterKeyId` – The ID of an AWS-managed customer master key
|
651
665
|
# (CMK) for Amazon SQS or a custom CMK. For more information, see [Key
|
652
666
|
# Terms][5]. While the alias of the AWS-managed CMK for Amazon SQS is
|
653
667
|
# always `alias/aws/sqs`, the alias of a custom CMK can, for example,
|
654
668
|
# be `alias/MyAlias `. For more examples, see [KeyId][6] in the *AWS
|
655
669
|
# Key Management Service API Reference*.
|
656
670
|
#
|
657
|
-
# * `KmsDataKeyReusePeriodSeconds`
|
671
|
+
# * `KmsDataKeyReusePeriodSeconds` – The length of time, in seconds, for
|
658
672
|
# which Amazon SQS can reuse a [data key][7] to encrypt or decrypt
|
659
673
|
# messages before calling AWS KMS again. An integer representing
|
660
674
|
# seconds, between 60 seconds (1 minute) and 86,400 seconds (24
|
@@ -666,7 +680,7 @@ module Aws::SQS
|
|
666
680
|
# The following attribute applies only to [FIFO (first-in-first-out)
|
667
681
|
# queues][9]\:
|
668
682
|
#
|
669
|
-
# * `ContentBasedDeduplication`
|
683
|
+
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
670
684
|
# For more information, see [Exactly-Once Processing][10] in the
|
671
685
|
# *Amazon Simple Queue Service Developer Guide*.
|
672
686
|
#
|
@@ -726,16 +740,18 @@ module Aws::SQS
|
|
726
740
|
# @return [Queue::Collection]
|
727
741
|
def dead_letter_source_queues(options = {})
|
728
742
|
batches = Enumerator.new do |y|
|
729
|
-
batch = []
|
730
743
|
options = options.merge(queue_url: @url)
|
731
744
|
resp = @client.list_dead_letter_source_queues(options)
|
732
|
-
resp.
|
733
|
-
batch
|
734
|
-
|
735
|
-
|
736
|
-
|
745
|
+
resp.each_page do |page|
|
746
|
+
batch = []
|
747
|
+
page.data.queue_urls.each do |q|
|
748
|
+
batch << Queue.new(
|
749
|
+
url: q,
|
750
|
+
client: @client
|
751
|
+
)
|
752
|
+
end
|
753
|
+
y.yield(batch)
|
737
754
|
end
|
738
|
-
y.yield(batch)
|
739
755
|
end
|
740
756
|
Queue::Collection.new(batches)
|
741
757
|
end
|
data/lib/aws-sdk-sqs/resource.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -62,39 +64,39 @@ module Aws::SQS
|
|
62
64
|
# The following lists the names, descriptions, and values of the special
|
63
65
|
# request parameters that the `CreateQueue` action uses:
|
64
66
|
#
|
65
|
-
# * `DelaySeconds`
|
67
|
+
# * `DelaySeconds` – The length of time, in seconds, for which the
|
66
68
|
# delivery of all messages in the queue is delayed. Valid values: An
|
67
69
|
# integer from 0 to 900 seconds (15 minutes). Default: 0.
|
68
70
|
#
|
69
|
-
# * `MaximumMessageSize`
|
71
|
+
# * `MaximumMessageSize` – The limit of how many bytes a message can
|
70
72
|
# contain before Amazon SQS rejects it. Valid values: An integer from
|
71
73
|
# 1,024 bytes (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144
|
72
74
|
# (256 KiB).
|
73
75
|
#
|
74
|
-
# * `MessageRetentionPeriod`
|
76
|
+
# * `MessageRetentionPeriod` – The length of time, in seconds, for which
|
75
77
|
# Amazon SQS retains a message. Valid values: An integer from 60
|
76
78
|
# seconds (1 minute) to 1,209,600 seconds (14 days). Default: 345,600
|
77
79
|
# (4 days).
|
78
80
|
#
|
79
|
-
# * `Policy`
|
81
|
+
# * `Policy` – The queue's policy. A valid AWS policy. For more
|
80
82
|
# information about policy structure, see [Overview of AWS IAM
|
81
83
|
# Policies][1] in the *Amazon IAM User Guide*.
|
82
84
|
#
|
83
|
-
# * `ReceiveMessageWaitTimeSeconds`
|
85
|
+
# * `ReceiveMessageWaitTimeSeconds` – The length of time, in seconds,
|
84
86
|
# for which a ` ReceiveMessage ` action waits for a message to arrive.
|
85
87
|
# Valid values: An integer from 0 to 20 (seconds). Default: 0.
|
86
88
|
#
|
87
|
-
# * `RedrivePolicy`
|
88
|
-
# dead-letter queue functionality of the source queue
|
89
|
-
# information about the redrive policy and
|
90
|
-
# [Using Amazon SQS Dead-Letter Queues][2] in
|
91
|
-
# Service Developer Guide*.
|
89
|
+
# * `RedrivePolicy` – The string that includes the parameters for the
|
90
|
+
# dead-letter queue functionality of the source queue as a JSON
|
91
|
+
# object. For more information about the redrive policy and
|
92
|
+
# dead-letter queues, see [Using Amazon SQS Dead-Letter Queues][2] in
|
93
|
+
# the *Amazon Simple Queue Service Developer Guide*.
|
92
94
|
#
|
93
|
-
# * `deadLetterTargetArn`
|
95
|
+
# * `deadLetterTargetArn` – The Amazon Resource Name (ARN) of the
|
94
96
|
# dead-letter queue to which Amazon SQS moves messages after the
|
95
97
|
# value of `maxReceiveCount` is exceeded.
|
96
98
|
#
|
97
|
-
# * `maxReceiveCount`
|
99
|
+
# * `maxReceiveCount` – The number of times a message is delivered to
|
98
100
|
# the source queue before being moved to the dead-letter queue. When
|
99
101
|
# the `ReceiveCount` for a message exceeds the `maxReceiveCount` for
|
100
102
|
# a queue, Amazon SQS moves the message to the dead-letter-queue.
|
@@ -105,7 +107,7 @@ module Aws::SQS
|
|
105
107
|
#
|
106
108
|
# </note>
|
107
109
|
#
|
108
|
-
# * `VisibilityTimeout`
|
110
|
+
# * `VisibilityTimeout` – The visibility timeout for the queue, in
|
109
111
|
# seconds. Valid values: An integer from 0 to 43,200 (12 hours).
|
110
112
|
# Default: 30. For more information about the visibility timeout, see
|
111
113
|
# [Visibility Timeout][3] in the *Amazon Simple Queue Service
|
@@ -113,14 +115,14 @@ module Aws::SQS
|
|
113
115
|
#
|
114
116
|
# The following attributes apply only to [server-side-encryption][4]\:
|
115
117
|
#
|
116
|
-
# * `KmsMasterKeyId`
|
118
|
+
# * `KmsMasterKeyId` – The ID of an AWS-managed customer master key
|
117
119
|
# (CMK) for Amazon SQS or a custom CMK. For more information, see [Key
|
118
120
|
# Terms][5]. While the alias of the AWS-managed CMK for Amazon SQS is
|
119
121
|
# always `alias/aws/sqs`, the alias of a custom CMK can, for example,
|
120
122
|
# be `alias/MyAlias `. For more examples, see [KeyId][6] in the *AWS
|
121
123
|
# Key Management Service API Reference*.
|
122
124
|
#
|
123
|
-
# * `KmsDataKeyReusePeriodSeconds`
|
125
|
+
# * `KmsDataKeyReusePeriodSeconds` – The length of time, in seconds, for
|
124
126
|
# which Amazon SQS can reuse a [data key][7] to encrypt or decrypt
|
125
127
|
# messages before calling AWS KMS again. An integer representing
|
126
128
|
# seconds, between 60 seconds (1 minute) and 86,400 seconds (24
|
@@ -132,7 +134,7 @@ module Aws::SQS
|
|
132
134
|
# The following attributes apply only to [FIFO (first-in-first-out)
|
133
135
|
# queues][9]\:
|
134
136
|
#
|
135
|
-
# * `FifoQueue`
|
137
|
+
# * `FifoQueue` – Designates a queue as FIFO. Valid values: `true`,
|
136
138
|
# `false`. If you don't specify the `FifoQueue` attribute, Amazon SQS
|
137
139
|
# creates a standard queue. You can provide this attribute only during
|
138
140
|
# queue creation. You can't change it for an existing queue. When you
|
@@ -142,7 +144,7 @@ module Aws::SQS
|
|
142
144
|
# For more information, see [FIFO Queue Logic][10] in the *Amazon
|
143
145
|
# Simple Queue Service Developer Guide*.
|
144
146
|
#
|
145
|
-
# * `ContentBasedDeduplication`
|
147
|
+
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
146
148
|
# Valid values: `true`, `false`. For more information, see
|
147
149
|
# [Exactly-Once Processing][11] in the *Amazon Simple Queue Service
|
148
150
|
# Developer Guide*.
|
@@ -280,15 +282,17 @@ module Aws::SQS
|
|
280
282
|
# @return [Queue::Collection]
|
281
283
|
def queues(options = {})
|
282
284
|
batches = Enumerator.new do |y|
|
283
|
-
batch = []
|
284
285
|
resp = @client.list_queues(options)
|
285
|
-
resp.
|
286
|
-
batch
|
287
|
-
|
288
|
-
|
289
|
-
|
286
|
+
resp.each_page do |page|
|
287
|
+
batch = []
|
288
|
+
page.data.queue_urls.each do |q|
|
289
|
+
batch << Queue.new(
|
290
|
+
url: q,
|
291
|
+
client: @client
|
292
|
+
)
|
293
|
+
end
|
294
|
+
y.yield(batch)
|
290
295
|
end
|
291
|
-
y.yield(batch)
|
292
296
|
end
|
293
297
|
Queue::Collection.new(batches)
|
294
298
|
end
|