aws-sdk-sqs 1.71.0 → 1.73.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: 2878138ab29e46e1ad37b1847af75b7c0a07415c5d588ea5d3c07be3a6a87d76
4
- data.tar.gz: 898ce0541417698de2f7d93afa8db831f222f8ee3644d836e23156d08869a729
3
+ metadata.gz: deed491ffeeba68062bb3476ef20639e61fd828a93ec0f3729e1f37070a0128d
4
+ data.tar.gz: 389ec66b3528d28972e921726bffe2af5f3bacf3832b23c536077861250436d8
5
5
  SHA512:
6
- metadata.gz: cdbe34cc44fee0f009243e7a4d245853b43420c2f66a456f13b10c2cc74deff55ddb3426f5f80caa912a19af62ea8fdc2bd3f2439aefc7e3fc2bdcdb0a0ab0a7
7
- data.tar.gz: 0d22fafbe4966c1cede8dd85e68f82916b6a20df8d0a45e614c98335798ee86c98634d60032da75b0d8f5d7725ade1a9730a57bf75fe4ed0b491bf7a7a6f4dc5
6
+ metadata.gz: f826805b81fc7cdc235e418891379457c6232545f0b9d917e81d53d8e30ba057628e5bb7c3c670b26feba786e31641c5555e15f2ff90a3a23c36f9e73e7adcae
7
+ data.tar.gz: c9c97a0b286d87978e3394125e163b355a8598cce6c9cc8a8a7a4fb81c9fd8a440c59b54f254e26f55625f7d8d591e921cd90f696c30ab91e0a591d8a99fdbf7
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.73.0 (2024-05-08)
5
+ ------------------
6
+
7
+ * Feature - This release adds MessageSystemAttributeNames to ReceiveMessageRequest to replace AttributeNames.
8
+
9
+ 1.72.0 (2024-04-30)
10
+ ------------------
11
+
12
+ * Feature - Handle System Message Attributes MD5 verification.
13
+
4
14
  1.71.0 (2024-04-25)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.71.0
1
+ 1.73.0
@@ -542,8 +542,6 @@ module Aws::SQS
542
542
  # can be the original source queue (from which the messages were
543
543
  # driven to the dead-letter-queue), or a custom destination queue.
544
544
  #
545
- # * Currently, only standard queues are supported.
546
- #
547
545
  # * Only one active message movement task is supported per queue at any
548
546
  # given time.
549
547
  #
@@ -1570,8 +1568,6 @@ module Aws::SQS
1570
1568
  # can be the original source queue (from which the messages were
1571
1569
  # driven to the dead-letter-queue), or a custom destination queue.
1572
1570
  #
1573
- # * Currently, only standard queues are supported.
1574
- #
1575
1571
  # * Only one active message movement task is supported per queue at any
1576
1572
  # given time.
1577
1573
  #
@@ -1833,6 +1829,54 @@ module Aws::SQS
1833
1829
  # Queue URLs and names are case-sensitive.
1834
1830
  #
1835
1831
  # @option params [Array<String>] :attribute_names
1832
+ # This parameter has been deprecated but will be supported for backward
1833
+ # compatibility. To provide attribute names, you are encouraged to use
1834
+ # `MessageSystemAttributeNames`.
1835
+ #
1836
+ # A list of attributes that need to be returned along with each message.
1837
+ # These attributes include:
1838
+ #
1839
+ # * `All` – Returns all values.
1840
+ #
1841
+ # * `ApproximateFirstReceiveTimestamp` – Returns the time the message
1842
+ # was first received from the queue ([epoch time][1] in milliseconds).
1843
+ #
1844
+ # * `ApproximateReceiveCount` – Returns the number of times a message
1845
+ # has been received across all queues but not deleted.
1846
+ #
1847
+ # * `AWSTraceHeader` – Returns the X-Ray trace header string.
1848
+ #
1849
+ # * `SenderId`
1850
+ #
1851
+ # * For a user, returns the user ID, for example
1852
+ # `ABCDEFGHI1JKLMNOPQ23R`.
1853
+ #
1854
+ # * For an IAM role, returns the IAM role ID, for example
1855
+ # `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
1856
+ #
1857
+ # * `SentTimestamp` – Returns the time the message was sent to the queue
1858
+ # ([epoch time][1] in milliseconds).
1859
+ #
1860
+ # * `SqsManagedSseEnabled` – Enables server-side queue encryption using
1861
+ # SQS owned encryption keys. Only one server-side encryption option is
1862
+ # supported per queue (for example, [SSE-KMS][2] or [SSE-SQS][3]).
1863
+ #
1864
+ # * `MessageDeduplicationId` – Returns the value provided by the
1865
+ # producer that calls the ` SendMessage ` action.
1866
+ #
1867
+ # * `MessageGroupId` – Returns the value provided by the producer that
1868
+ # calls the ` SendMessage ` action. Messages with the same
1869
+ # `MessageGroupId` are returned in sequence.
1870
+ #
1871
+ # * `SequenceNumber` – Returns the value provided by Amazon SQS.
1872
+ #
1873
+ #
1874
+ #
1875
+ # [1]: http://en.wikipedia.org/wiki/Unix_time
1876
+ # [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html
1877
+ # [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html
1878
+ #
1879
+ # @option params [Array<String>] :message_system_attribute_names
1836
1880
  # A list of attributes that need to be returned along with each message.
1837
1881
  # These attributes include:
1838
1882
  #
@@ -1912,8 +1956,8 @@ module Aws::SQS
1912
1956
  # The duration (in seconds) for which the call waits for a message to
1913
1957
  # arrive in the queue before returning. If a message is available, the
1914
1958
  # call returns sooner than `WaitTimeSeconds`. If no messages are
1915
- # available and the wait time expires, the call returns successfully
1916
- # with an empty list of messages.
1959
+ # available and the wait time expires, the call does not return a
1960
+ # message list.
1917
1961
  #
1918
1962
  # To avoid HTTP errors, ensure that the HTTP response timeout for
1919
1963
  # `ReceiveMessage` requests is longer than the `WaitTimeSeconds`
@@ -1942,10 +1986,6 @@ module Aws::SQS
1942
1986
  # * When you set `FifoQueue`, a caller of the `ReceiveMessage` action
1943
1987
  # can provide a `ReceiveRequestAttemptId` explicitly.
1944
1988
  #
1945
- # * If a caller of the `ReceiveMessage` action doesn't provide a
1946
- # `ReceiveRequestAttemptId`, Amazon SQS generates a
1947
- # `ReceiveRequestAttemptId`.
1948
- #
1949
1989
  # * It is possible to retry the `ReceiveMessage` action with the same
1950
1990
  # `ReceiveRequestAttemptId` if none of the messages have been modified
1951
1991
  # (deleted or had their visibility changes).
@@ -2000,6 +2040,7 @@ module Aws::SQS
2000
2040
  # resp = client.receive_message({
2001
2041
  # queue_url: "String", # required
2002
2042
  # 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
2043
+ # message_system_attribute_names: ["All"], # accepts All, SenderId, SentTimestamp, ApproximateReceiveCount, ApproximateFirstReceiveTimestamp, SequenceNumber, MessageDeduplicationId, MessageGroupId, AWSTraceHeader, DeadLetterQueueSourceArn
2003
2044
  # message_attribute_names: ["MessageAttributeName"],
2004
2045
  # max_number_of_messages: 1,
2005
2046
  # visibility_timeout: 1,
@@ -2231,8 +2272,8 @@ module Aws::SQS
2231
2272
  # `MessageGroupId` values. For each `MessageGroupId`, the messages are
2232
2273
  # sorted by time sent. The caller can't specify a `MessageGroupId`.
2233
2274
  #
2234
- # The length of `MessageGroupId` is 128 characters. Valid values:
2235
- # alphanumeric characters and punctuation ``
2275
+ # The maximum length of `MessageGroupId` is 128 characters. Valid
2276
+ # values: alphanumeric characters and punctuation ``
2236
2277
  # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
2237
2278
  #
2238
2279
  # For best practices of using `MessageGroupId`, see [Using the
@@ -2399,13 +2440,14 @@ module Aws::SQS
2399
2440
  req.send_request(options)
2400
2441
  end
2401
2442
 
2402
- # Sets the value of one or more queue attributes. When you change a
2403
- # queue's attributes, the change can take up to 60 seconds for most of
2404
- # the attributes to propagate throughout the Amazon SQS system. Changes
2405
- # made to the `MessageRetentionPeriod` attribute can take up to 15
2406
- # minutes and will impact existing messages in the queue potentially
2407
- # causing them to be expired and deleted if the `MessageRetentionPeriod`
2408
- # is reduced below the age of existing messages.
2443
+ # Sets the value of one or more queue attributes, like a policy. When
2444
+ # you change a queue's attributes, the change can take up to 60 seconds
2445
+ # for most of the attributes to propagate throughout the Amazon SQS
2446
+ # system. Changes made to the `MessageRetentionPeriod` attribute can
2447
+ # take up to 15 minutes and will impact existing messages in the queue
2448
+ # potentially causing them to be expired and deleted if the
2449
+ # `MessageRetentionPeriod` is reduced below the age of existing
2450
+ # messages.
2409
2451
  #
2410
2452
  # <note markdown="1"> * In the future, new attributes might be added. If you write code that
2411
2453
  # calls this action, we recommend that you structure your code so that
@@ -2653,9 +2695,6 @@ module Aws::SQS
2653
2695
  # original source queue (from which the messages were driven to the
2654
2696
  # dead-letter-queue), or a custom destination queue.
2655
2697
  #
2656
- # * Currently, only standard queues support redrive. FIFO queues don't
2657
- # support redrive.
2658
- #
2659
2698
  # * Only one active message movement task is supported per queue at any
2660
2699
  # given time.
2661
2700
  #
@@ -2820,7 +2859,7 @@ module Aws::SQS
2820
2859
  params: params,
2821
2860
  config: config)
2822
2861
  context[:gem_name] = 'aws-sdk-sqs'
2823
- context[:gem_version] = '1.71.0'
2862
+ context[:gem_version] = '1.73.0'
2824
2863
  Seahorse::Client::Request.new(handlers, context)
2825
2864
  end
2826
2865
 
@@ -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"))
@@ -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
@@ -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).
@@ -555,8 +599,8 @@ module Aws::SQS
555
599
  # `MessageGroupId` values. For each `MessageGroupId`, the messages are
556
600
  # sorted by time sent. The caller can't specify a `MessageGroupId`.
557
601
  #
558
- # The length of `MessageGroupId` is 128 characters. Valid values:
559
- # alphanumeric characters and punctuation ``
602
+ # The maximum length of `MessageGroupId` is 128 characters. Valid
603
+ # values: alphanumeric characters and punctuation ``
560
604
  # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
561
605
  #
562
606
  # For best practices of using `MessageGroupId`, see [Using the
@@ -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,
@@ -2338,8 +2387,8 @@ module Aws::SQS
2338
2387
  # are sorted by time sent. The caller can't specify a
2339
2388
  # `MessageGroupId`.
2340
2389
  #
2341
- # The length of `MessageGroupId` is 128 characters. Valid values:
2342
- # alphanumeric characters and punctuation ``
2390
+ # The maximum length of `MessageGroupId` is 128 characters. Valid
2391
+ # values: alphanumeric characters and punctuation ``
2343
2392
  # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
2344
2393
  #
2345
2394
  # 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.71.0'
57
+ GEM_VERSION = '1.73.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.71.0
4
+ version: 1.73.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-04-25 00:00:00.000000000 Z
11
+ date: 2024-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core