aws-sdk-sqs 1.30.0 → 1.89.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 +550 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-sqs/client.rb +931 -350
- data/lib/aws-sdk-sqs/client_api.rb +326 -53
- data/lib/aws-sdk-sqs/customizations.rb +5 -1
- data/lib/aws-sdk-sqs/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-sqs/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-sqs/endpoints.rb +20 -0
- data/lib/aws-sdk-sqs/errors.rb +263 -1
- data/lib/aws-sdk-sqs/message.rb +16 -9
- data/lib/aws-sdk-sqs/plugins/endpoints.rb +77 -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 +237 -98
- data/lib/aws-sdk-sqs/queue_poller.rb +72 -36
- data/lib/aws-sdk-sqs/resource.rb +137 -65
- data/lib/aws-sdk-sqs/types.rb +943 -539
- data/lib/aws-sdk-sqs.rb +20 -11
- 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 +28 -15
data/lib/aws-sdk-sqs/queue.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
4
4
|
#
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
@@ -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
|
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,10 @@ 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
|
+
#
|
207
223
|
# A list of attributes that need to be returned along with each message.
|
208
224
|
# These attributes include:
|
209
225
|
#
|
@@ -215,19 +231,64 @@ module Aws::SQS
|
|
215
231
|
# * `ApproximateReceiveCount` – Returns the number of times a message
|
216
232
|
# has been received across all queues but not deleted.
|
217
233
|
#
|
218
|
-
# * `AWSTraceHeader` – Returns the
|
234
|
+
# * `AWSTraceHeader` – Returns the X-Ray trace header string.
|
219
235
|
#
|
220
236
|
# * `SenderId`
|
221
237
|
#
|
222
|
-
# * For
|
238
|
+
# * For a user, returns the user ID, for example
|
223
239
|
# `ABCDEFGHI1JKLMNOPQ23R`.
|
224
240
|
#
|
225
241
|
# * For an IAM role, returns the IAM role ID, for example
|
226
242
|
# `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
|
243
|
+
# * `SentTimestamp` – Returns the time the message was sent to the queue
|
244
|
+
# ([epoch time][1] in milliseconds).
|
245
|
+
#
|
246
|
+
# * `SqsManagedSseEnabled` – Enables server-side queue encryption using
|
247
|
+
# SQS owned encryption keys. Only one server-side encryption option is
|
248
|
+
# supported per queue (for example, [SSE-KMS][2] or [SSE-SQS][3]).
|
249
|
+
#
|
250
|
+
# * `MessageDeduplicationId` – Returns the value provided by the
|
251
|
+
# producer that calls the ` SendMessage ` action.
|
252
|
+
#
|
253
|
+
# * `MessageGroupId` – Returns the value provided by the producer that
|
254
|
+
# calls the ` SendMessage ` action. Messages with the same
|
255
|
+
# `MessageGroupId` are returned in sequence.
|
256
|
+
#
|
257
|
+
# * `SequenceNumber` – Returns the value provided by Amazon SQS.
|
258
|
+
#
|
259
|
+
#
|
260
|
+
#
|
261
|
+
# [1]: http://en.wikipedia.org/wiki/Unix_time
|
262
|
+
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html
|
263
|
+
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html
|
264
|
+
# @option options [Array<String>] :message_system_attribute_names
|
265
|
+
# A list of attributes that need to be returned along with each message.
|
266
|
+
# These attributes include:
|
267
|
+
#
|
268
|
+
# * `All` – Returns all values.
|
269
|
+
#
|
270
|
+
# * `ApproximateFirstReceiveTimestamp` – Returns the time the message
|
271
|
+
# was first received from the queue ([epoch time][1] in milliseconds).
|
272
|
+
#
|
273
|
+
# * `ApproximateReceiveCount` – Returns the number of times a message
|
274
|
+
# has been received across all queues but not deleted.
|
275
|
+
#
|
276
|
+
# * `AWSTraceHeader` – Returns the X-Ray trace header string.
|
277
|
+
#
|
278
|
+
# * `SenderId`
|
279
|
+
#
|
280
|
+
# * For a user, returns the user ID, for example
|
281
|
+
# `ABCDEFGHI1JKLMNOPQ23R`.
|
227
282
|
#
|
283
|
+
# * For an IAM role, returns the IAM role ID, for example
|
284
|
+
# `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
|
228
285
|
# * `SentTimestamp` – Returns the time the message was sent to the queue
|
229
286
|
# ([epoch time][1] in milliseconds).
|
230
287
|
#
|
288
|
+
# * `SqsManagedSseEnabled` – Enables server-side queue encryption using
|
289
|
+
# SQS owned encryption keys. Only one server-side encryption option is
|
290
|
+
# supported per queue (for example, [SSE-KMS][2] or [SSE-SQS][3]).
|
291
|
+
#
|
231
292
|
# * `MessageDeduplicationId` – Returns the value provided by the
|
232
293
|
# producer that calls the ` SendMessage ` action.
|
233
294
|
#
|
@@ -240,6 +301,8 @@ module Aws::SQS
|
|
240
301
|
#
|
241
302
|
#
|
242
303
|
# [1]: http://en.wikipedia.org/wiki/Unix_time
|
304
|
+
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html
|
305
|
+
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html
|
243
306
|
# @option options [Array<String>] :message_attribute_names
|
244
307
|
# The name of the message attribute, where *N* is the index.
|
245
308
|
#
|
@@ -273,8 +336,8 @@ module Aws::SQS
|
|
273
336
|
# The duration (in seconds) for which the call waits for a message to
|
274
337
|
# arrive in the queue before returning. If a message is available, the
|
275
338
|
# call returns sooner than `WaitTimeSeconds`. If no messages are
|
276
|
-
# available and the wait time expires, the call
|
277
|
-
#
|
339
|
+
# available and the wait time expires, the call does not return a
|
340
|
+
# message list.
|
278
341
|
#
|
279
342
|
# To avoid HTTP errors, ensure that the HTTP response timeout for
|
280
343
|
# `ReceiveMessage` requests is longer than the `WaitTimeSeconds`
|
@@ -302,10 +365,6 @@ module Aws::SQS
|
|
302
365
|
# * When you set `FifoQueue`, a caller of the `ReceiveMessage` action
|
303
366
|
# can provide a `ReceiveRequestAttemptId` explicitly.
|
304
367
|
#
|
305
|
-
# * If a caller of the `ReceiveMessage` action doesn't provide a
|
306
|
-
# `ReceiveRequestAttemptId`, Amazon SQS generates a
|
307
|
-
# `ReceiveRequestAttemptId`.
|
308
|
-
#
|
309
368
|
# * It is possible to retry the `ReceiveMessage` action with the same
|
310
369
|
# `ReceiveRequestAttemptId` if none of the messages have been modified
|
311
370
|
# (deleted or had their visibility changes).
|
@@ -314,7 +373,7 @@ module Aws::SQS
|
|
314
373
|
# `ReceiveRequestAttemptId` return the same messages and receipt
|
315
374
|
# handles. If a retry occurs within the deduplication interval, it
|
316
375
|
# resets the visibility timeout. For more information, see [Visibility
|
317
|
-
# Timeout][1] in the *Amazon
|
376
|
+
# Timeout][1] in the *Amazon SQS Developer Guide*.
|
318
377
|
#
|
319
378
|
# If a caller of the `ReceiveMessage` action still processes messages
|
320
379
|
# when the visibility timeout expires and messages become visible,
|
@@ -339,12 +398,12 @@ module Aws::SQS
|
|
339
398
|
#
|
340
399
|
# The maximum length of `ReceiveRequestAttemptId` is 128 characters.
|
341
400
|
# `ReceiveRequestAttemptId` can contain alphanumeric characters (`a-z`,
|
342
|
-
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_
|
401
|
+
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
|
343
402
|
# ``).
|
344
403
|
#
|
345
404
|
# For best practices of using `ReceiveRequestAttemptId`, see [Using the
|
346
|
-
# ReceiveRequestAttemptId Request Parameter][2] in the *Amazon
|
347
|
-
#
|
405
|
+
# ReceiveRequestAttemptId Request Parameter][2] in the *Amazon SQS
|
406
|
+
# Developer Guide*.
|
348
407
|
#
|
349
408
|
#
|
350
409
|
#
|
@@ -354,7 +413,9 @@ module Aws::SQS
|
|
354
413
|
def receive_messages(options = {})
|
355
414
|
batch = []
|
356
415
|
options = options.merge(queue_url: @url)
|
357
|
-
resp =
|
416
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
417
|
+
@client.receive_message(options)
|
418
|
+
end
|
358
419
|
resp.data.messages.each do |m|
|
359
420
|
batch << Message.new(
|
360
421
|
queue_url: @url,
|
@@ -378,7 +439,9 @@ module Aws::SQS
|
|
378
439
|
# @return [EmptyStructure]
|
379
440
|
def remove_permission(options = {})
|
380
441
|
options = options.merge(queue_url: @url)
|
381
|
-
resp =
|
442
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
443
|
+
@client.remove_permission(options)
|
444
|
+
end
|
382
445
|
resp.data
|
383
446
|
end
|
384
447
|
|
@@ -410,16 +473,21 @@ module Aws::SQS
|
|
410
473
|
# })
|
411
474
|
# @param [Hash] options ({})
|
412
475
|
# @option options [required, String] :message_body
|
413
|
-
# The message to send. The
|
476
|
+
# The message to send. The minimum size is one character. The maximum
|
477
|
+
# size is 256 KiB.
|
414
478
|
#
|
415
479
|
# A message can include only XML, JSON, and unformatted text. The
|
416
|
-
# following Unicode characters are allowed
|
480
|
+
# following Unicode characters are allowed. For more information, see
|
481
|
+
# the [W3C specification for characters][1].
|
417
482
|
#
|
418
483
|
# `#x9` \| `#xA` \| `#xD` \| `#x20` to `#xD7FF` \| `#xE000` to `#xFFFD`
|
419
484
|
# \| `#x10000` to `#x10FFFF`
|
420
485
|
#
|
421
|
-
#
|
422
|
-
#
|
486
|
+
# Amazon SQS does not throw an exception or completely reject the
|
487
|
+
# message if it contains invalid characters. Instead, it replaces those
|
488
|
+
# invalid characters with `U+FFFD` before storing the message in the
|
489
|
+
# queue, as long as the message body contains at least one valid
|
490
|
+
# character.
|
423
491
|
#
|
424
492
|
#
|
425
493
|
#
|
@@ -437,19 +505,19 @@ module Aws::SQS
|
|
437
505
|
# </note>
|
438
506
|
# @option options [Hash<String,Types::MessageAttributeValue>] :message_attributes
|
439
507
|
# Each message attribute consists of a `Name`, `Type`, and `Value`. For
|
440
|
-
# more information, see [Amazon SQS
|
441
|
-
# *Amazon
|
508
|
+
# more information, see [Amazon SQS message attributes][1] in the
|
509
|
+
# *Amazon SQS Developer Guide*.
|
442
510
|
#
|
443
511
|
#
|
444
512
|
#
|
445
|
-
# [1]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-
|
513
|
+
# [1]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes
|
446
514
|
# @option options [Hash<String,Types::MessageSystemAttributeValue>] :message_system_attributes
|
447
515
|
# The message system attribute to send. Each message system attribute
|
448
516
|
# consists of a `Name`, `Type`, and `Value`.
|
449
517
|
#
|
450
518
|
# * Currently, the only supported message system attribute is
|
451
519
|
# `AWSTraceHeader`. Its type must be `String` and its value must be a
|
452
|
-
# correctly formatted
|
520
|
+
# correctly formatted X-Ray trace header string.
|
453
521
|
#
|
454
522
|
# * The size of a message system attribute doesn't count towards the
|
455
523
|
# total size of a message.
|
@@ -460,8 +528,8 @@ module Aws::SQS
|
|
460
528
|
# particular `MessageDeduplicationId` is sent successfully, any messages
|
461
529
|
# sent with the same `MessageDeduplicationId` are accepted successfully
|
462
530
|
# but aren't delivered during the 5-minute deduplication interval. For
|
463
|
-
# more information, see [ Exactly-
|
464
|
-
#
|
531
|
+
# more information, see [ Exactly-once processing][1] in the *Amazon SQS
|
532
|
+
# Developer Guide*.
|
465
533
|
#
|
466
534
|
# * Every message must have a unique `MessageDeduplicationId`,
|
467
535
|
#
|
@@ -478,7 +546,6 @@ module Aws::SQS
|
|
478
546
|
#
|
479
547
|
# * If the queue has `ContentBasedDeduplication` set, your
|
480
548
|
# `MessageDeduplicationId` overrides the generated one.
|
481
|
-
#
|
482
549
|
# * When `ContentBasedDeduplication` is in effect, messages with
|
483
550
|
# identical content sent within the deduplication interval are treated
|
484
551
|
# as duplicates and only one copy of the message is delivered.
|
@@ -503,16 +570,16 @@ module Aws::SQS
|
|
503
570
|
#
|
504
571
|
# The maximum length of `MessageDeduplicationId` is 128 characters.
|
505
572
|
# `MessageDeduplicationId` can contain alphanumeric characters (`a-z`,
|
506
|
-
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_
|
573
|
+
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
|
507
574
|
# ``).
|
508
575
|
#
|
509
576
|
# For best practices of using `MessageDeduplicationId`, see [Using the
|
510
|
-
# MessageDeduplicationId Property][2] in the *Amazon
|
511
|
-
#
|
577
|
+
# MessageDeduplicationId Property][2] in the *Amazon SQS Developer
|
578
|
+
# Guide*.
|
512
579
|
#
|
513
580
|
#
|
514
581
|
#
|
515
|
-
# [1]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues
|
582
|
+
# [1]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html
|
516
583
|
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html
|
517
584
|
# @option options [String] :message_group_id
|
518
585
|
# This parameter applies only to FIFO (first-in-first-out) queues.
|
@@ -533,13 +600,12 @@ module Aws::SQS
|
|
533
600
|
# `MessageGroupId` values. For each `MessageGroupId`, the messages are
|
534
601
|
# sorted by time sent. The caller can't specify a `MessageGroupId`.
|
535
602
|
#
|
536
|
-
# The length of `MessageGroupId` is 128 characters. Valid
|
537
|
-
# alphanumeric characters and punctuation ``
|
538
|
-
# (!"#$%&'()*+,-./:;<=>?@[\]^_
|
603
|
+
# The maximum length of `MessageGroupId` is 128 characters. Valid
|
604
|
+
# values: alphanumeric characters and punctuation ``
|
605
|
+
# (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) ``.
|
539
606
|
#
|
540
607
|
# For best practices of using `MessageGroupId`, see [Using the
|
541
|
-
# MessageGroupId Property][1] in the *Amazon
|
542
|
-
# Developer Guide*.
|
608
|
+
# MessageGroupId Property][1] in the *Amazon SQS Developer Guide*.
|
543
609
|
#
|
544
610
|
# `MessageGroupId` is required for FIFO queues. You can't use it for
|
545
611
|
# Standard queues.
|
@@ -550,7 +616,9 @@ module Aws::SQS
|
|
550
616
|
# @return [Types::SendMessageResult]
|
551
617
|
def send_message(options = {})
|
552
618
|
options = options.merge(queue_url: @url)
|
553
|
-
resp =
|
619
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
620
|
+
@client.send_message(options)
|
621
|
+
end
|
554
622
|
resp.data
|
555
623
|
end
|
556
624
|
|
@@ -591,7 +659,9 @@ module Aws::SQS
|
|
591
659
|
# @return [Types::SendMessageBatchResult]
|
592
660
|
def send_messages(options = {})
|
593
661
|
options = options.merge(queue_url: @url)
|
594
|
-
resp =
|
662
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
663
|
+
@client.send_message_batch(options)
|
664
|
+
end
|
595
665
|
resp.data
|
596
666
|
end
|
597
667
|
|
@@ -621,69 +691,105 @@ module Aws::SQS
|
|
621
691
|
# * `MessageRetentionPeriod` – The length of time, in seconds, for which
|
622
692
|
# Amazon SQS retains a message. Valid values: An integer representing
|
623
693
|
# seconds, from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600
|
624
|
-
# (4 days).
|
625
|
-
#
|
626
|
-
#
|
627
|
-
#
|
628
|
-
#
|
694
|
+
# (4 days). When you change a queue's attributes, the change can take
|
695
|
+
# up to 60 seconds for most of the attributes to propagate throughout
|
696
|
+
# the Amazon SQS system. Changes made to the `MessageRetentionPeriod`
|
697
|
+
# attribute can take up to 15 minutes and will impact existing
|
698
|
+
# messages in the queue potentially causing them to be expired and
|
699
|
+
# deleted if the `MessageRetentionPeriod` is reduced below the age of
|
700
|
+
# existing messages.
|
701
|
+
#
|
702
|
+
# * `Policy` – The queue's policy. A valid Amazon Web Services policy.
|
703
|
+
# For more information about policy structure, see [Overview of Amazon
|
704
|
+
# Web Services IAM Policies][1] in the *Identity and Access Management
|
705
|
+
# User Guide*.
|
629
706
|
#
|
630
707
|
# * `ReceiveMessageWaitTimeSeconds` – The length of time, in seconds,
|
631
708
|
# for which a ` ReceiveMessage ` action waits for a message to arrive.
|
632
709
|
# Valid values: An integer from 0 to 20 (seconds). Default: 0.
|
633
710
|
#
|
711
|
+
# * `VisibilityTimeout` – The visibility timeout for the queue, in
|
712
|
+
# seconds. Valid values: An integer from 0 to 43,200 (12 hours).
|
713
|
+
# Default: 30. For more information about the visibility timeout, see
|
714
|
+
# [Visibility Timeout][2] in the *Amazon SQS Developer Guide*.
|
715
|
+
#
|
716
|
+
# The following attributes apply only to [dead-letter queues:][3]
|
717
|
+
#
|
634
718
|
# * `RedrivePolicy` – The string that includes the parameters for the
|
635
719
|
# dead-letter queue functionality of the source queue as a JSON
|
636
|
-
# object.
|
637
|
-
# dead-letter queues, see [Using Amazon SQS Dead-Letter Queues][2] in
|
638
|
-
# the *Amazon Simple Queue Service Developer Guide*.
|
720
|
+
# object. The parameters are as follows:
|
639
721
|
#
|
640
722
|
# * `deadLetterTargetArn` – The Amazon Resource Name (ARN) of the
|
641
723
|
# dead-letter queue to which Amazon SQS moves messages after the
|
642
724
|
# value of `maxReceiveCount` is exceeded.
|
643
725
|
#
|
644
726
|
# * `maxReceiveCount` – The number of times a message is delivered to
|
645
|
-
# the source queue before being moved to the dead-letter queue.
|
646
|
-
# the `ReceiveCount` for a message exceeds the
|
647
|
-
# a queue, Amazon SQS moves the message to the
|
727
|
+
# the source queue before being moved to the dead-letter queue.
|
728
|
+
# Default: 10. When the `ReceiveCount` for a message exceeds the
|
729
|
+
# `maxReceiveCount` for a queue, Amazon SQS moves the message to the
|
730
|
+
# dead-letter-queue.
|
731
|
+
# * `RedriveAllowPolicy` – The string that includes the parameters for
|
732
|
+
# the permissions for the dead-letter queue redrive permission and
|
733
|
+
# which source queues can specify dead-letter queues as a JSON object.
|
734
|
+
# The parameters are as follows:
|
735
|
+
#
|
736
|
+
# * `redrivePermission` – The permission type that defines which
|
737
|
+
# source queues can specify the current queue as the dead-letter
|
738
|
+
# queue. Valid values are:
|
739
|
+
#
|
740
|
+
# * `allowAll` – (Default) Any source queues in this Amazon Web
|
741
|
+
# Services account in the same Region can specify this queue as
|
742
|
+
# the dead-letter queue.
|
743
|
+
#
|
744
|
+
# * `denyAll` – No source queues can specify this queue as the
|
745
|
+
# dead-letter queue.
|
746
|
+
#
|
747
|
+
# * `byQueue` – Only queues specified by the `sourceQueueArns`
|
748
|
+
# parameter can specify this queue as the dead-letter queue.
|
749
|
+
# * `sourceQueueArns` – The Amazon Resource Names (ARN)s of the source
|
750
|
+
# queues that can specify this queue as the dead-letter queue and
|
751
|
+
# redrive messages. You can specify this parameter only when the
|
752
|
+
# `redrivePermission` parameter is set to `byQueue`. You can specify
|
753
|
+
# up to 10 source queue ARNs. To allow more than 10 source queues to
|
754
|
+
# specify dead-letter queues, set the `redrivePermission` parameter
|
755
|
+
# to `allowAll`.
|
756
|
+
#
|
757
|
+
# <note markdown="1"> The dead-letter queue of a FIFO queue must also be a FIFO queue.
|
758
|
+
# Similarly, the dead-letter queue of a standard queue must also be a
|
759
|
+
# standard queue.
|
648
760
|
#
|
649
|
-
#
|
650
|
-
# Similarly, the dead-letter queue of a standard queue must also be a
|
651
|
-
# standard queue.
|
652
|
-
#
|
653
|
-
# </note>
|
654
|
-
#
|
655
|
-
# * `VisibilityTimeout` – The visibility timeout for the queue, in
|
656
|
-
# seconds. Valid values: An integer from 0 to 43,200 (12 hours).
|
657
|
-
# Default: 30. For more information about the visibility timeout, see
|
658
|
-
# [Visibility Timeout][3] in the *Amazon Simple Queue Service
|
659
|
-
# Developer Guide*.
|
761
|
+
# </note>
|
660
762
|
#
|
661
|
-
# The following attributes apply only to [server-side-encryption][4]
|
763
|
+
# The following attributes apply only to [server-side-encryption][4]:
|
662
764
|
#
|
663
|
-
# * `KmsMasterKeyId` – The ID of an
|
664
|
-
# (CMK) for Amazon SQS or a custom CMK. For more
|
665
|
-
# Terms][5]. While the alias of the AWS-managed
|
666
|
-
# always `alias/aws/sqs`, the alias of a custom
|
667
|
-
# be `alias/MyAlias `. For more examples, see
|
668
|
-
# Key Management Service API Reference*.
|
765
|
+
# * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
|
766
|
+
# master key (CMK) for Amazon SQS or a custom CMK. For more
|
767
|
+
# information, see [Key Terms][5]. While the alias of the AWS-managed
|
768
|
+
# CMK for Amazon SQS is always `alias/aws/sqs`, the alias of a custom
|
769
|
+
# CMK can, for example, be `alias/MyAlias `. For more examples, see
|
770
|
+
# [KeyId][6] in the *Key Management Service API Reference*.
|
669
771
|
#
|
670
772
|
# * `KmsDataKeyReusePeriodSeconds` – The length of time, in seconds, for
|
671
773
|
# which Amazon SQS can reuse a [data key][7] to encrypt or decrypt
|
672
|
-
# messages before calling
|
673
|
-
#
|
674
|
-
#
|
675
|
-
#
|
676
|
-
#
|
677
|
-
#
|
774
|
+
# messages before calling KMS again. An integer representing seconds,
|
775
|
+
# between 60 seconds (1 minute) and 86,400 seconds (24 hours).
|
776
|
+
# Default: 300 (5 minutes). A shorter time period provides better
|
777
|
+
# security but results in more calls to KMS which might incur charges
|
778
|
+
# after Free Tier. For more information, see [How Does the Data Key
|
779
|
+
# Reuse Period Work?][8].
|
780
|
+
#
|
781
|
+
# * `SqsManagedSseEnabled` – Enables server-side queue encryption using
|
782
|
+
# SQS owned encryption keys. Only one server-side encryption option is
|
783
|
+
# supported per queue (for example, [SSE-KMS][9] or [SSE-SQS][10]).
|
678
784
|
#
|
679
785
|
# The following attribute applies only to [FIFO (first-in-first-out)
|
680
|
-
# queues][
|
786
|
+
# queues][11]:
|
681
787
|
#
|
682
788
|
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
683
|
-
# For more information, see [Exactly-
|
684
|
-
# *Amazon
|
789
|
+
# For more information, see [Exactly-once processing][12] in the
|
790
|
+
# *Amazon SQS Developer Guide*. Note the following:
|
685
791
|
#
|
686
|
-
# * Every message must have a unique `MessageDeduplicationId
|
792
|
+
# * Every message must have a unique `MessageDeduplicationId`.
|
687
793
|
#
|
688
794
|
# * You may provide a `MessageDeduplicationId` explicitly.
|
689
795
|
#
|
@@ -699,7 +805,6 @@ module Aws::SQS
|
|
699
805
|
#
|
700
806
|
# * If the queue has `ContentBasedDeduplication` set, your
|
701
807
|
# `MessageDeduplicationId` overrides the generated one.
|
702
|
-
#
|
703
808
|
# * When `ContentBasedDeduplication` is in effect, messages with
|
704
809
|
# identical content sent within the deduplication interval are
|
705
810
|
# treated as duplicates and only one copy of the message is
|
@@ -711,22 +816,54 @@ module Aws::SQS
|
|
711
816
|
# `MessageDeduplicationId`, the two messages are treated as
|
712
817
|
# duplicates and only one copy of the message is delivered.
|
713
818
|
#
|
819
|
+
# The following attributes apply only to [high throughput for FIFO
|
820
|
+
# queues][13]:
|
821
|
+
#
|
822
|
+
# * `DeduplicationScope` – Specifies whether message deduplication
|
823
|
+
# occurs at the message group or queue level. Valid values are
|
824
|
+
# `messageGroup` and `queue`.
|
825
|
+
#
|
826
|
+
# * `FifoThroughputLimit` – Specifies whether the FIFO queue throughput
|
827
|
+
# quota applies to the entire queue or per message group. Valid values
|
828
|
+
# are `perQueue` and `perMessageGroupId`. The `perMessageGroupId`
|
829
|
+
# value is allowed only when the value for `DeduplicationScope` is
|
830
|
+
# `messageGroup`.
|
831
|
+
#
|
832
|
+
# To enable high throughput for FIFO queues, do the following:
|
833
|
+
#
|
834
|
+
# * Set `DeduplicationScope` to `messageGroup`.
|
835
|
+
#
|
836
|
+
# * Set `FifoThroughputLimit` to `perMessageGroupId`.
|
837
|
+
#
|
838
|
+
# If you set these attributes to anything other than the values shown
|
839
|
+
# for enabling high throughput, normal throughput is in effect and
|
840
|
+
# deduplication occurs as specified.
|
841
|
+
#
|
842
|
+
# For information on throughput quotas, see [Quotas related to
|
843
|
+
# messages][14] in the *Amazon SQS Developer Guide*.
|
844
|
+
#
|
714
845
|
#
|
715
846
|
#
|
716
847
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html
|
717
|
-
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-
|
718
|
-
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-
|
848
|
+
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
849
|
+
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
|
719
850
|
# [4]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html
|
720
851
|
# [5]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms
|
721
852
|
# [6]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
|
722
853
|
# [7]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys
|
723
854
|
# [8]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work
|
724
|
-
# [9]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/
|
725
|
-
# [10]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/
|
855
|
+
# [9]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html
|
856
|
+
# [10]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html
|
857
|
+
# [11]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
|
858
|
+
# [12]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html
|
859
|
+
# [13]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html
|
860
|
+
# [14]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html
|
726
861
|
# @return [EmptyStructure]
|
727
862
|
def set_attributes(options = {})
|
728
863
|
options = options.merge(queue_url: @url)
|
729
|
-
resp =
|
864
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
865
|
+
@client.set_queue_attributes(options)
|
866
|
+
end
|
730
867
|
resp.data
|
731
868
|
end
|
732
869
|
|
@@ -740,7 +877,9 @@ module Aws::SQS
|
|
740
877
|
def dead_letter_source_queues(options = {})
|
741
878
|
batches = Enumerator.new do |y|
|
742
879
|
options = options.merge(queue_url: @url)
|
743
|
-
resp =
|
880
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
881
|
+
@client.list_dead_letter_source_queues(options)
|
882
|
+
end
|
744
883
|
resp.each_page do |page|
|
745
884
|
batch = []
|
746
885
|
page.data.queue_urls.each do |q|
|