aws-sdk-sqs 1.23.0 → 1.27.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 88cfd94fed593b228e0538a28cc6242ef9f1c6fc
4
- data.tar.gz: 41df0f49aadb3fbfb3a9505169cd435236d9a849
2
+ SHA256:
3
+ metadata.gz: 930ec95f362fc5fa5b3332c482b8b0559e214c641df330439aa855164dd084d4
4
+ data.tar.gz: 73396e0bbd88f8c4c5c206263e7fc23ed7e72872d87a41044d151dade1375692
5
5
  SHA512:
6
- metadata.gz: f7be445ad514010bee82d6029d135c2122a40c6bff60ae9aec0da6ce9b57f34b83b1d4ccd6b6c2ef25ed738c7c2341c1bf3c8c7ca72fc7aaf65a4c2237db573e
7
- data.tar.gz: 2d8308a87e5013aa140c1f8b134b2194bb2b9c03bd09b53332e1741bbf244f0d6fed6d3e13cc3ed80e3452bf5c5dd168b07827ae14e09b04f81a737db80aec8c
6
+ metadata.gz: ee299a2d6ccf91c4c732ec05a1cb51890801e3a0b36925d80b5b106fa1ed8257c15beb081ba1768c95f2b30ab043feb68a5a01bccddb57da6d7a955f2fca9d66
7
+ data.tar.gz: 50a1077ce5cd35470137d997dcb5cbbd1bc5b3bb04c905db9b9fc9c791ed873f8526c59f40b938dbe99d82a89cd89b568b870e5cdd5e600bea3851ce04c399cf
@@ -26,17 +26,20 @@ require_relative 'aws-sdk-sqs/customizations'
26
26
  # methods each accept a hash of request parameters and return a response
27
27
  # structure.
28
28
  #
29
+ # sqs = Aws::SQS::Client.new
30
+ # resp = sqs.add_permission(params)
31
+ #
29
32
  # See {Client} for more information.
30
33
  #
31
34
  # # Errors
32
35
  #
33
- # Errors returned from Amazon Simple Queue Service all
34
- # extend {Errors::ServiceError}.
36
+ # Errors returned from Amazon Simple Queue Service are defined in the
37
+ # {Errors} module and all extend {Errors::ServiceError}.
35
38
  #
36
39
  # begin
37
40
  # # do stuff
38
41
  # rescue Aws::SQS::Errors::ServiceError
39
- # # rescues all service API errors
42
+ # # rescues all Amazon Simple Queue Service API errors
40
43
  # end
41
44
  #
42
45
  # See {Errors} for more information.
@@ -44,6 +47,6 @@ require_relative 'aws-sdk-sqs/customizations'
44
47
  # @service
45
48
  module Aws::SQS
46
49
 
47
- GEM_VERSION = '1.23.0'
50
+ GEM_VERSION = '1.27.1'
48
51
 
49
52
  end
@@ -24,6 +24,7 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
24
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
25
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
26
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
+ require 'aws-sdk-core/plugins/http_checksum.rb'
27
28
  require 'aws-sdk-core/plugins/signature_v4.rb'
28
29
  require 'aws-sdk-core/plugins/protocols/query.rb'
29
30
  require 'aws-sdk-sqs/plugins/queue_urls.rb'
@@ -32,6 +33,18 @@ require 'aws-sdk-sqs/plugins/md5s.rb'
32
33
  Aws::Plugins::GlobalConfiguration.add_identifier(:sqs)
33
34
 
34
35
  module Aws::SQS
36
+ # An API client for SQS. To construct a client, you need to configure a `:region` and `:credentials`.
37
+ #
38
+ # client = Aws::SQS::Client.new(
39
+ # region: region_name,
40
+ # credentials: credentials,
41
+ # # ...
42
+ # )
43
+ #
44
+ # For details on configuring region and credentials see
45
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
46
+ #
47
+ # See {#initialize} for a full list of supported configuration options.
35
48
  class Client < Seahorse::Client::Base
36
49
 
37
50
  include Aws::ClientStubs
@@ -59,6 +72,7 @@ module Aws::SQS
59
72
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
60
73
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
61
74
  add_plugin(Aws::Plugins::TransferEncoding)
75
+ add_plugin(Aws::Plugins::HttpChecksum)
62
76
  add_plugin(Aws::Plugins::SignatureV4)
63
77
  add_plugin(Aws::Plugins::Protocols::Query)
64
78
  add_plugin(Aws::SQS::Plugins::QueueUrls)
@@ -97,7 +111,7 @@ module Aws::SQS
97
111
  # @option options [required, String] :region
98
112
  # The AWS region to connect to. The configured `:region` is
99
113
  # used to determine the service `:endpoint`. When not passed,
100
- # a default `:region` is search for in the following locations:
114
+ # a default `:region` is searched for in the following locations:
101
115
  #
102
116
  # * `Aws.config[:region]`
103
117
  # * `ENV['AWS_REGION']`
@@ -112,6 +126,12 @@ module Aws::SQS
112
126
  # When set to `true`, a thread polling for endpoints will be running in
113
127
  # the background every 60 secs (default). Defaults to `false`.
114
128
  #
129
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
130
+ # Used only in `adaptive` retry mode. When true, the request will sleep
131
+ # until there is sufficent client side capacity to retry the request.
132
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
133
+ # not retry instead of sleeping.
134
+ #
115
135
  # @option options [Boolean] :client_side_monitoring (false)
116
136
  # When `true`, client-side metrics will be collected for all API requests from
117
137
  # this client.
@@ -136,6 +156,10 @@ module Aws::SQS
136
156
  # When `true`, an attempt is made to coerce request parameters into
137
157
  # the required types.
138
158
  #
159
+ # @option options [Boolean] :correct_clock_skew (true)
160
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
161
+ # a clock skew correction and retry requests with skewed client clocks.
162
+ #
139
163
  # @option options [Boolean] :disable_host_prefix_injection (false)
140
164
  # Set to true to disable SDK automatically adding host prefix
141
165
  # to default service endpoint when available.
@@ -143,7 +167,7 @@ module Aws::SQS
143
167
  # @option options [String] :endpoint
144
168
  # The client endpoint is normally constructed from the `:region`
145
169
  # option. You should only configure an `:endpoint` when connecting
146
- # to test endpoints. This should be avalid HTTP(S) URI.
170
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
147
171
  #
148
172
  # @option options [Integer] :endpoint_cache_max_entries (1000)
149
173
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -158,7 +182,7 @@ module Aws::SQS
158
182
  # requests fetching endpoints information. Defaults to 60 sec.
159
183
  #
160
184
  # @option options [Boolean] :endpoint_discovery (false)
161
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
185
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
162
186
  #
163
187
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
164
188
  # The log formatter.
@@ -170,15 +194,29 @@ module Aws::SQS
170
194
  # The Logger instance to send log messages to. If this option
171
195
  # is not set, logging will be disabled.
172
196
  #
197
+ # @option options [Integer] :max_attempts (3)
198
+ # An integer representing the maximum number attempts that will be made for
199
+ # a single request, including the initial attempt. For example,
200
+ # setting this value to 5 will result in a request being retried up to
201
+ # 4 times. Used in `standard` and `adaptive` retry modes.
202
+ #
173
203
  # @option options [String] :profile ("default")
174
204
  # Used when loading credentials from the shared credentials file
175
205
  # at HOME/.aws/credentials. When not specified, 'default' is used.
176
206
  #
207
+ # @option options [Proc] :retry_backoff
208
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
209
+ # This option is only used in the `legacy` retry mode.
210
+ #
177
211
  # @option options [Float] :retry_base_delay (0.3)
178
- # The base delay in seconds used by the default backoff function.
212
+ # The base delay in seconds used by the default backoff function. This option
213
+ # is only used in the `legacy` retry mode.
179
214
  #
180
215
  # @option options [Symbol] :retry_jitter (:none)
181
- # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
216
+ # A delay randomiser function used by the default backoff function.
217
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
218
+ # otherwise a Proc that takes and returns a number. This option is only used
219
+ # in the `legacy` retry mode.
182
220
  #
183
221
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
184
222
  #
@@ -186,11 +224,30 @@ module Aws::SQS
186
224
  # The maximum number of times to retry failed requests. Only
187
225
  # ~ 500 level server errors and certain ~ 400 level client errors
188
226
  # are retried. Generally, these are throttling errors, data
189
- # checksum errors, networking errors, timeout errors and auth
190
- # errors from expired credentials.
227
+ # checksum errors, networking errors, timeout errors, auth errors,
228
+ # endpoint discovery, and errors from expired credentials.
229
+ # This option is only used in the `legacy` retry mode.
191
230
  #
192
231
  # @option options [Integer] :retry_max_delay (0)
193
- # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
232
+ # The maximum number of seconds to delay between retries (0 for no limit)
233
+ # used by the default backoff function. This option is only used in the
234
+ # `legacy` retry mode.
235
+ #
236
+ # @option options [String] :retry_mode ("legacy")
237
+ # Specifies which retry algorithm to use. Values are:
238
+ #
239
+ # * `legacy` - The pre-existing retry behavior. This is default value if
240
+ # no retry mode is provided.
241
+ #
242
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
243
+ # This includes support for retry quotas, which limit the number of
244
+ # unsuccessful retries a client can make.
245
+ #
246
+ # * `adaptive` - An experimental retry mode that includes all the
247
+ # functionality of `standard` mode along with automatic client side
248
+ # throttling. This is a provisional mode that may change behavior
249
+ # in the future.
250
+ #
194
251
  #
195
252
  # @option options [String] :secret_access_key
196
253
  #
@@ -219,16 +276,15 @@ module Aws::SQS
219
276
  # requests through. Formatted like 'http://proxy.com:123'.
220
277
  #
221
278
  # @option options [Float] :http_open_timeout (15) The number of
222
- # seconds to wait when opening a HTTP session before rasing a
279
+ # seconds to wait when opening a HTTP session before raising a
223
280
  # `Timeout::Error`.
224
281
  #
225
282
  # @option options [Integer] :http_read_timeout (60) The default
226
283
  # number of seconds to wait for response data. This value can
227
- # safely be set
228
- # per-request on the session yeidled by {#session_for}.
284
+ # safely be set per-request on the session.
229
285
  #
230
286
  # @option options [Float] :http_idle_timeout (5) The number of
231
- # seconds a connection is allowed to sit idble before it is
287
+ # seconds a connection is allowed to sit idle before it is
232
288
  # considered stale. Stale connections are closed and removed
233
289
  # from the pool before making a request.
234
290
  #
@@ -237,7 +293,7 @@ module Aws::SQS
237
293
  # request body. This option has no effect unless the request has
238
294
  # "Expect" header set to "100-continue". Defaults to `nil` which
239
295
  # disables this behaviour. This value can safely be set per
240
- # request on the session yeidled by {#session_for}.
296
+ # request on the session.
241
297
  #
242
298
  # @option options [Boolean] :http_wire_trace (false) When `true`,
243
299
  # HTTP debug output will be sent to the `:logger`.
@@ -2220,7 +2276,7 @@ module Aws::SQS
2220
2276
  params: params,
2221
2277
  config: config)
2222
2278
  context[:gem_name] = 'aws-sdk-sqs'
2223
- context[:gem_version] = '1.23.0'
2279
+ context[:gem_version] = '1.27.1'
2224
2280
  Seahorse::Client::Request.new(handlers, context)
2225
2281
  end
2226
2282
 
@@ -112,6 +112,10 @@ module Aws::SQS
112
112
 
113
113
  AttributeNameList.member = Shapes::ShapeRef.new(shape: QueueAttributeName, location_name: "AttributeName")
114
114
 
115
+ BatchEntryIdsNotDistinct.struct_class = Types::BatchEntryIdsNotDistinct
116
+
117
+ BatchRequestTooLong.struct_class = Types::BatchRequestTooLong
118
+
115
119
  BatchResultErrorEntry.add_member(:id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Id"))
116
120
  BatchResultErrorEntry.add_member(:sender_fault, Shapes::ShapeRef.new(shape: Boolean, required: true, location_name: "SenderFault"))
117
121
  BatchResultErrorEntry.add_member(:code, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Code"))
@@ -181,6 +185,8 @@ module Aws::SQS
181
185
  DeleteQueueRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
182
186
  DeleteQueueRequest.struct_class = Types::DeleteQueueRequest
183
187
 
188
+ EmptyBatchRequest.struct_class = Types::EmptyBatchRequest
189
+
184
190
  GetQueueAttributesRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
185
191
  GetQueueAttributesRequest.add_member(:attribute_names, Shapes::ShapeRef.new(shape: AttributeNameList, location_name: "AttributeNames"))
186
192
  GetQueueAttributesRequest.struct_class = Types::GetQueueAttributesRequest
@@ -195,6 +201,14 @@ module Aws::SQS
195
201
  GetQueueUrlResult.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, location_name: "QueueUrl"))
196
202
  GetQueueUrlResult.struct_class = Types::GetQueueUrlResult
197
203
 
204
+ InvalidAttributeName.struct_class = Types::InvalidAttributeName
205
+
206
+ InvalidBatchEntryId.struct_class = Types::InvalidBatchEntryId
207
+
208
+ InvalidIdFormat.struct_class = Types::InvalidIdFormat
209
+
210
+ InvalidMessageContents.struct_class = Types::InvalidMessageContents
211
+
198
212
  ListDeadLetterSourceQueuesRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
199
213
  ListDeadLetterSourceQueuesRequest.struct_class = Types::ListDeadLetterSourceQueuesRequest
200
214
 
@@ -239,6 +253,8 @@ module Aws::SQS
239
253
 
240
254
  MessageList.member = Shapes::ShapeRef.new(shape: Message, location_name: "Message")
241
255
 
256
+ MessageNotInflight.struct_class = Types::MessageNotInflight
257
+
242
258
  MessageSystemAttributeMap.key = Shapes::ShapeRef.new(shape: MessageSystemAttributeName, location_name: "Name")
243
259
  MessageSystemAttributeMap.value = Shapes::ShapeRef.new(shape: String, location_name: "Value")
244
260
 
@@ -249,14 +265,26 @@ module Aws::SQS
249
265
  MessageSystemAttributeValue.add_member(:data_type, Shapes::ShapeRef.new(shape: String, required: true, location_name: "DataType"))
250
266
  MessageSystemAttributeValue.struct_class = Types::MessageSystemAttributeValue
251
267
 
268
+ OverLimit.struct_class = Types::OverLimit
269
+
270
+ PurgeQueueInProgress.struct_class = Types::PurgeQueueInProgress
271
+
252
272
  PurgeQueueRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
253
273
  PurgeQueueRequest.struct_class = Types::PurgeQueueRequest
254
274
 
255
275
  QueueAttributeMap.key = Shapes::ShapeRef.new(shape: QueueAttributeName, location_name: "Name")
256
276
  QueueAttributeMap.value = Shapes::ShapeRef.new(shape: String, location_name: "Value")
257
277
 
278
+ QueueDeletedRecently.struct_class = Types::QueueDeletedRecently
279
+
280
+ QueueDoesNotExist.struct_class = Types::QueueDoesNotExist
281
+
282
+ QueueNameExists.struct_class = Types::QueueNameExists
283
+
258
284
  QueueUrlList.member = Shapes::ShapeRef.new(shape: String, location_name: "QueueUrl")
259
285
 
286
+ ReceiptHandleIsInvalid.struct_class = Types::ReceiptHandleIsInvalid
287
+
260
288
  ReceiveMessageRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
261
289
  ReceiveMessageRequest.add_member(:attribute_names, Shapes::ShapeRef.new(shape: AttributeNameList, location_name: "AttributeNames"))
262
290
  ReceiveMessageRequest.add_member(:message_attribute_names, Shapes::ShapeRef.new(shape: MessageAttributeNameList, location_name: "MessageAttributeNames"))
@@ -333,6 +361,10 @@ module Aws::SQS
333
361
  TagQueueRequest.add_member(:tags, Shapes::ShapeRef.new(shape: TagMap, required: true, location_name: "Tags"))
334
362
  TagQueueRequest.struct_class = Types::TagQueueRequest
335
363
 
364
+ TooManyEntriesInBatchRequest.struct_class = Types::TooManyEntriesInBatchRequest
365
+
366
+ UnsupportedOperation.struct_class = Types::UnsupportedOperation
367
+
336
368
  UntagQueueRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
337
369
  UntagQueueRequest.add_member(:tag_keys, Shapes::ShapeRef.new(shape: TagKeyList, required: true, location_name: "TagKeys"))
338
370
  UntagQueueRequest.struct_class = Types::UntagQueueRequest
@@ -6,9 +6,207 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::SQS
9
+
10
+ # When SQS returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::SQS::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all SQS errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::SQS::Errors::ServiceError
18
+ # # rescues all SQS API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {BatchEntryIdsNotDistinct}
29
+ # * {BatchRequestTooLong}
30
+ # * {EmptyBatchRequest}
31
+ # * {InvalidAttributeName}
32
+ # * {InvalidBatchEntryId}
33
+ # * {InvalidIdFormat}
34
+ # * {InvalidMessageContents}
35
+ # * {MessageNotInflight}
36
+ # * {OverLimit}
37
+ # * {PurgeQueueInProgress}
38
+ # * {QueueDeletedRecently}
39
+ # * {QueueDoesNotExist}
40
+ # * {QueueNameExists}
41
+ # * {ReceiptHandleIsInvalid}
42
+ # * {TooManyEntriesInBatchRequest}
43
+ # * {UnsupportedOperation}
44
+ #
45
+ # Additionally, error classes are dynamically generated for service errors based on the error code
46
+ # if they are not defined above.
9
47
  module Errors
10
48
 
11
49
  extend Aws::Errors::DynamicErrors
12
50
 
51
+ class BatchEntryIdsNotDistinct < ServiceError
52
+
53
+ # @param [Seahorse::Client::RequestContext] context
54
+ # @param [String] message
55
+ # @param [Aws::SQS::Types::BatchEntryIdsNotDistinct] data
56
+ def initialize(context, message, data = Aws::EmptyStructure.new)
57
+ super(context, message, data)
58
+ end
59
+ end
60
+
61
+ class BatchRequestTooLong < ServiceError
62
+
63
+ # @param [Seahorse::Client::RequestContext] context
64
+ # @param [String] message
65
+ # @param [Aws::SQS::Types::BatchRequestTooLong] data
66
+ def initialize(context, message, data = Aws::EmptyStructure.new)
67
+ super(context, message, data)
68
+ end
69
+ end
70
+
71
+ class EmptyBatchRequest < ServiceError
72
+
73
+ # @param [Seahorse::Client::RequestContext] context
74
+ # @param [String] message
75
+ # @param [Aws::SQS::Types::EmptyBatchRequest] data
76
+ def initialize(context, message, data = Aws::EmptyStructure.new)
77
+ super(context, message, data)
78
+ end
79
+ end
80
+
81
+ class InvalidAttributeName < ServiceError
82
+
83
+ # @param [Seahorse::Client::RequestContext] context
84
+ # @param [String] message
85
+ # @param [Aws::SQS::Types::InvalidAttributeName] data
86
+ def initialize(context, message, data = Aws::EmptyStructure.new)
87
+ super(context, message, data)
88
+ end
89
+ end
90
+
91
+ class InvalidBatchEntryId < ServiceError
92
+
93
+ # @param [Seahorse::Client::RequestContext] context
94
+ # @param [String] message
95
+ # @param [Aws::SQS::Types::InvalidBatchEntryId] data
96
+ def initialize(context, message, data = Aws::EmptyStructure.new)
97
+ super(context, message, data)
98
+ end
99
+ end
100
+
101
+ class InvalidIdFormat < ServiceError
102
+
103
+ # @param [Seahorse::Client::RequestContext] context
104
+ # @param [String] message
105
+ # @param [Aws::SQS::Types::InvalidIdFormat] data
106
+ def initialize(context, message, data = Aws::EmptyStructure.new)
107
+ super(context, message, data)
108
+ end
109
+ end
110
+
111
+ class InvalidMessageContents < ServiceError
112
+
113
+ # @param [Seahorse::Client::RequestContext] context
114
+ # @param [String] message
115
+ # @param [Aws::SQS::Types::InvalidMessageContents] data
116
+ def initialize(context, message, data = Aws::EmptyStructure.new)
117
+ super(context, message, data)
118
+ end
119
+ end
120
+
121
+ class MessageNotInflight < ServiceError
122
+
123
+ # @param [Seahorse::Client::RequestContext] context
124
+ # @param [String] message
125
+ # @param [Aws::SQS::Types::MessageNotInflight] data
126
+ def initialize(context, message, data = Aws::EmptyStructure.new)
127
+ super(context, message, data)
128
+ end
129
+ end
130
+
131
+ class OverLimit < ServiceError
132
+
133
+ # @param [Seahorse::Client::RequestContext] context
134
+ # @param [String] message
135
+ # @param [Aws::SQS::Types::OverLimit] data
136
+ def initialize(context, message, data = Aws::EmptyStructure.new)
137
+ super(context, message, data)
138
+ end
139
+ end
140
+
141
+ class PurgeQueueInProgress < ServiceError
142
+
143
+ # @param [Seahorse::Client::RequestContext] context
144
+ # @param [String] message
145
+ # @param [Aws::SQS::Types::PurgeQueueInProgress] data
146
+ def initialize(context, message, data = Aws::EmptyStructure.new)
147
+ super(context, message, data)
148
+ end
149
+ end
150
+
151
+ class QueueDeletedRecently < ServiceError
152
+
153
+ # @param [Seahorse::Client::RequestContext] context
154
+ # @param [String] message
155
+ # @param [Aws::SQS::Types::QueueDeletedRecently] data
156
+ def initialize(context, message, data = Aws::EmptyStructure.new)
157
+ super(context, message, data)
158
+ end
159
+ end
160
+
161
+ class QueueDoesNotExist < ServiceError
162
+
163
+ # @param [Seahorse::Client::RequestContext] context
164
+ # @param [String] message
165
+ # @param [Aws::SQS::Types::QueueDoesNotExist] data
166
+ def initialize(context, message, data = Aws::EmptyStructure.new)
167
+ super(context, message, data)
168
+ end
169
+ end
170
+
171
+ class QueueNameExists < ServiceError
172
+
173
+ # @param [Seahorse::Client::RequestContext] context
174
+ # @param [String] message
175
+ # @param [Aws::SQS::Types::QueueNameExists] data
176
+ def initialize(context, message, data = Aws::EmptyStructure.new)
177
+ super(context, message, data)
178
+ end
179
+ end
180
+
181
+ class ReceiptHandleIsInvalid < ServiceError
182
+
183
+ # @param [Seahorse::Client::RequestContext] context
184
+ # @param [String] message
185
+ # @param [Aws::SQS::Types::ReceiptHandleIsInvalid] data
186
+ def initialize(context, message, data = Aws::EmptyStructure.new)
187
+ super(context, message, data)
188
+ end
189
+ end
190
+
191
+ class TooManyEntriesInBatchRequest < ServiceError
192
+
193
+ # @param [Seahorse::Client::RequestContext] context
194
+ # @param [String] message
195
+ # @param [Aws::SQS::Types::TooManyEntriesInBatchRequest] data
196
+ def initialize(context, message, data = Aws::EmptyStructure.new)
197
+ super(context, message, data)
198
+ end
199
+ end
200
+
201
+ class UnsupportedOperation < ServiceError
202
+
203
+ # @param [Seahorse::Client::RequestContext] context
204
+ # @param [String] message
205
+ # @param [Aws::SQS::Types::UnsupportedOperation] data
206
+ def initialize(context, message, data = Aws::EmptyStructure.new)
207
+ super(context, message, data)
208
+ end
209
+ end
210
+
13
211
  end
14
212
  end
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::SQS
9
+
9
10
  class Message
10
11
 
11
12
  extend Aws::Deprecations
@@ -24,6 +25,7 @@ module Aws::SQS
24
25
  @receipt_handle = extract_receipt_handle(args, options)
25
26
  @data = options.delete(:data)
26
27
  @client = options.delete(:client) || Client.new(options)
28
+ @waiter_block_warned = false
27
29
  end
28
30
 
29
31
  # @!group Read-Only Attributes
@@ -119,14 +119,12 @@ module Aws
119
119
  end
120
120
 
121
121
  def mismatch_error_message(section, local_md5, returned_md5, response)
122
- m = "MD5 returned by SQS does not match " <<
123
- "the calculation on the original request. ("
124
-
122
+ m = 'MD5 returned by SQS does not match '\
123
+ 'the calculation on the original request. ('
125
124
  if response.respond_to?(:id) && !response.id.nil?
126
- m << "Message ID: #{response.id}, "
125
+ m = "#{m}Message ID: #{response.id}, "
127
126
  end
128
-
129
- m << "MD5 calculated by the #{section}: " <<
127
+ "#{m}MD5 calculated by the #{section}: "\
130
128
  "'#{local_md5}', MD5 checksum returned: '#{returned_md5}')"
131
129
  end
132
130
  end
@@ -22,7 +22,7 @@ module Aws
22
22
  # region, then we will modify the request to have
23
23
  # a sigv4 signer for the proper region.
24
24
  def update_region(context, queue_url)
25
- if queue_region = queue_url.to_s.split('.')[1]
25
+ if queue_region = parse_region(queue_url)
26
26
  if queue_region != context.config.region
27
27
  config = context.config.dup
28
28
  config.region = queue_region
@@ -33,6 +33,16 @@ module Aws
33
33
  end
34
34
  end
35
35
 
36
+ private
37
+
38
+ # take the first component after service delimiter
39
+ # https://sqs.us-east-1.amazonaws.com/1234567890/demo
40
+ # https://vpce-x-y.sqs.us-east-1.vpce.amazonaws.com/1234567890/demo
41
+ def parse_region(url)
42
+ parts = url.split('sqs.')
43
+ parts[1].split('.').first if parts.size > 1
44
+ end
45
+
36
46
  end
37
47
 
38
48
  handler(Handler)
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::SQS
9
+
9
10
  class Queue
10
11
 
11
12
  extend Aws::Deprecations
@@ -21,6 +22,7 @@ module Aws::SQS
21
22
  @url = extract_url(args, options)
22
23
  @data = options.delete(:data)
23
24
  @client = options.delete(:client) || Client.new(options)
25
+ @waiter_block_warned = false
24
26
  end
25
27
 
26
28
  # @!group Read-Only Attributes
@@ -6,6 +6,18 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::SQS
9
+
10
+ # This class provides a resource oriented interface for SQS.
11
+ # To create a resource object:
12
+ #
13
+ # resource = Aws::SQS::Resource.new(region: 'us-west-2')
14
+ #
15
+ # You can supply a client object with custom configuration that will be used for all resource operations.
16
+ # If you do not pass `:client`, a default client will be constructed.
17
+ #
18
+ # client = Aws::SQS::Client.new(region: 'us-west-2')
19
+ # resource = Aws::SQS::Resource.new(client: client)
20
+ #
9
21
  class Resource
10
22
 
11
23
  # @param options ({})
@@ -73,6 +73,18 @@ module Aws::SQS
73
73
  include Aws::Structure
74
74
  end
75
75
 
76
+ # Two or more batch entries in the request have the same `Id`.
77
+ #
78
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/BatchEntryIdsNotDistinct AWS API Documentation
79
+ #
80
+ class BatchEntryIdsNotDistinct < Aws::EmptyStructure; end
81
+
82
+ # The length of all the messages put together is more than the limit.
83
+ #
84
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/BatchRequestTooLong AWS API Documentation
85
+ #
86
+ class BatchRequestTooLong < Aws::EmptyStructure; end
87
+
76
88
  # Gives a detailed description of the result of an action on each entry
77
89
  # in the request.
78
90
  #
@@ -616,6 +628,12 @@ module Aws::SQS
616
628
  include Aws::Structure
617
629
  end
618
630
 
631
+ # The batch request doesn't contain any entries.
632
+ #
633
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/EmptyBatchRequest AWS API Documentation
634
+ #
635
+ class EmptyBatchRequest < Aws::EmptyStructure; end
636
+
619
637
  # @note When making an API call, you may pass GetQueueAttributesRequest
620
638
  # data as a hash:
621
639
  #
@@ -811,6 +829,31 @@ module Aws::SQS
811
829
  include Aws::Structure
812
830
  end
813
831
 
832
+ # The specified attribute doesn't exist.
833
+ #
834
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/InvalidAttributeName AWS API Documentation
835
+ #
836
+ class InvalidAttributeName < Aws::EmptyStructure; end
837
+
838
+ # The `Id` of a batch entry in a batch request doesn't abide by the
839
+ # specification.
840
+ #
841
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/InvalidBatchEntryId AWS API Documentation
842
+ #
843
+ class InvalidBatchEntryId < Aws::EmptyStructure; end
844
+
845
+ # The specified receipt handle isn't valid for the current version.
846
+ #
847
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/InvalidIdFormat AWS API Documentation
848
+ #
849
+ class InvalidIdFormat < Aws::EmptyStructure; end
850
+
851
+ # The message contains characters outside the allowed set.
852
+ #
853
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/InvalidMessageContents AWS API Documentation
854
+ #
855
+ class InvalidMessageContents < Aws::EmptyStructure; end
856
+
814
857
  # @note When making an API call, you may pass ListDeadLetterSourceQueuesRequest
815
858
  # data as a hash:
816
859
  #
@@ -1059,6 +1102,12 @@ module Aws::SQS
1059
1102
  include Aws::Structure
1060
1103
  end
1061
1104
 
1105
+ # The specified message isn't in flight.
1106
+ #
1107
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/MessageNotInflight AWS API Documentation
1108
+ #
1109
+ class MessageNotInflight < Aws::EmptyStructure; end
1110
+
1062
1111
  # The user-specified message system attribute value. For string data
1063
1112
  # types, the `Value` attribute has the same restrictions on the content
1064
1113
  # as the message body. For more information, see ` SendMessage.`
@@ -1124,6 +1173,23 @@ module Aws::SQS
1124
1173
  include Aws::Structure
1125
1174
  end
1126
1175
 
1176
+ # The specified action violates a limit. For example, `ReceiveMessage`
1177
+ # returns this error if the maximum number of inflight messages is
1178
+ # reached and `AddPermission` returns this error if the maximum number
1179
+ # of permissions for the queue is reached.
1180
+ #
1181
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/OverLimit AWS API Documentation
1182
+ #
1183
+ class OverLimit < Aws::EmptyStructure; end
1184
+
1185
+ # Indicates that the specified queue previously received a `PurgeQueue`
1186
+ # request within the last 60 seconds (the time it can take to delete the
1187
+ # messages in the queue).
1188
+ #
1189
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/PurgeQueueInProgress AWS API Documentation
1190
+ #
1191
+ class PurgeQueueInProgress < Aws::EmptyStructure; end
1192
+
1127
1193
  # @note When making an API call, you may pass PurgeQueueRequest
1128
1194
  # data as a hash:
1129
1195
  #
@@ -1145,6 +1211,33 @@ module Aws::SQS
1145
1211
  include Aws::Structure
1146
1212
  end
1147
1213
 
1214
+ # You must wait 60 seconds after deleting a queue before you can create
1215
+ # another queue with the same name.
1216
+ #
1217
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/QueueDeletedRecently AWS API Documentation
1218
+ #
1219
+ class QueueDeletedRecently < Aws::EmptyStructure; end
1220
+
1221
+ # The specified queue doesn't exist.
1222
+ #
1223
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/QueueDoesNotExist AWS API Documentation
1224
+ #
1225
+ class QueueDoesNotExist < Aws::EmptyStructure; end
1226
+
1227
+ # A queue with this name already exists. Amazon SQS returns this error
1228
+ # only if the request includes attributes whose values differ from those
1229
+ # of the existing queue.
1230
+ #
1231
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/QueueNameExists AWS API Documentation
1232
+ #
1233
+ class QueueNameExists < Aws::EmptyStructure; end
1234
+
1235
+ # The specified receipt handle isn't valid.
1236
+ #
1237
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ReceiptHandleIsInvalid AWS API Documentation
1238
+ #
1239
+ class ReceiptHandleIsInvalid < Aws::EmptyStructure; end
1240
+
1148
1241
  # @note When making an API call, you may pass ReceiveMessageRequest
1149
1242
  # data as a hash:
1150
1243
  #
@@ -2151,6 +2244,18 @@ module Aws::SQS
2151
2244
  include Aws::Structure
2152
2245
  end
2153
2246
 
2247
+ # The batch request contains more entries than permissible.
2248
+ #
2249
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/TooManyEntriesInBatchRequest AWS API Documentation
2250
+ #
2251
+ class TooManyEntriesInBatchRequest < Aws::EmptyStructure; end
2252
+
2253
+ # Error code 400. Unsupported operation.
2254
+ #
2255
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/UnsupportedOperation AWS API Documentation
2256
+ #
2257
+ class UnsupportedOperation < Aws::EmptyStructure; end
2258
+
2154
2259
  # @note When making an API call, you may pass UntagQueueRequest
2155
2260
  # data as a hash:
2156
2261
  #
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.23.0
4
+ version: 1.27.1
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: 2019-10-23 00:00:00.000000000 Z
11
+ date: 2020-06-11 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.71.0
22
+ version: 3.99.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.71.0
32
+ version: 3.99.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.5.2.3
89
+ rubygems_version: 2.7.6.2
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: AWS SDK for Ruby - Amazon SQS