aws-sdk-sqs 1.39.0 → 1.86.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/CHANGELOG.md +248 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-sqs/client.rb +800 -329
- data/lib/aws-sdk-sqs/client_api.rb +325 -52
- data/lib/aws-sdk-sqs/customizations.rb +5 -1
- data/lib/aws-sdk-sqs/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-sqs/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-sqs/endpoints.rb +269 -0
- data/lib/aws-sdk-sqs/errors.rb +262 -0
- data/lib/aws-sdk-sqs/message.rb +13 -6
- data/lib/aws-sdk-sqs/plugins/endpoints.rb +128 -0
- data/lib/aws-sdk-sqs/plugins/md5s.rb +84 -35
- data/lib/aws-sdk-sqs/plugins/queue_urls.rb +20 -18
- data/lib/aws-sdk-sqs/queue.rb +209 -93
- data/lib/aws-sdk-sqs/queue_poller.rb +71 -35
- data/lib/aws-sdk-sqs/resource.rb +106 -59
- data/lib/aws-sdk-sqs/types.rb +827 -502
- data/lib/aws-sdk-sqs.rb +17 -9
- data/sig/client.rbs +367 -0
- data/sig/errors.rbs +98 -0
- data/sig/message.rbs +73 -0
- data/sig/queue.rbs +164 -0
- data/sig/resource.rbs +108 -0
- data/sig/types.rbs +472 -0
- data/sig/waiters.rbs +13 -0
- metadata +22 -11
data/lib/aws-sdk-sqs/queue.rb
CHANGED
@@ -54,10 +54,12 @@ module Aws::SQS
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp =
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
|
+
@client.get_queue_attributes(
|
58
59
|
queue_url: @url,
|
59
60
|
attribute_names: ["All"]
|
60
61
|
)
|
62
|
+
end
|
61
63
|
@data = resp.data
|
62
64
|
self
|
63
65
|
end
|
@@ -94,11 +96,10 @@ module Aws::SQS
|
|
94
96
|
# characters include alphanumeric characters, hyphens (`-`), and
|
95
97
|
# underscores (`_`).
|
96
98
|
# @option options [required, Array<String>] :aws_account_ids
|
97
|
-
# The
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
# Queue Service Developer Guide*.
|
99
|
+
# The Amazon Web Services account numbers of the [principals][1] who are
|
100
|
+
# to receive permission. For information about locating the Amazon Web
|
101
|
+
# Services account identification, see [Your Amazon Web Services
|
102
|
+
# Identifiers][2] in the *Amazon SQS Developer Guide*.
|
102
103
|
#
|
103
104
|
#
|
104
105
|
#
|
@@ -110,7 +111,7 @@ module Aws::SQS
|
|
110
111
|
#
|
111
112
|
# For more information about these actions, see [Overview of Managing
|
112
113
|
# Access Permissions to Your Amazon Simple Queue Service Resource][1] in
|
113
|
-
# the *Amazon
|
114
|
+
# the *Amazon SQS Developer Guide*.
|
114
115
|
#
|
115
116
|
# Specifying `SendMessage`, `DeleteMessage`, or
|
116
117
|
# `ChangeMessageVisibility` for `ActionName.n` also grants permissions
|
@@ -124,7 +125,9 @@ module Aws::SQS
|
|
124
125
|
# @return [EmptyStructure]
|
125
126
|
def add_permission(options = {})
|
126
127
|
options = options.merge(queue_url: @url)
|
127
|
-
resp =
|
128
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
129
|
+
@client.add_permission(options)
|
130
|
+
end
|
128
131
|
resp.data
|
129
132
|
end
|
130
133
|
|
@@ -141,12 +144,14 @@ module Aws::SQS
|
|
141
144
|
# })
|
142
145
|
# @param [Hash] options ({})
|
143
146
|
# @option options [required, Array<Types::ChangeMessageVisibilityBatchRequestEntry>] :entries
|
144
|
-
#
|
147
|
+
# Lists the receipt handles of the messages for which the visibility
|
145
148
|
# timeout must be changed.
|
146
149
|
# @return [Types::ChangeMessageVisibilityBatchResult]
|
147
150
|
def change_message_visibility_batch(options = {})
|
148
151
|
options = options.merge(queue_url: @url)
|
149
|
-
resp =
|
152
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
153
|
+
@client.change_message_visibility_batch(options)
|
154
|
+
end
|
150
155
|
resp.data
|
151
156
|
end
|
152
157
|
|
@@ -157,7 +162,9 @@ module Aws::SQS
|
|
157
162
|
# @return [EmptyStructure]
|
158
163
|
def delete(options = {})
|
159
164
|
options = options.merge(queue_url: @url)
|
160
|
-
resp =
|
165
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
166
|
+
@client.delete_queue(options)
|
167
|
+
end
|
161
168
|
resp.data
|
162
169
|
end
|
163
170
|
|
@@ -173,11 +180,13 @@ module Aws::SQS
|
|
173
180
|
# })
|
174
181
|
# @param [Hash] options ({})
|
175
182
|
# @option options [required, Array<Types::DeleteMessageBatchRequestEntry>] :entries
|
176
|
-
#
|
183
|
+
# Lists the receipt handles for the messages to be deleted.
|
177
184
|
# @return [Types::DeleteMessageBatchResult]
|
178
185
|
def delete_messages(options = {})
|
179
186
|
options = options.merge(queue_url: @url)
|
180
|
-
resp =
|
187
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
188
|
+
@client.delete_message_batch(options)
|
189
|
+
end
|
181
190
|
resp.data
|
182
191
|
end
|
183
192
|
|
@@ -188,14 +197,17 @@ module Aws::SQS
|
|
188
197
|
# @return [EmptyStructure]
|
189
198
|
def purge(options = {})
|
190
199
|
options = options.merge(queue_url: @url)
|
191
|
-
resp =
|
200
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
201
|
+
@client.purge_queue(options)
|
202
|
+
end
|
192
203
|
resp.data
|
193
204
|
end
|
194
205
|
|
195
206
|
# @example Request syntax with placeholder values
|
196
207
|
#
|
197
208
|
# message = queue.receive_messages({
|
198
|
-
# attribute_names: ["All"], # accepts All, Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds, RedrivePolicy, FifoQueue, ContentBasedDeduplication, KmsMasterKeyId, KmsDataKeyReusePeriodSeconds, DeduplicationScope, FifoThroughputLimit
|
209
|
+
# attribute_names: ["All"], # accepts All, Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds, RedrivePolicy, FifoQueue, ContentBasedDeduplication, KmsMasterKeyId, KmsDataKeyReusePeriodSeconds, DeduplicationScope, FifoThroughputLimit, RedriveAllowPolicy, SqsManagedSseEnabled
|
210
|
+
# message_system_attribute_names: ["All"], # accepts All, SenderId, SentTimestamp, ApproximateReceiveCount, ApproximateFirstReceiveTimestamp, SequenceNumber, MessageDeduplicationId, MessageGroupId, AWSTraceHeader, DeadLetterQueueSourceArn
|
199
211
|
# message_attribute_names: ["MessageAttributeName"],
|
200
212
|
# max_number_of_messages: 1,
|
201
213
|
# visibility_timeout: 1,
|
@@ -204,6 +216,53 @@ module Aws::SQS
|
|
204
216
|
# })
|
205
217
|
# @param [Hash] options ({})
|
206
218
|
# @option options [Array<String>] :attribute_names
|
219
|
+
# This parameter has been deprecated but will be supported for backward
|
220
|
+
# compatibility. To provide attribute names, you are encouraged to use
|
221
|
+
# `MessageSystemAttributeNames`.
|
222
|
+
#
|
223
|
+
# A list of attributes that need to be returned along with each message.
|
224
|
+
# These attributes include:
|
225
|
+
#
|
226
|
+
# * `All` – Returns all values.
|
227
|
+
#
|
228
|
+
# * `ApproximateFirstReceiveTimestamp` – Returns the time the message
|
229
|
+
# was first received from the queue ([epoch time][1] in milliseconds).
|
230
|
+
#
|
231
|
+
# * `ApproximateReceiveCount` – Returns the number of times a message
|
232
|
+
# has been received across all queues but not deleted.
|
233
|
+
#
|
234
|
+
# * `AWSTraceHeader` – Returns the X-Ray trace header string.
|
235
|
+
#
|
236
|
+
# * `SenderId`
|
237
|
+
#
|
238
|
+
# * For a user, returns the user ID, for example
|
239
|
+
# `ABCDEFGHI1JKLMNOPQ23R`.
|
240
|
+
#
|
241
|
+
# * For an IAM role, returns the IAM role ID, for example
|
242
|
+
# `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
|
243
|
+
#
|
244
|
+
# * `SentTimestamp` – Returns the time the message was sent to the queue
|
245
|
+
# ([epoch time][1] in milliseconds).
|
246
|
+
#
|
247
|
+
# * `SqsManagedSseEnabled` – Enables server-side queue encryption using
|
248
|
+
# SQS owned encryption keys. Only one server-side encryption option is
|
249
|
+
# supported per queue (for example, [SSE-KMS][2] or [SSE-SQS][3]).
|
250
|
+
#
|
251
|
+
# * `MessageDeduplicationId` – Returns the value provided by the
|
252
|
+
# producer that calls the ` SendMessage ` action.
|
253
|
+
#
|
254
|
+
# * `MessageGroupId` – Returns the value provided by the producer that
|
255
|
+
# calls the ` SendMessage ` action. Messages with the same
|
256
|
+
# `MessageGroupId` are returned in sequence.
|
257
|
+
#
|
258
|
+
# * `SequenceNumber` – Returns the value provided by Amazon SQS.
|
259
|
+
#
|
260
|
+
#
|
261
|
+
#
|
262
|
+
# [1]: http://en.wikipedia.org/wiki/Unix_time
|
263
|
+
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html
|
264
|
+
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html
|
265
|
+
# @option options [Array<String>] :message_system_attribute_names
|
207
266
|
# A list of attributes that need to be returned along with each message.
|
208
267
|
# These attributes include:
|
209
268
|
#
|
@@ -215,11 +274,11 @@ module Aws::SQS
|
|
215
274
|
# * `ApproximateReceiveCount` – Returns the number of times a message
|
216
275
|
# has been received across all queues but not deleted.
|
217
276
|
#
|
218
|
-
# * `AWSTraceHeader` – Returns the
|
277
|
+
# * `AWSTraceHeader` – Returns the X-Ray trace header string.
|
219
278
|
#
|
220
279
|
# * `SenderId`
|
221
280
|
#
|
222
|
-
# * For
|
281
|
+
# * For a user, returns the user ID, for example
|
223
282
|
# `ABCDEFGHI1JKLMNOPQ23R`.
|
224
283
|
#
|
225
284
|
# * For an IAM role, returns the IAM role ID, for example
|
@@ -228,6 +287,10 @@ module Aws::SQS
|
|
228
287
|
# * `SentTimestamp` – Returns the time the message was sent to the queue
|
229
288
|
# ([epoch time][1] in milliseconds).
|
230
289
|
#
|
290
|
+
# * `SqsManagedSseEnabled` – Enables server-side queue encryption using
|
291
|
+
# SQS owned encryption keys. Only one server-side encryption option is
|
292
|
+
# supported per queue (for example, [SSE-KMS][2] or [SSE-SQS][3]).
|
293
|
+
#
|
231
294
|
# * `MessageDeduplicationId` – Returns the value provided by the
|
232
295
|
# producer that calls the ` SendMessage ` action.
|
233
296
|
#
|
@@ -240,6 +303,8 @@ module Aws::SQS
|
|
240
303
|
#
|
241
304
|
#
|
242
305
|
# [1]: http://en.wikipedia.org/wiki/Unix_time
|
306
|
+
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html
|
307
|
+
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html
|
243
308
|
# @option options [Array<String>] :message_attribute_names
|
244
309
|
# The name of the message attribute, where *N* is the index.
|
245
310
|
#
|
@@ -273,8 +338,8 @@ module Aws::SQS
|
|
273
338
|
# The duration (in seconds) for which the call waits for a message to
|
274
339
|
# arrive in the queue before returning. If a message is available, the
|
275
340
|
# call returns sooner than `WaitTimeSeconds`. If no messages are
|
276
|
-
# available and the wait time expires, the call
|
277
|
-
#
|
341
|
+
# available and the wait time expires, the call does not return a
|
342
|
+
# message list.
|
278
343
|
#
|
279
344
|
# To avoid HTTP errors, ensure that the HTTP response timeout for
|
280
345
|
# `ReceiveMessage` requests is longer than the `WaitTimeSeconds`
|
@@ -302,10 +367,6 @@ module Aws::SQS
|
|
302
367
|
# * When you set `FifoQueue`, a caller of the `ReceiveMessage` action
|
303
368
|
# can provide a `ReceiveRequestAttemptId` explicitly.
|
304
369
|
#
|
305
|
-
# * If a caller of the `ReceiveMessage` action doesn't provide a
|
306
|
-
# `ReceiveRequestAttemptId`, Amazon SQS generates a
|
307
|
-
# `ReceiveRequestAttemptId`.
|
308
|
-
#
|
309
370
|
# * It is possible to retry the `ReceiveMessage` action with the same
|
310
371
|
# `ReceiveRequestAttemptId` if none of the messages have been modified
|
311
372
|
# (deleted or had their visibility changes).
|
@@ -314,7 +375,7 @@ module Aws::SQS
|
|
314
375
|
# `ReceiveRequestAttemptId` return the same messages and receipt
|
315
376
|
# handles. If a retry occurs within the deduplication interval, it
|
316
377
|
# resets the visibility timeout. For more information, see [Visibility
|
317
|
-
# Timeout][1] in the *Amazon
|
378
|
+
# Timeout][1] in the *Amazon SQS Developer Guide*.
|
318
379
|
#
|
319
380
|
# If a caller of the `ReceiveMessage` action still processes messages
|
320
381
|
# when the visibility timeout expires and messages become visible,
|
@@ -343,8 +404,8 @@ module Aws::SQS
|
|
343
404
|
# ``).
|
344
405
|
#
|
345
406
|
# For best practices of using `ReceiveRequestAttemptId`, see [Using the
|
346
|
-
# ReceiveRequestAttemptId Request Parameter][2] in the *Amazon
|
347
|
-
#
|
407
|
+
# ReceiveRequestAttemptId Request Parameter][2] in the *Amazon SQS
|
408
|
+
# Developer Guide*.
|
348
409
|
#
|
349
410
|
#
|
350
411
|
#
|
@@ -354,7 +415,9 @@ module Aws::SQS
|
|
354
415
|
def receive_messages(options = {})
|
355
416
|
batch = []
|
356
417
|
options = options.merge(queue_url: @url)
|
357
|
-
resp =
|
418
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
419
|
+
@client.receive_message(options)
|
420
|
+
end
|
358
421
|
resp.data.messages.each do |m|
|
359
422
|
batch << Message.new(
|
360
423
|
queue_url: @url,
|
@@ -378,7 +441,9 @@ module Aws::SQS
|
|
378
441
|
# @return [EmptyStructure]
|
379
442
|
def remove_permission(options = {})
|
380
443
|
options = options.merge(queue_url: @url)
|
381
|
-
resp =
|
444
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
445
|
+
@client.remove_permission(options)
|
446
|
+
end
|
382
447
|
resp.data
|
383
448
|
end
|
384
449
|
|
@@ -411,16 +476,20 @@ module Aws::SQS
|
|
411
476
|
# @param [Hash] options ({})
|
412
477
|
# @option options [required, String] :message_body
|
413
478
|
# The message to send. The minimum size is one character. The maximum
|
414
|
-
# size is 256
|
479
|
+
# size is 256 KiB.
|
415
480
|
#
|
416
481
|
# A message can include only XML, JSON, and unformatted text. The
|
417
|
-
# following Unicode characters are allowed
|
482
|
+
# following Unicode characters are allowed. For more information, see
|
483
|
+
# the [W3C specification for characters][1].
|
418
484
|
#
|
419
485
|
# `#x9` \| `#xA` \| `#xD` \| `#x20` to `#xD7FF` \| `#xE000` to `#xFFFD`
|
420
486
|
# \| `#x10000` to `#x10FFFF`
|
421
487
|
#
|
422
|
-
#
|
423
|
-
#
|
488
|
+
# Amazon SQS does not throw an exception or completely reject the
|
489
|
+
# message if it contains invalid characters. Instead, it replaces those
|
490
|
+
# invalid characters with `U+FFFD` before storing the message in the
|
491
|
+
# queue, as long as the message body contains at least one valid
|
492
|
+
# character.
|
424
493
|
#
|
425
494
|
#
|
426
495
|
#
|
@@ -438,8 +507,8 @@ module Aws::SQS
|
|
438
507
|
# </note>
|
439
508
|
# @option options [Hash<String,Types::MessageAttributeValue>] :message_attributes
|
440
509
|
# Each message attribute consists of a `Name`, `Type`, and `Value`. For
|
441
|
-
# more information, see [Amazon SQS
|
442
|
-
# *Amazon
|
510
|
+
# more information, see [Amazon SQS message attributes][1] in the
|
511
|
+
# *Amazon SQS Developer Guide*.
|
443
512
|
#
|
444
513
|
#
|
445
514
|
#
|
@@ -450,7 +519,7 @@ module Aws::SQS
|
|
450
519
|
#
|
451
520
|
# * Currently, the only supported message system attribute is
|
452
521
|
# `AWSTraceHeader`. Its type must be `String` and its value must be a
|
453
|
-
# correctly formatted
|
522
|
+
# correctly formatted X-Ray trace header string.
|
454
523
|
#
|
455
524
|
# * The size of a message system attribute doesn't count towards the
|
456
525
|
# total size of a message.
|
@@ -461,8 +530,8 @@ module Aws::SQS
|
|
461
530
|
# particular `MessageDeduplicationId` is sent successfully, any messages
|
462
531
|
# sent with the same `MessageDeduplicationId` are accepted successfully
|
463
532
|
# but aren't delivered during the 5-minute deduplication interval. For
|
464
|
-
# more information, see [ Exactly-once processing][1] in the *Amazon
|
465
|
-
#
|
533
|
+
# more information, see [ Exactly-once processing][1] in the *Amazon SQS
|
534
|
+
# Developer Guide*.
|
466
535
|
#
|
467
536
|
# * Every message must have a unique `MessageDeduplicationId`,
|
468
537
|
#
|
@@ -508,8 +577,8 @@ module Aws::SQS
|
|
508
577
|
# ``).
|
509
578
|
#
|
510
579
|
# For best practices of using `MessageDeduplicationId`, see [Using the
|
511
|
-
# MessageDeduplicationId Property][2] in the *Amazon
|
512
|
-
#
|
580
|
+
# MessageDeduplicationId Property][2] in the *Amazon SQS Developer
|
581
|
+
# Guide*.
|
513
582
|
#
|
514
583
|
#
|
515
584
|
#
|
@@ -534,13 +603,12 @@ module Aws::SQS
|
|
534
603
|
# `MessageGroupId` values. For each `MessageGroupId`, the messages are
|
535
604
|
# sorted by time sent. The caller can't specify a `MessageGroupId`.
|
536
605
|
#
|
537
|
-
# The length of `MessageGroupId` is 128 characters. Valid
|
538
|
-
# alphanumeric characters and punctuation ``
|
606
|
+
# The maximum length of `MessageGroupId` is 128 characters. Valid
|
607
|
+
# values: alphanumeric characters and punctuation ``
|
539
608
|
# (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
|
540
609
|
#
|
541
610
|
# For best practices of using `MessageGroupId`, see [Using the
|
542
|
-
# MessageGroupId Property][1] in the *Amazon
|
543
|
-
# Developer Guide*.
|
611
|
+
# MessageGroupId Property][1] in the *Amazon SQS Developer Guide*.
|
544
612
|
#
|
545
613
|
# `MessageGroupId` is required for FIFO queues. You can't use it for
|
546
614
|
# Standard queues.
|
@@ -551,7 +619,9 @@ module Aws::SQS
|
|
551
619
|
# @return [Types::SendMessageResult]
|
552
620
|
def send_message(options = {})
|
553
621
|
options = options.merge(queue_url: @url)
|
554
|
-
resp =
|
622
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
623
|
+
@client.send_message(options)
|
624
|
+
end
|
555
625
|
resp.data
|
556
626
|
end
|
557
627
|
|
@@ -592,7 +662,9 @@ module Aws::SQS
|
|
592
662
|
# @return [Types::SendMessageBatchResult]
|
593
663
|
def send_messages(options = {})
|
594
664
|
options = options.merge(queue_url: @url)
|
595
|
-
resp =
|
665
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
666
|
+
@client.send_message_batch(options)
|
667
|
+
end
|
596
668
|
resp.data
|
597
669
|
end
|
598
670
|
|
@@ -622,67 +694,105 @@ module Aws::SQS
|
|
622
694
|
# * `MessageRetentionPeriod` – The length of time, in seconds, for which
|
623
695
|
# Amazon SQS retains a message. Valid values: An integer representing
|
624
696
|
# seconds, from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600
|
625
|
-
# (4 days).
|
626
|
-
#
|
627
|
-
#
|
628
|
-
#
|
629
|
-
#
|
697
|
+
# (4 days). When you change a queue's attributes, the change can take
|
698
|
+
# up to 60 seconds for most of the attributes to propagate throughout
|
699
|
+
# the Amazon SQS system. Changes made to the `MessageRetentionPeriod`
|
700
|
+
# attribute can take up to 15 minutes and will impact existing
|
701
|
+
# messages in the queue potentially causing them to be expired and
|
702
|
+
# deleted if the `MessageRetentionPeriod` is reduced below the age of
|
703
|
+
# existing messages.
|
704
|
+
#
|
705
|
+
# * `Policy` – The queue's policy. A valid Amazon Web Services policy.
|
706
|
+
# For more information about policy structure, see [Overview of Amazon
|
707
|
+
# Web Services IAM Policies][1] in the *Identity and Access Management
|
708
|
+
# User Guide*.
|
630
709
|
#
|
631
710
|
# * `ReceiveMessageWaitTimeSeconds` – The length of time, in seconds,
|
632
711
|
# for which a ` ReceiveMessage ` action waits for a message to arrive.
|
633
712
|
# Valid values: An integer from 0 to 20 (seconds). Default: 0.
|
634
713
|
#
|
714
|
+
# * `VisibilityTimeout` – The visibility timeout for the queue, in
|
715
|
+
# seconds. Valid values: An integer from 0 to 43,200 (12 hours).
|
716
|
+
# Default: 30. For more information about the visibility timeout, see
|
717
|
+
# [Visibility Timeout][2] in the *Amazon SQS Developer Guide*.
|
718
|
+
#
|
719
|
+
# The following attributes apply only to [dead-letter queues:][3]
|
720
|
+
#
|
635
721
|
# * `RedrivePolicy` – The string that includes the parameters for the
|
636
722
|
# dead-letter queue functionality of the source queue as a JSON
|
637
|
-
# object.
|
638
|
-
# dead-letter queues, see [Using Amazon SQS Dead-Letter Queues][2] in
|
639
|
-
# the *Amazon Simple Queue Service Developer Guide*.
|
723
|
+
# object. The parameters are as follows:
|
640
724
|
#
|
641
725
|
# * `deadLetterTargetArn` – The Amazon Resource Name (ARN) of the
|
642
726
|
# dead-letter queue to which Amazon SQS moves messages after the
|
643
727
|
# value of `maxReceiveCount` is exceeded.
|
644
728
|
#
|
645
729
|
# * `maxReceiveCount` – The number of times a message is delivered to
|
646
|
-
# the source queue before being moved to the dead-letter queue.
|
647
|
-
# the `ReceiveCount` for a message exceeds the
|
648
|
-
# a queue, Amazon SQS moves the message to the
|
649
|
-
#
|
650
|
-
#
|
651
|
-
#
|
652
|
-
#
|
730
|
+
# the source queue before being moved to the dead-letter queue.
|
731
|
+
# Default: 10. When the `ReceiveCount` for a message exceeds the
|
732
|
+
# `maxReceiveCount` for a queue, Amazon SQS moves the message to the
|
733
|
+
# dead-letter-queue.
|
734
|
+
#
|
735
|
+
# * `RedriveAllowPolicy` – The string that includes the parameters for
|
736
|
+
# the permissions for the dead-letter queue redrive permission and
|
737
|
+
# which source queues can specify dead-letter queues as a JSON object.
|
738
|
+
# The parameters are as follows:
|
739
|
+
#
|
740
|
+
# * `redrivePermission` – The permission type that defines which
|
741
|
+
# source queues can specify the current queue as the dead-letter
|
742
|
+
# queue. Valid values are:
|
743
|
+
#
|
744
|
+
# * `allowAll` – (Default) Any source queues in this Amazon Web
|
745
|
+
# Services account in the same Region can specify this queue as
|
746
|
+
# the dead-letter queue.
|
747
|
+
#
|
748
|
+
# * `denyAll` – No source queues can specify this queue as the
|
749
|
+
# dead-letter queue.
|
750
|
+
#
|
751
|
+
# * `byQueue` – Only queues specified by the `sourceQueueArns`
|
752
|
+
# parameter can specify this queue as the dead-letter queue.
|
753
|
+
#
|
754
|
+
# * `sourceQueueArns` – The Amazon Resource Names (ARN)s of the source
|
755
|
+
# queues that can specify this queue as the dead-letter queue and
|
756
|
+
# redrive messages. You can specify this parameter only when the
|
757
|
+
# `redrivePermission` parameter is set to `byQueue`. You can specify
|
758
|
+
# up to 10 source queue ARNs. To allow more than 10 source queues to
|
759
|
+
# specify dead-letter queues, set the `redrivePermission` parameter
|
760
|
+
# to `allowAll`.
|
761
|
+
#
|
762
|
+
# <note markdown="1"> The dead-letter queue of a FIFO queue must also be a FIFO queue.
|
763
|
+
# Similarly, the dead-letter queue of a standard queue must also be a
|
764
|
+
# standard queue.
|
653
765
|
#
|
654
|
-
#
|
655
|
-
#
|
656
|
-
# * `VisibilityTimeout` – The visibility timeout for the queue, in
|
657
|
-
# seconds. Valid values: An integer from 0 to 43,200 (12 hours).
|
658
|
-
# Default: 30. For more information about the visibility timeout, see
|
659
|
-
# [Visibility Timeout][3] in the *Amazon Simple Queue Service
|
660
|
-
# Developer Guide*.
|
766
|
+
# </note>
|
661
767
|
#
|
662
|
-
# The following attributes apply only to [server-side-encryption][4]
|
768
|
+
# The following attributes apply only to [server-side-encryption][4]:
|
663
769
|
#
|
664
|
-
# * `KmsMasterKeyId` – The ID of an
|
665
|
-
# (CMK) for Amazon SQS or a custom CMK. For more
|
666
|
-
# Terms][5]. While the alias of the AWS-managed
|
667
|
-
# always `alias/aws/sqs`, the alias of a custom
|
668
|
-
# be `alias/MyAlias `. For more examples, see
|
669
|
-
# Key Management Service API Reference*.
|
770
|
+
# * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
|
771
|
+
# master key (CMK) for Amazon SQS or a custom CMK. For more
|
772
|
+
# information, see [Key Terms][5]. While the alias of the AWS-managed
|
773
|
+
# CMK for Amazon SQS is always `alias/aws/sqs`, the alias of a custom
|
774
|
+
# CMK can, for example, be `alias/MyAlias `. For more examples, see
|
775
|
+
# [KeyId][6] in the *Key Management Service API Reference*.
|
670
776
|
#
|
671
777
|
# * `KmsDataKeyReusePeriodSeconds` – The length of time, in seconds, for
|
672
778
|
# which Amazon SQS can reuse a [data key][7] to encrypt or decrypt
|
673
|
-
# messages before calling
|
674
|
-
#
|
675
|
-
#
|
676
|
-
#
|
677
|
-
#
|
678
|
-
#
|
779
|
+
# messages before calling KMS again. An integer representing seconds,
|
780
|
+
# between 60 seconds (1 minute) and 86,400 seconds (24 hours).
|
781
|
+
# Default: 300 (5 minutes). A shorter time period provides better
|
782
|
+
# security but results in more calls to KMS which might incur charges
|
783
|
+
# after Free Tier. For more information, see [How Does the Data Key
|
784
|
+
# Reuse Period Work?][8].
|
785
|
+
#
|
786
|
+
# * `SqsManagedSseEnabled` – Enables server-side queue encryption using
|
787
|
+
# SQS owned encryption keys. Only one server-side encryption option is
|
788
|
+
# supported per queue (for example, [SSE-KMS][9] or [SSE-SQS][10]).
|
679
789
|
#
|
680
790
|
# The following attribute applies only to [FIFO (first-in-first-out)
|
681
|
-
# queues][
|
791
|
+
# queues][11]:
|
682
792
|
#
|
683
793
|
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
684
|
-
# For more information, see [Exactly-once processing][
|
685
|
-
# *Amazon
|
794
|
+
# For more information, see [Exactly-once processing][12] in the
|
795
|
+
# *Amazon SQS Developer Guide*. Note the following:
|
686
796
|
#
|
687
797
|
# * Every message must have a unique `MessageDeduplicationId`.
|
688
798
|
#
|
@@ -713,7 +823,7 @@ module Aws::SQS
|
|
713
823
|
# duplicates and only one copy of the message is delivered.
|
714
824
|
#
|
715
825
|
# The following attributes apply only to [high throughput for FIFO
|
716
|
-
# queues][
|
826
|
+
# queues][13]:
|
717
827
|
#
|
718
828
|
# * `DeduplicationScope` – Specifies whether message deduplication
|
719
829
|
# occurs at the message group or queue level. Valid values are
|
@@ -736,26 +846,30 @@ module Aws::SQS
|
|
736
846
|
# deduplication occurs as specified.
|
737
847
|
#
|
738
848
|
# For information on throughput quotas, see [Quotas related to
|
739
|
-
# messages][
|
849
|
+
# messages][14] in the *Amazon SQS Developer Guide*.
|
740
850
|
#
|
741
851
|
#
|
742
852
|
#
|
743
853
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html
|
744
|
-
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-
|
745
|
-
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-
|
854
|
+
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
855
|
+
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
|
746
856
|
# [4]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html
|
747
857
|
# [5]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms
|
748
858
|
# [6]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
|
749
859
|
# [7]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys
|
750
860
|
# [8]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work
|
751
|
-
# [9]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/
|
752
|
-
# [10]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/
|
753
|
-
# [11]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/
|
754
|
-
# [12]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/
|
861
|
+
# [9]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html
|
862
|
+
# [10]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html
|
863
|
+
# [11]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
|
864
|
+
# [12]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html
|
865
|
+
# [13]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html
|
866
|
+
# [14]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html
|
755
867
|
# @return [EmptyStructure]
|
756
868
|
def set_attributes(options = {})
|
757
869
|
options = options.merge(queue_url: @url)
|
758
|
-
resp =
|
870
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
871
|
+
@client.set_queue_attributes(options)
|
872
|
+
end
|
759
873
|
resp.data
|
760
874
|
end
|
761
875
|
|
@@ -769,7 +883,9 @@ module Aws::SQS
|
|
769
883
|
def dead_letter_source_queues(options = {})
|
770
884
|
batches = Enumerator.new do |y|
|
771
885
|
options = options.merge(queue_url: @url)
|
772
|
-
resp =
|
886
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
887
|
+
@client.list_dead_letter_source_queues(options)
|
888
|
+
end
|
773
889
|
resp.each_page do |page|
|
774
890
|
batch = []
|
775
891
|
page.data.queue_urls.each do |q|
|