aws-sdk-sqs 1.52.0 → 1.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-sqs/client.rb +240 -149
- data/lib/aws-sdk-sqs/client_api.rb +219 -51
- data/lib/aws-sdk-sqs/endpoint_provider.rb +41 -100
- data/lib/aws-sdk-sqs/errors.rb +246 -0
- data/lib/aws-sdk-sqs/queue.rb +60 -26
- data/lib/aws-sdk-sqs/queue_poller.rb +6 -0
- data/lib/aws-sdk-sqs/resource.rb +61 -27
- data/lib/aws-sdk-sqs/types.rb +449 -391
- data/lib/aws-sdk-sqs.rb +1 -1
- metadata +2 -2
@@ -9,108 +9,49 @@
|
|
9
9
|
|
10
10
|
module Aws::SQS
|
11
11
|
class EndpointProvider
|
12
|
-
def
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
def resolve_endpoint(parameters)
|
13
|
+
region = parameters.region
|
14
|
+
use_dual_stack = parameters.use_dual_stack
|
15
|
+
use_fips = parameters.use_fips
|
16
|
+
endpoint = parameters.endpoint
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
18
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
20
|
+
end
|
21
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
21
25
|
end
|
22
|
-
|
23
|
-
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
29
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
36
|
+
if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
|
37
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs.#{region}.amazonaws.com", headers: {}, properties: {})
|
38
|
+
end
|
39
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
40
|
+
end
|
41
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
42
|
+
end
|
43
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
44
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
45
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
46
|
+
end
|
47
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
48
|
+
end
|
49
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
50
|
+
end
|
51
|
+
end
|
52
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
53
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
24
54
|
|
25
|
-
def resolve_endpoint(parameters)
|
26
|
-
@provider.resolve_endpoint(parameters)
|
27
55
|
end
|
28
|
-
|
29
|
-
# @api private
|
30
|
-
RULES = <<-JSON
|
31
|
-
eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
|
32
|
-
bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOmZhbHNlLCJkb2N1bWVu
|
33
|
-
dGF0aW9uIjoiVGhlIEFXUyByZWdpb24gdXNlZCB0byBkaXNwYXRjaCB0aGUg
|
34
|
-
cmVxdWVzdC4iLCJ0eXBlIjoiU3RyaW5nIn0sIlVzZUR1YWxTdGFjayI6eyJi
|
35
|
-
dWlsdEluIjoiQVdTOjpVc2VEdWFsU3RhY2siLCJyZXF1aXJlZCI6dHJ1ZSwi
|
36
|
-
ZGVmYXVsdCI6ZmFsc2UsImRvY3VtZW50YXRpb24iOiJXaGVuIHRydWUsIHVz
|
37
|
-
ZSB0aGUgZHVhbC1zdGFjayBlbmRwb2ludC4gSWYgdGhlIGNvbmZpZ3VyZWQg
|
38
|
-
ZW5kcG9pbnQgZG9lcyBub3Qgc3VwcG9ydCBkdWFsLXN0YWNrLCBkaXNwYXRj
|
39
|
-
aGluZyB0aGUgcmVxdWVzdCBNQVkgcmV0dXJuIGFuIGVycm9yLiIsInR5cGUi
|
40
|
-
OiJCb29sZWFuIn0sIlVzZUZJUFMiOnsiYnVpbHRJbiI6IkFXUzo6VXNlRklQ
|
41
|
-
UyIsInJlcXVpcmVkIjp0cnVlLCJkZWZhdWx0IjpmYWxzZSwiZG9jdW1lbnRh
|
42
|
-
dGlvbiI6IldoZW4gdHJ1ZSwgc2VuZCB0aGlzIHJlcXVlc3QgdG8gdGhlIEZJ
|
43
|
-
UFMt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7InVybCI6Imh0dHBzOi8vc3Fz
|
105
|
-
LntSZWdpb259LntQYXJ0aXRpb25SZXN1bHQjZHVhbFN0YWNrRG5zU3VmZml4
|
106
|
-
fSIsInByb3BlcnRpZXMiOnt9LCJoZWFkZXJzIjp7fX0sInR5cGUiOiJlbmRw
|
107
|
-
b2ludCJ9XX0seyJjb25kaXRpb25zIjpbXSwiZXJyb3IiOiJEdWFsU3RhY2sg
|
108
|
-
aXMgZW5hYmxlZCBidXQgdGhpcyBwYXJ0aXRpb24gZG9lcyBub3Qgc3VwcG9y
|
109
|
-
dCBEdWFsU3RhY2siLCJ0eXBlIjoiZXJyb3IifV19LHsiY29uZGl0aW9ucyI6
|
110
|
-
W10sImVuZHBvaW50Ijp7InVybCI6Imh0dHBzOi8vc3FzLntSZWdpb259LntQ
|
111
|
-
YXJ0aXRpb25SZXN1bHQjZG5zU3VmZml4fSIsInByb3BlcnRpZXMiOnt9LCJo
|
112
|
-
ZWFkZXJzIjp7fX0sInR5cGUiOiJlbmRwb2ludCJ9XX1dfQ==
|
113
|
-
|
114
|
-
JSON
|
115
56
|
end
|
116
57
|
end
|
data/lib/aws-sdk-sqs/errors.rb
CHANGED
@@ -30,10 +30,20 @@ module Aws::SQS
|
|
30
30
|
# * {BatchEntryIdsNotDistinct}
|
31
31
|
# * {BatchRequestTooLong}
|
32
32
|
# * {EmptyBatchRequest}
|
33
|
+
# * {InvalidAddress}
|
33
34
|
# * {InvalidAttributeName}
|
35
|
+
# * {InvalidAttributeValue}
|
34
36
|
# * {InvalidBatchEntryId}
|
35
37
|
# * {InvalidIdFormat}
|
36
38
|
# * {InvalidMessageContents}
|
39
|
+
# * {InvalidSecurity}
|
40
|
+
# * {KmsAccessDenied}
|
41
|
+
# * {KmsDisabled}
|
42
|
+
# * {KmsInvalidKeyUsage}
|
43
|
+
# * {KmsInvalidState}
|
44
|
+
# * {KmsNotFound}
|
45
|
+
# * {KmsOptInRequired}
|
46
|
+
# * {KmsThrottled}
|
37
47
|
# * {MessageNotInflight}
|
38
48
|
# * {OverLimit}
|
39
49
|
# * {PurgeQueueInProgress}
|
@@ -41,6 +51,7 @@ module Aws::SQS
|
|
41
51
|
# * {QueueDoesNotExist}
|
42
52
|
# * {QueueNameExists}
|
43
53
|
# * {ReceiptHandleIsInvalid}
|
54
|
+
# * {RequestThrottled}
|
44
55
|
# * {TooManyEntriesInBatchRequest}
|
45
56
|
# * {UnsupportedOperation}
|
46
57
|
#
|
@@ -58,6 +69,11 @@ module Aws::SQS
|
|
58
69
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
59
70
|
super(context, message, data)
|
60
71
|
end
|
72
|
+
|
73
|
+
# @return [String]
|
74
|
+
def message
|
75
|
+
@message || @data[:message]
|
76
|
+
end
|
61
77
|
end
|
62
78
|
|
63
79
|
class BatchRequestTooLong < ServiceError
|
@@ -68,6 +84,11 @@ module Aws::SQS
|
|
68
84
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
69
85
|
super(context, message, data)
|
70
86
|
end
|
87
|
+
|
88
|
+
# @return [String]
|
89
|
+
def message
|
90
|
+
@message || @data[:message]
|
91
|
+
end
|
71
92
|
end
|
72
93
|
|
73
94
|
class EmptyBatchRequest < ServiceError
|
@@ -78,6 +99,26 @@ module Aws::SQS
|
|
78
99
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
79
100
|
super(context, message, data)
|
80
101
|
end
|
102
|
+
|
103
|
+
# @return [String]
|
104
|
+
def message
|
105
|
+
@message || @data[:message]
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
class InvalidAddress < ServiceError
|
110
|
+
|
111
|
+
# @param [Seahorse::Client::RequestContext] context
|
112
|
+
# @param [String] message
|
113
|
+
# @param [Aws::SQS::Types::InvalidAddress] data
|
114
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
115
|
+
super(context, message, data)
|
116
|
+
end
|
117
|
+
|
118
|
+
# @return [String]
|
119
|
+
def message
|
120
|
+
@message || @data[:message]
|
121
|
+
end
|
81
122
|
end
|
82
123
|
|
83
124
|
class InvalidAttributeName < ServiceError
|
@@ -88,6 +129,26 @@ module Aws::SQS
|
|
88
129
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
89
130
|
super(context, message, data)
|
90
131
|
end
|
132
|
+
|
133
|
+
# @return [String]
|
134
|
+
def message
|
135
|
+
@message || @data[:message]
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
class InvalidAttributeValue < ServiceError
|
140
|
+
|
141
|
+
# @param [Seahorse::Client::RequestContext] context
|
142
|
+
# @param [String] message
|
143
|
+
# @param [Aws::SQS::Types::InvalidAttributeValue] data
|
144
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
145
|
+
super(context, message, data)
|
146
|
+
end
|
147
|
+
|
148
|
+
# @return [String]
|
149
|
+
def message
|
150
|
+
@message || @data[:message]
|
151
|
+
end
|
91
152
|
end
|
92
153
|
|
93
154
|
class InvalidBatchEntryId < ServiceError
|
@@ -98,6 +159,11 @@ module Aws::SQS
|
|
98
159
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
99
160
|
super(context, message, data)
|
100
161
|
end
|
162
|
+
|
163
|
+
# @return [String]
|
164
|
+
def message
|
165
|
+
@message || @data[:message]
|
166
|
+
end
|
101
167
|
end
|
102
168
|
|
103
169
|
class InvalidIdFormat < ServiceError
|
@@ -118,6 +184,131 @@ module Aws::SQS
|
|
118
184
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
119
185
|
super(context, message, data)
|
120
186
|
end
|
187
|
+
|
188
|
+
# @return [String]
|
189
|
+
def message
|
190
|
+
@message || @data[:message]
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
class InvalidSecurity < ServiceError
|
195
|
+
|
196
|
+
# @param [Seahorse::Client::RequestContext] context
|
197
|
+
# @param [String] message
|
198
|
+
# @param [Aws::SQS::Types::InvalidSecurity] data
|
199
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
200
|
+
super(context, message, data)
|
201
|
+
end
|
202
|
+
|
203
|
+
# @return [String]
|
204
|
+
def message
|
205
|
+
@message || @data[:message]
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
class KmsAccessDenied < ServiceError
|
210
|
+
|
211
|
+
# @param [Seahorse::Client::RequestContext] context
|
212
|
+
# @param [String] message
|
213
|
+
# @param [Aws::SQS::Types::KmsAccessDenied] data
|
214
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
215
|
+
super(context, message, data)
|
216
|
+
end
|
217
|
+
|
218
|
+
# @return [String]
|
219
|
+
def message
|
220
|
+
@message || @data[:message]
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
class KmsDisabled < ServiceError
|
225
|
+
|
226
|
+
# @param [Seahorse::Client::RequestContext] context
|
227
|
+
# @param [String] message
|
228
|
+
# @param [Aws::SQS::Types::KmsDisabled] data
|
229
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
230
|
+
super(context, message, data)
|
231
|
+
end
|
232
|
+
|
233
|
+
# @return [String]
|
234
|
+
def message
|
235
|
+
@message || @data[:message]
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
class KmsInvalidKeyUsage < ServiceError
|
240
|
+
|
241
|
+
# @param [Seahorse::Client::RequestContext] context
|
242
|
+
# @param [String] message
|
243
|
+
# @param [Aws::SQS::Types::KmsInvalidKeyUsage] data
|
244
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
245
|
+
super(context, message, data)
|
246
|
+
end
|
247
|
+
|
248
|
+
# @return [String]
|
249
|
+
def message
|
250
|
+
@message || @data[:message]
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
class KmsInvalidState < ServiceError
|
255
|
+
|
256
|
+
# @param [Seahorse::Client::RequestContext] context
|
257
|
+
# @param [String] message
|
258
|
+
# @param [Aws::SQS::Types::KmsInvalidState] data
|
259
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
260
|
+
super(context, message, data)
|
261
|
+
end
|
262
|
+
|
263
|
+
# @return [String]
|
264
|
+
def message
|
265
|
+
@message || @data[:message]
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
class KmsNotFound < ServiceError
|
270
|
+
|
271
|
+
# @param [Seahorse::Client::RequestContext] context
|
272
|
+
# @param [String] message
|
273
|
+
# @param [Aws::SQS::Types::KmsNotFound] data
|
274
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
275
|
+
super(context, message, data)
|
276
|
+
end
|
277
|
+
|
278
|
+
# @return [String]
|
279
|
+
def message
|
280
|
+
@message || @data[:message]
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
class KmsOptInRequired < ServiceError
|
285
|
+
|
286
|
+
# @param [Seahorse::Client::RequestContext] context
|
287
|
+
# @param [String] message
|
288
|
+
# @param [Aws::SQS::Types::KmsOptInRequired] data
|
289
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
290
|
+
super(context, message, data)
|
291
|
+
end
|
292
|
+
|
293
|
+
# @return [String]
|
294
|
+
def message
|
295
|
+
@message || @data[:message]
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
class KmsThrottled < ServiceError
|
300
|
+
|
301
|
+
# @param [Seahorse::Client::RequestContext] context
|
302
|
+
# @param [String] message
|
303
|
+
# @param [Aws::SQS::Types::KmsThrottled] data
|
304
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
305
|
+
super(context, message, data)
|
306
|
+
end
|
307
|
+
|
308
|
+
# @return [String]
|
309
|
+
def message
|
310
|
+
@message || @data[:message]
|
311
|
+
end
|
121
312
|
end
|
122
313
|
|
123
314
|
class MessageNotInflight < ServiceError
|
@@ -138,6 +329,11 @@ module Aws::SQS
|
|
138
329
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
139
330
|
super(context, message, data)
|
140
331
|
end
|
332
|
+
|
333
|
+
# @return [String]
|
334
|
+
def message
|
335
|
+
@message || @data[:message]
|
336
|
+
end
|
141
337
|
end
|
142
338
|
|
143
339
|
class PurgeQueueInProgress < ServiceError
|
@@ -148,6 +344,11 @@ module Aws::SQS
|
|
148
344
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
149
345
|
super(context, message, data)
|
150
346
|
end
|
347
|
+
|
348
|
+
# @return [String]
|
349
|
+
def message
|
350
|
+
@message || @data[:message]
|
351
|
+
end
|
151
352
|
end
|
152
353
|
|
153
354
|
class QueueDeletedRecently < ServiceError
|
@@ -158,6 +359,11 @@ module Aws::SQS
|
|
158
359
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
159
360
|
super(context, message, data)
|
160
361
|
end
|
362
|
+
|
363
|
+
# @return [String]
|
364
|
+
def message
|
365
|
+
@message || @data[:message]
|
366
|
+
end
|
161
367
|
end
|
162
368
|
|
163
369
|
class QueueDoesNotExist < ServiceError
|
@@ -168,6 +374,11 @@ module Aws::SQS
|
|
168
374
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
169
375
|
super(context, message, data)
|
170
376
|
end
|
377
|
+
|
378
|
+
# @return [String]
|
379
|
+
def message
|
380
|
+
@message || @data[:message]
|
381
|
+
end
|
171
382
|
end
|
172
383
|
|
173
384
|
class QueueNameExists < ServiceError
|
@@ -178,6 +389,11 @@ module Aws::SQS
|
|
178
389
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
179
390
|
super(context, message, data)
|
180
391
|
end
|
392
|
+
|
393
|
+
# @return [String]
|
394
|
+
def message
|
395
|
+
@message || @data[:message]
|
396
|
+
end
|
181
397
|
end
|
182
398
|
|
183
399
|
class ReceiptHandleIsInvalid < ServiceError
|
@@ -188,6 +404,26 @@ module Aws::SQS
|
|
188
404
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
189
405
|
super(context, message, data)
|
190
406
|
end
|
407
|
+
|
408
|
+
# @return [String]
|
409
|
+
def message
|
410
|
+
@message || @data[:message]
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
414
|
+
class RequestThrottled < ServiceError
|
415
|
+
|
416
|
+
# @param [Seahorse::Client::RequestContext] context
|
417
|
+
# @param [String] message
|
418
|
+
# @param [Aws::SQS::Types::RequestThrottled] data
|
419
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
420
|
+
super(context, message, data)
|
421
|
+
end
|
422
|
+
|
423
|
+
# @return [String]
|
424
|
+
def message
|
425
|
+
@message || @data[:message]
|
426
|
+
end
|
191
427
|
end
|
192
428
|
|
193
429
|
class TooManyEntriesInBatchRequest < ServiceError
|
@@ -198,6 +434,11 @@ module Aws::SQS
|
|
198
434
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
199
435
|
super(context, message, data)
|
200
436
|
end
|
437
|
+
|
438
|
+
# @return [String]
|
439
|
+
def message
|
440
|
+
@message || @data[:message]
|
441
|
+
end
|
201
442
|
end
|
202
443
|
|
203
444
|
class UnsupportedOperation < ServiceError
|
@@ -208,6 +449,11 @@ module Aws::SQS
|
|
208
449
|
def initialize(context, message, data = Aws::EmptyStructure.new)
|
209
450
|
super(context, message, data)
|
210
451
|
end
|
452
|
+
|
453
|
+
# @return [String]
|
454
|
+
def message
|
455
|
+
@message || @data[:message]
|
456
|
+
end
|
211
457
|
end
|
212
458
|
|
213
459
|
end
|
data/lib/aws-sdk-sqs/queue.rb
CHANGED
@@ -218,7 +218,7 @@ module Aws::SQS
|
|
218
218
|
#
|
219
219
|
# * `SenderId`
|
220
220
|
#
|
221
|
-
# * For
|
221
|
+
# * For a user, returns the user ID, for example
|
222
222
|
# `ABCDEFGHI1JKLMNOPQ23R`.
|
223
223
|
#
|
224
224
|
# * For an IAM role, returns the IAM role ID, for example
|
@@ -229,7 +229,7 @@ module Aws::SQS
|
|
229
229
|
#
|
230
230
|
# * `SqsManagedSseEnabled` – Enables server-side queue encryption using
|
231
231
|
# SQS owned encryption keys. Only one server-side encryption option is
|
232
|
-
# supported per queue (
|
232
|
+
# supported per queue (for example, [SSE-KMS][2] or [SSE-SQS][3]).
|
233
233
|
#
|
234
234
|
# * `MessageDeduplicationId` – Returns the value provided by the
|
235
235
|
# producer that calls the ` SendMessage ` action.
|
@@ -416,7 +416,7 @@ module Aws::SQS
|
|
416
416
|
# @param [Hash] options ({})
|
417
417
|
# @option options [required, String] :message_body
|
418
418
|
# The message to send. The minimum size is one character. The maximum
|
419
|
-
# size is 256
|
419
|
+
# size is 256 KiB.
|
420
420
|
#
|
421
421
|
# A message can include only XML, JSON, and unformatted text. The
|
422
422
|
# following Unicode characters are allowed:
|
@@ -626,7 +626,13 @@ module Aws::SQS
|
|
626
626
|
# * `MessageRetentionPeriod` – The length of time, in seconds, for which
|
627
627
|
# Amazon SQS retains a message. Valid values: An integer representing
|
628
628
|
# seconds, from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600
|
629
|
-
# (4 days).
|
629
|
+
# (4 days). When you change a queue's attributes, the change can take
|
630
|
+
# up to 60 seconds for most of the attributes to propagate throughout
|
631
|
+
# the Amazon SQS system. Changes made to the `MessageRetentionPeriod`
|
632
|
+
# attribute can take up to 15 minutes and will impact existing
|
633
|
+
# messages in the queue potentially causing them to be expired and
|
634
|
+
# deleted if the `MessageRetentionPeriod` is reduced below the age of
|
635
|
+
# existing messages.
|
630
636
|
#
|
631
637
|
# * `Policy` – The queue's policy. A valid Amazon Web Services policy.
|
632
638
|
# For more information about policy structure, see [Overview of Amazon
|
@@ -637,33 +643,61 @@ module Aws::SQS
|
|
637
643
|
# for which a ` ReceiveMessage ` action waits for a message to arrive.
|
638
644
|
# Valid values: An integer from 0 to 20 (seconds). Default: 0.
|
639
645
|
#
|
646
|
+
# * `VisibilityTimeout` – The visibility timeout for the queue, in
|
647
|
+
# seconds. Valid values: An integer from 0 to 43,200 (12 hours).
|
648
|
+
# Default: 30. For more information about the visibility timeout, see
|
649
|
+
# [Visibility Timeout][2] in the *Amazon SQS Developer Guide*.
|
650
|
+
#
|
651
|
+
# The following attributes apply only to [dead-letter queues:][3]
|
652
|
+
#
|
640
653
|
# * `RedrivePolicy` – The string that includes the parameters for the
|
641
654
|
# dead-letter queue functionality of the source queue as a JSON
|
642
|
-
# object.
|
643
|
-
# dead-letter queues, see [Using Amazon SQS Dead-Letter Queues][2] in
|
644
|
-
# the *Amazon SQS Developer Guide*.
|
655
|
+
# object. The parameters are as follows:
|
645
656
|
#
|
646
657
|
# * `deadLetterTargetArn` – The Amazon Resource Name (ARN) of the
|
647
658
|
# dead-letter queue to which Amazon SQS moves messages after the
|
648
659
|
# value of `maxReceiveCount` is exceeded.
|
649
660
|
#
|
650
661
|
# * `maxReceiveCount` – The number of times a message is delivered to
|
651
|
-
# the source queue before being moved to the dead-letter queue.
|
652
|
-
# the `ReceiveCount` for a message exceeds the
|
653
|
-
# a queue, Amazon SQS moves the message to the
|
654
|
-
#
|
655
|
-
#
|
656
|
-
#
|
657
|
-
#
|
662
|
+
# the source queue before being moved to the dead-letter queue.
|
663
|
+
# Default: 10. When the `ReceiveCount` for a message exceeds the
|
664
|
+
# `maxReceiveCount` for a queue, Amazon SQS moves the message to the
|
665
|
+
# dead-letter-queue.
|
666
|
+
#
|
667
|
+
# * `RedriveAllowPolicy` – The string that includes the parameters for
|
668
|
+
# the permissions for the dead-letter queue redrive permission and
|
669
|
+
# which source queues can specify dead-letter queues as a JSON object.
|
670
|
+
# The parameters are as follows:
|
671
|
+
#
|
672
|
+
# * `redrivePermission` – The permission type that defines which
|
673
|
+
# source queues can specify the current queue as the dead-letter
|
674
|
+
# queue. Valid values are:
|
675
|
+
#
|
676
|
+
# * `allowAll` – (Default) Any source queues in this Amazon Web
|
677
|
+
# Services account in the same Region can specify this queue as
|
678
|
+
# the dead-letter queue.
|
679
|
+
#
|
680
|
+
# * `denyAll` – No source queues can specify this queue as the
|
681
|
+
# dead-letter queue.
|
682
|
+
#
|
683
|
+
# * `byQueue` – Only queues specified by the `sourceQueueArns`
|
684
|
+
# parameter can specify this queue as the dead-letter queue.
|
685
|
+
#
|
686
|
+
# * `sourceQueueArns` – The Amazon Resource Names (ARN)s of the source
|
687
|
+
# queues that can specify this queue as the dead-letter queue and
|
688
|
+
# redrive messages. You can specify this parameter only when the
|
689
|
+
# `redrivePermission` parameter is set to `byQueue`. You can specify
|
690
|
+
# up to 10 source queue ARNs. To allow more than 10 source queues to
|
691
|
+
# specify dead-letter queues, set the `redrivePermission` parameter
|
692
|
+
# to `allowAll`.
|
693
|
+
#
|
694
|
+
# <note markdown="1"> The dead-letter queue of a FIFO queue must also be a FIFO queue.
|
695
|
+
# Similarly, the dead-letter queue of a standard queue must also be a
|
696
|
+
# standard queue.
|
658
697
|
#
|
659
|
-
#
|
660
|
-
#
|
661
|
-
# * `VisibilityTimeout` – The visibility timeout for the queue, in
|
662
|
-
# seconds. Valid values: An integer from 0 to 43,200 (12 hours).
|
663
|
-
# Default: 30. For more information about the visibility timeout, see
|
664
|
-
# [Visibility Timeout][3] in the *Amazon SQS Developer Guide*.
|
698
|
+
# </note>
|
665
699
|
#
|
666
|
-
# The following attributes apply only to [server-side-encryption][4]
|
700
|
+
# The following attributes apply only to [server-side-encryption][4]:
|
667
701
|
#
|
668
702
|
# * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
|
669
703
|
# master key (CMK) for Amazon SQS or a custom CMK. For more
|
@@ -683,10 +717,10 @@ module Aws::SQS
|
|
683
717
|
#
|
684
718
|
# * `SqsManagedSseEnabled` – Enables server-side queue encryption using
|
685
719
|
# SQS owned encryption keys. Only one server-side encryption option is
|
686
|
-
# supported per queue (
|
720
|
+
# supported per queue (for example, [SSE-KMS][9] or [SSE-SQS][10]).
|
687
721
|
#
|
688
722
|
# The following attribute applies only to [FIFO (first-in-first-out)
|
689
|
-
# queues][11]
|
723
|
+
# queues][11]:
|
690
724
|
#
|
691
725
|
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
692
726
|
# For more information, see [Exactly-once processing][12] in the
|
@@ -721,7 +755,7 @@ module Aws::SQS
|
|
721
755
|
# duplicates and only one copy of the message is delivered.
|
722
756
|
#
|
723
757
|
# The following attributes apply only to [high throughput for FIFO
|
724
|
-
# queues][13]
|
758
|
+
# queues][13]:
|
725
759
|
#
|
726
760
|
# * `DeduplicationScope` – Specifies whether message deduplication
|
727
761
|
# occurs at the message group or queue level. Valid values are
|
@@ -749,8 +783,8 @@ module Aws::SQS
|
|
749
783
|
#
|
750
784
|
#
|
751
785
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html
|
752
|
-
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-
|
753
|
-
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-
|
786
|
+
# [2]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
787
|
+
# [3]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
|
754
788
|
# [4]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html
|
755
789
|
# [5]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms
|
756
790
|
# [6]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
|
@@ -498,6 +498,12 @@ module Aws
|
|
498
498
|
raise ArgumentError, "invalid option #{opt_name.inspect}"
|
499
499
|
end
|
500
500
|
end
|
501
|
+
|
502
|
+
max_number_of_messages = @request_params[:max_number_of_messages]
|
503
|
+
unless max_number_of_messages.is_a?(Integer) && max_number_of_messages.positive?
|
504
|
+
raise ArgumentError, ':max_number_of_messages must be a positive integer'
|
505
|
+
end
|
506
|
+
|
501
507
|
@request_params.freeze
|
502
508
|
freeze
|
503
509
|
end
|