aws-sdk-sqs 1.70.0 → 1.76.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e39a9eb3e92b4f93130e52d3e002ba963cd03c5f5e755cf339e8c85883ee10a7
4
- data.tar.gz: 8efebea51d0957b0d17e558b4ba79108827eda88454d5b54463b3a4c3d073093
3
+ metadata.gz: 30f3d0e15b1b86a8c08c9d5e4e5c65bb9f97557e5f370da75bb4aaad9049988b
4
+ data.tar.gz: 803f2ff4d41901845c619b85e99d7b0124d05bde615dc379c0d7e7592e704742
5
5
  SHA512:
6
- metadata.gz: e815e358570d6098594e80bb81c32c2795dfc7f8b92592f1c5646867781e1f57c1220f80efe3e7e2424c7ef7334f3194ddb58c0f1533f9dddfa14f41fd74967c
7
- data.tar.gz: 210fb2b41bb8d08d460fb293a0ba6c336a9afdcd2630fd37a003852ac162cbc71aae986ee68075413e88c4765d8e6f693554a35a6d1be8c8da895badb4ed97ec
6
+ metadata.gz: ef3434620fe158611cf1b055a4a4f4cb854e260037070f8439e4cc4c32dfa355e127857b7e7b85e1777602da3853ee7b90862663193db20d118e685f7aab32fa
7
+ data.tar.gz: 8e49cf238eceb7df74b7c869e56eb981629dc93f57c3afdbf781918483442bb739ee234d40642790ddbef9763153024de27683bda353b90ac11bd8ec89ee0975
data/CHANGELOG.md CHANGED
@@ -1,6 +1,36 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.76.0 (2024-06-06)
5
+ ------------------
6
+
7
+ * Feature - Doc only updates for SQS. These updates include customer-reported issues and TCX3 modifications.
8
+
9
+ 1.75.0 (2024-06-05)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
14
+ 1.74.0 (2024-05-13)
15
+ ------------------
16
+
17
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
18
+
19
+ 1.73.0 (2024-05-08)
20
+ ------------------
21
+
22
+ * Feature - This release adds MessageSystemAttributeNames to ReceiveMessageRequest to replace AttributeNames.
23
+
24
+ 1.72.0 (2024-04-30)
25
+ ------------------
26
+
27
+ * Feature - Handle System Message Attributes MD5 verification.
28
+
29
+ 1.71.0 (2024-04-25)
30
+ ------------------
31
+
32
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
33
+
4
34
  1.70.0 (2024-01-26)
5
35
  ------------------
6
36
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.70.0
1
+ 1.76.0
@@ -22,6 +22,7 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
22
  require 'aws-sdk-core/plugins/response_paging.rb'
23
23
  require 'aws-sdk-core/plugins/stub_responses.rb'
24
24
  require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/invocation_id.rb'
25
26
  require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
27
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
28
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
@@ -74,6 +75,7 @@ module Aws::SQS
74
75
  add_plugin(Aws::Plugins::ResponsePaging)
75
76
  add_plugin(Aws::Plugins::StubResponses)
76
77
  add_plugin(Aws::Plugins::IdempotencyToken)
78
+ add_plugin(Aws::Plugins::InvocationId)
77
79
  add_plugin(Aws::Plugins::JsonvalueConverter)
78
80
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
79
81
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
@@ -200,10 +202,17 @@ module Aws::SQS
200
202
  # When set to 'true' the request body will not be compressed
201
203
  # for supported operations.
202
204
  #
203
- # @option options [String] :endpoint
204
- # The client endpoint is normally constructed from the `:region`
205
- # option. You should only configure an `:endpoint` when connecting
206
- # to test or custom endpoints. This should be a valid HTTP(S) URI.
205
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
206
+ # Normally you should not configure the `:endpoint` option
207
+ # directly. This is normally constructed from the `:region`
208
+ # option. Configuring `:endpoint` is normally reserved for
209
+ # connecting to test or custom endpoints. The endpoint should
210
+ # be a URI formatted like:
211
+ #
212
+ # 'http://example.com'
213
+ # 'https://example.com'
214
+ # 'http://example.com:123'
215
+ #
207
216
  #
208
217
  # @option options [Integer] :endpoint_cache_max_entries (1000)
209
218
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -296,8 +305,9 @@ module Aws::SQS
296
305
  #
297
306
  # @option options [String] :sdk_ua_app_id
298
307
  # A unique and opaque application ID that is appended to the
299
- # User-Agent header as app/<sdk_ua_app_id>. It should have a
300
- # maximum length of 50.
308
+ # User-Agent header as app/sdk_ua_app_id. It should have a
309
+ # maximum length of 50. This variable is sourced from environment
310
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
301
311
  #
302
312
  # @option options [String] :secret_access_key
303
313
  #
@@ -357,50 +367,65 @@ module Aws::SQS
357
367
  # @option options [Aws::SQS::EndpointProvider] :endpoint_provider
358
368
  # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SQS::EndpointParameters`
359
369
  #
360
- # @option options [URI::HTTP,String] :http_proxy A proxy to send
361
- # requests through. Formatted like 'http://proxy.com:123'.
362
- #
363
- # @option options [Float] :http_open_timeout (15) The number of
364
- # seconds to wait when opening a HTTP session before raising a
365
- # `Timeout::Error`.
366
- #
367
- # @option options [Float] :http_read_timeout (60) The default
368
- # number of seconds to wait for response data. This value can
369
- # safely be set per-request on the session.
370
- #
371
- # @option options [Float] :http_idle_timeout (5) The number of
372
- # seconds a connection is allowed to sit idle before it is
373
- # considered stale. Stale connections are closed and removed
374
- # from the pool before making a request.
375
- #
376
- # @option options [Float] :http_continue_timeout (1) The number of
377
- # seconds to wait for a 100-continue response before sending the
378
- # request body. This option has no effect unless the request has
379
- # "Expect" header set to "100-continue". Defaults to `nil` which
380
- # disables this behaviour. This value can safely be set per
381
- # request on the session.
382
- #
383
- # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
384
- # in seconds.
385
- #
386
- # @option options [Boolean] :http_wire_trace (false) When `true`,
387
- # HTTP debug output will be sent to the `:logger`.
370
+ # @option options [Float] :http_continue_timeout (1)
371
+ # The number of seconds to wait for a 100-continue response before sending the
372
+ # request body. This option has no effect unless the request has "Expect"
373
+ # header set to "100-continue". Defaults to `nil` which disables this
374
+ # behaviour. This value can safely be set per request on the session.
375
+ #
376
+ # @option options [Float] :http_idle_timeout (5)
377
+ # The number of seconds a connection is allowed to sit idle before it
378
+ # is considered stale. Stale connections are closed and removed from the
379
+ # pool before making a request.
380
+ #
381
+ # @option options [Float] :http_open_timeout (15)
382
+ # The default number of seconds to wait for response data.
383
+ # This value can safely be set per-request on the session.
384
+ #
385
+ # @option options [URI::HTTP,String] :http_proxy
386
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
387
+ #
388
+ # @option options [Float] :http_read_timeout (60)
389
+ # The default number of seconds to wait for response data.
390
+ # This value can safely be set per-request on the session.
391
+ #
392
+ # @option options [Boolean] :http_wire_trace (false)
393
+ # When `true`, HTTP debug output will be sent to the `:logger`.
394
+ #
395
+ # @option options [Proc] :on_chunk_received
396
+ # When a Proc object is provided, it will be used as callback when each chunk
397
+ # of the response body is received. It provides three arguments: the chunk,
398
+ # the number of bytes received, and the total number of
399
+ # bytes in the response (or nil if the server did not send a `content-length`).
400
+ #
401
+ # @option options [Proc] :on_chunk_sent
402
+ # When a Proc object is provided, it will be used as callback when each chunk
403
+ # of the request body is sent. It provides three arguments: the chunk,
404
+ # the number of bytes read from the body, and the total number of
405
+ # bytes in the body.
406
+ #
407
+ # @option options [Boolean] :raise_response_errors (true)
408
+ # When `true`, response errors are raised.
409
+ #
410
+ # @option options [String] :ssl_ca_bundle
411
+ # Full path to the SSL certificate authority bundle file that should be used when
412
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
413
+ # `:ssl_ca_directory` the the system default will be used if available.
414
+ #
415
+ # @option options [String] :ssl_ca_directory
416
+ # Full path of the directory that contains the unbundled SSL certificate
417
+ # authority files for verifying peer certificates. If you do
418
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
419
+ # default will be used if available.
388
420
  #
389
- # @option options [Boolean] :ssl_verify_peer (true) When `true`,
390
- # SSL peer certificates are verified when establishing a
391
- # connection.
421
+ # @option options [String] :ssl_ca_store
422
+ # Sets the X509::Store to verify peer certificate.
392
423
  #
393
- # @option options [String] :ssl_ca_bundle Full path to the SSL
394
- # certificate authority bundle file that should be used when
395
- # verifying peer certificates. If you do not pass
396
- # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
397
- # will be used if available.
424
+ # @option options [Float] :ssl_timeout
425
+ # Sets the SSL timeout in seconds
398
426
  #
399
- # @option options [String] :ssl_ca_directory Full path of the
400
- # directory that contains the unbundled SSL certificate
401
- # authority files for verifying peer certificates. If you do
402
- # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
403
- # system default will be used if available.
427
+ # @option options [Boolean] :ssl_verify_peer (true)
428
+ # When `true`, SSL peer certificates are verified when establishing a connection.
404
429
  #
405
430
  def initialize(*args)
406
431
  super
@@ -518,8 +543,6 @@ module Aws::SQS
518
543
  # can be the original source queue (from which the messages were
519
544
  # driven to the dead-letter-queue), or a custom destination queue.
520
545
  #
521
- # * Currently, only standard queues are supported.
522
- #
523
546
  # * Only one active message movement task is supported per queue at any
524
547
  # given time.
525
548
  #
@@ -1546,8 +1569,6 @@ module Aws::SQS
1546
1569
  # can be the original source queue (from which the messages were
1547
1570
  # driven to the dead-letter-queue), or a custom destination queue.
1548
1571
  #
1549
- # * Currently, only standard queues are supported.
1550
- #
1551
1572
  # * Only one active message movement task is supported per queue at any
1552
1573
  # given time.
1553
1574
  #
@@ -1809,6 +1830,54 @@ module Aws::SQS
1809
1830
  # Queue URLs and names are case-sensitive.
1810
1831
  #
1811
1832
  # @option params [Array<String>] :attribute_names
1833
+ # This parameter has been deprecated but will be supported for backward
1834
+ # compatibility. To provide attribute names, you are encouraged to use
1835
+ # `MessageSystemAttributeNames`.
1836
+ #
1837
+ # A list of attributes that need to be returned along with each message.
1838
+ # These attributes include:
1839
+ #
1840
+ # * `All` – Returns all values.
1841
+ #
1842
+ # * `ApproximateFirstReceiveTimestamp` – Returns the time the message
1843
+ # was first received from the queue ([epoch time][1] in milliseconds).
1844
+ #
1845
+ # * `ApproximateReceiveCount` – Returns the number of times a message
1846
+ # has been received across all queues but not deleted.
1847
+ #
1848
+ # * `AWSTraceHeader` – Returns the X-Ray trace header string.
1849
+ #
1850
+ # * `SenderId`
1851
+ #
1852
+ # * For a user, returns the user ID, for example
1853
+ # `ABCDEFGHI1JKLMNOPQ23R`.
1854
+ #
1855
+ # * For an IAM role, returns the IAM role ID, for example
1856
+ # `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
1857
+ #
1858
+ # * `SentTimestamp` – Returns the time the message was sent to the queue
1859
+ # ([epoch time][1] in milliseconds).
1860
+ #
1861
+ # * `SqsManagedSseEnabled` – Enables server-side queue encryption using
1862
+ # SQS owned encryption keys. Only one server-side encryption option is
1863
+ # supported per queue (for example, [SSE-KMS][2] or [SSE-SQS][3]).
1864
+ #
1865
+ # * `MessageDeduplicationId` – Returns the value provided by the
1866
+ # producer that calls the ` SendMessage ` action.
1867
+ #
1868
+ # * `MessageGroupId` – Returns the value provided by the producer that
1869
+ # calls the ` SendMessage ` action. Messages with the same
1870
+ # `MessageGroupId` are returned in sequence.
1871
+ #
1872
+ # * `SequenceNumber` – Returns the value provided by Amazon SQS.
1873
+ #
1874
+ #
1875
+ #
1876
+ # [1]: http://en.wikipedia.org/wiki/Unix_time
1877
+ # [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html
1878
+ # [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html
1879
+ #
1880
+ # @option params [Array<String>] :message_system_attribute_names
1812
1881
  # A list of attributes that need to be returned along with each message.
1813
1882
  # These attributes include:
1814
1883
  #
@@ -1888,8 +1957,8 @@ module Aws::SQS
1888
1957
  # The duration (in seconds) for which the call waits for a message to
1889
1958
  # arrive in the queue before returning. If a message is available, the
1890
1959
  # call returns sooner than `WaitTimeSeconds`. If no messages are
1891
- # available and the wait time expires, the call returns successfully
1892
- # with an empty list of messages.
1960
+ # available and the wait time expires, the call does not return a
1961
+ # message list.
1893
1962
  #
1894
1963
  # To avoid HTTP errors, ensure that the HTTP response timeout for
1895
1964
  # `ReceiveMessage` requests is longer than the `WaitTimeSeconds`
@@ -1918,10 +1987,6 @@ module Aws::SQS
1918
1987
  # * When you set `FifoQueue`, a caller of the `ReceiveMessage` action
1919
1988
  # can provide a `ReceiveRequestAttemptId` explicitly.
1920
1989
  #
1921
- # * If a caller of the `ReceiveMessage` action doesn't provide a
1922
- # `ReceiveRequestAttemptId`, Amazon SQS generates a
1923
- # `ReceiveRequestAttemptId`.
1924
- #
1925
1990
  # * It is possible to retry the `ReceiveMessage` action with the same
1926
1991
  # `ReceiveRequestAttemptId` if none of the messages have been modified
1927
1992
  # (deleted or had their visibility changes).
@@ -1976,6 +2041,7 @@ module Aws::SQS
1976
2041
  # resp = client.receive_message({
1977
2042
  # queue_url: "String", # required
1978
2043
  # 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
2044
+ # message_system_attribute_names: ["All"], # accepts All, SenderId, SentTimestamp, ApproximateReceiveCount, ApproximateFirstReceiveTimestamp, SequenceNumber, MessageDeduplicationId, MessageGroupId, AWSTraceHeader, DeadLetterQueueSourceArn
1979
2045
  # message_attribute_names: ["MessageAttributeName"],
1980
2046
  # max_number_of_messages: 1,
1981
2047
  # visibility_timeout: 1,
@@ -2060,13 +2126,17 @@ module Aws::SQS
2060
2126
  # Delivers a message to the specified queue.
2061
2127
  #
2062
2128
  # A message can include only XML, JSON, and unformatted text. The
2063
- # following Unicode characters are allowed:
2129
+ # following Unicode characters are allowed. For more information, see
2130
+ # the [W3C specification for characters][1].
2064
2131
  #
2065
2132
  # `#x9` \| `#xA` \| `#xD` \| `#x20` to `#xD7FF` \| `#xE000` to `#xFFFD`
2066
2133
  # \| `#x10000` to `#x10FFFF`
2067
2134
  #
2068
- # Any characters not included in this list will be rejected. For more
2069
- # information, see the [W3C specification for characters][1].
2135
+ # Amazon SQS does not throw an exception or completely reject the
2136
+ # message if it contains invalid characters. Instead, it replaces those
2137
+ # invalid characters with `U+FFFD` before storing the message in the
2138
+ # queue, as long as the message body contains at least one valid
2139
+ # character.
2070
2140
  #
2071
2141
  #
2072
2142
  #
@@ -2082,13 +2152,17 @@ module Aws::SQS
2082
2152
  # size is 256 KiB.
2083
2153
  #
2084
2154
  # A message can include only XML, JSON, and unformatted text. The
2085
- # following Unicode characters are allowed:
2155
+ # following Unicode characters are allowed. For more information, see
2156
+ # the [W3C specification for characters][1].
2086
2157
  #
2087
2158
  # `#x9` \| `#xA` \| `#xD` \| `#x20` to `#xD7FF` \| `#xE000` to `#xFFFD`
2088
2159
  # \| `#x10000` to `#x10FFFF`
2089
2160
  #
2090
- # Any characters not included in this list will be rejected. For more
2091
- # information, see the [W3C specification for characters][1].
2161
+ # Amazon SQS does not throw an exception or completely reject the
2162
+ # message if it contains invalid characters. Instead, it replaces those
2163
+ # invalid characters with `U+FFFD` before storing the message in the
2164
+ # queue, as long as the message body contains at least one valid
2165
+ # character.
2092
2166
  #
2093
2167
  #
2094
2168
  #
@@ -2207,8 +2281,8 @@ module Aws::SQS
2207
2281
  # `MessageGroupId` values. For each `MessageGroupId`, the messages are
2208
2282
  # sorted by time sent. The caller can't specify a `MessageGroupId`.
2209
2283
  #
2210
- # The length of `MessageGroupId` is 128 characters. Valid values:
2211
- # alphanumeric characters and punctuation ``
2284
+ # The maximum length of `MessageGroupId` is 128 characters. Valid
2285
+ # values: alphanumeric characters and punctuation ``
2212
2286
  # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
2213
2287
  #
2214
2288
  # For best practices of using `MessageGroupId`, see [Using the
@@ -2290,13 +2364,17 @@ module Aws::SQS
2290
2364
  # messages) are both 256 KiB (262,144 bytes).
2291
2365
  #
2292
2366
  # A message can include only XML, JSON, and unformatted text. The
2293
- # following Unicode characters are allowed:
2367
+ # following Unicode characters are allowed. For more information, see
2368
+ # the [W3C specification for characters][1].
2294
2369
  #
2295
2370
  # `#x9` \| `#xA` \| `#xD` \| `#x20` to `#xD7FF` \| `#xE000` to `#xFFFD`
2296
2371
  # \| `#x10000` to `#x10FFFF`
2297
2372
  #
2298
- # Any characters not included in this list will be rejected. For more
2299
- # information, see the [W3C specification for characters][1].
2373
+ # Amazon SQS does not throw an exception or completely reject the
2374
+ # message if it contains invalid characters. Instead, it replaces those
2375
+ # invalid characters with `U+FFFD` before storing the message in the
2376
+ # queue, as long as the message body contains at least one valid
2377
+ # character.
2300
2378
  #
2301
2379
  # If you don't specify the `DelaySeconds` parameter for an entry,
2302
2380
  # Amazon SQS uses the default value for the queue.
@@ -2375,13 +2453,14 @@ module Aws::SQS
2375
2453
  req.send_request(options)
2376
2454
  end
2377
2455
 
2378
- # Sets the value of one or more queue attributes. When you change a
2379
- # queue's attributes, the change can take up to 60 seconds for most of
2380
- # the attributes to propagate throughout the Amazon SQS system. Changes
2381
- # made to the `MessageRetentionPeriod` attribute can take up to 15
2382
- # minutes and will impact existing messages in the queue potentially
2383
- # causing them to be expired and deleted if the `MessageRetentionPeriod`
2384
- # is reduced below the age of existing messages.
2456
+ # Sets the value of one or more queue attributes, like a policy. When
2457
+ # you change a queue's attributes, the change can take up to 60 seconds
2458
+ # for most of the attributes to propagate throughout the Amazon SQS
2459
+ # system. Changes made to the `MessageRetentionPeriod` attribute can
2460
+ # take up to 15 minutes and will impact existing messages in the queue
2461
+ # potentially causing them to be expired and deleted if the
2462
+ # `MessageRetentionPeriod` is reduced below the age of existing
2463
+ # messages.
2385
2464
  #
2386
2465
  # <note markdown="1"> * In the future, new attributes might be added. If you write code that
2387
2466
  # calls this action, we recommend that you structure your code so that
@@ -2629,9 +2708,6 @@ module Aws::SQS
2629
2708
  # original source queue (from which the messages were driven to the
2630
2709
  # dead-letter-queue), or a custom destination queue.
2631
2710
  #
2632
- # * Currently, only standard queues support redrive. FIFO queues don't
2633
- # support redrive.
2634
- #
2635
2711
  # * Only one active message movement task is supported per queue at any
2636
2712
  # given time.
2637
2713
  #
@@ -2796,7 +2872,7 @@ module Aws::SQS
2796
2872
  params: params,
2797
2873
  config: config)
2798
2874
  context[:gem_name] = 'aws-sdk-sqs'
2799
- context[:gem_version] = '1.70.0'
2875
+ context[:gem_version] = '1.76.0'
2800
2876
  Seahorse::Client::Request.new(handlers, context)
2801
2877
  end
2802
2878
 
@@ -83,6 +83,7 @@ module Aws::SQS
83
83
  MessageBodySystemAttributeMap = Shapes::MapShape.new(name: 'MessageBodySystemAttributeMap', flattened: true)
84
84
  MessageList = Shapes::ListShape.new(name: 'MessageList', flattened: true)
85
85
  MessageNotInflight = Shapes::StructureShape.new(name: 'MessageNotInflight')
86
+ MessageSystemAttributeList = Shapes::ListShape.new(name: 'MessageSystemAttributeList', flattened: true)
86
87
  MessageSystemAttributeMap = Shapes::MapShape.new(name: 'MessageSystemAttributeMap', flattened: true)
87
88
  MessageSystemAttributeName = Shapes::StringShape.new(name: 'MessageSystemAttributeName')
88
89
  MessageSystemAttributeNameForSends = Shapes::StringShape.new(name: 'MessageSystemAttributeNameForSends')
@@ -350,6 +351,8 @@ module Aws::SQS
350
351
 
351
352
  MessageNotInflight.struct_class = Types::MessageNotInflight
352
353
 
354
+ MessageSystemAttributeList.member = Shapes::ShapeRef.new(shape: MessageSystemAttributeName)
355
+
353
356
  MessageSystemAttributeMap.key = Shapes::ShapeRef.new(shape: MessageSystemAttributeName)
354
357
  MessageSystemAttributeMap.value = Shapes::ShapeRef.new(shape: String)
355
358
 
@@ -387,7 +390,8 @@ module Aws::SQS
387
390
  ReceiptHandleIsInvalid.struct_class = Types::ReceiptHandleIsInvalid
388
391
 
389
392
  ReceiveMessageRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
390
- ReceiveMessageRequest.add_member(:attribute_names, Shapes::ShapeRef.new(shape: AttributeNameList, location_name: "AttributeNames"))
393
+ ReceiveMessageRequest.add_member(:attribute_names, Shapes::ShapeRef.new(shape: AttributeNameList, deprecated: true, location_name: "AttributeNames", metadata: {"deprecatedMessage"=>"AttributeNames has been replaced by MessageSystemAttributeNames"}))
394
+ ReceiveMessageRequest.add_member(:message_system_attribute_names, Shapes::ShapeRef.new(shape: MessageSystemAttributeList, location_name: "MessageSystemAttributeNames"))
391
395
  ReceiveMessageRequest.add_member(:message_attribute_names, Shapes::ShapeRef.new(shape: MessageAttributeNameList, location_name: "MessageAttributeNames"))
392
396
  ReceiveMessageRequest.add_member(:max_number_of_messages, Shapes::ShapeRef.new(shape: NullableInteger, location_name: "MaxNumberOfMessages"))
393
397
  ReceiveMessageRequest.add_member(:visibility_timeout, Shapes::ShapeRef.new(shape: NullableInteger, location_name: "VisibilityTimeout"))
@@ -499,6 +503,7 @@ module Aws::SQS
499
503
  "errorPrefix" => "AWS.SimpleQueueService.",
500
504
  "jsonVersion" => "1.0",
501
505
  "protocol" => "json",
506
+ "protocols" => ["json"],
502
507
  "serviceAbbreviation" => "Amazon SQS",
503
508
  "serviceFullName" => "Amazon Simple Queue Service",
504
509
  "serviceId" => "SQS",
@@ -163,7 +163,7 @@ module Aws::SQS
163
163
  queue_url: @queue_url,
164
164
  receipt_handle: @receipt_handle
165
165
  )
166
- resp = Aws::Plugins::UserAgent.feature('resource') do
166
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
167
167
  @client.change_message_visibility(options)
168
168
  end
169
169
  resp.data
@@ -179,7 +179,7 @@ module Aws::SQS
179
179
  queue_url: @queue_url,
180
180
  receipt_handle: @receipt_handle
181
181
  )
182
- resp = Aws::Plugins::UserAgent.feature('resource') do
182
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
183
183
  @client.delete_message(options)
184
184
  end
185
185
  resp.data
@@ -246,7 +246,7 @@ module Aws::SQS
246
246
  receipt_handle: item.receipt_handle
247
247
  }
248
248
  end
249
- Aws::Plugins::UserAgent.feature('resource') do
249
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
250
250
  batch[0].client.delete_message_batch(params)
251
251
  end
252
252
  end
@@ -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,53 @@ module Aws::SQS
215
216
  # })
216
217
  # @param [Hash] options ({})
217
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
218
266
  # A list of attributes that need to be returned along with each message.
219
267
  # These attributes include:
220
268
  #
@@ -290,8 +338,8 @@ module Aws::SQS
290
338
  # The duration (in seconds) for which the call waits for a message to
291
339
  # arrive in the queue before returning. If a message is available, the
292
340
  # 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.
341
+ # available and the wait time expires, the call does not return a
342
+ # message list.
295
343
  #
296
344
  # To avoid HTTP errors, ensure that the HTTP response timeout for
297
345
  # `ReceiveMessage` requests is longer than the `WaitTimeSeconds`
@@ -319,10 +367,6 @@ module Aws::SQS
319
367
  # * When you set `FifoQueue`, a caller of the `ReceiveMessage` action
320
368
  # can provide a `ReceiveRequestAttemptId` explicitly.
321
369
  #
322
- # * If a caller of the `ReceiveMessage` action doesn't provide a
323
- # `ReceiveRequestAttemptId`, Amazon SQS generates a
324
- # `ReceiveRequestAttemptId`.
325
- #
326
370
  # * It is possible to retry the `ReceiveMessage` action with the same
327
371
  # `ReceiveRequestAttemptId` if none of the messages have been modified
328
372
  # (deleted or had their visibility changes).
@@ -371,7 +415,7 @@ module Aws::SQS
371
415
  def receive_messages(options = {})
372
416
  batch = []
373
417
  options = options.merge(queue_url: @url)
374
- resp = Aws::Plugins::UserAgent.feature('resource') do
418
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
375
419
  @client.receive_message(options)
376
420
  end
377
421
  resp.data.messages.each do |m|
@@ -397,7 +441,7 @@ module Aws::SQS
397
441
  # @return [EmptyStructure]
398
442
  def remove_permission(options = {})
399
443
  options = options.merge(queue_url: @url)
400
- resp = Aws::Plugins::UserAgent.feature('resource') do
444
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
401
445
  @client.remove_permission(options)
402
446
  end
403
447
  resp.data
@@ -435,13 +479,17 @@ module Aws::SQS
435
479
  # size is 256 KiB.
436
480
  #
437
481
  # A message can include only XML, JSON, and unformatted text. The
438
- # following Unicode characters are allowed:
482
+ # following Unicode characters are allowed. For more information, see
483
+ # the [W3C specification for characters][1].
439
484
  #
440
485
  # `#x9` \| `#xA` \| `#xD` \| `#x20` to `#xD7FF` \| `#xE000` to `#xFFFD`
441
486
  # \| `#x10000` to `#x10FFFF`
442
487
  #
443
- # Any characters not included in this list will be rejected. For more
444
- # information, see the [W3C specification for characters][1].
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.
445
493
  #
446
494
  #
447
495
  #
@@ -555,8 +603,8 @@ module Aws::SQS
555
603
  # `MessageGroupId` values. For each `MessageGroupId`, the messages are
556
604
  # sorted by time sent. The caller can't specify a `MessageGroupId`.
557
605
  #
558
- # The length of `MessageGroupId` is 128 characters. Valid values:
559
- # alphanumeric characters and punctuation ``
606
+ # The maximum length of `MessageGroupId` is 128 characters. Valid
607
+ # values: alphanumeric characters and punctuation ``
560
608
  # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
561
609
  #
562
610
  # For best practices of using `MessageGroupId`, see [Using the
@@ -571,7 +619,7 @@ module Aws::SQS
571
619
  # @return [Types::SendMessageResult]
572
620
  def send_message(options = {})
573
621
  options = options.merge(queue_url: @url)
574
- resp = Aws::Plugins::UserAgent.feature('resource') do
622
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
575
623
  @client.send_message(options)
576
624
  end
577
625
  resp.data
@@ -614,7 +662,7 @@ module Aws::SQS
614
662
  # @return [Types::SendMessageBatchResult]
615
663
  def send_messages(options = {})
616
664
  options = options.merge(queue_url: @url)
617
- resp = Aws::Plugins::UserAgent.feature('resource') do
665
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
618
666
  @client.send_message_batch(options)
619
667
  end
620
668
  resp.data
@@ -819,7 +867,7 @@ module Aws::SQS
819
867
  # @return [EmptyStructure]
820
868
  def set_attributes(options = {})
821
869
  options = options.merge(queue_url: @url)
822
- resp = Aws::Plugins::UserAgent.feature('resource') do
870
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
823
871
  @client.set_queue_attributes(options)
824
872
  end
825
873
  resp.data
@@ -835,7 +883,7 @@ module Aws::SQS
835
883
  def dead_letter_source_queues(options = {})
836
884
  batches = Enumerator.new do |y|
837
885
  options = options.merge(queue_url: @url)
838
- resp = Aws::Plugins::UserAgent.feature('resource') do
886
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
839
887
  @client.list_dead_letter_source_queues(options)
840
888
  end
841
889
  resp.each_page do |page|
@@ -294,7 +294,7 @@ module Aws::SQS
294
294
  # [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
295
  # @return [Queue]
296
296
  def create_queue(options = {})
297
- resp = Aws::Plugins::UserAgent.feature('resource') do
297
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
298
298
  @client.create_queue(options)
299
299
  end
300
300
  Queue.new(
@@ -321,7 +321,7 @@ module Aws::SQS
321
321
  # queue.
322
322
  # @return [Queue]
323
323
  def get_queue_by_name(options = {})
324
- resp = Aws::Plugins::UserAgent.feature('resource') do
324
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
325
325
  @client.get_queue_url(options)
326
326
  end
327
327
  Queue.new(
@@ -355,7 +355,7 @@ module Aws::SQS
355
355
  # @return [Queue::Collection]
356
356
  def queues(options = {})
357
357
  batches = Enumerator.new do |y|
358
- resp = Aws::Plugins::UserAgent.feature('resource') do
358
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
359
359
  @client.list_queues(options)
360
360
  end
361
361
  resp.each_page do |page|
@@ -1245,8 +1245,9 @@ module Aws::SQS
1245
1245
  #
1246
1246
  # @!attribute [rw] approximate_number_of_messages_to_move
1247
1247
  # The number of messages to be moved from the source queue. This
1248
- # number is obtained at the time of starting the message movement
1249
- # task.
1248
+ # number is obtained at the time of starting the message movement task
1249
+ # and is only included after the message movement task is selected to
1250
+ # start.
1250
1251
  # @return [Integer]
1251
1252
  #
1252
1253
  # @!attribute [rw] failure_reason
@@ -1657,6 +1658,57 @@ module Aws::SQS
1657
1658
  # @return [String]
1658
1659
  #
1659
1660
  # @!attribute [rw] attribute_names
1661
+ # This parameter has been deprecated but will be supported for
1662
+ # backward compatibility. To provide attribute names, you are
1663
+ # encouraged to use `MessageSystemAttributeNames`.
1664
+ #
1665
+ # A list of attributes that need to be returned along with each
1666
+ # message. These attributes include:
1667
+ #
1668
+ # * `All` – Returns all values.
1669
+ #
1670
+ # * `ApproximateFirstReceiveTimestamp` – Returns the time the message
1671
+ # was first received from the queue ([epoch time][1] in
1672
+ # milliseconds).
1673
+ #
1674
+ # * `ApproximateReceiveCount` – Returns the number of times a message
1675
+ # has been received across all queues but not deleted.
1676
+ #
1677
+ # * `AWSTraceHeader` – Returns the X-Ray trace header string.
1678
+ #
1679
+ # * `SenderId`
1680
+ #
1681
+ # * For a user, returns the user ID, for example
1682
+ # `ABCDEFGHI1JKLMNOPQ23R`.
1683
+ #
1684
+ # * For an IAM role, returns the IAM role ID, for example
1685
+ # `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
1686
+ #
1687
+ # * `SentTimestamp` – Returns the time the message was sent to the
1688
+ # queue ([epoch time][1] in milliseconds).
1689
+ #
1690
+ # * `SqsManagedSseEnabled` – Enables server-side queue encryption
1691
+ # using SQS owned encryption keys. Only one server-side encryption
1692
+ # option is supported per queue (for example, [SSE-KMS][2] or
1693
+ # [SSE-SQS][3]).
1694
+ #
1695
+ # * `MessageDeduplicationId` – Returns the value provided by the
1696
+ # producer that calls the ` SendMessage ` action.
1697
+ #
1698
+ # * `MessageGroupId` – Returns the value provided by the producer that
1699
+ # calls the ` SendMessage ` action. Messages with the same
1700
+ # `MessageGroupId` are returned in sequence.
1701
+ #
1702
+ # * `SequenceNumber` – Returns the value provided by Amazon SQS.
1703
+ #
1704
+ #
1705
+ #
1706
+ # [1]: http://en.wikipedia.org/wiki/Unix_time
1707
+ # [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html
1708
+ # [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html
1709
+ # @return [Array<String>]
1710
+ #
1711
+ # @!attribute [rw] message_system_attribute_names
1660
1712
  # A list of attributes that need to be returned along with each
1661
1713
  # message. These attributes include:
1662
1714
  #
@@ -1742,8 +1794,8 @@ module Aws::SQS
1742
1794
  # The duration (in seconds) for which the call waits for a message to
1743
1795
  # arrive in the queue before returning. If a message is available, the
1744
1796
  # call returns sooner than `WaitTimeSeconds`. If no messages are
1745
- # available and the wait time expires, the call returns successfully
1746
- # with an empty list of messages.
1797
+ # available and the wait time expires, the call does not return a
1798
+ # message list.
1747
1799
  #
1748
1800
  # To avoid HTTP errors, ensure that the HTTP response timeout for
1749
1801
  # `ReceiveMessage` requests is longer than the `WaitTimeSeconds`
@@ -1774,10 +1826,6 @@ module Aws::SQS
1774
1826
  # * When you set `FifoQueue`, a caller of the `ReceiveMessage` action
1775
1827
  # can provide a `ReceiveRequestAttemptId` explicitly.
1776
1828
  #
1777
- # * If a caller of the `ReceiveMessage` action doesn't provide a
1778
- # `ReceiveRequestAttemptId`, Amazon SQS generates a
1779
- # `ReceiveRequestAttemptId`.
1780
- #
1781
1829
  # * It is possible to retry the `ReceiveMessage` action with the same
1782
1830
  # `ReceiveRequestAttemptId` if none of the messages have been
1783
1831
  # modified (deleted or had their visibility changes).
@@ -1831,6 +1879,7 @@ module Aws::SQS
1831
1879
  class ReceiveMessageRequest < Struct.new(
1832
1880
  :queue_url,
1833
1881
  :attribute_names,
1882
+ :message_system_attribute_names,
1834
1883
  :message_attribute_names,
1835
1884
  :max_number_of_messages,
1836
1885
  :visibility_timeout,
@@ -2204,13 +2253,17 @@ module Aws::SQS
2204
2253
  # size is 256 KiB.
2205
2254
  #
2206
2255
  # A message can include only XML, JSON, and unformatted text. The
2207
- # following Unicode characters are allowed:
2256
+ # following Unicode characters are allowed. For more information, see
2257
+ # the [W3C specification for characters][1].
2208
2258
  #
2209
2259
  # `#x9` \| `#xA` \| `#xD` \| `#x20` to `#xD7FF` \| `#xE000` to
2210
2260
  # `#xFFFD` \| `#x10000` to `#x10FFFF`
2211
2261
  #
2212
- # Any characters not included in this list will be rejected. For more
2213
- # information, see the [W3C specification for characters][1].
2262
+ # Amazon SQS does not throw an exception or completely reject the
2263
+ # message if it contains invalid characters. Instead, it replaces
2264
+ # those invalid characters with `U+FFFD` before storing the message in
2265
+ # the queue, as long as the message body contains at least one valid
2266
+ # character.
2214
2267
  #
2215
2268
  #
2216
2269
  #
@@ -2338,8 +2391,8 @@ module Aws::SQS
2338
2391
  # are sorted by time sent. The caller can't specify a
2339
2392
  # `MessageGroupId`.
2340
2393
  #
2341
- # The length of `MessageGroupId` is 128 characters. Valid values:
2342
- # alphanumeric characters and punctuation ``
2394
+ # The maximum length of `MessageGroupId` is 128 characters. Valid
2395
+ # values: alphanumeric characters and punctuation ``
2343
2396
  # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
2344
2397
  #
2345
2398
  # For best practices of using `MessageGroupId`, see [Using the
data/lib/aws-sdk-sqs.rb CHANGED
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-sqs/customizations'
54
54
  # @!group service
55
55
  module Aws::SQS
56
56
 
57
- GEM_VERSION = '1.70.0'
57
+ GEM_VERSION = '1.76.0'
58
58
 
59
59
  end
data/sig/client.rbs CHANGED
@@ -244,6 +244,7 @@ module Aws
244
244
  def receive_message: (
245
245
  queue_url: ::String,
246
246
  ?attribute_names: Array[("All" | "Policy" | "VisibilityTimeout" | "MaximumMessageSize" | "MessageRetentionPeriod" | "ApproximateNumberOfMessages" | "ApproximateNumberOfMessagesNotVisible" | "CreatedTimestamp" | "LastModifiedTimestamp" | "QueueArn" | "ApproximateNumberOfMessagesDelayed" | "DelaySeconds" | "ReceiveMessageWaitTimeSeconds" | "RedrivePolicy" | "FifoQueue" | "ContentBasedDeduplication" | "KmsMasterKeyId" | "KmsDataKeyReusePeriodSeconds" | "DeduplicationScope" | "FifoThroughputLimit" | "RedriveAllowPolicy" | "SqsManagedSseEnabled")],
247
+ ?message_system_attribute_names: Array[("All" | "SenderId" | "SentTimestamp" | "ApproximateReceiveCount" | "ApproximateFirstReceiveTimestamp" | "SequenceNumber" | "MessageDeduplicationId" | "MessageGroupId" | "AWSTraceHeader" | "DeadLetterQueueSourceArn")],
247
248
  ?message_attribute_names: Array[::String],
248
249
  ?max_number_of_messages: ::Integer,
249
250
  ?visibility_timeout: ::Integer,
data/sig/message.rbs CHANGED
@@ -30,7 +30,7 @@ module Aws
30
30
  def body: () -> ::String
31
31
 
32
32
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS/Message.html#attributes-instance_method
33
- def attributes: () -> ::Hash[("SenderId" | "SentTimestamp" | "ApproximateReceiveCount" | "ApproximateFirstReceiveTimestamp" | "SequenceNumber" | "MessageDeduplicationId" | "MessageGroupId" | "AWSTraceHeader" | "DeadLetterQueueSourceArn"), ::String]
33
+ def attributes: () -> ::Hash[("All" | "SenderId" | "SentTimestamp" | "ApproximateReceiveCount" | "ApproximateFirstReceiveTimestamp" | "SequenceNumber" | "MessageDeduplicationId" | "MessageGroupId" | "AWSTraceHeader" | "DeadLetterQueueSourceArn"), ::String]
34
34
 
35
35
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS/Message.html#md5_of_message_attributes-instance_method
36
36
  def md5_of_message_attributes: () -> ::String
data/sig/queue.rbs CHANGED
@@ -77,6 +77,7 @@ module Aws
77
77
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS/Queue.html#receive_messages-instance_method
78
78
  def receive_messages: (
79
79
  ?attribute_names: Array[("All" | "Policy" | "VisibilityTimeout" | "MaximumMessageSize" | "MessageRetentionPeriod" | "ApproximateNumberOfMessages" | "ApproximateNumberOfMessagesNotVisible" | "CreatedTimestamp" | "LastModifiedTimestamp" | "QueueArn" | "ApproximateNumberOfMessagesDelayed" | "DelaySeconds" | "ReceiveMessageWaitTimeSeconds" | "RedrivePolicy" | "FifoQueue" | "ContentBasedDeduplication" | "KmsMasterKeyId" | "KmsDataKeyReusePeriodSeconds" | "DeduplicationScope" | "FifoThroughputLimit" | "RedriveAllowPolicy" | "SqsManagedSseEnabled")],
80
+ ?message_system_attribute_names: Array[("All" | "SenderId" | "SentTimestamp" | "ApproximateReceiveCount" | "ApproximateFirstReceiveTimestamp" | "SequenceNumber" | "MessageDeduplicationId" | "MessageGroupId" | "AWSTraceHeader" | "DeadLetterQueueSourceArn")],
80
81
  ?message_attribute_names: Array[::String],
81
82
  ?max_number_of_messages: ::Integer,
82
83
  ?visibility_timeout: ::Integer,
data/sig/types.rbs CHANGED
@@ -281,7 +281,7 @@ module Aws::SQS
281
281
  attr_accessor receipt_handle: ::String
282
282
  attr_accessor md5_of_body: ::String
283
283
  attr_accessor body: ::String
284
- attr_accessor attributes: ::Hash[("SenderId" | "SentTimestamp" | "ApproximateReceiveCount" | "ApproximateFirstReceiveTimestamp" | "SequenceNumber" | "MessageDeduplicationId" | "MessageGroupId" | "AWSTraceHeader" | "DeadLetterQueueSourceArn"), ::String]
284
+ attr_accessor attributes: ::Hash[("All" | "SenderId" | "SentTimestamp" | "ApproximateReceiveCount" | "ApproximateFirstReceiveTimestamp" | "SequenceNumber" | "MessageDeduplicationId" | "MessageGroupId" | "AWSTraceHeader" | "DeadLetterQueueSourceArn"), ::String]
285
285
  attr_accessor md5_of_message_attributes: ::String
286
286
  attr_accessor message_attributes: ::Hash[::String, Types::MessageAttributeValue]
287
287
  SENSITIVE: []
@@ -346,6 +346,7 @@ module Aws::SQS
346
346
  class ReceiveMessageRequest
347
347
  attr_accessor queue_url: ::String
348
348
  attr_accessor attribute_names: ::Array[("All" | "Policy" | "VisibilityTimeout" | "MaximumMessageSize" | "MessageRetentionPeriod" | "ApproximateNumberOfMessages" | "ApproximateNumberOfMessagesNotVisible" | "CreatedTimestamp" | "LastModifiedTimestamp" | "QueueArn" | "ApproximateNumberOfMessagesDelayed" | "DelaySeconds" | "ReceiveMessageWaitTimeSeconds" | "RedrivePolicy" | "FifoQueue" | "ContentBasedDeduplication" | "KmsMasterKeyId" | "KmsDataKeyReusePeriodSeconds" | "DeduplicationScope" | "FifoThroughputLimit" | "RedriveAllowPolicy" | "SqsManagedSseEnabled")]
349
+ attr_accessor message_system_attribute_names: ::Array[("All" | "SenderId" | "SentTimestamp" | "ApproximateReceiveCount" | "ApproximateFirstReceiveTimestamp" | "SequenceNumber" | "MessageDeduplicationId" | "MessageGroupId" | "AWSTraceHeader" | "DeadLetterQueueSourceArn")]
349
350
  attr_accessor message_attribute_names: ::Array[::String]
350
351
  attr_accessor max_number_of_messages: ::Integer
351
352
  attr_accessor visibility_timeout: ::Integer
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-sqs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.70.0
4
+ version: 1.76.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-26 00:00:00.000000000 Z
11
+ date: 2024-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.191.0
22
+ version: 3.197.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.191.0
32
+ version: 3.197.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement