aws-sdk-sqs 1.70.0 → 1.93.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.
@@ -6,7 +6,6 @@ module Aws
6
6
  module SQS
7
7
  module Plugins
8
8
  class Md5s < Seahorse::Client::Plugin
9
-
10
9
  # @api private
11
10
  class Handler < Seahorse::Client::Handler
12
11
  def call(context)
@@ -26,16 +25,17 @@ module Aws
26
25
  'String' => 1,
27
26
  'Binary' => 2,
28
27
  'Number' => 1
29
- }
28
+ }.freeze
30
29
 
31
- DATA_TYPE = /\A(String|Binary|Number)(\..+)?\z/
30
+ DATA_TYPE = /\A(String|Binary|Number)(\..+)?\z/.freeze
32
31
 
33
32
  NORMALIZED_ENCODING = Encoding::UTF_8
34
33
 
35
34
  def validate_send_message(context, response)
36
35
  body = context.params[:message_body]
37
36
  attributes = context.params[:message_attributes]
38
- validate_single_message(body, attributes, response)
37
+ system_attributes = context.params[:message_system_attributes]
38
+ validate_single_message(body, attributes, system_attributes, response)
39
39
  end
40
40
 
41
41
  def validate_send_message_batch(context, response)
@@ -43,63 +43,87 @@ module Aws
43
43
  id = entry[:id]
44
44
  body = entry[:message_body]
45
45
  attributes = entry[:message_attributes]
46
+ system_attributes = entry[:message_system_attributes]
46
47
  message_response = response.successful.select { |r| r.id == id }[0]
47
48
  unless message_response.nil?
48
- validate_single_message(body, attributes, message_response)
49
+ validate_single_message(body, attributes, system_attributes, message_response)
49
50
  end
50
51
  end
51
52
  end
52
53
 
53
- def validate_single_message(body, attributes, response)
54
+ def validate_single_message(body, attributes, system_attributes, response)
54
55
  validate_body(body, response)
55
56
  unless attributes.nil? || attributes.empty?
56
57
  validate_attributes(attributes, response)
57
58
  end
59
+ unless system_attributes.nil? || system_attributes.empty?
60
+ validate_system_attributes(system_attributes, response)
61
+ end
58
62
  end
59
63
 
60
64
  def validate_body(body, response)
61
65
  calculated_md5 = md5_of_message_body(body)
62
66
  returned_md5 = response.md5_of_message_body
63
- if calculated_md5 != returned_md5
64
- error_message = mismatch_error_message(
65
- 'message body',
66
- calculated_md5,
67
- returned_md5,
68
- response)
69
- raise Aws::Errors::ChecksumError, error_message
70
- end
67
+ return unless calculated_md5 != returned_md5
68
+
69
+ error_message = mismatch_error_message(
70
+ 'message body',
71
+ calculated_md5,
72
+ returned_md5,
73
+ response
74
+ )
75
+ raise Aws::Errors::ChecksumError, error_message
71
76
  end
72
77
 
73
78
  def validate_attributes(attributes, response)
74
79
  calculated_md5 = md5_of_message_attributes(attributes)
75
80
  returned_md5 = response.md5_of_message_attributes
76
- if returned_md5 != calculated_md5
77
- error_message = mismatch_error_message(
78
- 'message attributes',
79
- calculated_md5,
80
- returned_md5,
81
- response)
82
- raise Aws::Errors::ChecksumError, error_message
83
- end
81
+ return unless returned_md5 != calculated_md5
82
+
83
+ error_message = mismatch_error_message(
84
+ 'message attributes',
85
+ calculated_md5,
86
+ returned_md5,
87
+ response
88
+ )
89
+ raise Aws::Errors::ChecksumError, error_message
90
+ end
91
+
92
+ def validate_system_attributes(system_attributes, response)
93
+ calculated_md5 = md5_of_message_system_attributes(system_attributes)
94
+ returned_md5 = response.md5_of_message_system_attributes
95
+ return unless returned_md5 != calculated_md5
96
+
97
+ error_message = mismatch_error_message(
98
+ 'message system attributes',
99
+ calculated_md5,
100
+ returned_md5,
101
+ response
102
+ )
103
+ raise Aws::Errors::ChecksumError, error_message
84
104
  end
85
105
 
86
106
  def md5_of_message_body(message_body)
87
107
  OpenSSL::Digest::MD5.hexdigest(message_body)
88
108
  end
89
109
 
110
+ # MD5 of Message Attributes and System Attributes are effectively
111
+ # the same calculation. However, keeping these as two methods because
112
+ # they are modeled as two different shapes.
113
+ ###
90
114
  def md5_of_message_attributes(message_attributes)
91
- encoded = { }
115
+ encoded = {}
92
116
  message_attributes.each do |name, attribute|
93
117
  name = name.to_s
94
118
  encoded[name] = String.new
95
119
  data_type_without_label = DATA_TYPE.match(attribute[:data_type])[1]
96
120
  encoded[name] << encode_length_and_bytes(name) <<
97
- encode_length_and_bytes(attribute[:data_type]) <<
98
- [TRANSPORT_TYPE_ENCODINGS[data_type_without_label]].pack('C'.freeze)
121
+ encode_length_and_bytes(attribute[:data_type]) <<
122
+ [TRANSPORT_TYPE_ENCODINGS[data_type_without_label]].pack('C')
99
123
 
100
- if attribute[:string_value] != nil
124
+ if !attribute[:string_value].nil?
101
125
  encoded[name] << encode_length_and_string(attribute[:string_value])
102
- elsif attribute[:binary_value] != nil
126
+ elsif !attribute[:binary_value].nil?
103
127
  encoded[name] << encode_length_and_bytes(attribute[:binary_value])
104
128
  end
105
129
  end
@@ -110,6 +134,30 @@ module Aws
110
134
  OpenSSL::Digest::MD5.hexdigest(buffer)
111
135
  end
112
136
 
137
+ def md5_of_message_system_attributes(message_system_attributes)
138
+ encoded = {}
139
+ message_system_attributes.each do |name, attribute|
140
+ name = name.to_s
141
+ encoded[name] = String.new
142
+ data_type_without_label = DATA_TYPE.match(attribute[:data_type])[1]
143
+ encoded[name] << encode_length_and_bytes(name) <<
144
+ encode_length_and_bytes(attribute[:data_type]) <<
145
+ [TRANSPORT_TYPE_ENCODINGS[data_type_without_label]].pack('C')
146
+
147
+ if !attribute[:string_value].nil?
148
+ encoded[name] << encode_length_and_string(attribute[:string_value])
149
+ elsif !attribute[:binary_value].nil?
150
+ encoded[name] << encode_length_and_bytes(attribute[:binary_value])
151
+ end
152
+ end
153
+
154
+ buffer = encoded.keys.sort.reduce(String.new) do |string, name|
155
+ string << encoded[name]
156
+ end
157
+ OpenSSL::Digest::MD5.hexdigest(buffer)
158
+ end
159
+ ###
160
+
113
161
  def encode_length_and_string(string)
114
162
  string = String.new(string)
115
163
  string.encode!(NORMALIZED_ENCODING)
@@ -117,7 +165,7 @@ module Aws
117
165
  end
118
166
 
119
167
  def encode_length_and_bytes(bytes)
120
- [bytes.bytesize, bytes].pack('L>a*'.freeze)
168
+ [bytes.bytesize, bytes].pack('L>a*')
121
169
  end
122
170
 
123
171
  def mismatch_error_message(section, local_md5, returned_md5, response)
@@ -154,13 +202,14 @@ not match.
154
202
  end
155
203
 
156
204
  def add_handlers(handlers, config)
157
- if config.verify_checksums
158
- handlers.add(Handler, {
159
- priority: 10 ,
160
- step: :validate,
161
- operations: [:send_message, :send_message_batch]
162
- })
163
- end
205
+ return unless config.verify_checksums
206
+
207
+ handlers.add(
208
+ Handler,
209
+ priority: 10,
210
+ step: :validate,
211
+ operations: %i[send_message send_message_batch]
212
+ )
164
213
  end
165
214
  end
166
215
  end
@@ -54,7 +54,7 @@ module Aws::SQS
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = Aws::Plugins::UserAgent.feature('resource') do
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
58
  @client.get_queue_attributes(
59
59
  queue_url: @url,
60
60
  attribute_names: ["All"]
@@ -125,7 +125,7 @@ module Aws::SQS
125
125
  # @return [EmptyStructure]
126
126
  def add_permission(options = {})
127
127
  options = options.merge(queue_url: @url)
128
- resp = Aws::Plugins::UserAgent.feature('resource') do
128
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
129
129
  @client.add_permission(options)
130
130
  end
131
131
  resp.data
@@ -149,7 +149,7 @@ module Aws::SQS
149
149
  # @return [Types::ChangeMessageVisibilityBatchResult]
150
150
  def change_message_visibility_batch(options = {})
151
151
  options = options.merge(queue_url: @url)
152
- resp = Aws::Plugins::UserAgent.feature('resource') do
152
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
153
153
  @client.change_message_visibility_batch(options)
154
154
  end
155
155
  resp.data
@@ -162,7 +162,7 @@ module Aws::SQS
162
162
  # @return [EmptyStructure]
163
163
  def delete(options = {})
164
164
  options = options.merge(queue_url: @url)
165
- resp = Aws::Plugins::UserAgent.feature('resource') do
165
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
166
166
  @client.delete_queue(options)
167
167
  end
168
168
  resp.data
@@ -184,7 +184,7 @@ module Aws::SQS
184
184
  # @return [Types::DeleteMessageBatchResult]
185
185
  def delete_messages(options = {})
186
186
  options = options.merge(queue_url: @url)
187
- resp = Aws::Plugins::UserAgent.feature('resource') do
187
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
188
188
  @client.delete_message_batch(options)
189
189
  end
190
190
  resp.data
@@ -197,7 +197,7 @@ module Aws::SQS
197
197
  # @return [EmptyStructure]
198
198
  def purge(options = {})
199
199
  options = options.merge(queue_url: @url)
200
- resp = Aws::Plugins::UserAgent.feature('resource') do
200
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
201
201
  @client.purge_queue(options)
202
202
  end
203
203
  resp.data
@@ -207,6 +207,7 @@ module Aws::SQS
207
207
  #
208
208
  # message = queue.receive_messages({
209
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
210
211
  # message_attribute_names: ["MessageAttributeName"],
211
212
  # max_number_of_messages: 1,
212
213
  # visibility_timeout: 1,
@@ -215,6 +216,10 @@ module Aws::SQS
215
216
  # })
216
217
  # @param [Hash] options ({})
217
218
  # @option options [Array<String>] :attribute_names
219
+ # This parameter has been discontinued but will be supported for
220
+ # backward compatibility. To provide attribute names, you are encouraged
221
+ # to use `MessageSystemAttributeNames`.
222
+ #
218
223
  # A list of attributes that need to be returned along with each message.
219
224
  # These attributes include:
220
225
  #
@@ -235,7 +240,48 @@ module Aws::SQS
235
240
  #
236
241
  # * For an IAM role, returns the IAM role ID, for example
237
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).
238
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`.
282
+ #
283
+ # * For an IAM role, returns the IAM role ID, for example
284
+ # `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
239
285
  # * `SentTimestamp` – Returns the time the message was sent to the queue
240
286
  # ([epoch time][1] in milliseconds).
241
287
  #
@@ -285,13 +331,46 @@ module Aws::SQS
285
331
  # @option options [Integer] :visibility_timeout
286
332
  # The duration (in seconds) that the received messages are hidden from
287
333
  # subsequent retrieve requests after being retrieved by a
288
- # `ReceiveMessage` request.
334
+ # `ReceiveMessage` request. If not specified, the default visibility
335
+ # timeout for the queue is used, which is 30 seconds.
336
+ #
337
+ # Understanding `VisibilityTimeout`:
338
+ #
339
+ # * When a message is received from a queue, it becomes temporarily
340
+ # invisible to other consumers for the duration of the visibility
341
+ # timeout. This prevents multiple consumers from processing the same
342
+ # message simultaneously. If the message is not deleted or its
343
+ # visibility timeout is not extended before the timeout expires, it
344
+ # becomes visible again and can be retrieved by other consumers.
345
+ #
346
+ # * Setting an appropriate visibility timeout is crucial. If it's too
347
+ # short, the message might become visible again before processing is
348
+ # complete, leading to duplicate processing. If it's too long, it
349
+ # delays the reprocessing of messages if the initial processing fails.
350
+ #
351
+ # * You can adjust the visibility timeout using the
352
+ # `--visibility-timeout` parameter in the `receive-message` command to
353
+ # match the processing time required by your application.
354
+ #
355
+ # * A message that isn't deleted or a message whose visibility isn't
356
+ # extended before the visibility timeout expires counts as a failed
357
+ # receive. Depending on the configuration of the queue, the message
358
+ # might be sent to the dead-letter queue.
359
+ #
360
+ # For more information, see [Visibility Timeout][1] in the *Amazon SQS
361
+ # Developer Guide*.
362
+ #
363
+ #
364
+ #
365
+ # [1]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
289
366
  # @option options [Integer] :wait_time_seconds
290
367
  # The duration (in seconds) for which the call waits for a message to
291
368
  # arrive in the queue before returning. If a message is available, the
292
369
  # call returns sooner than `WaitTimeSeconds`. If no messages are
293
- # available and the wait time expires, the call returns successfully
294
- # with an empty list of messages.
370
+ # available and the wait time expires, the call does not return a
371
+ # message list. If you are using the Java SDK, it returns a
372
+ # `ReceiveMessageResponse` object, which has a empty list instead of a
373
+ # Null object.
295
374
  #
296
375
  # To avoid HTTP errors, ensure that the HTTP response timeout for
297
376
  # `ReceiveMessage` requests is longer than the `WaitTimeSeconds`
@@ -319,10 +398,6 @@ module Aws::SQS
319
398
  # * When you set `FifoQueue`, a caller of the `ReceiveMessage` action
320
399
  # can provide a `ReceiveRequestAttemptId` explicitly.
321
400
  #
322
- # * If a caller of the `ReceiveMessage` action doesn't provide a
323
- # `ReceiveRequestAttemptId`, Amazon SQS generates a
324
- # `ReceiveRequestAttemptId`.
325
- #
326
401
  # * It is possible to retry the `ReceiveMessage` action with the same
327
402
  # `ReceiveRequestAttemptId` if none of the messages have been modified
328
403
  # (deleted or had their visibility changes).
@@ -356,7 +431,7 @@ module Aws::SQS
356
431
  #
357
432
  # The maximum length of `ReceiveRequestAttemptId` is 128 characters.
358
433
  # `ReceiveRequestAttemptId` can contain alphanumeric characters (`a-z`,
359
- # `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~
434
+ # `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
360
435
  # ``).
361
436
  #
362
437
  # For best practices of using `ReceiveRequestAttemptId`, see [Using the
@@ -371,7 +446,7 @@ module Aws::SQS
371
446
  def receive_messages(options = {})
372
447
  batch = []
373
448
  options = options.merge(queue_url: @url)
374
- resp = Aws::Plugins::UserAgent.feature('resource') do
449
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
375
450
  @client.receive_message(options)
376
451
  end
377
452
  resp.data.messages.each do |m|
@@ -397,7 +472,7 @@ module Aws::SQS
397
472
  # @return [EmptyStructure]
398
473
  def remove_permission(options = {})
399
474
  options = options.merge(queue_url: @url)
400
- resp = Aws::Plugins::UserAgent.feature('resource') do
475
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
401
476
  @client.remove_permission(options)
402
477
  end
403
478
  resp.data
@@ -435,13 +510,17 @@ module Aws::SQS
435
510
  # size is 256 KiB.
436
511
  #
437
512
  # A message can include only XML, JSON, and unformatted text. The
438
- # following Unicode characters are allowed:
513
+ # following Unicode characters are allowed. For more information, see
514
+ # the [W3C specification for characters][1].
439
515
  #
440
516
  # `#x9` \| `#xA` \| `#xD` \| `#x20` to `#xD7FF` \| `#xE000` to `#xFFFD`
441
517
  # \| `#x10000` to `#x10FFFF`
442
518
  #
443
- # Any characters not included in this list will be rejected. For more
444
- # information, see the [W3C specification for characters][1].
519
+ # Amazon SQS does not throw an exception or completely reject the
520
+ # message if it contains invalid characters. Instead, it replaces those
521
+ # invalid characters with `U+FFFD` before storing the message in the
522
+ # queue, as long as the message body contains at least one valid
523
+ # character.
445
524
  #
446
525
  #
447
526
  #
@@ -500,7 +579,6 @@ module Aws::SQS
500
579
  #
501
580
  # * If the queue has `ContentBasedDeduplication` set, your
502
581
  # `MessageDeduplicationId` overrides the generated one.
503
- #
504
582
  # * When `ContentBasedDeduplication` is in effect, messages with
505
583
  # identical content sent within the deduplication interval are treated
506
584
  # as duplicates and only one copy of the message is delivered.
@@ -525,7 +603,7 @@ module Aws::SQS
525
603
  #
526
604
  # The maximum length of `MessageDeduplicationId` is 128 characters.
527
605
  # `MessageDeduplicationId` can contain alphanumeric characters (`a-z`,
528
- # `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~
606
+ # `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
529
607
  # ``).
530
608
  #
531
609
  # For best practices of using `MessageDeduplicationId`, see [Using the
@@ -555,9 +633,9 @@ module Aws::SQS
555
633
  # `MessageGroupId` values. For each `MessageGroupId`, the messages are
556
634
  # sorted by time sent. The caller can't specify a `MessageGroupId`.
557
635
  #
558
- # The length of `MessageGroupId` is 128 characters. Valid values:
559
- # alphanumeric characters and punctuation ``
560
- # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
636
+ # The maximum length of `MessageGroupId` is 128 characters. Valid
637
+ # values: alphanumeric characters and punctuation ``
638
+ # (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) ``.
561
639
  #
562
640
  # For best practices of using `MessageGroupId`, see [Using the
563
641
  # MessageGroupId Property][1] in the *Amazon SQS Developer Guide*.
@@ -571,7 +649,7 @@ module Aws::SQS
571
649
  # @return [Types::SendMessageResult]
572
650
  def send_message(options = {})
573
651
  options = options.merge(queue_url: @url)
574
- resp = Aws::Plugins::UserAgent.feature('resource') do
652
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
575
653
  @client.send_message(options)
576
654
  end
577
655
  resp.data
@@ -614,7 +692,7 @@ module Aws::SQS
614
692
  # @return [Types::SendMessageBatchResult]
615
693
  def send_messages(options = {})
616
694
  options = options.merge(queue_url: @url)
617
- resp = Aws::Plugins::UserAgent.feature('resource') do
695
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
618
696
  @client.send_message_batch(options)
619
697
  end
620
698
  resp.data
@@ -683,7 +761,6 @@ module Aws::SQS
683
761
  # Default: 10. When the `ReceiveCount` for a message exceeds the
684
762
  # `maxReceiveCount` for a queue, Amazon SQS moves the message to the
685
763
  # dead-letter-queue.
686
- #
687
764
  # * `RedriveAllowPolicy` – The string that includes the parameters for
688
765
  # the permissions for the dead-letter queue redrive permission and
689
766
  # which source queues can specify dead-letter queues as a JSON object.
@@ -702,7 +779,6 @@ module Aws::SQS
702
779
  #
703
780
  # * `byQueue` – Only queues specified by the `sourceQueueArns`
704
781
  # parameter can specify this queue as the dead-letter queue.
705
- #
706
782
  # * `sourceQueueArns` – The Amazon Resource Names (ARN)s of the source
707
783
  # queues that can specify this queue as the dead-letter queue and
708
784
  # redrive messages. You can specify this parameter only when the
@@ -762,7 +838,6 @@ module Aws::SQS
762
838
  #
763
839
  # * If the queue has `ContentBasedDeduplication` set, your
764
840
  # `MessageDeduplicationId` overrides the generated one.
765
- #
766
841
  # * When `ContentBasedDeduplication` is in effect, messages with
767
842
  # identical content sent within the deduplication interval are
768
843
  # treated as duplicates and only one copy of the message is
@@ -819,7 +894,7 @@ module Aws::SQS
819
894
  # @return [EmptyStructure]
820
895
  def set_attributes(options = {})
821
896
  options = options.merge(queue_url: @url)
822
- resp = Aws::Plugins::UserAgent.feature('resource') do
897
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
823
898
  @client.set_queue_attributes(options)
824
899
  end
825
900
  resp.data
@@ -835,7 +910,7 @@ module Aws::SQS
835
910
  def dead_letter_source_queues(options = {})
836
911
  batches = Enumerator.new do |y|
837
912
  options = options.merge(queue_url: @url)
838
- resp = Aws::Plugins::UserAgent.feature('resource') do
913
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
839
914
  @client.list_dead_letter_source_queues(options)
840
915
  end
841
916
  resp.each_page do |page|
@@ -134,7 +134,7 @@ module Aws
134
134
  # ### `:idle_timeout` Option
135
135
  #
136
136
  # This is a configurable, maximum number of seconds to wait for a
137
- # new message before the polling loop exists. By default, there is
137
+ # new message before the polling loop exits. By default, there is
138
138
  # no idle timeout.
139
139
  #
140
140
  # # stops polling after a minute of no received messages
@@ -112,7 +112,6 @@ module Aws::SQS
112
112
  # Default: 10. When the `ReceiveCount` for a message exceeds the
113
113
  # `maxReceiveCount` for a queue, Amazon SQS moves the message to the
114
114
  # dead-letter-queue.
115
- #
116
115
  # * `RedriveAllowPolicy` – The string that includes the parameters for
117
116
  # the permissions for the dead-letter queue redrive permission and
118
117
  # which source queues can specify dead-letter queues as a JSON object.
@@ -131,7 +130,6 @@ module Aws::SQS
131
130
  #
132
131
  # * `byQueue` – Only queues specified by the `sourceQueueArns`
133
132
  # parameter can specify this queue as the dead-letter queue.
134
- #
135
133
  # * `sourceQueueArns` – The Amazon Resource Names (ARN)s of the source
136
134
  # queues that can specify this queue as the dead-letter queue and
137
135
  # redrive messages. You can specify this parameter only when the
@@ -203,7 +201,6 @@ module Aws::SQS
203
201
  #
204
202
  # * If the queue has `ContentBasedDeduplication` set, your
205
203
  # `MessageDeduplicationId` overrides the generated one.
206
- #
207
204
  # * When `ContentBasedDeduplication` is in effect, messages with
208
205
  # identical content sent within the deduplication interval are
209
206
  # treated as duplicates and only one copy of the message is
@@ -294,7 +291,7 @@ module Aws::SQS
294
291
  # [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name
295
292
  # @return [Queue]
296
293
  def create_queue(options = {})
297
- resp = Aws::Plugins::UserAgent.feature('resource') do
294
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
298
295
  @client.create_queue(options)
299
296
  end
300
297
  Queue.new(
@@ -311,17 +308,17 @@ module Aws::SQS
311
308
  # })
312
309
  # @param [Hash] options ({})
313
310
  # @option options [required, String] :queue_name
314
- # The name of the queue whose URL must be fetched. Maximum 80
315
- # characters. Valid values: alphanumeric characters, hyphens (`-`), and
316
- # underscores (`_`).
317
- #
318
- # Queue URLs and names are case-sensitive.
311
+ # (Required) The name of the queue for which you want to fetch the URL.
312
+ # The name can be up to 80 characters long and can include alphanumeric
313
+ # characters, hyphens (-), and underscores (\_). Queue URLs and names
314
+ # are case-sensitive.
319
315
  # @option options [String] :queue_owner_aws_account_id
320
- # The Amazon Web Services account ID of the account that created the
321
- # queue.
316
+ # (Optional) The Amazon Web Services account ID of the account that
317
+ # created the queue. This is only required when you are attempting to
318
+ # access a queue owned by another Amazon Web Services account.
322
319
  # @return [Queue]
323
320
  def get_queue_by_name(options = {})
324
- resp = Aws::Plugins::UserAgent.feature('resource') do
321
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
325
322
  @client.get_queue_url(options)
326
323
  end
327
324
  Queue.new(
@@ -355,7 +352,7 @@ module Aws::SQS
355
352
  # @return [Queue::Collection]
356
353
  def queues(options = {})
357
354
  batches = Enumerator.new do |y|
358
- resp = Aws::Plugins::UserAgent.feature('resource') do
355
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
359
356
  @client.list_queues(options)
360
357
  end
361
358
  resp.each_page do |page|