aws-sdk-sqs 1.0.0.rc2 → 1.0.0.rc3
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/lib/aws-sdk-sqs.rb +1 -1
- data/lib/aws-sdk-sqs/client.rb +1748 -1547
- data/lib/aws-sdk-sqs/client_api.rb +454 -456
- data/lib/aws-sdk-sqs/errors.rb +4 -13
- data/lib/aws-sdk-sqs/message.rb +198 -203
- data/lib/aws-sdk-sqs/plugins/md5s.rb +1 -1
- data/lib/aws-sdk-sqs/queue.rb +738 -684
- data/lib/aws-sdk-sqs/resource.rb +210 -201
- data/lib/aws-sdk-sqs/types.rb +1753 -1597
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bace4eb7c364857de074caf3308d3e0927e479b1
|
4
|
+
data.tar.gz: 3887799f7fe844ef92a80cde78a5ab9c71a38c95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99161519210f855b6a5dff2513787bfcbe4a9797a289796f88312053f0baa0fdc962e8de95db67ef8573ad663b4fdac9a6c1730cb7690a758d66980b29c9f260
|
7
|
+
data.tar.gz: 0d3592978081380b21235d84dc183e2e36f8c62f392f9a264bf6e961e439d831e342e1f5ea07c478e987fd0ebf1ec73c80733d9dc171bc4d3a9882bbdf4987ed
|
data/lib/aws-sdk-sqs.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
data/lib/aws-sdk-sqs/client.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
@@ -25,1582 +25,1783 @@ require 'aws-sdk-sqs/plugins/md5s.rb'
|
|
25
25
|
|
26
26
|
Aws::Plugins::GlobalConfiguration.add_identifier(:sqs)
|
27
27
|
|
28
|
-
module Aws
|
29
|
-
|
30
|
-
class Client < Seahorse::Client::Base
|
28
|
+
module Aws::SQS
|
29
|
+
class Client < Seahorse::Client::Base
|
31
30
|
|
32
|
-
|
31
|
+
include Aws::ClientStubs
|
33
32
|
|
34
|
-
|
33
|
+
@identifier = :sqs
|
35
34
|
|
36
|
-
|
35
|
+
set_api(ClientApi::API)
|
37
36
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
37
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
38
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
39
|
+
add_plugin(Aws::Plugins::Logging)
|
40
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
41
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
42
|
+
add_plugin(Aws::Plugins::UserAgent)
|
43
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
44
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
45
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
46
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
47
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
48
|
+
add_plugin(Aws::Plugins::StubResponses)
|
49
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
50
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
51
|
+
add_plugin(Aws::Plugins::Protocols::Query)
|
52
|
+
add_plugin(Aws::SQS::Plugins::QueueUrls)
|
53
|
+
add_plugin(Aws::SQS::Plugins::Md5s)
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
55
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
56
|
+
# Your AWS credentials. This can be an instance of any one of the
|
57
|
+
# following classes:
|
58
|
+
#
|
59
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
60
|
+
# credentials.
|
61
|
+
#
|
62
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
63
|
+
# from an EC2 IMDS on an EC2 instance.
|
64
|
+
#
|
65
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
66
|
+
# shared file, such as `~/.aws/config`.
|
67
|
+
#
|
68
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
69
|
+
#
|
70
|
+
# When `:credentials` are not configured directly, the following
|
71
|
+
# locations will be searched for credentials:
|
72
|
+
#
|
73
|
+
# * `Aws.config[:credentials]`
|
74
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
75
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
76
|
+
# * `~/.aws/credentials`
|
77
|
+
# * `~/.aws/config`
|
78
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
79
|
+
# very aggressive. Construct and pass an instance of
|
80
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
81
|
+
# timeouts.
|
82
|
+
#
|
83
|
+
# @option options [required, String] :region
|
84
|
+
# The AWS region to connect to. The configured `:region` is
|
85
|
+
# used to determine the service `:endpoint`. When not passed,
|
86
|
+
# a default `:region` is search for in the following locations:
|
87
|
+
#
|
88
|
+
# * `Aws.config[:region]`
|
89
|
+
# * `ENV['AWS_REGION']`
|
90
|
+
# * `ENV['AMAZON_REGION']`
|
91
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
92
|
+
# * `~/.aws/credentials`
|
93
|
+
# * `~/.aws/config`
|
94
|
+
#
|
95
|
+
# @option options [String] :access_key_id
|
96
|
+
#
|
97
|
+
# @option options [Boolean] :convert_params (true)
|
98
|
+
# When `true`, an attempt is made to coerce request parameters into
|
99
|
+
# the required types.
|
100
|
+
#
|
101
|
+
# @option options [String] :endpoint
|
102
|
+
# The client endpoint is normally constructed from the `:region`
|
103
|
+
# option. You should only configure an `:endpoint` when connecting
|
104
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
105
|
+
#
|
106
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
107
|
+
# The log formatter.
|
108
|
+
#
|
109
|
+
# @option options [Symbol] :log_level (:info)
|
110
|
+
# The log level to send messages to the `:logger` at.
|
111
|
+
#
|
112
|
+
# @option options [Logger] :logger
|
113
|
+
# The Logger instance to send log messages to. If this option
|
114
|
+
# is not set, logging will be disabled.
|
115
|
+
#
|
116
|
+
# @option options [String] :profile ("default")
|
117
|
+
# Used when loading credentials from the shared credentials file
|
118
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
119
|
+
#
|
120
|
+
# @option options [Integer] :retry_limit (3)
|
121
|
+
# The maximum number of times to retry failed requests. Only
|
122
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
123
|
+
# are retried. Generally, these are throttling errors, data
|
124
|
+
# checksum errors, networking errors, timeout errors and auth
|
125
|
+
# errors from expired credentials.
|
126
|
+
#
|
127
|
+
# @option options [String] :secret_access_key
|
128
|
+
#
|
129
|
+
# @option options [String] :session_token
|
130
|
+
#
|
131
|
+
# @option options [Boolean] :stub_responses (false)
|
132
|
+
# Causes the client to return stubbed responses. By default
|
133
|
+
# fake responses are generated and returned. You can specify
|
134
|
+
# the response data to return or errors to raise by calling
|
135
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
136
|
+
#
|
137
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
138
|
+
# requests are made, and retries are disabled.
|
139
|
+
#
|
140
|
+
# @option options [Boolean] :validate_params (true)
|
141
|
+
# When `true`, request parameters are validated before
|
142
|
+
# sending the request.
|
143
|
+
#
|
144
|
+
# @option options [Boolean] :verify_checksums (true)
|
145
|
+
# When `true` MD5 checksums will be computed for messages sent to
|
146
|
+
# an SQS queue and matched against MD5 checksums returned by Amazon SQS.
|
147
|
+
# `Aws::Errors::Checksum` errors are raised for cases where checksums do
|
148
|
+
# not match.
|
149
|
+
#
|
150
|
+
def initialize(*args)
|
151
|
+
super
|
152
|
+
end
|
141
153
|
|
142
|
-
|
143
|
-
# allows for sharing access to the queue.
|
144
|
-
#
|
145
|
-
# When you create a queue, you have full control access rights for the
|
146
|
-
# queue. Only you (as owner of the queue) can grant or deny permissions
|
147
|
-
# to the queue. For more information about these permissions, see
|
148
|
-
# [Shared Queues][2] in the *Amazon SQS Developer Guide*.
|
149
|
-
#
|
150
|
-
# <note markdown="1"> `AddPermission` writes an Amazon SQS-generated policy. If you want to
|
151
|
-
# write your own policy, use SetQueueAttributes to upload your policy.
|
152
|
-
# For more information about writing your own policy, see [Using The
|
153
|
-
# Access Policy Language][3] in the *Amazon SQS Developer Guide*.
|
154
|
-
#
|
155
|
-
# </note>
|
156
|
-
#
|
157
|
-
# <note markdown="1"> Some API actions take lists of parameters. These lists are specified
|
158
|
-
# using the `param.n` notation. Values of `n` are integers starting from
|
159
|
-
# 1. For example, a parameter list with two elements looks like this:
|
160
|
-
#
|
161
|
-
# </note>
|
162
|
-
#
|
163
|
-
# `&Attribute.1=this`
|
164
|
-
#
|
165
|
-
# `&Attribute.2=that`
|
166
|
-
#
|
167
|
-
#
|
168
|
-
#
|
169
|
-
# [1]: http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P
|
170
|
-
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html
|
171
|
-
# [3]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AccessPolicyLanguage.html
|
172
|
-
# @option params [required, String] :queue_url
|
173
|
-
# The URL of the Amazon SQS queue to take action on.
|
174
|
-
#
|
175
|
-
# Queue URLs are case-sensitive.
|
176
|
-
# @option params [required, String] :label
|
177
|
-
# The unique identification of the permission you're setting (e.g.,
|
178
|
-
# `AliceSendMessage`). Constraints: Maximum 80 characters; alphanumeric
|
179
|
-
# characters, hyphens (-), and underscores (\_) are allowed.
|
180
|
-
# @option params [required, Array<String>] :aws_account_ids
|
181
|
-
# The AWS account number of the [principal][1] who will be given
|
182
|
-
# permission. The principal must have an AWS account, but does not need
|
183
|
-
# to be signed up for Amazon SQS. For information about locating the AWS
|
184
|
-
# account identification, see [Your AWS Identifiers][2] in the *Amazon
|
185
|
-
# SQS Developer Guide*.
|
186
|
-
#
|
187
|
-
#
|
188
|
-
#
|
189
|
-
# [1]: http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P
|
190
|
-
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AWSCredentials.html
|
191
|
-
# @option params [required, Array<String>] :actions
|
192
|
-
# The action the client wants to allow for the specified principal. The
|
193
|
-
# following are valid values: `* | SendMessage | ReceiveMessage |
|
194
|
-
# DeleteMessage | ChangeMessageVisibility | GetQueueAttributes |
|
195
|
-
# GetQueueUrl`. For more information about these actions, see
|
196
|
-
# [Understanding Permissions][1] in the *Amazon SQS Developer Guide*.
|
197
|
-
#
|
198
|
-
# Specifying `SendMessage`, `DeleteMessage`, or
|
199
|
-
# `ChangeMessageVisibility` for the `ActionName.n` also grants
|
200
|
-
# permissions for the corresponding batch versions of those actions:
|
201
|
-
# `SendMessageBatch`, `DeleteMessageBatch`, and
|
202
|
-
# `ChangeMessageVisibilityBatch`.
|
203
|
-
#
|
204
|
-
#
|
205
|
-
#
|
206
|
-
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html#PermissionTypes
|
207
|
-
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
208
|
-
#
|
209
|
-
# @example Request syntax with placeholder values
|
210
|
-
# resp = client.add_permission({
|
211
|
-
# queue_url: "String", # required
|
212
|
-
# label: "String", # required
|
213
|
-
# aws_account_ids: ["String"], # required
|
214
|
-
# actions: ["String"], # required
|
215
|
-
# })
|
216
|
-
# @overload add_permission(params = {})
|
217
|
-
# @param [Hash] params ({})
|
218
|
-
def add_permission(params = {}, options = {})
|
219
|
-
req = build_request(:add_permission, params)
|
220
|
-
req.send_request(options)
|
221
|
-
end
|
154
|
+
# @!group API Operations
|
222
155
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
156
|
+
# Adds a permission to a queue for a specific [principal][1]. This
|
157
|
+
# allows sharing access to the queue.
|
158
|
+
#
|
159
|
+
# When you create a queue, you have full control access rights for the
|
160
|
+
# queue. Only you, the owner of the queue, can grant or deny permissions
|
161
|
+
# to the queue. For more information about these permissions, see
|
162
|
+
# [Shared Queues][2] in the *Amazon SQS Developer Guide*.
|
163
|
+
#
|
164
|
+
# <note markdown="1"> `AddPermission` writes an Amazon-SQS-generated policy. If you want to
|
165
|
+
# write your own policy, use ` SetQueueAttributes ` to upload your
|
166
|
+
# policy. For more information about writing your own policy, see [Using
|
167
|
+
# The Access Policy Language][3] in the *Amazon SQS Developer Guide*.
|
168
|
+
#
|
169
|
+
# Some actions take lists of parameters. These lists are specified using
|
170
|
+
# the `param.n` notation. Values of `n` are integers starting from 1.
|
171
|
+
# For example, a parameter list with two elements looks like this:
|
172
|
+
#
|
173
|
+
# `&Attribute.1=this`
|
174
|
+
#
|
175
|
+
# `&Attribute.2=that`
|
176
|
+
#
|
177
|
+
# </note>
|
178
|
+
#
|
179
|
+
#
|
180
|
+
#
|
181
|
+
# [1]: http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P
|
182
|
+
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html
|
183
|
+
# [3]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AccessPolicyLanguage.html
|
184
|
+
#
|
185
|
+
# @option params [required, String] :queue_url
|
186
|
+
# The URL of the Amazon SQS queue to which permissions are added.
|
187
|
+
#
|
188
|
+
# Queue URLs are case-sensitive.
|
189
|
+
#
|
190
|
+
# @option params [required, String] :label
|
191
|
+
# The unique identification of the permission you're setting (for
|
192
|
+
# example, `AliceSendMessage`). Maximum 80 characters. Allowed
|
193
|
+
# characters include alphanumeric characters, hyphens (`-`), and
|
194
|
+
# underscores (`_`).
|
195
|
+
#
|
196
|
+
# @option params [required, Array<String>] :aws_account_ids
|
197
|
+
# The AWS account number of the [principal][1] who is given permission.
|
198
|
+
# The principal must have an AWS account, but does not need to be signed
|
199
|
+
# up for Amazon SQS. For information about locating the AWS account
|
200
|
+
# identification, see [Your AWS Identifiers][2] in the *Amazon SQS
|
201
|
+
# Developer Guide*.
|
202
|
+
#
|
203
|
+
#
|
204
|
+
#
|
205
|
+
# [1]: http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P
|
206
|
+
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AWSCredentials.html
|
207
|
+
#
|
208
|
+
# @option params [required, Array<String>] :actions
|
209
|
+
# The action the client wants to allow for the specified principal. The
|
210
|
+
# following values are valid:
|
211
|
+
#
|
212
|
+
# * `*`
|
213
|
+
#
|
214
|
+
# * `ChangeMessageVisibility`
|
215
|
+
#
|
216
|
+
# * `DeleteMessage`
|
217
|
+
#
|
218
|
+
# * `GetQueueAttributes`
|
219
|
+
#
|
220
|
+
# * `GetQueueUrl`
|
221
|
+
#
|
222
|
+
# * `ReceiveMessage`
|
223
|
+
#
|
224
|
+
# * `SendMessage`
|
225
|
+
#
|
226
|
+
# For more information about these actions, see [Understanding
|
227
|
+
# Permissions][1] in the *Amazon SQS Developer Guide*.
|
228
|
+
#
|
229
|
+
# Specifying `SendMessage`, `DeleteMessage`, or
|
230
|
+
# `ChangeMessageVisibility` for `ActionName.n` also grants permissions
|
231
|
+
# for the corresponding batch versions of those actions:
|
232
|
+
# `SendMessageBatch`, `DeleteMessageBatch`, and
|
233
|
+
# `ChangeMessageVisibilityBatch`.
|
234
|
+
#
|
235
|
+
#
|
236
|
+
#
|
237
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html#PermissionTypes
|
238
|
+
#
|
239
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
240
|
+
#
|
241
|
+
# @example Request syntax with placeholder values
|
242
|
+
#
|
243
|
+
# resp = client.add_permission({
|
244
|
+
# queue_url: "String", # required
|
245
|
+
# label: "String", # required
|
246
|
+
# aws_account_ids: ["String"], # required
|
247
|
+
# actions: ["String"], # required
|
248
|
+
# })
|
249
|
+
#
|
250
|
+
# @overload add_permission(params = {})
|
251
|
+
# @param [Hash] params ({})
|
252
|
+
def add_permission(params = {}, options = {})
|
253
|
+
req = build_request(:add_permission, params)
|
254
|
+
req.send_request(options)
|
255
|
+
end
|
293
256
|
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
257
|
+
# Changes the visibility timeout of a specified message in a queue to a
|
258
|
+
# new value. The maximum allowed timeout value is 12 hours. Thus, you
|
259
|
+
# can't extend the timeout of a message in an existing queue to more
|
260
|
+
# than a total visibility timeout of 12 hours. For more information, see
|
261
|
+
# [Visibility Timeout][1] in the *Amazon SQS Developer Guide*.
|
262
|
+
#
|
263
|
+
# For example, you have a message and with the default visibility
|
264
|
+
# timeout of 5 minutes. After 3 minutes, you call
|
265
|
+
# `ChangeMessageVisiblity` with a timeout of 10 minutes. At that time,
|
266
|
+
# the timeout for the message is extended by 10 minutes beyond the time
|
267
|
+
# of the `ChangeMessageVisibility` action. This results in a total
|
268
|
+
# visibility timeout of 13 minutes. You can continue to call the
|
269
|
+
# `ChangeMessageVisibility` to extend the visibility timeout to a
|
270
|
+
# maximum of 12 hours. If you try to extend the visibility timeout
|
271
|
+
# beyond 12 hours, your request is rejected.
|
272
|
+
#
|
273
|
+
# A message is considered to be *in flight* after it's received from a
|
274
|
+
# queue by a consumer, but not yet deleted from the queue.
|
275
|
+
#
|
276
|
+
# For standard queues, there can be a maximum of 120,000 inflight
|
277
|
+
# messages per queue. If you reach this limit, Amazon SQS returns the
|
278
|
+
# `OverLimit` error message. To avoid reaching the limit, you should
|
279
|
+
# delete messages from the queue after they're processed. You can also
|
280
|
+
# increase the number of queues you use to process your messages.
|
281
|
+
#
|
282
|
+
# For FIFO queues, there can be a maximum of 20,000 inflight messages
|
283
|
+
# per queue. If you reach this limit, Amazon SQS returns no error
|
284
|
+
# messages.
|
285
|
+
#
|
286
|
+
# If you attempt to set the `VisibilityTimeout` to a value greater than
|
287
|
+
# the maximum time left, Amazon SQS returns an error. Amazon SQS
|
288
|
+
# doesn't automatically recalculate and increase the timeout to the
|
289
|
+
# maximum remaining time.
|
290
|
+
#
|
291
|
+
# Unlike with a queue, when you change the visibility timeout for a
|
292
|
+
# specific message the timeout value is applied immediately but isn't
|
293
|
+
# saved in memory for that message. If you don't delete a message after
|
294
|
+
# it is received, the visibility timeout for the message reverts to the
|
295
|
+
# original timeout value (not to the value you set using the
|
296
|
+
# `ChangeMessageVisibility` action) the next time the message is
|
297
|
+
# received.
|
298
|
+
#
|
299
|
+
#
|
300
|
+
#
|
301
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
302
|
+
#
|
303
|
+
# @option params [required, String] :queue_url
|
304
|
+
# The URL of the Amazon SQS queue whose message's visibility is
|
305
|
+
# changed.
|
306
|
+
#
|
307
|
+
# Queue URLs are case-sensitive.
|
308
|
+
#
|
309
|
+
# @option params [required, String] :receipt_handle
|
310
|
+
# The receipt handle associated with the message whose visibility
|
311
|
+
# timeout is changed. This parameter is returned by the ` ReceiveMessage
|
312
|
+
# ` action.
|
313
|
+
#
|
314
|
+
# @option params [required, Integer] :visibility_timeout
|
315
|
+
# The new value for the message's visibility timeout (in seconds).
|
316
|
+
# Values values: `0` to `43200`. Maximum: 12 hours.
|
317
|
+
#
|
318
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
319
|
+
#
|
320
|
+
# @example Request syntax with placeholder values
|
321
|
+
#
|
322
|
+
# resp = client.change_message_visibility({
|
323
|
+
# queue_url: "String", # required
|
324
|
+
# receipt_handle: "String", # required
|
325
|
+
# visibility_timeout: 1, # required
|
326
|
+
# })
|
327
|
+
#
|
328
|
+
# @overload change_message_visibility(params = {})
|
329
|
+
# @param [Hash] params ({})
|
330
|
+
def change_message_visibility(params = {}, options = {})
|
331
|
+
req = build_request(:change_message_visibility, params)
|
332
|
+
req.send_request(options)
|
333
|
+
end
|
351
334
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
# * `DelaySeconds` - The number of seconds for which the delivery of all
|
417
|
-
# messages in the queue is delayed. An integer from 0 to 900 (15
|
418
|
-
# minutes). The default is 0 (zero).
|
419
|
-
#
|
420
|
-
# * `MaximumMessageSize` - The limit of how many bytes a message can
|
421
|
-
# contain before Amazon SQS rejects it. An integer from 1,024 bytes (1
|
422
|
-
# KiB) up to 262,144 bytes (256 KiB). The default is 262,144 (256
|
423
|
-
# KiB).
|
424
|
-
#
|
425
|
-
# * `MessageRetentionPeriod` - The number of seconds for which Amazon
|
426
|
-
# SQS retains a message. An integer representing seconds, from 60 (1
|
427
|
-
# minute) to 120,9600 (14 days). The default is 345,600 (4 days).
|
428
|
-
#
|
429
|
-
# * `Policy` - The queue's policy. A valid AWS policy. For more
|
430
|
-
# information about policy structure, see [Overview of AWS IAM
|
431
|
-
# Policies][1] in the *Amazon IAM User Guide*.
|
432
|
-
#
|
433
|
-
# * `ReceiveMessageWaitTimeSeconds` - The number of seconds for which a
|
434
|
-
# ReceiveMessage action will wait for a message to arrive. An integer
|
435
|
-
# from 0 to 20 (seconds). The default is 0.
|
436
|
-
#
|
437
|
-
# * `RedrivePolicy` - The parameters for the dead letter queue
|
438
|
-
# functionality of the source queue. For more information about the
|
439
|
-
# redrive policy and dead letter queues, see [Using Amazon SQS Dead
|
440
|
-
# Letter Queues][2] in the *Amazon SQS Developer Guide*.
|
441
|
-
#
|
442
|
-
# <note markdown="1"> The dead letter queue of a FIFO queue must also be a FIFO queue.
|
443
|
-
# Similarly, the dead letter queue of a standard queue must also be a
|
444
|
-
# standard queue.
|
445
|
-
#
|
446
|
-
# </note>
|
447
|
-
#
|
448
|
-
# * `VisibilityTimeout` - The visibility timeout for the queue. An
|
449
|
-
# integer from 0 to 43200 (12 hours). The default is 30. For more
|
450
|
-
# information about the visibility timeout, see [Visibility
|
451
|
-
# Timeout][3] in the *Amazon SQS Developer Guide*.
|
452
|
-
#
|
453
|
-
# The following attributes apply only to [FIFO (first-in-first-out)
|
454
|
-
# queues][4]\:
|
455
|
-
#
|
456
|
-
# * `FifoQueue` - Designates a queue as FIFO. You can provide this
|
457
|
-
# attribute only during queue creation; you can't change it for an
|
458
|
-
# existing queue. When you set this attribute, you must provide a
|
459
|
-
# `MessageGroupId` explicitly.
|
460
|
-
#
|
461
|
-
# For more information, see [FIFO Queue Logic][5] in the *Amazon SQS
|
462
|
-
# Developer Guide*.
|
463
|
-
#
|
464
|
-
# * `ContentBasedDeduplication` - Enables content-based deduplication.
|
465
|
-
# For more information, see [Exactly-Once Processing][6] in the
|
466
|
-
# *Amazon SQS Developer Guide*.
|
467
|
-
#
|
468
|
-
# * Every message must have a unique `MessageDeduplicationId`,
|
469
|
-
#
|
470
|
-
# * You may provide a `MessageDeduplicationId` explicitly.
|
471
|
-
#
|
472
|
-
# * If you aren't able to provide a `MessageDeduplicationId` and
|
473
|
-
# you enable `ContentBasedDeduplication` for your queue, Amazon
|
474
|
-
# SQS uses a SHA-256 hash to generate the `MessageDeduplicationId`
|
475
|
-
# using the body of the message (but not the attributes of the
|
476
|
-
# message).
|
477
|
-
#
|
478
|
-
# * If you don't provide a `MessageDeduplicationId` and the queue
|
479
|
-
# doesn't have `ContentBasedDeduplication` set, the action fails
|
480
|
-
# with an error.
|
481
|
-
#
|
482
|
-
# * If the queue has `ContentBasedDeduplication` set, your
|
483
|
-
# `MessageDeduplicationId` overrides the generated one.
|
484
|
-
#
|
485
|
-
# * When `ContentBasedDeduplication` is in effect, messages with
|
486
|
-
# identical content sent within the deduplication interval are
|
487
|
-
# treated as duplicates and only one copy of the message is
|
488
|
-
# delivered.
|
489
|
-
#
|
490
|
-
# * You can also use `ContentBasedDeduplication` for messages with
|
491
|
-
# identical content to be treated as duplicates.
|
492
|
-
#
|
493
|
-
# * If you send one message with `ContentBasedDeduplication` enabled
|
494
|
-
# and then another message with a `MessageDeduplicationId` that is
|
495
|
-
# the same as the one generated for the first
|
496
|
-
# `MessageDeduplicationId`, the two messages are treated as
|
497
|
-
# duplicates and only one copy of the message is delivered.
|
498
|
-
#
|
499
|
-
# Any other valid special request parameters that are specified (such as
|
500
|
-
# `ApproximateNumberOfMessages`, `ApproximateNumberOfMessagesDelayed`,
|
501
|
-
# `ApproximateNumberOfMessagesNotVisible`, `CreatedTimestamp`,
|
502
|
-
# `LastModifiedTimestamp`, and `QueueArn`) will be ignored.
|
503
|
-
#
|
504
|
-
#
|
505
|
-
#
|
506
|
-
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html
|
507
|
-
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
|
508
|
-
# [3]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
509
|
-
# [4]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
|
510
|
-
# [5]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-understanding-logic
|
511
|
-
# [6]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing
|
512
|
-
# @return [Types::CreateQueueResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
513
|
-
#
|
514
|
-
# * {Types::CreateQueueResult#queue_url #QueueUrl} => String
|
515
|
-
#
|
516
|
-
# @example Request syntax with placeholder values
|
517
|
-
# resp = client.create_queue({
|
518
|
-
# queue_name: "String", # required
|
519
|
-
# attributes: {
|
520
|
-
# "All" => "String",
|
521
|
-
# },
|
522
|
-
# })
|
523
|
-
#
|
524
|
-
# @example Response structure
|
525
|
-
# resp.queue_url #=> String
|
526
|
-
# @overload create_queue(params = {})
|
527
|
-
# @param [Hash] params ({})
|
528
|
-
def create_queue(params = {}, options = {})
|
529
|
-
req = build_request(:create_queue, params)
|
530
|
-
req.send_request(options)
|
531
|
-
end
|
335
|
+
# Changes the visibility timeout of multiple messages. This is a batch
|
336
|
+
# version of ` ChangeMessageVisibility `. The result of the action on
|
337
|
+
# each message is reported individually in the response. You can send up
|
338
|
+
# to 10 ` ChangeMessageVisibility ` requests with each
|
339
|
+
# `ChangeMessageVisibilityBatch` action.
|
340
|
+
#
|
341
|
+
# Because the batch request can result in a combination of successful
|
342
|
+
# and unsuccessful actions, you should check for batch errors even when
|
343
|
+
# the call returns an HTTP status code of `200`.
|
344
|
+
#
|
345
|
+
# <note markdown="1"> Some actions take lists of parameters. These lists are specified using
|
346
|
+
# the `param.n` notation. Values of `n` are integers starting from 1.
|
347
|
+
# For example, a parameter list with two elements looks like this:
|
348
|
+
#
|
349
|
+
# `&Attribute.1=this`
|
350
|
+
#
|
351
|
+
# `&Attribute.2=that`
|
352
|
+
#
|
353
|
+
# </note>
|
354
|
+
#
|
355
|
+
# @option params [required, String] :queue_url
|
356
|
+
# The URL of the Amazon SQS queue whose messages' visibility is
|
357
|
+
# changed.
|
358
|
+
#
|
359
|
+
# Queue URLs are case-sensitive.
|
360
|
+
#
|
361
|
+
# @option params [required, Array<Types::ChangeMessageVisibilityBatchRequestEntry>] :entries
|
362
|
+
# A list of receipt handles of the messages for which the visibility
|
363
|
+
# timeout must be changed.
|
364
|
+
#
|
365
|
+
# @return [Types::ChangeMessageVisibilityBatchResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
366
|
+
#
|
367
|
+
# * {Types::ChangeMessageVisibilityBatchResult#successful #successful} => Array<Types::ChangeMessageVisibilityBatchResultEntry>
|
368
|
+
# * {Types::ChangeMessageVisibilityBatchResult#failed #failed} => Array<Types::BatchResultErrorEntry>
|
369
|
+
#
|
370
|
+
# @example Request syntax with placeholder values
|
371
|
+
#
|
372
|
+
# resp = client.change_message_visibility_batch({
|
373
|
+
# queue_url: "String", # required
|
374
|
+
# entries: [ # required
|
375
|
+
# {
|
376
|
+
# id: "String", # required
|
377
|
+
# receipt_handle: "String", # required
|
378
|
+
# visibility_timeout: 1,
|
379
|
+
# },
|
380
|
+
# ],
|
381
|
+
# })
|
382
|
+
#
|
383
|
+
# @example Response structure
|
384
|
+
#
|
385
|
+
# resp.successful #=> Array
|
386
|
+
# resp.successful[0].id #=> String
|
387
|
+
# resp.failed #=> Array
|
388
|
+
# resp.failed[0].id #=> String
|
389
|
+
# resp.failed[0].sender_fault #=> Boolean
|
390
|
+
# resp.failed[0].code #=> String
|
391
|
+
# resp.failed[0].message #=> String
|
392
|
+
#
|
393
|
+
# @overload change_message_visibility_batch(params = {})
|
394
|
+
# @param [Hash] params ({})
|
395
|
+
def change_message_visibility_batch(params = {}, options = {})
|
396
|
+
req = build_request(:change_message_visibility_batch, params)
|
397
|
+
req.send_request(options)
|
398
|
+
end
|
532
399
|
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
400
|
+
# Creates a new standard or FIFO queue or returns the URL of an existing
|
401
|
+
# queue. You can pass one or more attributes in the request. Keep the
|
402
|
+
# following caveats in mind:
|
403
|
+
#
|
404
|
+
# * If you don't specify the `FifoQueue` attribute, Amazon SQS creates
|
405
|
+
# a standard queue.
|
406
|
+
#
|
407
|
+
# <note markdown="1"> You can't change the queue type after you create it and you can't
|
408
|
+
# convert an existing standard queue into a FIFO queue. You must
|
409
|
+
# either create a new FIFO queue for your application or delete your
|
410
|
+
# existing standard queue and recreate it as a FIFO queue. For more
|
411
|
+
# information, see [ Moving From a Standard Queue to a FIFO Queue][1]
|
412
|
+
# in the *Amazon SQS Developer Guide*.
|
413
|
+
#
|
414
|
+
# </note>
|
415
|
+
#
|
416
|
+
# * If you don't provide a value for an attribute, the queue is created
|
417
|
+
# with the default value for the attribute.
|
418
|
+
#
|
419
|
+
# * If you delete a queue, you must wait at least 60 seconds before
|
420
|
+
# creating a queue with the same name.
|
421
|
+
#
|
422
|
+
# To successfully create a new queue, you must provide a queue name that
|
423
|
+
# adheres to the [limits related to queues][2] and is unique within the
|
424
|
+
# scope of your queues.
|
425
|
+
#
|
426
|
+
# To get the queue URL, use the ` GetQueueUrl ` action. ` GetQueueUrl `
|
427
|
+
# requires only the `QueueName` parameter. be aware of existing queue
|
428
|
+
# names:
|
429
|
+
#
|
430
|
+
# * If you provide the name of an existing queue along with the exact
|
431
|
+
# names and values of all the queue's attributes, `CreateQueue`
|
432
|
+
# returns the queue URL for the existing queue.
|
433
|
+
#
|
434
|
+
# * If the queue name, attribute names, or attribute values don't match
|
435
|
+
# an existing queue, `CreateQueue` returns an error.
|
436
|
+
#
|
437
|
+
# <note markdown="1"> Some actions take lists of parameters. These lists are specified using
|
438
|
+
# the `param.n` notation. Values of `n` are integers starting from 1.
|
439
|
+
# For example, a parameter list with two elements looks like this:
|
440
|
+
#
|
441
|
+
# `&Attribute.1=this`
|
442
|
+
#
|
443
|
+
# `&Attribute.2=that`
|
444
|
+
#
|
445
|
+
# </note>
|
446
|
+
#
|
447
|
+
#
|
448
|
+
#
|
449
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-moving
|
450
|
+
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html
|
451
|
+
#
|
452
|
+
# @option params [required, String] :queue_name
|
453
|
+
# The name of the new queue. The following limits apply to this name:
|
454
|
+
#
|
455
|
+
# * A queue name can have up to 80 characters.
|
456
|
+
#
|
457
|
+
# * Valid values: alphanumeric characters, hyphens (`-`), and
|
458
|
+
# underscores (`_`).
|
459
|
+
#
|
460
|
+
# * A FIFO queue name must end with the `.fifo` suffix.
|
461
|
+
#
|
462
|
+
# Queue names are case-sensitive.
|
463
|
+
#
|
464
|
+
# @option params [Hash<String,String>] :attributes
|
465
|
+
# A map of attributes with their corresponding values.
|
466
|
+
#
|
467
|
+
# The following lists the names, descriptions, and values of the special
|
468
|
+
# request parameters that the `CreateQueue` action uses:
|
469
|
+
#
|
470
|
+
# * `DelaySeconds` - The number of seconds for which the delivery of all
|
471
|
+
# messages in the queue is delayed. Valid values: An integer from 0 to
|
472
|
+
# 900 seconds (15 minutes). The default is 0 (zero).
|
473
|
+
#
|
474
|
+
# * `MaximumMessageSize` - The limit of how many bytes a message can
|
475
|
+
# contain before Amazon SQS rejects it. Valid values: An integer from
|
476
|
+
# 1,024 bytes (1 KiB) to 262,144 bytes (256 KiB). The default is
|
477
|
+
# 262,144 (256 KiB).
|
478
|
+
#
|
479
|
+
# * `MessageRetentionPeriod` - The number of seconds for which Amazon
|
480
|
+
# SQS retains a message. Valid values: An integer from 60 seconds (1
|
481
|
+
# minute) to 1,209,600 seconds (14 days). The default is 345,600 (4
|
482
|
+
# days).
|
483
|
+
#
|
484
|
+
# * `Policy` - The queue's policy. A valid AWS policy. For more
|
485
|
+
# information about policy structure, see [Overview of AWS IAM
|
486
|
+
# Policies][1] in the *Amazon IAM User Guide*.
|
487
|
+
#
|
488
|
+
# * `ReceiveMessageWaitTimeSeconds` - The number of seconds for which a
|
489
|
+
# ` ReceiveMessage ` action waits for a message to arrive. Valid
|
490
|
+
# values: An integer from 0 to 20 (seconds). The default is 0 (zero).
|
491
|
+
#
|
492
|
+
# * `RedrivePolicy` - The parameters for the dead letter queue
|
493
|
+
# functionality of the source queue. For more information about the
|
494
|
+
# redrive policy and dead letter queues, see [Using Amazon SQS Dead
|
495
|
+
# Letter Queues][2] in the *Amazon SQS Developer Guide*.
|
496
|
+
#
|
497
|
+
# <note markdown="1"> The dead letter queue of a FIFO queue must also be a FIFO queue.
|
498
|
+
# Similarly, the dead letter queue of a standard queue must also be a
|
499
|
+
# standard queue.
|
500
|
+
#
|
501
|
+
# </note>
|
502
|
+
#
|
503
|
+
# * `VisibilityTimeout` - The visibility timeout for the queue. Valid
|
504
|
+
# values: An integer from 0 to 43,200 (12 hours). The default is 30.
|
505
|
+
# For more information about the visibility timeout, see [Visibility
|
506
|
+
# Timeout][3] in the *Amazon SQS Developer Guide*.
|
507
|
+
#
|
508
|
+
# The following attributes apply only to [FIFO (first-in-first-out)
|
509
|
+
# queues][4]\:
|
510
|
+
#
|
511
|
+
# * `FifoQueue` - Designates a queue as FIFO. You can provide this
|
512
|
+
# attribute only during queue creation. You can't change it for an
|
513
|
+
# existing queue. When you set this attribute, you must provide a
|
514
|
+
# `MessageGroupId` explicitly.
|
515
|
+
#
|
516
|
+
# For more information, see [FIFO Queue Logic][5] in the *Amazon SQS
|
517
|
+
# Developer Guide*.
|
518
|
+
#
|
519
|
+
# * `ContentBasedDeduplication` - Enables content-based deduplication.
|
520
|
+
# For more information, see [Exactly-Once Processing][6] in the
|
521
|
+
# *Amazon SQS Developer Guide*.
|
522
|
+
#
|
523
|
+
# * Every message must have a unique `MessageDeduplicationId`,
|
524
|
+
#
|
525
|
+
# * You may provide a `MessageDeduplicationId` explicitly.
|
526
|
+
#
|
527
|
+
# * If you aren't able to provide a `MessageDeduplicationId` and
|
528
|
+
# you enable `ContentBasedDeduplication` for your queue, Amazon
|
529
|
+
# SQS uses a SHA-256 hash to generate the `MessageDeduplicationId`
|
530
|
+
# using the body of the message (but not the attributes of the
|
531
|
+
# message).
|
532
|
+
#
|
533
|
+
# * If you don't provide a `MessageDeduplicationId` and the queue
|
534
|
+
# doesn't have `ContentBasedDeduplication` set, the action fails
|
535
|
+
# with an error.
|
536
|
+
#
|
537
|
+
# * If the queue has `ContentBasedDeduplication` set, your
|
538
|
+
# `MessageDeduplicationId` overrides the generated one.
|
539
|
+
#
|
540
|
+
# * When `ContentBasedDeduplication` is in effect, messages with
|
541
|
+
# identical content sent within the deduplication interval are
|
542
|
+
# treated as duplicates and only one copy of the message is
|
543
|
+
# delivered.
|
544
|
+
#
|
545
|
+
# * You can also use `ContentBasedDeduplication` for messages with
|
546
|
+
# identical content to be treated as duplicates.
|
547
|
+
#
|
548
|
+
# * If you send one message with `ContentBasedDeduplication` enabled
|
549
|
+
# and then another message with a `MessageDeduplicationId` that is
|
550
|
+
# the same as the one generated for the first
|
551
|
+
# `MessageDeduplicationId`, the two messages are treated as
|
552
|
+
# duplicates and only one copy of the message is delivered.
|
553
|
+
#
|
554
|
+
# Any other valid special request parameters (such as the following) are
|
555
|
+
# ignored:
|
556
|
+
#
|
557
|
+
# * `ApproximateNumberOfMessages`
|
558
|
+
#
|
559
|
+
# * `ApproximateNumberOfMessagesDelayed`
|
560
|
+
#
|
561
|
+
# * `ApproximateNumberOfMessagesNotVisible`
|
562
|
+
#
|
563
|
+
# * `CreatedTimestamp`
|
564
|
+
#
|
565
|
+
# * `LastModifiedTimestamp`
|
566
|
+
#
|
567
|
+
# * `QueueArn`
|
568
|
+
#
|
569
|
+
#
|
570
|
+
#
|
571
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html
|
572
|
+
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
|
573
|
+
# [3]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
574
|
+
# [4]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
|
575
|
+
# [5]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-understanding-logic
|
576
|
+
# [6]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing
|
577
|
+
#
|
578
|
+
# @return [Types::CreateQueueResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
579
|
+
#
|
580
|
+
# * {Types::CreateQueueResult#queue_url #queue_url} => String
|
581
|
+
#
|
582
|
+
# @example Request syntax with placeholder values
|
583
|
+
#
|
584
|
+
# resp = client.create_queue({
|
585
|
+
# queue_name: "String", # required
|
586
|
+
# attributes: {
|
587
|
+
# "All" => "String",
|
588
|
+
# },
|
589
|
+
# })
|
590
|
+
#
|
591
|
+
# @example Response structure
|
592
|
+
#
|
593
|
+
# resp.queue_url #=> String
|
594
|
+
#
|
595
|
+
# @overload create_queue(params = {})
|
596
|
+
# @param [Hash] params ({})
|
597
|
+
def create_queue(params = {}, options = {})
|
598
|
+
req = build_request(:create_queue, params)
|
599
|
+
req.send_request(options)
|
600
|
+
end
|
576
601
|
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
# @param [Hash] params ({})
|
626
|
-
def delete_message_batch(params = {}, options = {})
|
627
|
-
req = build_request(:delete_message_batch, params)
|
628
|
-
req.send_request(options)
|
629
|
-
end
|
602
|
+
# Deletes the specified message from the specified queue. You specify
|
603
|
+
# the message by using the message's *receipt handle* and not the
|
604
|
+
# *MessageId* you receive when you send the message. Even if the message
|
605
|
+
# is locked by another reader due to the visibility timeout setting, it
|
606
|
+
# is still deleted from the queue. If you leave a message in the queue
|
607
|
+
# for longer than the queue's configured retention period, Amazon SQS
|
608
|
+
# automatically deletes the message.
|
609
|
+
#
|
610
|
+
# <note markdown="1"> The receipt handle is associated with a specific instance of receiving
|
611
|
+
# the message. If you receive a message more than once, the receipt
|
612
|
+
# handle you get each time you receive the message is different. If you
|
613
|
+
# don't provide the most recently received receipt handle for the
|
614
|
+
# message when you use the `DeleteMessage` action, the request succeeds,
|
615
|
+
# but the message might not be deleted.
|
616
|
+
#
|
617
|
+
# For standard queues, it is possible to receive a message even after
|
618
|
+
# you deleting it. This might happen on rare occasions if one of the
|
619
|
+
# servers storing a copy of the message is unavailable when you send the
|
620
|
+
# request to delete the message. The copy remains on the server and
|
621
|
+
# might be returned to you on a subsequent receive request. You should
|
622
|
+
# ensure that your application is idempotent, so that receiving a
|
623
|
+
# message more than once does not cause issues.
|
624
|
+
#
|
625
|
+
# </note>
|
626
|
+
#
|
627
|
+
# @option params [required, String] :queue_url
|
628
|
+
# The URL of the Amazon SQS queue from which messages are deleted.
|
629
|
+
#
|
630
|
+
# Queue URLs are case-sensitive.
|
631
|
+
#
|
632
|
+
# @option params [required, String] :receipt_handle
|
633
|
+
# The receipt handle associated with the message to delete.
|
634
|
+
#
|
635
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
636
|
+
#
|
637
|
+
# @example Request syntax with placeholder values
|
638
|
+
#
|
639
|
+
# resp = client.delete_message({
|
640
|
+
# queue_url: "String", # required
|
641
|
+
# receipt_handle: "String", # required
|
642
|
+
# })
|
643
|
+
#
|
644
|
+
# @overload delete_message(params = {})
|
645
|
+
# @param [Hash] params ({})
|
646
|
+
def delete_message(params = {}, options = {})
|
647
|
+
req = build_request(:delete_message, params)
|
648
|
+
req.send_request(options)
|
649
|
+
end
|
630
650
|
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
651
|
+
# Deletes up to ten messages from the specified queue. This is a batch
|
652
|
+
# version of ` DeleteMessage `. The result of the action on each message
|
653
|
+
# is reported individually in the response.
|
654
|
+
#
|
655
|
+
# Because the batch request can result in a combination of successful
|
656
|
+
# and unsuccessful actions, you should check for batch errors even when
|
657
|
+
# the call returns an HTTP status code of `200`.
|
658
|
+
#
|
659
|
+
# <note markdown="1"> Some actions take lists of parameters. These lists are specified using
|
660
|
+
# the `param.n` notation. Values of `n` are integers starting from 1.
|
661
|
+
# For example, a parameter list with two elements looks like this:
|
662
|
+
#
|
663
|
+
# `&Attribute.1=this`
|
664
|
+
#
|
665
|
+
# `&Attribute.2=that`
|
666
|
+
#
|
667
|
+
# </note>
|
668
|
+
#
|
669
|
+
# @option params [required, String] :queue_url
|
670
|
+
# The URL of the Amazon SQS queue from which messages are deleted.
|
671
|
+
#
|
672
|
+
# Queue URLs are case-sensitive.
|
673
|
+
#
|
674
|
+
# @option params [required, Array<Types::DeleteMessageBatchRequestEntry>] :entries
|
675
|
+
# A list of receipt handles for the messages to be deleted.
|
676
|
+
#
|
677
|
+
# @return [Types::DeleteMessageBatchResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
678
|
+
#
|
679
|
+
# * {Types::DeleteMessageBatchResult#successful #successful} => Array<Types::DeleteMessageBatchResultEntry>
|
680
|
+
# * {Types::DeleteMessageBatchResult#failed #failed} => Array<Types::BatchResultErrorEntry>
|
681
|
+
#
|
682
|
+
# @example Request syntax with placeholder values
|
683
|
+
#
|
684
|
+
# resp = client.delete_message_batch({
|
685
|
+
# queue_url: "String", # required
|
686
|
+
# entries: [ # required
|
687
|
+
# {
|
688
|
+
# id: "String", # required
|
689
|
+
# receipt_handle: "String", # required
|
690
|
+
# },
|
691
|
+
# ],
|
692
|
+
# })
|
693
|
+
#
|
694
|
+
# @example Response structure
|
695
|
+
#
|
696
|
+
# resp.successful #=> Array
|
697
|
+
# resp.successful[0].id #=> String
|
698
|
+
# resp.failed #=> Array
|
699
|
+
# resp.failed[0].id #=> String
|
700
|
+
# resp.failed[0].sender_fault #=> Boolean
|
701
|
+
# resp.failed[0].code #=> String
|
702
|
+
# resp.failed[0].message #=> String
|
703
|
+
#
|
704
|
+
# @overload delete_message_batch(params = {})
|
705
|
+
# @param [Hash] params ({})
|
706
|
+
def delete_message_batch(params = {}, options = {})
|
707
|
+
req = build_request(:delete_message_batch, params)
|
708
|
+
req.send_request(options)
|
709
|
+
end
|
668
710
|
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
# number of messages that are waiting to be added to the queue.
|
704
|
-
#
|
705
|
-
# * `ApproximateNumberOfMessagesNotVisible` - Returns the approximate
|
706
|
-
# number of messages that have not timed-out and are not deleted. For
|
707
|
-
# more information, see [Resources Required to Process Messages][1] in
|
708
|
-
# the *Amazon SQS Developer Guide*.
|
709
|
-
#
|
710
|
-
# * `CreatedTimestamp` - Returns the time when the queue was created in
|
711
|
-
# seconds (epoch time).
|
712
|
-
#
|
713
|
-
# * `DelaySeconds` - Returns the default delay on the queue in seconds.
|
714
|
-
#
|
715
|
-
# * `LastModifiedTimestamp` - Returns the time when the queue was last
|
716
|
-
# changed in seconds (epoch time).
|
717
|
-
#
|
718
|
-
# * `MaximumMessageSize` - Returns the limit of how many bytes a message
|
719
|
-
# can contain before Amazon SQS rejects it.
|
720
|
-
#
|
721
|
-
# * `MessageRetentionPeriod` - Returns the number of seconds for which
|
722
|
-
# Amazon SQS retains a message.
|
723
|
-
#
|
724
|
-
# * `Policy` - Returns the policy of the queue.
|
725
|
-
#
|
726
|
-
# * `QueueArn` - Returns the Amazon resource name (ARN) of the queue.
|
727
|
-
#
|
728
|
-
# * `ReceiveMessageWaitTimeSeconds` - Returns the number of seconds for
|
729
|
-
# which ReceiveMessage call will wait for a message to arrive.
|
730
|
-
#
|
731
|
-
# * `RedrivePolicy` - Returns the parameters for dead letter queue
|
732
|
-
# functionality of the source queue. For more information about the
|
733
|
-
# redrive policy and dead letter queues, see [Using Amazon SQS Dead
|
734
|
-
# Letter Queues][2] in the *Amazon SQS Developer Guide*.
|
735
|
-
#
|
736
|
-
# * `VisibilityTimeout` - Returns the visibility timeout for the queue.
|
737
|
-
# For more information about the visibility timeout, see [Visibility
|
738
|
-
# Timeout][3] in the *Amazon SQS Developer Guide*.
|
739
|
-
#
|
740
|
-
# The following attributes apply only to [FIFO (first-in-first-out)
|
741
|
-
# queues][4]\:
|
742
|
-
#
|
743
|
-
# * `FifoQueue` - Returns whether the queue is FIFO. For more
|
744
|
-
# information, see [FIFO Queue Logic][5] in the *Amazon SQS Developer
|
745
|
-
# Guide*.
|
746
|
-
#
|
747
|
-
# * `ContentBasedDeduplication` - Returns whether content-based
|
748
|
-
# deduplication is enabled for the queue. For more information, see
|
749
|
-
# [Exactly-Once Processing][6] in the *Amazon SQS Developer Guide*.
|
750
|
-
#
|
751
|
-
#
|
752
|
-
#
|
753
|
-
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-resources-required-process-messages.html
|
754
|
-
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
|
755
|
-
# [3]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
756
|
-
# [4]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
|
757
|
-
# [5]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-understanding-logic
|
758
|
-
# [6]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing
|
759
|
-
# @return [Types::GetQueueAttributesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
760
|
-
#
|
761
|
-
# * {Types::GetQueueAttributesResult#attributes #Attributes} => Hash<String,String>
|
762
|
-
#
|
763
|
-
# @example Request syntax with placeholder values
|
764
|
-
# resp = client.get_queue_attributes({
|
765
|
-
# queue_url: "String", # required
|
766
|
-
# attribute_names: ["All"], # accepts All, Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds, RedrivePolicy, FifoQueue, ContentBasedDeduplication
|
767
|
-
# })
|
768
|
-
#
|
769
|
-
# @example Response structure
|
770
|
-
# resp.attributes #=> Hash
|
771
|
-
# resp.attributes["QueueAttributeName"] #=> String
|
772
|
-
# @overload get_queue_attributes(params = {})
|
773
|
-
# @param [Hash] params ({})
|
774
|
-
def get_queue_attributes(params = {}, options = {})
|
775
|
-
req = build_request(:get_queue_attributes, params)
|
776
|
-
req.send_request(options)
|
777
|
-
end
|
711
|
+
# Deletes the queue specified by the `QueueUrl`, even if the queue is
|
712
|
+
# empty. If the specified queue doesn't exist, Amazon SQS returns a
|
713
|
+
# successful response.
|
714
|
+
#
|
715
|
+
# Be careful with the `DeleteQueue` action: When you delete a queue, any
|
716
|
+
# messages in the queue are no longer available.
|
717
|
+
#
|
718
|
+
# When you delete a queue, the deletion process takes up to 60 seconds.
|
719
|
+
# Requests you send involving that queue during the 60 seconds might
|
720
|
+
# succeed. For example, a ` SendMessage ` request might succeed, but
|
721
|
+
# after 60 seconds the queue and the message you sent no longer exist.
|
722
|
+
#
|
723
|
+
# When you delete a queue, you must wait at least 60 seconds before
|
724
|
+
# creating a queue with the same name.
|
725
|
+
#
|
726
|
+
# @option params [required, String] :queue_url
|
727
|
+
# The URL of the Amazon SQS queue to delete.
|
728
|
+
#
|
729
|
+
# Queue URLs are case-sensitive.
|
730
|
+
#
|
731
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
732
|
+
#
|
733
|
+
# @example Request syntax with placeholder values
|
734
|
+
#
|
735
|
+
# resp = client.delete_queue({
|
736
|
+
# queue_url: "String", # required
|
737
|
+
# })
|
738
|
+
#
|
739
|
+
# @overload delete_queue(params = {})
|
740
|
+
# @param [Hash] params ({})
|
741
|
+
def delete_queue(params = {}, options = {})
|
742
|
+
req = build_request(:delete_queue, params)
|
743
|
+
req.send_request(options)
|
744
|
+
end
|
778
745
|
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
746
|
+
# Gets attributes for the specified queue.
|
747
|
+
#
|
748
|
+
# <note markdown="1"> Some actions take lists of parameters. These lists are specified using
|
749
|
+
# the `param.n` notation. Values of `n` are integers starting from 1.
|
750
|
+
# For example, a parameter list with two elements looks like this:
|
751
|
+
#
|
752
|
+
# `&Attribute.1=this`
|
753
|
+
#
|
754
|
+
# `&Attribute.2=that`
|
755
|
+
#
|
756
|
+
# </note>
|
757
|
+
#
|
758
|
+
# @option params [required, String] :queue_url
|
759
|
+
# The URL of the Amazon SQS queue whose attribute information is
|
760
|
+
# retrieved.
|
761
|
+
#
|
762
|
+
# Queue URLs are case-sensitive.
|
763
|
+
#
|
764
|
+
# @option params [Array<String>] :attribute_names
|
765
|
+
# A list of attributes for which to retrieve information.
|
766
|
+
#
|
767
|
+
# <note markdown="1"> In the future, new attributes might be added. If you write code that
|
768
|
+
# calls this action, we recommend that you structure your code so that
|
769
|
+
# it can handle new attributes gracefully.
|
770
|
+
#
|
771
|
+
# </note>
|
772
|
+
#
|
773
|
+
# The following attributes are supported:
|
774
|
+
#
|
775
|
+
# * `All` - Returns all values.
|
776
|
+
#
|
777
|
+
# * `ApproximateNumberOfMessages` - Returns the approximate number of
|
778
|
+
# visible messages in a queue. For more information, see [Resources
|
779
|
+
# Required to Process Messages][1] in the *Amazon SQS Developer
|
780
|
+
# Guide*.
|
781
|
+
#
|
782
|
+
# * `ApproximateNumberOfMessagesDelayed` - Returns the approximate
|
783
|
+
# number of messages that are waiting to be added to the queue.
|
784
|
+
#
|
785
|
+
# * `ApproximateNumberOfMessagesNotVisible` - Returns the approximate
|
786
|
+
# number of messages that have not timed-out and aren't deleted. For
|
787
|
+
# more information, see [Resources Required to Process Messages][1] in
|
788
|
+
# the *Amazon SQS Developer Guide*.
|
789
|
+
#
|
790
|
+
# * `CreatedTimestamp` - Returns the time when the queue was created in
|
791
|
+
# seconds ([epoch time][2]).
|
792
|
+
#
|
793
|
+
# * `DelaySeconds` - Returns the default delay on the queue in seconds.
|
794
|
+
#
|
795
|
+
# * `LastModifiedTimestamp` - Returns the time when the queue was last
|
796
|
+
# changed in seconds ([epoch time][2]).
|
797
|
+
#
|
798
|
+
# * `MaximumMessageSize` - Returns the limit of how many bytes a message
|
799
|
+
# can contain before Amazon SQS rejects it.
|
800
|
+
#
|
801
|
+
# * `MessageRetentionPeriod` - Returns the number of seconds for which
|
802
|
+
# Amazon SQS retains a message.
|
803
|
+
#
|
804
|
+
# * `Policy` - Returns the policy of the queue.
|
805
|
+
#
|
806
|
+
# * `QueueArn` - Returns the Amazon resource name (ARN) of the queue.
|
807
|
+
#
|
808
|
+
# * `ReceiveMessageWaitTimeSeconds` - Returns the number of seconds for
|
809
|
+
# which the `ReceiveMessage` action waits for a message to arrive.
|
810
|
+
#
|
811
|
+
# * `RedrivePolicy` - Returns the parameters for dead letter queue
|
812
|
+
# functionality of the source queue. For more information about the
|
813
|
+
# redrive policy and dead letter queues, see [Using Amazon SQS Dead
|
814
|
+
# Letter Queues][3] in the *Amazon SQS Developer Guide*.
|
815
|
+
#
|
816
|
+
# * `VisibilityTimeout` - Returns the visibility timeout for the queue.
|
817
|
+
# For more information about the visibility timeout, see [Visibility
|
818
|
+
# Timeout][4] in the *Amazon SQS Developer Guide*.
|
819
|
+
#
|
820
|
+
# The following attributes apply only to [FIFO (first-in-first-out)
|
821
|
+
# queues][5]\:
|
822
|
+
#
|
823
|
+
# * `FifoQueue` - Returns whether the queue is FIFO. For more
|
824
|
+
# information, see [FIFO Queue Logic][6] in the *Amazon SQS Developer
|
825
|
+
# Guide*.
|
826
|
+
#
|
827
|
+
# * `ContentBasedDeduplication` - Returns whether content-based
|
828
|
+
# deduplication is enabled for the queue. For more information, see
|
829
|
+
# [Exactly-Once Processing][7] in the *Amazon SQS Developer Guide*.
|
830
|
+
#
|
831
|
+
#
|
832
|
+
#
|
833
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-resources-required-process-messages.html
|
834
|
+
# [2]: http://en.wikipedia.org/wiki/Unix_time
|
835
|
+
# [3]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
|
836
|
+
# [4]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
837
|
+
# [5]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
|
838
|
+
# [6]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-understanding-logic
|
839
|
+
# [7]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing
|
840
|
+
#
|
841
|
+
# @return [Types::GetQueueAttributesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
842
|
+
#
|
843
|
+
# * {Types::GetQueueAttributesResult#attributes #attributes} => Hash<String,String>
|
844
|
+
#
|
845
|
+
# @example Request syntax with placeholder values
|
846
|
+
#
|
847
|
+
# resp = client.get_queue_attributes({
|
848
|
+
# queue_url: "String", # required
|
849
|
+
# attribute_names: ["All"], # accepts All, Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds, RedrivePolicy, FifoQueue, ContentBasedDeduplication
|
850
|
+
# })
|
851
|
+
#
|
852
|
+
# @example Response structure
|
853
|
+
#
|
854
|
+
# resp.attributes #=> Hash
|
855
|
+
# resp.attributes["QueueAttributeName"] #=> String
|
856
|
+
#
|
857
|
+
# @overload get_queue_attributes(params = {})
|
858
|
+
# @param [Hash] params ({})
|
859
|
+
def get_queue_attributes(params = {}, options = {})
|
860
|
+
req = build_request(:get_queue_attributes, params)
|
861
|
+
req.send_request(options)
|
862
|
+
end
|
818
863
|
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
864
|
+
# Returns the URL of an existing queue. This action provides a simple
|
865
|
+
# way to retrieve the URL of an Amazon SQS queue.
|
866
|
+
#
|
867
|
+
# To access a queue that belongs to another AWS account, use the
|
868
|
+
# `QueueOwnerAWSAccountId` parameter to specify the account ID of the
|
869
|
+
# queue's owner. The queue's owner must grant you permission to access
|
870
|
+
# the queue. For more information about shared queue access, see `
|
871
|
+
# AddPermission ` or see [Shared Queues][1] in the *Amazon SQS Developer
|
872
|
+
# Guide*.
|
873
|
+
#
|
874
|
+
#
|
875
|
+
#
|
876
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html
|
877
|
+
#
|
878
|
+
# @option params [required, String] :queue_name
|
879
|
+
# The name of the queue whose URL must be fetched. Maximum 80
|
880
|
+
# characters. Valid values: alphanumeric characters, hyphens (`-`), and
|
881
|
+
# underscores (`_`).
|
882
|
+
#
|
883
|
+
# Queue names are case-sensitive.
|
884
|
+
#
|
885
|
+
# @option params [String] :queue_owner_aws_account_id
|
886
|
+
# The AWS account ID of the account that created the queue.
|
887
|
+
#
|
888
|
+
# @return [Types::GetQueueUrlResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
889
|
+
#
|
890
|
+
# * {Types::GetQueueUrlResult#queue_url #queue_url} => String
|
891
|
+
#
|
892
|
+
# @example Request syntax with placeholder values
|
893
|
+
#
|
894
|
+
# resp = client.get_queue_url({
|
895
|
+
# queue_name: "String", # required
|
896
|
+
# queue_owner_aws_account_id: "String",
|
897
|
+
# })
|
898
|
+
#
|
899
|
+
# @example Response structure
|
900
|
+
#
|
901
|
+
# resp.queue_url #=> String
|
902
|
+
#
|
903
|
+
# @overload get_queue_url(params = {})
|
904
|
+
# @param [Hash] params ({})
|
905
|
+
def get_queue_url(params = {}, options = {})
|
906
|
+
req = build_request(:get_queue_url, params)
|
907
|
+
req.send_request(options)
|
908
|
+
end
|
850
909
|
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
910
|
+
# Returns a list of your queues that have the `RedrivePolicy` queue
|
911
|
+
# attribute configured with a dead letter queue.
|
912
|
+
#
|
913
|
+
# For more information about using dead letter queues, see [Using Amazon
|
914
|
+
# SQS Dead Letter Queues][1] in the *Amazon SQS Developer Guide*.
|
915
|
+
#
|
916
|
+
#
|
917
|
+
#
|
918
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
|
919
|
+
#
|
920
|
+
# @option params [required, String] :queue_url
|
921
|
+
# The URL of a dead letter queue.
|
922
|
+
#
|
923
|
+
# Queue URLs are case-sensitive.
|
924
|
+
#
|
925
|
+
# @return [Types::ListDeadLetterSourceQueuesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
926
|
+
#
|
927
|
+
# * {Types::ListDeadLetterSourceQueuesResult#queue_urls #queue_urls} => Array<String>
|
928
|
+
#
|
929
|
+
# @example Request syntax with placeholder values
|
930
|
+
#
|
931
|
+
# resp = client.list_dead_letter_source_queues({
|
932
|
+
# queue_url: "String", # required
|
933
|
+
# })
|
934
|
+
#
|
935
|
+
# @example Response structure
|
936
|
+
#
|
937
|
+
# resp.queue_urls #=> Array
|
938
|
+
# resp.queue_urls[0] #=> String
|
939
|
+
#
|
940
|
+
# @overload list_dead_letter_source_queues(params = {})
|
941
|
+
# @param [Hash] params ({})
|
942
|
+
def list_dead_letter_source_queues(params = {}, options = {})
|
943
|
+
req = build_request(:list_dead_letter_source_queues, params)
|
944
|
+
req.send_request(options)
|
945
|
+
end
|
878
946
|
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
947
|
+
# Returns a list of your queues. The maximum number of queues that can
|
948
|
+
# be returned is 1,000. If you specify a value for the optional
|
949
|
+
# `QueueNamePrefix` parameter, only queues with a name that begins with
|
950
|
+
# the specified value are returned.
|
951
|
+
#
|
952
|
+
# @option params [String] :queue_name_prefix
|
953
|
+
# A string to use for filtering the list results. Only those queues
|
954
|
+
# whose name begins with the specified string are returned.
|
955
|
+
#
|
956
|
+
# Queue names are case-sensitive.
|
957
|
+
#
|
958
|
+
# @return [Types::ListQueuesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
959
|
+
#
|
960
|
+
# * {Types::ListQueuesResult#queue_urls #queue_urls} => Array<String>
|
961
|
+
#
|
962
|
+
# @example Request syntax with placeholder values
|
963
|
+
#
|
964
|
+
# resp = client.list_queues({
|
965
|
+
# queue_name_prefix: "String",
|
966
|
+
# })
|
967
|
+
#
|
968
|
+
# @example Response structure
|
969
|
+
#
|
970
|
+
# resp.queue_urls #=> Array
|
971
|
+
# resp.queue_urls[0] #=> String
|
972
|
+
#
|
973
|
+
# @overload list_queues(params = {})
|
974
|
+
# @param [Hash] params ({})
|
975
|
+
def list_queues(params = {}, options = {})
|
976
|
+
req = build_request(:list_queues, params)
|
977
|
+
req.send_request(options)
|
978
|
+
end
|
907
979
|
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
#
|
941
|
-
# You can provide the `VisibilityTimeout` parameter in your request,
|
942
|
-
# which will be applied to the messages that Amazon SQS returns in the
|
943
|
-
# response. If you don't include the parameter, the overall visibility
|
944
|
-
# timeout for the queue is used for the returned messages. For more
|
945
|
-
# information, see [Visibility Timeout][4] in the *Amazon SQS Developer
|
946
|
-
# Guide*.
|
947
|
-
#
|
948
|
-
# A message that is not deleted or a message whose visibility is not
|
949
|
-
# extended before the visibility timeout expires counts as a failed
|
950
|
-
# receive. Depending on the configuration of the queue, the message
|
951
|
-
# might be sent to the dead letter queue.
|
952
|
-
#
|
953
|
-
# <note markdown="1"> Going forward, new attributes might be added. If you are writing code
|
954
|
-
# that calls this action, we recommend that you structure your code so
|
955
|
-
# that it can handle new attributes gracefully.
|
956
|
-
#
|
957
|
-
# </note>
|
958
|
-
#
|
959
|
-
#
|
960
|
-
#
|
961
|
-
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html
|
962
|
-
# [2]: https://www.ietf.org/rfc/rfc1321.txt
|
963
|
-
# [3]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html
|
964
|
-
# [4]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
965
|
-
# @option params [required, String] :queue_url
|
966
|
-
# The URL of the Amazon SQS queue to take action on.
|
967
|
-
#
|
968
|
-
# Queue URLs are case-sensitive.
|
969
|
-
# @option params [Array<String>] :attribute_names
|
970
|
-
# A list of attributes that need to be returned along with each message.
|
971
|
-
# These attributes include:
|
972
|
-
#
|
973
|
-
# * `All` - Returns all values.
|
974
|
-
#
|
975
|
-
# * `ApproximateFirstReceiveTimestamp` - Returns the time the message
|
976
|
-
# was first received from the queue (epoch time in milliseconds).
|
977
|
-
#
|
978
|
-
# * `ApproximateReceiveCount` - Returns the number of times a message
|
979
|
-
# has been received from the queue but not deleted.
|
980
|
-
#
|
981
|
-
# * `SenderId`
|
982
|
-
#
|
983
|
-
# * For an IAM user, returns the IAM user ID, for example
|
984
|
-
# `ABCDEFGHI1JKLMNOPQ23R`.
|
985
|
-
#
|
986
|
-
# * For an IAM role, returns the IAM role ID, for example
|
987
|
-
# `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
|
988
|
-
#
|
989
|
-
# * `SentTimestamp` - Returns the time the message was sent to the queue
|
990
|
-
# (epoch time in milliseconds).
|
991
|
-
#
|
992
|
-
# * `MessageDeduplicationId` - Returns the value provided by the sender
|
993
|
-
# that calls the ` SendMessage ` action.
|
994
|
-
#
|
995
|
-
# * `MessageGroupId` - Returns the value provided by the sender that
|
996
|
-
# calls the ` SendMessage ` action. Messages with the same
|
997
|
-
# `MessageGroupId` are returned in sequence.
|
998
|
-
#
|
999
|
-
# * `SequenceNumber` - Returns the value provided by Amazon SQS.
|
1000
|
-
#
|
1001
|
-
# Any other valid special request parameters (such as the following)
|
1002
|
-
# that are specified are ignored:
|
1003
|
-
#
|
1004
|
-
# * `ApproximateNumberOfMessages`
|
1005
|
-
#
|
1006
|
-
# * `ApproximateNumberOfMessagesDelayed`
|
1007
|
-
#
|
1008
|
-
# * `ApproximateNumberOfMessagesNotVisible`
|
1009
|
-
#
|
1010
|
-
# * `CreatedTimestamp`
|
1011
|
-
#
|
1012
|
-
# * `ContentBasedDeduplication`
|
1013
|
-
#
|
1014
|
-
# * `DelaySeconds`
|
1015
|
-
#
|
1016
|
-
# * `LastModifiedTimestamp`
|
1017
|
-
#
|
1018
|
-
# * `MaximumMessageSize`
|
1019
|
-
#
|
1020
|
-
# * `MessageRetentionPeriod`
|
1021
|
-
#
|
1022
|
-
# * `Policy`
|
1023
|
-
#
|
1024
|
-
# * `QueueArn`,
|
1025
|
-
#
|
1026
|
-
# * `ReceiveMessageWaitTimeSeconds`
|
1027
|
-
#
|
1028
|
-
# * `RedrivePolicy`
|
1029
|
-
#
|
1030
|
-
# * `FifoQueue`
|
1031
|
-
#
|
1032
|
-
# * `VisibilityTimeout`
|
1033
|
-
# @option params [Array<String>] :message_attribute_names
|
1034
|
-
# The name of the message attribute, where *N* is the index. The message
|
1035
|
-
# attribute name can contain the following characters: A-Z, a-z, 0-9,
|
1036
|
-
# underscore (\_), hyphen (-), and period (.). The name must not start
|
1037
|
-
# or end with a period, and it should not have successive periods. The
|
1038
|
-
# name is case sensitive and must be unique among all attribute names
|
1039
|
-
# for the message. The name can be up to 256 characters long. The name
|
1040
|
-
# can't start with "AWS." or "Amazon." (or any variations in
|
1041
|
-
# casing), because these prefixes are reserved for use by Amazon Web
|
1042
|
-
# Services.
|
1043
|
-
#
|
1044
|
-
# When using `ReceiveMessage`, you can send a list of attribute names to
|
1045
|
-
# receive, or you can return all of the attributes by specifying "All"
|
1046
|
-
# or ".*" in your request. You can also use "bar.*" to return all
|
1047
|
-
# message attributes starting with the "bar" prefix.
|
1048
|
-
# @option params [Integer] :max_number_of_messages
|
1049
|
-
# The maximum number of messages to return. Amazon SQS never returns
|
1050
|
-
# more messages than this value but might return fewer. Values can be
|
1051
|
-
# from 1 to 10. Default is 1.
|
1052
|
-
#
|
1053
|
-
# All of the messages are not necessarily returned.
|
1054
|
-
# @option params [Integer] :visibility_timeout
|
1055
|
-
# The duration (in seconds) that the received messages are hidden from
|
1056
|
-
# subsequent retrieve requests after being retrieved by a
|
1057
|
-
# `ReceiveMessage` request.
|
1058
|
-
# @option params [Integer] :wait_time_seconds
|
1059
|
-
# The duration (in seconds) for which the call will wait for a message
|
1060
|
-
# to arrive in the queue before returning. If a message is available,
|
1061
|
-
# the call will return sooner than WaitTimeSeconds.
|
1062
|
-
# @option params [String] :receive_request_attempt_id
|
1063
|
-
# This parameter applies only to FIFO (first-in-first-out) queues.
|
1064
|
-
#
|
1065
|
-
# The token used for deduplication of `ReceiveMessage` calls. If a
|
1066
|
-
# networking issue occurs after a `ReceiveMessage` action, and instead
|
1067
|
-
# of a response you receive a generic error, you can retry the same
|
1068
|
-
# action with an identical `ReceiveRequestAttemptId` to retrieve the
|
1069
|
-
# same set of messages, even if their visibility timeout has not yet
|
1070
|
-
# expired.
|
1071
|
-
#
|
1072
|
-
# * You can use `ReceiveRequestAttemptId` only for 5 minutes after a
|
1073
|
-
# `ReceiveMessage` action.
|
1074
|
-
#
|
1075
|
-
# * When you set `FifoQueue`, a caller of the `ReceiveMessage` action
|
1076
|
-
# can provide a `ReceiveRequestAttemptId` explicitly.
|
1077
|
-
#
|
1078
|
-
# * If a caller of the `ReceiveMessage` action doesn't provide a
|
1079
|
-
# `ReceiveRequestAttemptId`, Amazon SQS generates a
|
1080
|
-
# `ReceiveRequestAttemptId`.
|
1081
|
-
#
|
1082
|
-
# * You can retry the `ReceiveMessage` action with the same
|
1083
|
-
# `ReceiveRequestAttemptId` if none of the messages have been modified
|
1084
|
-
# (deleted or had their visibility changes).
|
1085
|
-
#
|
1086
|
-
# * During a visibility timeout, subsequent calls with the same
|
1087
|
-
# `ReceiveRequestAttemptId` return the same messages and receipt
|
1088
|
-
# handles. If a retry occurs within the deduplication interval, it
|
1089
|
-
# resets the visibility timeout. For more information, see [Visibility
|
1090
|
-
# Timeout][1] in the *Amazon Simple Queue Service Developer Guide*.
|
1091
|
-
#
|
1092
|
-
# If a caller of the `ReceiveMessage` action is still processing
|
1093
|
-
# messages when the visibility timeout expires and messages become
|
1094
|
-
# visible, another worker reading from the same queue can receive the
|
1095
|
-
# same messages and therefore process duplicates. Also, if a reader
|
1096
|
-
# whose message processing time is longer than the visibility timeout
|
1097
|
-
# tries to delete the processed messages, the action fails with an
|
1098
|
-
# error.
|
1099
|
-
#
|
1100
|
-
# To mitigate this effect, ensure that your application observes a
|
1101
|
-
# safe threshold before the visibility timeout expires and extend the
|
1102
|
-
# visibility timeout as necessary.
|
1103
|
-
#
|
1104
|
-
# * While messages with a particular `MessageGroupId` are invisible, no
|
1105
|
-
# more messages belonging to the same `MessageGroupId` are returned
|
1106
|
-
# until the visibility timeout expires. You can still receive messages
|
1107
|
-
# with another `MessageGroupId` as long as it is also visible.
|
1108
|
-
#
|
1109
|
-
# * If a caller of `ReceiveMessage` can't track the
|
1110
|
-
# `ReceiveRequestAttemptId`, no retries will work until the original
|
1111
|
-
# visibility timeout expires. As a result, delays might occur but the
|
1112
|
-
# messages in the queue will remain in a strict order.
|
1113
|
-
#
|
1114
|
-
# The length of `ReceiveRequestAttemptId` is 128 characters.
|
1115
|
-
# `ReceiveRequestAttemptId` can contain alphanumeric characters (`a-z`,
|
1116
|
-
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~
|
1117
|
-
# ``).
|
1118
|
-
#
|
1119
|
-
# For best practices of using `ReceiveRequestAttemptId`, see [Using the
|
1120
|
-
# ReceiveRequestAttemptId Request Parameter][2] in the *Amazon Simple
|
1121
|
-
# Queue Service Developer Guide*.
|
1122
|
-
#
|
1123
|
-
#
|
1124
|
-
#
|
1125
|
-
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
1126
|
-
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-receiverequestattemptid-request-parameter
|
1127
|
-
# @return [Types::ReceiveMessageResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1128
|
-
#
|
1129
|
-
# * {Types::ReceiveMessageResult#messages #Messages} => Array<Types::Message>
|
1130
|
-
#
|
1131
|
-
# @example Request syntax with placeholder values
|
1132
|
-
# resp = client.receive_message({
|
1133
|
-
# queue_url: "String", # required
|
1134
|
-
# attribute_names: ["All"], # accepts All, Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds, RedrivePolicy, FifoQueue, ContentBasedDeduplication
|
1135
|
-
# message_attribute_names: ["MessageAttributeName"],
|
1136
|
-
# max_number_of_messages: 1,
|
1137
|
-
# visibility_timeout: 1,
|
1138
|
-
# wait_time_seconds: 1,
|
1139
|
-
# receive_request_attempt_id: "String",
|
1140
|
-
# })
|
1141
|
-
#
|
1142
|
-
# @example Response structure
|
1143
|
-
# resp.messages #=> Array
|
1144
|
-
# resp.messages[0].message_id #=> String
|
1145
|
-
# resp.messages[0].receipt_handle #=> String
|
1146
|
-
# resp.messages[0].md5_of_body #=> String
|
1147
|
-
# resp.messages[0].body #=> String
|
1148
|
-
# resp.messages[0].attributes #=> Hash
|
1149
|
-
# resp.messages[0].attributes["MessageSystemAttributeName"] #=> String
|
1150
|
-
# resp.messages[0].md5_of_message_attributes #=> String
|
1151
|
-
# resp.messages[0].message_attributes #=> Hash
|
1152
|
-
# resp.messages[0].message_attributes["String"].string_value #=> String
|
1153
|
-
# resp.messages[0].message_attributes["String"].binary_value #=> String
|
1154
|
-
# resp.messages[0].message_attributes["String"].string_list_values #=> Array
|
1155
|
-
# resp.messages[0].message_attributes["String"].string_list_values[0] #=> String
|
1156
|
-
# resp.messages[0].message_attributes["String"].binary_list_values #=> Array
|
1157
|
-
# resp.messages[0].message_attributes["String"].binary_list_values[0] #=> String
|
1158
|
-
# resp.messages[0].message_attributes["String"].data_type #=> String
|
1159
|
-
# @overload receive_message(params = {})
|
1160
|
-
# @param [Hash] params ({})
|
1161
|
-
def receive_message(params = {}, options = {})
|
1162
|
-
req = build_request(:receive_message, params)
|
1163
|
-
req.send_request(options)
|
1164
|
-
end
|
980
|
+
# Deletes the messages in a queue specified by the `QueueURL` parameter.
|
981
|
+
#
|
982
|
+
# When you use the `PurgeQueue` action, you can't retrieve a message
|
983
|
+
# deleted from a queue.
|
984
|
+
#
|
985
|
+
# When you purge a queue, the message deletion process takes up to 60
|
986
|
+
# seconds. All messages sent to the queue before calling the
|
987
|
+
# `PurgeQueue` action are deleted. Messages sent to the queue while it
|
988
|
+
# is being purged might be deleted. While the queue is being purged,
|
989
|
+
# messages sent to the queue before `PurgeQueue` is called might be
|
990
|
+
# received, but are deleted within the next minute.
|
991
|
+
#
|
992
|
+
# @option params [required, String] :queue_url
|
993
|
+
# The URL of the queue from which the `PurgeQueue` action deletes
|
994
|
+
# messages.
|
995
|
+
#
|
996
|
+
# Queue URLs are case-sensitive.
|
997
|
+
#
|
998
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
999
|
+
#
|
1000
|
+
# @example Request syntax with placeholder values
|
1001
|
+
#
|
1002
|
+
# resp = client.purge_queue({
|
1003
|
+
# queue_url: "String", # required
|
1004
|
+
# })
|
1005
|
+
#
|
1006
|
+
# @overload purge_queue(params = {})
|
1007
|
+
# @param [Hash] params ({})
|
1008
|
+
def purge_queue(params = {}, options = {})
|
1009
|
+
req = build_request(:purge_queue, params)
|
1010
|
+
req.send_request(options)
|
1011
|
+
end
|
1165
1012
|
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1013
|
+
# Retrieves one or more messages (up to 10), from the specified queue.
|
1014
|
+
# Using the `WaitTimeSeconds` parameter enables long-poll support. For
|
1015
|
+
# more information, see [Amazon SQS Long Polling][1] in the *Amazon SQS
|
1016
|
+
# Developer Guide*.
|
1017
|
+
#
|
1018
|
+
# Short poll is the default behavior where a weighted random set of
|
1019
|
+
# machines is sampled on a `ReceiveMessage` call. Thus, only the
|
1020
|
+
# messages on the sampled machines are returned. If the number of
|
1021
|
+
# messages in the queue is small (fewer than 1,000), you most likely get
|
1022
|
+
# fewer messages than you requested per `ReceiveMessage` call. If the
|
1023
|
+
# number of messages in the queue is extremely small, you might not
|
1024
|
+
# receive any messages in a particular `ReceiveMessage` response. If
|
1025
|
+
# this happens, repeat the request.
|
1026
|
+
#
|
1027
|
+
# For each message returned, the response includes the following:
|
1028
|
+
#
|
1029
|
+
# * The message body.
|
1030
|
+
#
|
1031
|
+
# * An MD5 digest of the message body. For information on MD5, see
|
1032
|
+
# [RFC1321][2].
|
1033
|
+
#
|
1034
|
+
# * The `MessageId` you received when you sent the message to the queue.
|
1035
|
+
#
|
1036
|
+
# * The receipt handle.
|
1037
|
+
#
|
1038
|
+
# * The message attributes.
|
1039
|
+
#
|
1040
|
+
# * An MD5 digest of the message attributes.
|
1041
|
+
#
|
1042
|
+
# The receipt handle is the identifier you must provide when deleting
|
1043
|
+
# the message. For more information, see [Queue and Message
|
1044
|
+
# Identifiers][3] in the *Amazon SQS Developer Guide*.
|
1045
|
+
#
|
1046
|
+
# You can provide the `VisibilityTimeout` parameter in your request. The
|
1047
|
+
# parameter is applied to the messages that Amazon SQS returns in the
|
1048
|
+
# response. If you don't include the parameter, the overall visibility
|
1049
|
+
# timeout for the queue is used for the returned messages. For more
|
1050
|
+
# information, see [Visibility Timeout][4] in the *Amazon SQS Developer
|
1051
|
+
# Guide*.
|
1052
|
+
#
|
1053
|
+
# A message that isn't deleted or a message whose visibility isn't
|
1054
|
+
# extended before the visibility timeout expires counts as a failed
|
1055
|
+
# receive. Depending on the configuration of the queue, the message
|
1056
|
+
# might be sent to the dead letter queue.
|
1057
|
+
#
|
1058
|
+
# <note markdown="1"> In the future, new attributes might be added. If you write code that
|
1059
|
+
# calls this action, we recommend that you structure your code so that
|
1060
|
+
# it can handle new attributes gracefully.
|
1061
|
+
#
|
1062
|
+
# </note>
|
1063
|
+
#
|
1064
|
+
#
|
1065
|
+
#
|
1066
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html
|
1067
|
+
# [2]: https://www.ietf.org/rfc/rfc1321.txt
|
1068
|
+
# [3]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html
|
1069
|
+
# [4]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
1070
|
+
#
|
1071
|
+
# @option params [required, String] :queue_url
|
1072
|
+
# The URL of the Amazon SQS queue from which messages are received.
|
1073
|
+
#
|
1074
|
+
# Queue URLs are case-sensitive.
|
1075
|
+
#
|
1076
|
+
# @option params [Array<String>] :attribute_names
|
1077
|
+
# A list of attributes that need to be returned along with each message.
|
1078
|
+
# These attributes include:
|
1079
|
+
#
|
1080
|
+
# * `All` - Returns all values.
|
1081
|
+
#
|
1082
|
+
# * `ApproximateFirstReceiveTimestamp` - Returns the time the message
|
1083
|
+
# was first received from the queue ([epoch time][1] in milliseconds).
|
1084
|
+
#
|
1085
|
+
# * `ApproximateReceiveCount` - Returns the number of times a message
|
1086
|
+
# has been received from the queue but not deleted.
|
1087
|
+
#
|
1088
|
+
# * `SenderId`
|
1089
|
+
#
|
1090
|
+
# * For an IAM user, returns the IAM user ID, for example
|
1091
|
+
# `ABCDEFGHI1JKLMNOPQ23R`.
|
1092
|
+
#
|
1093
|
+
# * For an IAM role, returns the IAM role ID, for example
|
1094
|
+
# `ABCDE1F2GH3I4JK5LMNOP:i-a123b456`.
|
1095
|
+
#
|
1096
|
+
# * `SentTimestamp` - Returns the time the message was sent to the queue
|
1097
|
+
# ([epoch time][1] in milliseconds).
|
1098
|
+
#
|
1099
|
+
# * `MessageDeduplicationId` - Returns the value provided by the sender
|
1100
|
+
# that calls the ` SendMessage ` action.
|
1101
|
+
#
|
1102
|
+
# * `MessageGroupId` - Returns the value provided by the sender that
|
1103
|
+
# calls the ` SendMessage ` action. Messages with the same
|
1104
|
+
# `MessageGroupId` are returned in sequence.
|
1105
|
+
#
|
1106
|
+
# * `SequenceNumber` - Returns the value provided by Amazon SQS.
|
1107
|
+
#
|
1108
|
+
# Any other valid special request parameters (such as the following) are
|
1109
|
+
# ignored:
|
1110
|
+
#
|
1111
|
+
# * `ApproximateNumberOfMessages`
|
1112
|
+
#
|
1113
|
+
# * `ApproximateNumberOfMessagesDelayed`
|
1114
|
+
#
|
1115
|
+
# * `ApproximateNumberOfMessagesNotVisible`
|
1116
|
+
#
|
1117
|
+
# * `CreatedTimestamp`
|
1118
|
+
#
|
1119
|
+
# * `ContentBasedDeduplication`
|
1120
|
+
#
|
1121
|
+
# * `DelaySeconds`
|
1122
|
+
#
|
1123
|
+
# * `FifoQueue`
|
1124
|
+
#
|
1125
|
+
# * `LastModifiedTimestamp`
|
1126
|
+
#
|
1127
|
+
# * `MaximumMessageSize`
|
1128
|
+
#
|
1129
|
+
# * `MessageRetentionPeriod`
|
1130
|
+
#
|
1131
|
+
# * `Policy`
|
1132
|
+
#
|
1133
|
+
# * `QueueArn`,
|
1134
|
+
#
|
1135
|
+
# * `ReceiveMessageWaitTimeSeconds`
|
1136
|
+
#
|
1137
|
+
# * `RedrivePolicy`
|
1138
|
+
#
|
1139
|
+
# * `VisibilityTimeout`
|
1140
|
+
#
|
1141
|
+
#
|
1142
|
+
#
|
1143
|
+
# [1]: http://en.wikipedia.org/wiki/Unix_time
|
1144
|
+
#
|
1145
|
+
# @option params [Array<String>] :message_attribute_names
|
1146
|
+
# The name of the message attribute, where *N* is the index.
|
1147
|
+
#
|
1148
|
+
# * The name can contain alphanumeric characters and the underscore
|
1149
|
+
# (`_`), hyphen (`-`), and period (`.`).
|
1150
|
+
#
|
1151
|
+
# * The name is case-sensitive and must be unique among all attribute
|
1152
|
+
# names for the message.
|
1153
|
+
#
|
1154
|
+
# * The name must not start with AWS-reserved prefixes such as `AWS.` or
|
1155
|
+
# `Amazon.` (or any casing variants).
|
1156
|
+
#
|
1157
|
+
# * The name must not start or end with a period (`.`), and it should
|
1158
|
+
# not have periods in succession (`..`).
|
1159
|
+
#
|
1160
|
+
# * The name can be up to 256 characters long.
|
1161
|
+
#
|
1162
|
+
# When using `ReceiveMessage`, you can send a list of attribute names to
|
1163
|
+
# receive, or you can return all of the attributes by specifying `All`
|
1164
|
+
# or `.*` in your request. You can also use all message attributes
|
1165
|
+
# starting with a prefix, for example `bar.*`.
|
1166
|
+
#
|
1167
|
+
# @option params [Integer] :max_number_of_messages
|
1168
|
+
# The maximum number of messages to return. Amazon SQS never returns
|
1169
|
+
# more messages than this value (however, fewer messages might be
|
1170
|
+
# returned). Valid values are 1 to 10. Default is 1.
|
1171
|
+
#
|
1172
|
+
# @option params [Integer] :visibility_timeout
|
1173
|
+
# The duration (in seconds) that the received messages are hidden from
|
1174
|
+
# subsequent retrieve requests after being retrieved by a
|
1175
|
+
# `ReceiveMessage` request.
|
1176
|
+
#
|
1177
|
+
# @option params [Integer] :wait_time_seconds
|
1178
|
+
# The duration (in seconds) for which the call waits for a message to
|
1179
|
+
# arrive in the queue before returning. If a message is available, the
|
1180
|
+
# call returns sooner than `WaitTimeSeconds`.
|
1181
|
+
#
|
1182
|
+
# @option params [String] :receive_request_attempt_id
|
1183
|
+
# This parameter applies only to FIFO (first-in-first-out) queues.
|
1184
|
+
#
|
1185
|
+
# The token used for deduplication of `ReceiveMessage` calls. If a
|
1186
|
+
# networking issue occurs after a `ReceiveMessage` action, and instead
|
1187
|
+
# of a response you receive a generic error, you can retry the same
|
1188
|
+
# action with an identical `ReceiveRequestAttemptId` to retrieve the
|
1189
|
+
# same set of messages, even if their visibility timeout has not yet
|
1190
|
+
# expired.
|
1191
|
+
#
|
1192
|
+
# * You can use `ReceiveRequestAttemptId` only for 5 minutes after a
|
1193
|
+
# `ReceiveMessage` action.
|
1194
|
+
#
|
1195
|
+
# * When you set `FifoQueue`, a caller of the `ReceiveMessage` action
|
1196
|
+
# can provide a `ReceiveRequestAttemptId` explicitly.
|
1197
|
+
#
|
1198
|
+
# * If a caller of the `ReceiveMessage` action doesn't provide a
|
1199
|
+
# `ReceiveRequestAttemptId`, Amazon SQS generates a
|
1200
|
+
# `ReceiveRequestAttemptId`.
|
1201
|
+
#
|
1202
|
+
# * You can retry the `ReceiveMessage` action with the same
|
1203
|
+
# `ReceiveRequestAttemptId` if none of the messages have been modified
|
1204
|
+
# (deleted or had their visibility changes).
|
1205
|
+
#
|
1206
|
+
# * During a visibility timeout, subsequent calls with the same
|
1207
|
+
# `ReceiveRequestAttemptId` return the same messages and receipt
|
1208
|
+
# handles. If a retry occurs within the deduplication interval, it
|
1209
|
+
# resets the visibility timeout. For more information, see [Visibility
|
1210
|
+
# Timeout][1] in the *Amazon Simple Queue Service Developer Guide*.
|
1211
|
+
#
|
1212
|
+
# If a caller of the `ReceiveMessage` action is still processing
|
1213
|
+
# messages when the visibility timeout expires and messages become
|
1214
|
+
# visible, another worker reading from the same queue can receive the
|
1215
|
+
# same messages and therefore process duplicates. Also, if a reader
|
1216
|
+
# whose message processing time is longer than the visibility timeout
|
1217
|
+
# tries to delete the processed messages, the action fails with an
|
1218
|
+
# error.
|
1219
|
+
#
|
1220
|
+
# To mitigate this effect, ensure that your application observes a
|
1221
|
+
# safe threshold before the visibility timeout expires and extend the
|
1222
|
+
# visibility timeout as necessary.
|
1223
|
+
#
|
1224
|
+
# * While messages with a particular `MessageGroupId` are invisible, no
|
1225
|
+
# more messages belonging to the same `MessageGroupId` are returned
|
1226
|
+
# until the visibility timeout expires. You can still receive messages
|
1227
|
+
# with another `MessageGroupId` as long as it is also visible.
|
1228
|
+
#
|
1229
|
+
# * If a caller of `ReceiveMessage` can't track the
|
1230
|
+
# `ReceiveRequestAttemptId`, no retries work until the original
|
1231
|
+
# visibility timeout expires. As a result, delays might occur but the
|
1232
|
+
# messages in the queue remain in a strict order.
|
1233
|
+
#
|
1234
|
+
# The length of `ReceiveRequestAttemptId` is 128 characters.
|
1235
|
+
# `ReceiveRequestAttemptId` can contain alphanumeric characters (`a-z`,
|
1236
|
+
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~
|
1237
|
+
# ``).
|
1238
|
+
#
|
1239
|
+
# For best practices of using `ReceiveRequestAttemptId`, see [Using the
|
1240
|
+
# ReceiveRequestAttemptId Request Parameter][2] in the *Amazon Simple
|
1241
|
+
# Queue Service Developer Guide*.
|
1242
|
+
#
|
1243
|
+
#
|
1244
|
+
#
|
1245
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
1246
|
+
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-receiverequestattemptid-request-parameter
|
1247
|
+
#
|
1248
|
+
# @return [Types::ReceiveMessageResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1249
|
+
#
|
1250
|
+
# * {Types::ReceiveMessageResult#messages #messages} => Array<Types::Message>
|
1251
|
+
#
|
1252
|
+
# @example Request syntax with placeholder values
|
1253
|
+
#
|
1254
|
+
# resp = client.receive_message({
|
1255
|
+
# queue_url: "String", # required
|
1256
|
+
# attribute_names: ["All"], # accepts All, Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds, RedrivePolicy, FifoQueue, ContentBasedDeduplication
|
1257
|
+
# message_attribute_names: ["MessageAttributeName"],
|
1258
|
+
# max_number_of_messages: 1,
|
1259
|
+
# visibility_timeout: 1,
|
1260
|
+
# wait_time_seconds: 1,
|
1261
|
+
# receive_request_attempt_id: "String",
|
1262
|
+
# })
|
1263
|
+
#
|
1264
|
+
# @example Response structure
|
1265
|
+
#
|
1266
|
+
# resp.messages #=> Array
|
1267
|
+
# resp.messages[0].message_id #=> String
|
1268
|
+
# resp.messages[0].receipt_handle #=> String
|
1269
|
+
# resp.messages[0].md5_of_body #=> String
|
1270
|
+
# resp.messages[0].body #=> String
|
1271
|
+
# resp.messages[0].attributes #=> Hash
|
1272
|
+
# resp.messages[0].attributes["MessageSystemAttributeName"] #=> String
|
1273
|
+
# resp.messages[0].md5_of_message_attributes #=> String
|
1274
|
+
# resp.messages[0].message_attributes #=> Hash
|
1275
|
+
# resp.messages[0].message_attributes["String"].string_value #=> String
|
1276
|
+
# resp.messages[0].message_attributes["String"].binary_value #=> String
|
1277
|
+
# resp.messages[0].message_attributes["String"].string_list_values #=> Array
|
1278
|
+
# resp.messages[0].message_attributes["String"].string_list_values[0] #=> String
|
1279
|
+
# resp.messages[0].message_attributes["String"].binary_list_values #=> Array
|
1280
|
+
# resp.messages[0].message_attributes["String"].binary_list_values[0] #=> String
|
1281
|
+
# resp.messages[0].message_attributes["String"].data_type #=> String
|
1282
|
+
#
|
1283
|
+
# @overload receive_message(params = {})
|
1284
|
+
# @param [Hash] params ({})
|
1285
|
+
def receive_message(params = {}, options = {})
|
1286
|
+
req = build_request(:receive_message, params)
|
1287
|
+
req.send_request(options)
|
1288
|
+
end
|
1188
1289
|
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
# <note markdown="1"> When you set `FifoQueue`, you can't set `DelaySeconds` per message.
|
1217
|
-
# You can set this parameter only on a queue level.
|
1218
|
-
#
|
1219
|
-
# </note>
|
1220
|
-
# @option params [Hash<String,Types::MessageAttributeValue>] :message_attributes
|
1221
|
-
# Each message attribute consists of a Name, Type, and Value. For more
|
1222
|
-
# information, see [Message Attribute Items and Validation][1] in the
|
1223
|
-
# *Amazon SQS Developer Guide*.
|
1224
|
-
#
|
1225
|
-
#
|
1226
|
-
#
|
1227
|
-
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation
|
1228
|
-
# @option params [String] :message_deduplication_id
|
1229
|
-
# This parameter applies only to FIFO (first-in-first-out) queues.
|
1230
|
-
#
|
1231
|
-
# The token used for deduplication of sent messages. If a message with a
|
1232
|
-
# particular `MessageDeduplicationId` is sent successfully, any messages
|
1233
|
-
# sent with the same `MessageDeduplicationId` are accepted successfully
|
1234
|
-
# but aren't delivered during the 5-minute deduplication interval. For
|
1235
|
-
# more information, see [ Exactly-Once Processing][1] in the *Amazon SQS
|
1236
|
-
# Developer Guide*.
|
1237
|
-
#
|
1238
|
-
# * Every message must have a unique `MessageDeduplicationId`,
|
1239
|
-
#
|
1240
|
-
# * You may provide a `MessageDeduplicationId` explicitly.
|
1241
|
-
#
|
1242
|
-
# * If you aren't able to provide a `MessageDeduplicationId` and you
|
1243
|
-
# enable `ContentBasedDeduplication` for your queue, Amazon SQS uses
|
1244
|
-
# a SHA-256 hash to generate the `MessageDeduplicationId` using the
|
1245
|
-
# body of the message (but not the attributes of the message).
|
1246
|
-
#
|
1247
|
-
# * If you don't provide a `MessageDeduplicationId` and the queue
|
1248
|
-
# doesn't have `ContentBasedDeduplication` set, the action fails
|
1249
|
-
# with an error.
|
1250
|
-
#
|
1251
|
-
# * If the queue has `ContentBasedDeduplication` set, your
|
1252
|
-
# `MessageDeduplicationId` overrides the generated one.
|
1253
|
-
#
|
1254
|
-
# * When `ContentBasedDeduplication` is in effect, messages with
|
1255
|
-
# identical content sent within the deduplication interval are treated
|
1256
|
-
# as duplicates and only one copy of the message is delivered.
|
1257
|
-
#
|
1258
|
-
# * You can also use `ContentBasedDeduplication` for messages with
|
1259
|
-
# identical content to be treated as duplicates.
|
1260
|
-
#
|
1261
|
-
# * If you send one message with `ContentBasedDeduplication` enabled and
|
1262
|
-
# then another message with a `MessageDeduplicationId` that is the
|
1263
|
-
# same as the one generated for the first `MessageDeduplicationId`,
|
1264
|
-
# the two messages are treated as duplicates and only one copy of the
|
1265
|
-
# message is delivered.
|
1266
|
-
#
|
1267
|
-
# <note markdown="1"> The `MessageDeduplicationId` is available to the recipient of the
|
1268
|
-
# message (this can be useful for troubleshooting delivery issues).
|
1269
|
-
#
|
1270
|
-
# If a message is sent successfully but the acknowledgdment is lost and
|
1271
|
-
# the message is resent with the same `MessageDeduplicationId` after the
|
1272
|
-
# deduplication interval, Amazon SQS can't detect duplicate messages.
|
1273
|
-
#
|
1274
|
-
# </note>
|
1275
|
-
#
|
1276
|
-
# The length of `MessageDeduplicationId` is 128 characters.
|
1277
|
-
# `MessageDeduplicationId` can contain alphanumeric characters (`a-z`,
|
1278
|
-
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~
|
1279
|
-
# ``).
|
1280
|
-
#
|
1281
|
-
# For best practices of using `MessageDeduplicationId`, see [Using the
|
1282
|
-
# MessageDeduplicationId Property][2] in the *Amazon Simple Queue
|
1283
|
-
# Service Developer Guide*.
|
1284
|
-
#
|
1285
|
-
#
|
1286
|
-
#
|
1287
|
-
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing
|
1288
|
-
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagededuplicationid-property
|
1289
|
-
# @option params [String] :message_group_id
|
1290
|
-
# This parameter applies only to FIFO (first-in-first-out) queues.
|
1291
|
-
#
|
1292
|
-
# The tag that specifies that a message belongs to a specific message
|
1293
|
-
# group. Messages that belong to the same message group are processed in
|
1294
|
-
# a FIFO manner (however, messages in different message groups might be
|
1295
|
-
# processed out of order). To interleave multiple ordered streams within
|
1296
|
-
# a single queue, use `MessageGroupId` values (for example, session data
|
1297
|
-
# for multiple users). In this scenario, multiple readers can process
|
1298
|
-
# the queue, but the session data of each user is processed in a FIFO
|
1299
|
-
# fashion.
|
1300
|
-
#
|
1301
|
-
# * You must associate a non-empty `MessageGroupId` with a message. If
|
1302
|
-
# you don't provide a `MessageGroupId`, the action fails.
|
1303
|
-
#
|
1304
|
-
# * `ReceiveMessage` might return messages with multiple
|
1305
|
-
# `MessageGroupId` values. For each `MessageGroupId`, the messages are
|
1306
|
-
# sorted by time sent. The caller can't specify a `MessageGroupId`.
|
1307
|
-
#
|
1308
|
-
# The length of `MessageGroupId` is 128 characters. Valid values are
|
1309
|
-
# alphanumeric characters and punctuation ``
|
1310
|
-
# (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
|
1311
|
-
#
|
1312
|
-
# For best practices of using `MessageGroupId`, see [Using the
|
1313
|
-
# MessageGroupId Property][1] in the *Amazon Simple Queue Service
|
1314
|
-
# Developer Guide*.
|
1315
|
-
#
|
1316
|
-
#
|
1317
|
-
#
|
1318
|
-
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagegroupid-property
|
1319
|
-
# @return [Types::SendMessageResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1320
|
-
#
|
1321
|
-
# * {Types::SendMessageResult#md5_of_message_body #MD5OfMessageBody} => String
|
1322
|
-
# * {Types::SendMessageResult#md5_of_message_attributes #MD5OfMessageAttributes} => String
|
1323
|
-
# * {Types::SendMessageResult#message_id #MessageId} => String
|
1324
|
-
# * {Types::SendMessageResult#sequence_number #SequenceNumber} => String
|
1325
|
-
#
|
1326
|
-
# @example Request syntax with placeholder values
|
1327
|
-
# resp = client.send_message({
|
1328
|
-
# queue_url: "String", # required
|
1329
|
-
# message_body: "String", # required
|
1330
|
-
# delay_seconds: 1,
|
1331
|
-
# message_attributes: {
|
1332
|
-
# "String" => {
|
1333
|
-
# string_value: "String",
|
1334
|
-
# binary_value: "data",
|
1335
|
-
# string_list_values: ["String"],
|
1336
|
-
# binary_list_values: ["data"],
|
1337
|
-
# data_type: "String", # required
|
1338
|
-
# },
|
1339
|
-
# },
|
1340
|
-
# message_deduplication_id: "String",
|
1341
|
-
# message_group_id: "String",
|
1342
|
-
# })
|
1343
|
-
#
|
1344
|
-
# @example Response structure
|
1345
|
-
# resp.md5_of_message_body #=> String
|
1346
|
-
# resp.md5_of_message_attributes #=> String
|
1347
|
-
# resp.message_id #=> String
|
1348
|
-
# resp.sequence_number #=> String
|
1349
|
-
# @overload send_message(params = {})
|
1350
|
-
# @param [Hash] params ({})
|
1351
|
-
def send_message(params = {}, options = {})
|
1352
|
-
req = build_request(:send_message, params)
|
1353
|
-
req.send_request(options)
|
1354
|
-
end
|
1290
|
+
# Revokes any permissions in the queue policy that matches the specified
|
1291
|
+
# `Label` parameter. Only the owner of the queue can remove permissions.
|
1292
|
+
#
|
1293
|
+
# @option params [required, String] :queue_url
|
1294
|
+
# The URL of the Amazon SQS queue from which permissions are removed.
|
1295
|
+
#
|
1296
|
+
# Queue URLs are case-sensitive.
|
1297
|
+
#
|
1298
|
+
# @option params [required, String] :label
|
1299
|
+
# The identification of the permission to remove. This is the label
|
1300
|
+
# added using the ` AddPermission ` action.
|
1301
|
+
#
|
1302
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1303
|
+
#
|
1304
|
+
# @example Request syntax with placeholder values
|
1305
|
+
#
|
1306
|
+
# resp = client.remove_permission({
|
1307
|
+
# queue_url: "String", # required
|
1308
|
+
# label: "String", # required
|
1309
|
+
# })
|
1310
|
+
#
|
1311
|
+
# @overload remove_permission(params = {})
|
1312
|
+
# @param [Hash] params ({})
|
1313
|
+
def remove_permission(params = {}, options = {})
|
1314
|
+
req = build_request(:remove_permission, params)
|
1315
|
+
req.send_request(options)
|
1316
|
+
end
|
1355
1317
|
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1318
|
+
# Delivers a message to the specified queue.
|
1319
|
+
#
|
1320
|
+
# The following list shows the characters (in Unicode) that are allowed
|
1321
|
+
# in your message, according to the W3C XML specification:
|
1322
|
+
#
|
1323
|
+
# * `#x9`
|
1324
|
+
#
|
1325
|
+
# * `#xA`
|
1326
|
+
#
|
1327
|
+
# * `#xD`
|
1328
|
+
#
|
1329
|
+
# * `#x20` to `#xD7FF`
|
1330
|
+
#
|
1331
|
+
# * `#xE000` to `#xFFFD`
|
1332
|
+
#
|
1333
|
+
# * `#x10000` to `#x10FFFF`
|
1334
|
+
#
|
1335
|
+
# For more information, see [RFC1321][1]. If you send any characters
|
1336
|
+
# that aren't included in this list, your request is rejected.
|
1337
|
+
#
|
1338
|
+
#
|
1339
|
+
#
|
1340
|
+
# [1]: https://www.ietf.org/rfc/rfc1321.txt
|
1341
|
+
#
|
1342
|
+
# @option params [required, String] :queue_url
|
1343
|
+
# The URL of the Amazon SQS queue to which a message is sent.
|
1344
|
+
#
|
1345
|
+
# Queue URLs are case-sensitive.
|
1346
|
+
#
|
1347
|
+
# @option params [required, String] :message_body
|
1348
|
+
# The message to send. The maximum string size is 256 KB.
|
1349
|
+
#
|
1350
|
+
# The following list shows the characters (in Unicode) that are allowed
|
1351
|
+
# in your message, according to the W3C XML specification:
|
1352
|
+
#
|
1353
|
+
# * `#x9`
|
1354
|
+
#
|
1355
|
+
# * `#xA`
|
1356
|
+
#
|
1357
|
+
# * `#xD`
|
1358
|
+
#
|
1359
|
+
# * `#x20` to `#xD7FF`
|
1360
|
+
#
|
1361
|
+
# * `#xE000` to `#xFFFD`
|
1362
|
+
#
|
1363
|
+
# * `#x10000` to `#x10FFFF`
|
1364
|
+
#
|
1365
|
+
# For more information, see [RFC1321][1]. If you send any characters
|
1366
|
+
# that aren't included in this list, your request is rejected.
|
1367
|
+
#
|
1368
|
+
#
|
1369
|
+
#
|
1370
|
+
# [1]: https://www.ietf.org/rfc/rfc1321.txt
|
1371
|
+
#
|
1372
|
+
# @option params [Integer] :delay_seconds
|
1373
|
+
# The number of seconds to delay a specific message. Valid values: 0 to
|
1374
|
+
# 900. Maximum: 15 minutes. Messages with a positive `DelaySeconds`
|
1375
|
+
# value become available for processing after the delay period is
|
1376
|
+
# finished. If you don't specify a value, the default value for the
|
1377
|
+
# queue applies.
|
1378
|
+
#
|
1379
|
+
# <note markdown="1"> When you set `FifoQueue`, you can't set `DelaySeconds` per message.
|
1380
|
+
# You can set this parameter only on a queue level.
|
1381
|
+
#
|
1382
|
+
# </note>
|
1383
|
+
#
|
1384
|
+
# @option params [Hash<String,Types::MessageAttributeValue>] :message_attributes
|
1385
|
+
# Each message attribute consists of a `Name`, `Type`, and `Value`. For
|
1386
|
+
# more information, see [Message Attribute Items and Validation][1] in
|
1387
|
+
# the *Amazon SQS Developer Guide*.
|
1388
|
+
#
|
1389
|
+
#
|
1390
|
+
#
|
1391
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation
|
1392
|
+
#
|
1393
|
+
# @option params [String] :message_deduplication_id
|
1394
|
+
# This parameter applies only to FIFO (first-in-first-out) queues.
|
1395
|
+
#
|
1396
|
+
# The token used for deduplication of sent messages. If a message with a
|
1397
|
+
# particular `MessageDeduplicationId` is sent successfully, any messages
|
1398
|
+
# sent with the same `MessageDeduplicationId` are accepted successfully
|
1399
|
+
# but aren't delivered during the 5-minute deduplication interval. For
|
1400
|
+
# more information, see [ Exactly-Once Processing][1] in the *Amazon SQS
|
1401
|
+
# Developer Guide*.
|
1402
|
+
#
|
1403
|
+
# * Every message must have a unique `MessageDeduplicationId`,
|
1404
|
+
#
|
1405
|
+
# * You may provide a `MessageDeduplicationId` explicitly.
|
1406
|
+
#
|
1407
|
+
# * If you aren't able to provide a `MessageDeduplicationId` and you
|
1408
|
+
# enable `ContentBasedDeduplication` for your queue, Amazon SQS uses
|
1409
|
+
# a SHA-256 hash to generate the `MessageDeduplicationId` using the
|
1410
|
+
# body of the message (but not the attributes of the message).
|
1411
|
+
#
|
1412
|
+
# * If you don't provide a `MessageDeduplicationId` and the queue
|
1413
|
+
# doesn't have `ContentBasedDeduplication` set, the action fails
|
1414
|
+
# with an error.
|
1415
|
+
#
|
1416
|
+
# * If the queue has `ContentBasedDeduplication` set, your
|
1417
|
+
# `MessageDeduplicationId` overrides the generated one.
|
1418
|
+
#
|
1419
|
+
# * When `ContentBasedDeduplication` is in effect, messages with
|
1420
|
+
# identical content sent within the deduplication interval are treated
|
1421
|
+
# as duplicates and only one copy of the message is delivered.
|
1422
|
+
#
|
1423
|
+
# * You can also use `ContentBasedDeduplication` for messages with
|
1424
|
+
# identical content to be treated as duplicates.
|
1425
|
+
#
|
1426
|
+
# * If you send one message with `ContentBasedDeduplication` enabled and
|
1427
|
+
# then another message with a `MessageDeduplicationId` that is the
|
1428
|
+
# same as the one generated for the first `MessageDeduplicationId`,
|
1429
|
+
# the two messages are treated as duplicates and only one copy of the
|
1430
|
+
# message is delivered.
|
1431
|
+
#
|
1432
|
+
# <note markdown="1"> The `MessageDeduplicationId` is available to the recipient of the
|
1433
|
+
# message (this can be useful for troubleshooting delivery issues).
|
1434
|
+
#
|
1435
|
+
# If a message is sent successfully but the acknowledgement is lost and
|
1436
|
+
# the message is resent with the same `MessageDeduplicationId` after the
|
1437
|
+
# deduplication interval, Amazon SQS can't detect duplicate messages.
|
1438
|
+
#
|
1439
|
+
# </note>
|
1440
|
+
#
|
1441
|
+
# The length of `MessageDeduplicationId` is 128 characters.
|
1442
|
+
# `MessageDeduplicationId` can contain alphanumeric characters (`a-z`,
|
1443
|
+
# `A-Z`, `0-9`) and punctuation (`` !"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~
|
1444
|
+
# ``).
|
1445
|
+
#
|
1446
|
+
# For best practices of using `MessageDeduplicationId`, see [Using the
|
1447
|
+
# MessageDeduplicationId Property][2] in the *Amazon Simple Queue
|
1448
|
+
# Service Developer Guide*.
|
1449
|
+
#
|
1450
|
+
#
|
1451
|
+
#
|
1452
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing
|
1453
|
+
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagededuplicationid-property
|
1454
|
+
#
|
1455
|
+
# @option params [String] :message_group_id
|
1456
|
+
# This parameter applies only to FIFO (first-in-first-out) queues.
|
1457
|
+
#
|
1458
|
+
# The tag that specifies that a message belongs to a specific message
|
1459
|
+
# group. Messages that belong to the same message group are processed in
|
1460
|
+
# a FIFO manner (however, messages in different message groups might be
|
1461
|
+
# processed out of order). To interleave multiple ordered streams within
|
1462
|
+
# a single queue, use `MessageGroupId` values (for example, session data
|
1463
|
+
# for multiple users). In this scenario, multiple readers can process
|
1464
|
+
# the queue, but the session data of each user is processed in a FIFO
|
1465
|
+
# fashion.
|
1466
|
+
#
|
1467
|
+
# * You must associate a non-empty `MessageGroupId` with a message. If
|
1468
|
+
# you don't provide a `MessageGroupId`, the action fails.
|
1469
|
+
#
|
1470
|
+
# * `ReceiveMessage` might return messages with multiple
|
1471
|
+
# `MessageGroupId` values. For each `MessageGroupId`, the messages are
|
1472
|
+
# sorted by time sent. The caller can't specify a `MessageGroupId`.
|
1473
|
+
#
|
1474
|
+
# The length of `MessageGroupId` is 128 characters. Valid values are
|
1475
|
+
# alphanumeric characters and punctuation ``
|
1476
|
+
# (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
|
1477
|
+
#
|
1478
|
+
# For best practices of using `MessageGroupId`, see [Using the
|
1479
|
+
# MessageGroupId Property][1] in the *Amazon Simple Queue Service
|
1480
|
+
# Developer Guide*.
|
1481
|
+
#
|
1482
|
+
#
|
1483
|
+
#
|
1484
|
+
# [1]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagegroupid-property
|
1485
|
+
#
|
1486
|
+
# @return [Types::SendMessageResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1487
|
+
#
|
1488
|
+
# * {Types::SendMessageResult#md5_of_message_body #md5_of_message_body} => String
|
1489
|
+
# * {Types::SendMessageResult#md5_of_message_attributes #md5_of_message_attributes} => String
|
1490
|
+
# * {Types::SendMessageResult#message_id #message_id} => String
|
1491
|
+
# * {Types::SendMessageResult#sequence_number #sequence_number} => String
|
1492
|
+
#
|
1493
|
+
# @example Request syntax with placeholder values
|
1494
|
+
#
|
1495
|
+
# resp = client.send_message({
|
1496
|
+
# queue_url: "String", # required
|
1497
|
+
# message_body: "String", # required
|
1498
|
+
# delay_seconds: 1,
|
1499
|
+
# message_attributes: {
|
1500
|
+
# "String" => {
|
1501
|
+
# string_value: "String",
|
1502
|
+
# binary_value: "data",
|
1503
|
+
# string_list_values: ["String"],
|
1504
|
+
# binary_list_values: ["data"],
|
1505
|
+
# data_type: "String", # required
|
1506
|
+
# },
|
1507
|
+
# },
|
1508
|
+
# message_deduplication_id: "String",
|
1509
|
+
# message_group_id: "String",
|
1510
|
+
# })
|
1511
|
+
#
|
1512
|
+
# @example Response structure
|
1513
|
+
#
|
1514
|
+
# resp.md5_of_message_body #=> String
|
1515
|
+
# resp.md5_of_message_attributes #=> String
|
1516
|
+
# resp.message_id #=> String
|
1517
|
+
# resp.sequence_number #=> String
|
1518
|
+
#
|
1519
|
+
# @overload send_message(params = {})
|
1520
|
+
# @param [Hash] params ({})
|
1521
|
+
def send_message(params = {}, options = {})
|
1522
|
+
req = build_request(:send_message, params)
|
1523
|
+
req.send_request(options)
|
1524
|
+
end
|
1446
1525
|
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
# [4]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
|
1553
|
-
# [5]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing
|
1554
|
-
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1555
|
-
#
|
1556
|
-
# @example Request syntax with placeholder values
|
1557
|
-
# resp = client.set_queue_attributes({
|
1558
|
-
# queue_url: "String", # required
|
1559
|
-
# attributes: { # required
|
1560
|
-
# "All" => "String",
|
1561
|
-
# },
|
1562
|
-
# })
|
1563
|
-
# @overload set_queue_attributes(params = {})
|
1564
|
-
# @param [Hash] params ({})
|
1565
|
-
def set_queue_attributes(params = {}, options = {})
|
1566
|
-
req = build_request(:set_queue_attributes, params)
|
1567
|
-
req.send_request(options)
|
1568
|
-
end
|
1526
|
+
# Delivers up to ten messages to the specified queue. This is a batch
|
1527
|
+
# version of ` SendMessage `. For a FIFO queue, multiple messages within
|
1528
|
+
# a single batch are enqueued in the order they are sent.
|
1529
|
+
#
|
1530
|
+
# The result of sending each message is reported individually in the
|
1531
|
+
# response. Because the batch request can result in a combination of
|
1532
|
+
# successful and unsuccessful actions, you should check for batch errors
|
1533
|
+
# even when the call returns an HTTP status code of `200`.
|
1534
|
+
#
|
1535
|
+
# The maximum allowed individual message size and the maximum total
|
1536
|
+
# payload size (the sum of the individual lengths of all of the batched
|
1537
|
+
# messages) are both 256 KB (262,144 bytes).
|
1538
|
+
#
|
1539
|
+
# The following list shows the characters (in Unicode) that are allowed
|
1540
|
+
# in your message, according to the W3C XML specification:
|
1541
|
+
#
|
1542
|
+
# * `#x9`
|
1543
|
+
#
|
1544
|
+
# * `#xA`
|
1545
|
+
#
|
1546
|
+
# * `#xD`
|
1547
|
+
#
|
1548
|
+
# * `#x20` to `#xD7FF`
|
1549
|
+
#
|
1550
|
+
# * `#xE000` to `#xFFFD`
|
1551
|
+
#
|
1552
|
+
# * `#x10000` to `#x10FFFF`
|
1553
|
+
#
|
1554
|
+
# For more information, see [RFC1321][1]. If you send any characters
|
1555
|
+
# that aren't included in this list, your request is rejected.
|
1556
|
+
#
|
1557
|
+
# If you don't specify the `DelaySeconds` parameter for an entry,
|
1558
|
+
# Amazon SQS uses the default value for the queue.
|
1559
|
+
#
|
1560
|
+
# <note markdown="1"> Some actions take lists of parameters. These lists are specified using
|
1561
|
+
# the `param.n` notation. Values of `n` are integers starting from 1.
|
1562
|
+
# For example, a parameter list with two elements looks like this:
|
1563
|
+
#
|
1564
|
+
# `&Attribute.1=this`
|
1565
|
+
#
|
1566
|
+
# `&Attribute.2=that`
|
1567
|
+
#
|
1568
|
+
# </note>
|
1569
|
+
#
|
1570
|
+
#
|
1571
|
+
#
|
1572
|
+
# [1]: https://www.ietf.org/rfc/rfc1321.txt
|
1573
|
+
#
|
1574
|
+
# @option params [required, String] :queue_url
|
1575
|
+
# The URL of the Amazon SQS queue to which batched messages are sent.
|
1576
|
+
#
|
1577
|
+
# Queue URLs are case-sensitive.
|
1578
|
+
#
|
1579
|
+
# @option params [required, Array<Types::SendMessageBatchRequestEntry>] :entries
|
1580
|
+
# A list of ` SendMessageBatchRequestEntry ` items.
|
1581
|
+
#
|
1582
|
+
# @return [Types::SendMessageBatchResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1583
|
+
#
|
1584
|
+
# * {Types::SendMessageBatchResult#successful #successful} => Array<Types::SendMessageBatchResultEntry>
|
1585
|
+
# * {Types::SendMessageBatchResult#failed #failed} => Array<Types::BatchResultErrorEntry>
|
1586
|
+
#
|
1587
|
+
# @example Request syntax with placeholder values
|
1588
|
+
#
|
1589
|
+
# resp = client.send_message_batch({
|
1590
|
+
# queue_url: "String", # required
|
1591
|
+
# entries: [ # required
|
1592
|
+
# {
|
1593
|
+
# id: "String", # required
|
1594
|
+
# message_body: "String", # required
|
1595
|
+
# delay_seconds: 1,
|
1596
|
+
# message_attributes: {
|
1597
|
+
# "String" => {
|
1598
|
+
# string_value: "String",
|
1599
|
+
# binary_value: "data",
|
1600
|
+
# string_list_values: ["String"],
|
1601
|
+
# binary_list_values: ["data"],
|
1602
|
+
# data_type: "String", # required
|
1603
|
+
# },
|
1604
|
+
# },
|
1605
|
+
# message_deduplication_id: "String",
|
1606
|
+
# message_group_id: "String",
|
1607
|
+
# },
|
1608
|
+
# ],
|
1609
|
+
# })
|
1610
|
+
#
|
1611
|
+
# @example Response structure
|
1612
|
+
#
|
1613
|
+
# resp.successful #=> Array
|
1614
|
+
# resp.successful[0].id #=> String
|
1615
|
+
# resp.successful[0].message_id #=> String
|
1616
|
+
# resp.successful[0].md5_of_message_body #=> String
|
1617
|
+
# resp.successful[0].md5_of_message_attributes #=> String
|
1618
|
+
# resp.successful[0].sequence_number #=> String
|
1619
|
+
# resp.failed #=> Array
|
1620
|
+
# resp.failed[0].id #=> String
|
1621
|
+
# resp.failed[0].sender_fault #=> Boolean
|
1622
|
+
# resp.failed[0].code #=> String
|
1623
|
+
# resp.failed[0].message #=> String
|
1624
|
+
#
|
1625
|
+
# @overload send_message_batch(params = {})
|
1626
|
+
# @param [Hash] params ({})
|
1627
|
+
def send_message_batch(params = {}, options = {})
|
1628
|
+
req = build_request(:send_message_batch, params)
|
1629
|
+
req.send_request(options)
|
1630
|
+
end
|
1569
1631
|
|
1570
|
-
|
1632
|
+
# Sets the value of one or more queue attributes. When you change a
|
1633
|
+
# queue's attributes, the change can take up to 60 seconds for most of
|
1634
|
+
# the attributes to propagate throughout the Amazon SQS system. Changes
|
1635
|
+
# made to the `MessageRetentionPeriod` attribute can take up to 15
|
1636
|
+
# minutes.
|
1637
|
+
#
|
1638
|
+
# <note markdown="1"> In the future, new attributes might be added. If you write code that
|
1639
|
+
# calls this action, we recommend that you structure your code so that
|
1640
|
+
# it can handle new attributes gracefully.
|
1641
|
+
#
|
1642
|
+
# </note>
|
1643
|
+
#
|
1644
|
+
# @option params [required, String] :queue_url
|
1645
|
+
# The URL of the Amazon SQS queue whose attributes are set.
|
1646
|
+
#
|
1647
|
+
# Queue URLs are case-sensitive.
|
1648
|
+
#
|
1649
|
+
# @option params [required, Hash<String,String>] :attributes
|
1650
|
+
# A map of attributes to set.
|
1651
|
+
#
|
1652
|
+
# The following lists the names, descriptions, and values of the special
|
1653
|
+
# request parameters that the `SetQueueAttributes` action uses:
|
1654
|
+
#
|
1655
|
+
# * `DelaySeconds` - The number of seconds for which the delivery of all
|
1656
|
+
# messages in the queue is delayed. Valid values: An integer from 0 to
|
1657
|
+
# 900 (15 minutes). The default is 0 (zero).
|
1658
|
+
#
|
1659
|
+
# * `MaximumMessageSize` - The limit of how many bytes a message can
|
1660
|
+
# contain before Amazon SQS rejects it. Valid values: An integer from
|
1661
|
+
# 1,024 bytes (1 KiB) up to 262,144 bytes (256 KiB). The default is
|
1662
|
+
# 262,144 (256 KiB).
|
1663
|
+
#
|
1664
|
+
# * `MessageRetentionPeriod` - The number of seconds for which Amazon
|
1665
|
+
# SQS retains a message. Valid values: An integer representing
|
1666
|
+
# seconds, from 60 (1 minute) to 1,209,600 (14 days). The default is
|
1667
|
+
# 345,600 (4 days).
|
1668
|
+
#
|
1669
|
+
# * `Policy` - The queue's policy. A valid AWS policy. For more
|
1670
|
+
# information about policy structure, see [Overview of AWS IAM
|
1671
|
+
# Policies][1] in the *Amazon IAM User Guide*.
|
1672
|
+
#
|
1673
|
+
# * `ReceiveMessageWaitTimeSeconds` - The number of seconds for which a
|
1674
|
+
# ` ReceiveMessage ` action waits for a message to arrive. Valid
|
1675
|
+
# values: an integer from 0 to 20 (seconds). The default is 0.
|
1676
|
+
#
|
1677
|
+
# * `RedrivePolicy` - The parameters for the dead letter queue
|
1678
|
+
# functionality of the source queue. For more information about the
|
1679
|
+
# redrive policy and dead letter queues, see [Using Amazon SQS Dead
|
1680
|
+
# Letter Queues][2] in the *Amazon SQS Developer Guide*.
|
1681
|
+
#
|
1682
|
+
# <note markdown="1"> The dead letter queue of a FIFO queue must also be a FIFO queue.
|
1683
|
+
# Similarly, the dead letter queue of a standard queue must also be a
|
1684
|
+
# standard queue.
|
1685
|
+
#
|
1686
|
+
# </note>
|
1687
|
+
#
|
1688
|
+
# * `VisibilityTimeout` - The visibility timeout for the queue. Valid
|
1689
|
+
# values: an integer from 0 to 43,200 (12 hours). The default is 30.
|
1690
|
+
# For more information about the visibility timeout, see [Visibility
|
1691
|
+
# Timeout][3] in the *Amazon SQS Developer Guide*.
|
1692
|
+
#
|
1693
|
+
# The following attribute applies only to [FIFO (first-in-first-out)
|
1694
|
+
# queues][4]\:
|
1695
|
+
#
|
1696
|
+
# * `ContentBasedDeduplication` - Enables content-based deduplication.
|
1697
|
+
# For more information, see [Exactly-Once Processing][5] in the
|
1698
|
+
# *Amazon SQS Developer Guide*.
|
1699
|
+
#
|
1700
|
+
# * Every message must have a unique `MessageDeduplicationId`,
|
1701
|
+
#
|
1702
|
+
# * You may provide a `MessageDeduplicationId` explicitly.
|
1703
|
+
#
|
1704
|
+
# * If you aren't able to provide a `MessageDeduplicationId` and
|
1705
|
+
# you enable `ContentBasedDeduplication` for your queue, Amazon
|
1706
|
+
# SQS uses a SHA-256 hash to generate the `MessageDeduplicationId`
|
1707
|
+
# using the body of the message (but not the attributes of the
|
1708
|
+
# message).
|
1709
|
+
#
|
1710
|
+
# * If you don't provide a `MessageDeduplicationId` and the queue
|
1711
|
+
# doesn't have `ContentBasedDeduplication` set, the action fails
|
1712
|
+
# with an error.
|
1713
|
+
#
|
1714
|
+
# * If the queue has `ContentBasedDeduplication` set, your
|
1715
|
+
# `MessageDeduplicationId` overrides the generated one.
|
1716
|
+
#
|
1717
|
+
# * When `ContentBasedDeduplication` is in effect, messages with
|
1718
|
+
# identical content sent within the deduplication interval are
|
1719
|
+
# treated as duplicates and only one copy of the message is
|
1720
|
+
# delivered.
|
1721
|
+
#
|
1722
|
+
# * You can also use `ContentBasedDeduplication` for messages with
|
1723
|
+
# identical content to be treated as duplicates.
|
1724
|
+
#
|
1725
|
+
# * If you send one message with `ContentBasedDeduplication` enabled
|
1726
|
+
# and then another message with a `MessageDeduplicationId` that is
|
1727
|
+
# the same as the one generated for the first
|
1728
|
+
# `MessageDeduplicationId`, the two messages are treated as
|
1729
|
+
# duplicates and only one copy of the message is delivered.
|
1730
|
+
#
|
1731
|
+
# Any other valid special request parameters (such as the following) are
|
1732
|
+
# ignored:
|
1733
|
+
#
|
1734
|
+
# * `ApproximateNumberOfMessages`
|
1735
|
+
#
|
1736
|
+
# * `ApproximateNumberOfMessagesDelayed`
|
1737
|
+
#
|
1738
|
+
# * `ApproximateNumberOfMessagesNotVisible`
|
1739
|
+
#
|
1740
|
+
# * `CreatedTimestamp`
|
1741
|
+
#
|
1742
|
+
# * `LastModifiedTimestamp`
|
1743
|
+
#
|
1744
|
+
# * `QueueArn`
|
1745
|
+
#
|
1746
|
+
#
|
1747
|
+
#
|
1748
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html
|
1749
|
+
# [2]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
|
1750
|
+
# [3]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
|
1751
|
+
# [4]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
|
1752
|
+
# [5]: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing
|
1753
|
+
#
|
1754
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1755
|
+
#
|
1756
|
+
# @example Request syntax with placeholder values
|
1757
|
+
#
|
1758
|
+
# resp = client.set_queue_attributes({
|
1759
|
+
# queue_url: "String", # required
|
1760
|
+
# attributes: { # required
|
1761
|
+
# "All" => "String",
|
1762
|
+
# },
|
1763
|
+
# })
|
1764
|
+
#
|
1765
|
+
# @overload set_queue_attributes(params = {})
|
1766
|
+
# @param [Hash] params ({})
|
1767
|
+
def set_queue_attributes(params = {}, options = {})
|
1768
|
+
req = build_request(:set_queue_attributes, params)
|
1769
|
+
req.send_request(options)
|
1770
|
+
end
|
1571
1771
|
|
1572
|
-
|
1573
|
-
# @api private
|
1574
|
-
def build_request(operation_name, params = {})
|
1575
|
-
handlers = @handlers.for(operation_name)
|
1576
|
-
context = Seahorse::Client::RequestContext.new(
|
1577
|
-
operation_name: operation_name,
|
1578
|
-
operation: config.api.operation(operation_name),
|
1579
|
-
client: self,
|
1580
|
-
params: params,
|
1581
|
-
config: config)
|
1582
|
-
context[:gem_name] = 'aws-sdk-sqs'
|
1583
|
-
context[:gem_version] = '1.0.0.rc2'
|
1584
|
-
Seahorse::Client::Request.new(handlers, context)
|
1585
|
-
end
|
1772
|
+
# @!endgroup
|
1586
1773
|
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1774
|
+
# @param params ({})
|
1775
|
+
# @api private
|
1776
|
+
def build_request(operation_name, params = {})
|
1777
|
+
handlers = @handlers.for(operation_name)
|
1778
|
+
context = Seahorse::Client::RequestContext.new(
|
1779
|
+
operation_name: operation_name,
|
1780
|
+
operation: config.api.operation(operation_name),
|
1781
|
+
client: self,
|
1782
|
+
params: params,
|
1783
|
+
config: config)
|
1784
|
+
context[:gem_name] = 'aws-sdk-sqs'
|
1785
|
+
context[:gem_version] = '1.0.0.rc2'
|
1786
|
+
Seahorse::Client::Request.new(handlers, context)
|
1787
|
+
end
|
1592
1788
|
|
1593
|
-
|
1789
|
+
# @api private
|
1790
|
+
# @deprecated
|
1791
|
+
def waiter_names
|
1792
|
+
[]
|
1793
|
+
end
|
1594
1794
|
|
1595
|
-
|
1596
|
-
attr_reader :identifier
|
1795
|
+
class << self
|
1597
1796
|
|
1598
|
-
|
1599
|
-
|
1600
|
-
Errors
|
1601
|
-
end
|
1797
|
+
# @api private
|
1798
|
+
attr_reader :identifier
|
1602
1799
|
|
1800
|
+
# @api private
|
1801
|
+
def errors_module
|
1802
|
+
Errors
|
1603
1803
|
end
|
1804
|
+
|
1604
1805
|
end
|
1605
1806
|
end
|
1606
1807
|
end
|