aws-sdk-sqs 1.22.0 → 1.26.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
- SHA1:
3
- metadata.gz: cd14f96254945c551d2fc18f2c2869b6dd16e805
4
- data.tar.gz: 5acdb3a8e968736d20cb983a420e0bb8c4977e6f
2
+ SHA256:
3
+ metadata.gz: b1014852f63645561d9801b151910a4dd10ebffc2f9e805d05d4b5b34a3b42b7
4
+ data.tar.gz: 2ae4abb0f31cc7342d00707d5c1f402b84201fb607255c5126aec77ff8421f33
5
5
  SHA512:
6
- metadata.gz: 1293b547300fc75cc8fa04a92e600c78784ed2ae2c08f086dcc4d0ccd2f9395fa0d476095eef10e0276141a8a02a7ea8d19841e16db854ce97bd48db929cb217
7
- data.tar.gz: 8baff2e7c31a2b6c7776b1a39097caf1a49ff535ff4a6192101f00f42a41c481b3546d3198c3942603c1fd54f660bca62eb54d5a455e5e02302b3efd8796f2d1
6
+ metadata.gz: 723969270fc807c267b455564eb5d76c7a0b8a37001016c0b3b1f89d607fe63a5240b1fd944ec1742b715a53329b6544e341dc0a82c0749125d7e7bb7def07c8
7
+ data.tar.gz: 1b7baa49dd7422d5483941ad10aa8c11e12267647963c4f698c3a9736fc8a6c9e5a54d09a6270b09c8a763abe7bab552809ca4b53e41465152b4c242389d8542
@@ -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.22.0'
50
+ GEM_VERSION = '1.26.0'
48
51
 
49
52
  end
@@ -32,6 +32,18 @@ require 'aws-sdk-sqs/plugins/md5s.rb'
32
32
  Aws::Plugins::GlobalConfiguration.add_identifier(:sqs)
33
33
 
34
34
  module Aws::SQS
35
+ # An API client for SQS. To construct a client, you need to configure a `:region` and `:credentials`.
36
+ #
37
+ # client = Aws::SQS::Client.new(
38
+ # region: region_name,
39
+ # credentials: credentials,
40
+ # # ...
41
+ # )
42
+ #
43
+ # For details on configuring region and credentials see
44
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
45
+ #
46
+ # See {#initialize} for a full list of supported configuration options.
35
47
  class Client < Seahorse::Client::Base
36
48
 
37
49
  include Aws::ClientStubs
@@ -97,7 +109,7 @@ module Aws::SQS
97
109
  # @option options [required, String] :region
98
110
  # The AWS region to connect to. The configured `:region` is
99
111
  # used to determine the service `:endpoint`. When not passed,
100
- # a default `:region` is search for in the following locations:
112
+ # a default `:region` is searched for in the following locations:
101
113
  #
102
114
  # * `Aws.config[:region]`
103
115
  # * `ENV['AWS_REGION']`
@@ -112,6 +124,12 @@ module Aws::SQS
112
124
  # When set to `true`, a thread polling for endpoints will be running in
113
125
  # the background every 60 secs (default). Defaults to `false`.
114
126
  #
127
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
128
+ # Used only in `adaptive` retry mode. When true, the request will sleep
129
+ # until there is sufficent client side capacity to retry the request.
130
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
131
+ # not retry instead of sleeping.
132
+ #
115
133
  # @option options [Boolean] :client_side_monitoring (false)
116
134
  # When `true`, client-side metrics will be collected for all API requests from
117
135
  # this client.
@@ -136,6 +154,10 @@ module Aws::SQS
136
154
  # When `true`, an attempt is made to coerce request parameters into
137
155
  # the required types.
138
156
  #
157
+ # @option options [Boolean] :correct_clock_skew (true)
158
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
159
+ # a clock skew correction and retry requests with skewed client clocks.
160
+ #
139
161
  # @option options [Boolean] :disable_host_prefix_injection (false)
140
162
  # Set to true to disable SDK automatically adding host prefix
141
163
  # to default service endpoint when available.
@@ -143,7 +165,7 @@ module Aws::SQS
143
165
  # @option options [String] :endpoint
144
166
  # The client endpoint is normally constructed from the `:region`
145
167
  # option. You should only configure an `:endpoint` when connecting
146
- # to test endpoints. This should be avalid HTTP(S) URI.
168
+ # to test endpoints. This should be a valid HTTP(S) URI.
147
169
  #
148
170
  # @option options [Integer] :endpoint_cache_max_entries (1000)
149
171
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -158,7 +180,7 @@ module Aws::SQS
158
180
  # requests fetching endpoints information. Defaults to 60 sec.
159
181
  #
160
182
  # @option options [Boolean] :endpoint_discovery (false)
161
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
183
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
162
184
  #
163
185
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
164
186
  # The log formatter.
@@ -170,15 +192,29 @@ module Aws::SQS
170
192
  # The Logger instance to send log messages to. If this option
171
193
  # is not set, logging will be disabled.
172
194
  #
195
+ # @option options [Integer] :max_attempts (3)
196
+ # An integer representing the maximum number attempts that will be made for
197
+ # a single request, including the initial attempt. For example,
198
+ # setting this value to 5 will result in a request being retried up to
199
+ # 4 times. Used in `standard` and `adaptive` retry modes.
200
+ #
173
201
  # @option options [String] :profile ("default")
174
202
  # Used when loading credentials from the shared credentials file
175
203
  # at HOME/.aws/credentials. When not specified, 'default' is used.
176
204
  #
205
+ # @option options [Proc] :retry_backoff
206
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
207
+ # This option is only used in the `legacy` retry mode.
208
+ #
177
209
  # @option options [Float] :retry_base_delay (0.3)
178
- # The base delay in seconds used by the default backoff function.
210
+ # The base delay in seconds used by the default backoff function. This option
211
+ # is only used in the `legacy` retry mode.
179
212
  #
180
213
  # @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.
214
+ # A delay randomiser function used by the default backoff function.
215
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
216
+ # otherwise a Proc that takes and returns a number. This option is only used
217
+ # in the `legacy` retry mode.
182
218
  #
183
219
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
184
220
  #
@@ -186,11 +222,30 @@ module Aws::SQS
186
222
  # The maximum number of times to retry failed requests. Only
187
223
  # ~ 500 level server errors and certain ~ 400 level client errors
188
224
  # are retried. Generally, these are throttling errors, data
189
- # checksum errors, networking errors, timeout errors and auth
190
- # errors from expired credentials.
225
+ # checksum errors, networking errors, timeout errors, auth errors,
226
+ # endpoint discovery, and errors from expired credentials.
227
+ # This option is only used in the `legacy` retry mode.
191
228
  #
192
229
  # @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.
230
+ # The maximum number of seconds to delay between retries (0 for no limit)
231
+ # used by the default backoff function. This option is only used in the
232
+ # `legacy` retry mode.
233
+ #
234
+ # @option options [String] :retry_mode ("legacy")
235
+ # Specifies which retry algorithm to use. Values are:
236
+ #
237
+ # * `legacy` - The pre-existing retry behavior. This is default value if
238
+ # no retry mode is provided.
239
+ #
240
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
241
+ # This includes support for retry quotas, which limit the number of
242
+ # unsuccessful retries a client can make.
243
+ #
244
+ # * `adaptive` - An experimental retry mode that includes all the
245
+ # functionality of `standard` mode along with automatic client side
246
+ # throttling. This is a provisional mode that may change behavior
247
+ # in the future.
248
+ #
194
249
  #
195
250
  # @option options [String] :secret_access_key
196
251
  #
@@ -219,16 +274,15 @@ module Aws::SQS
219
274
  # requests through. Formatted like 'http://proxy.com:123'.
220
275
  #
221
276
  # @option options [Float] :http_open_timeout (15) The number of
222
- # seconds to wait when opening a HTTP session before rasing a
277
+ # seconds to wait when opening a HTTP session before raising a
223
278
  # `Timeout::Error`.
224
279
  #
225
280
  # @option options [Integer] :http_read_timeout (60) The default
226
281
  # 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}.
282
+ # safely be set per-request on the session.
229
283
  #
230
284
  # @option options [Float] :http_idle_timeout (5) The number of
231
- # seconds a connection is allowed to sit idble before it is
285
+ # seconds a connection is allowed to sit idle before it is
232
286
  # considered stale. Stale connections are closed and removed
233
287
  # from the pool before making a request.
234
288
  #
@@ -237,7 +291,7 @@ module Aws::SQS
237
291
  # request body. This option has no effect unless the request has
238
292
  # "Expect" header set to "100-continue". Defaults to `nil` which
239
293
  # disables this behaviour. This value can safely be set per
240
- # request on the session yeidled by {#session_for}.
294
+ # request on the session.
241
295
  #
242
296
  # @option options [Boolean] :http_wire_trace (false) When `true`,
243
297
  # HTTP debug output will be sent to the `:logger`.
@@ -2220,7 +2274,7 @@ module Aws::SQS
2220
2274
  params: params,
2221
2275
  config: config)
2222
2276
  context[:gem_name] = 'aws-sdk-sqs'
2223
- context[:gem_version] = '1.22.0'
2277
+ context[:gem_version] = '1.26.0'
2224
2278
  Seahorse::Client::Request.new(handlers, context)
2225
2279
  end
2226
2280
 
@@ -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.22.0
4
+ version: 1.26.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: 2019-08-28 00:00:00.000000000 Z
11
+ date: 2020-05-28 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.61.1
22
+ version: 3.71.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.61.1
32
+ version: 3.71.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