aws-sdk-sqs 1.51.1 → 1.58.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +42 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-sqs/client.rb +395 -152
- data/lib/aws-sdk-sqs/client_api.rb +76 -0
- data/lib/aws-sdk-sqs/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-sqs/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-sqs/endpoints.rb +338 -0
- data/lib/aws-sdk-sqs/errors.rb +11 -0
- data/lib/aws-sdk-sqs/message.rb +9 -3
- data/lib/aws-sdk-sqs/plugins/endpoints.rb +114 -0
- data/lib/aws-sdk-sqs/plugins/queue_urls.rb +4 -10
- data/lib/aws-sdk-sqs/queue.rb +98 -40
- data/lib/aws-sdk-sqs/queue_poller.rb +6 -0
- data/lib/aws-sdk-sqs/resource.rb +70 -30
- data/lib/aws-sdk-sqs/types.rb +349 -379
- data/lib/aws-sdk-sqs.rb +5 -1
- metadata +8 -4
@@ -25,6 +25,8 @@ module Aws::SQS
|
|
25
25
|
BinaryList = Shapes::ListShape.new(name: 'BinaryList', flattened: true)
|
26
26
|
Boolean = Shapes::BooleanShape.new(name: 'Boolean')
|
27
27
|
BoxedInteger = Shapes::IntegerShape.new(name: 'BoxedInteger')
|
28
|
+
CancelMessageMoveTaskRequest = Shapes::StructureShape.new(name: 'CancelMessageMoveTaskRequest')
|
29
|
+
CancelMessageMoveTaskResult = Shapes::StructureShape.new(name: 'CancelMessageMoveTaskResult')
|
28
30
|
ChangeMessageVisibilityBatchRequest = Shapes::StructureShape.new(name: 'ChangeMessageVisibilityBatchRequest')
|
29
31
|
ChangeMessageVisibilityBatchRequestEntry = Shapes::StructureShape.new(name: 'ChangeMessageVisibilityBatchRequestEntry')
|
30
32
|
ChangeMessageVisibilityBatchRequestEntryList = Shapes::ListShape.new(name: 'ChangeMessageVisibilityBatchRequestEntryList', flattened: true)
|
@@ -54,10 +56,15 @@ module Aws::SQS
|
|
54
56
|
InvalidMessageContents = Shapes::StructureShape.new(name: 'InvalidMessageContents')
|
55
57
|
ListDeadLetterSourceQueuesRequest = Shapes::StructureShape.new(name: 'ListDeadLetterSourceQueuesRequest')
|
56
58
|
ListDeadLetterSourceQueuesResult = Shapes::StructureShape.new(name: 'ListDeadLetterSourceQueuesResult')
|
59
|
+
ListMessageMoveTasksRequest = Shapes::StructureShape.new(name: 'ListMessageMoveTasksRequest')
|
60
|
+
ListMessageMoveTasksResult = Shapes::StructureShape.new(name: 'ListMessageMoveTasksResult')
|
61
|
+
ListMessageMoveTasksResultEntry = Shapes::StructureShape.new(name: 'ListMessageMoveTasksResultEntry')
|
62
|
+
ListMessageMoveTasksResultEntryList = Shapes::ListShape.new(name: 'ListMessageMoveTasksResultEntryList', flattened: true)
|
57
63
|
ListQueueTagsRequest = Shapes::StructureShape.new(name: 'ListQueueTagsRequest')
|
58
64
|
ListQueueTagsResult = Shapes::StructureShape.new(name: 'ListQueueTagsResult')
|
59
65
|
ListQueuesRequest = Shapes::StructureShape.new(name: 'ListQueuesRequest')
|
60
66
|
ListQueuesResult = Shapes::StructureShape.new(name: 'ListQueuesResult')
|
67
|
+
Long = Shapes::IntegerShape.new(name: 'Long')
|
61
68
|
Message = Shapes::StructureShape.new(name: 'Message')
|
62
69
|
MessageAttributeName = Shapes::StringShape.new(name: 'MessageAttributeName')
|
63
70
|
MessageAttributeNameList = Shapes::ListShape.new(name: 'MessageAttributeNameList', flattened: true)
|
@@ -83,6 +90,7 @@ module Aws::SQS
|
|
83
90
|
ReceiveMessageRequest = Shapes::StructureShape.new(name: 'ReceiveMessageRequest')
|
84
91
|
ReceiveMessageResult = Shapes::StructureShape.new(name: 'ReceiveMessageResult')
|
85
92
|
RemovePermissionRequest = Shapes::StructureShape.new(name: 'RemovePermissionRequest')
|
93
|
+
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
86
94
|
SendMessageBatchRequest = Shapes::StructureShape.new(name: 'SendMessageBatchRequest')
|
87
95
|
SendMessageBatchRequestEntry = Shapes::StructureShape.new(name: 'SendMessageBatchRequestEntry')
|
88
96
|
SendMessageBatchRequestEntryList = Shapes::ListShape.new(name: 'SendMessageBatchRequestEntryList', flattened: true)
|
@@ -92,6 +100,8 @@ module Aws::SQS
|
|
92
100
|
SendMessageRequest = Shapes::StructureShape.new(name: 'SendMessageRequest')
|
93
101
|
SendMessageResult = Shapes::StructureShape.new(name: 'SendMessageResult')
|
94
102
|
SetQueueAttributesRequest = Shapes::StructureShape.new(name: 'SetQueueAttributesRequest')
|
103
|
+
StartMessageMoveTaskRequest = Shapes::StructureShape.new(name: 'StartMessageMoveTaskRequest')
|
104
|
+
StartMessageMoveTaskResult = Shapes::StructureShape.new(name: 'StartMessageMoveTaskResult')
|
95
105
|
String = Shapes::StringShape.new(name: 'String')
|
96
106
|
StringList = Shapes::ListShape.new(name: 'StringList', flattened: true)
|
97
107
|
TagKey = Shapes::StringShape.new(name: 'TagKey')
|
@@ -130,6 +140,12 @@ module Aws::SQS
|
|
130
140
|
|
131
141
|
BinaryList.member = Shapes::ShapeRef.new(shape: Binary, location_name: "BinaryListValue")
|
132
142
|
|
143
|
+
CancelMessageMoveTaskRequest.add_member(:task_handle, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TaskHandle"))
|
144
|
+
CancelMessageMoveTaskRequest.struct_class = Types::CancelMessageMoveTaskRequest
|
145
|
+
|
146
|
+
CancelMessageMoveTaskResult.add_member(:approximate_number_of_messages_moved, Shapes::ShapeRef.new(shape: Long, location_name: "ApproximateNumberOfMessagesMoved"))
|
147
|
+
CancelMessageMoveTaskResult.struct_class = Types::CancelMessageMoveTaskResult
|
148
|
+
|
133
149
|
ChangeMessageVisibilityBatchRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
|
134
150
|
ChangeMessageVisibilityBatchRequest.add_member(:entries, Shapes::ShapeRef.new(shape: ChangeMessageVisibilityBatchRequestEntryList, required: true, location_name: "Entries"))
|
135
151
|
ChangeMessageVisibilityBatchRequest.struct_class = Types::ChangeMessageVisibilityBatchRequest
|
@@ -222,6 +238,26 @@ module Aws::SQS
|
|
222
238
|
ListDeadLetterSourceQueuesResult.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
|
223
239
|
ListDeadLetterSourceQueuesResult.struct_class = Types::ListDeadLetterSourceQueuesResult
|
224
240
|
|
241
|
+
ListMessageMoveTasksRequest.add_member(:source_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "SourceArn"))
|
242
|
+
ListMessageMoveTasksRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: Integer, location_name: "MaxResults"))
|
243
|
+
ListMessageMoveTasksRequest.struct_class = Types::ListMessageMoveTasksRequest
|
244
|
+
|
245
|
+
ListMessageMoveTasksResult.add_member(:results, Shapes::ShapeRef.new(shape: ListMessageMoveTasksResultEntryList, location_name: "Results"))
|
246
|
+
ListMessageMoveTasksResult.struct_class = Types::ListMessageMoveTasksResult
|
247
|
+
|
248
|
+
ListMessageMoveTasksResultEntry.add_member(:task_handle, Shapes::ShapeRef.new(shape: String, location_name: "TaskHandle"))
|
249
|
+
ListMessageMoveTasksResultEntry.add_member(:status, Shapes::ShapeRef.new(shape: String, location_name: "Status"))
|
250
|
+
ListMessageMoveTasksResultEntry.add_member(:source_arn, Shapes::ShapeRef.new(shape: String, location_name: "SourceArn"))
|
251
|
+
ListMessageMoveTasksResultEntry.add_member(:destination_arn, Shapes::ShapeRef.new(shape: String, location_name: "DestinationArn"))
|
252
|
+
ListMessageMoveTasksResultEntry.add_member(:max_number_of_messages_per_second, Shapes::ShapeRef.new(shape: Integer, location_name: "MaxNumberOfMessagesPerSecond"))
|
253
|
+
ListMessageMoveTasksResultEntry.add_member(:approximate_number_of_messages_moved, Shapes::ShapeRef.new(shape: Long, location_name: "ApproximateNumberOfMessagesMoved"))
|
254
|
+
ListMessageMoveTasksResultEntry.add_member(:approximate_number_of_messages_to_move, Shapes::ShapeRef.new(shape: Long, location_name: "ApproximateNumberOfMessagesToMove"))
|
255
|
+
ListMessageMoveTasksResultEntry.add_member(:failure_reason, Shapes::ShapeRef.new(shape: String, location_name: "FailureReason"))
|
256
|
+
ListMessageMoveTasksResultEntry.add_member(:started_timestamp, Shapes::ShapeRef.new(shape: Long, location_name: "StartedTimestamp"))
|
257
|
+
ListMessageMoveTasksResultEntry.struct_class = Types::ListMessageMoveTasksResultEntry
|
258
|
+
|
259
|
+
ListMessageMoveTasksResultEntryList.member = Shapes::ShapeRef.new(shape: ListMessageMoveTasksResultEntry, location_name: "ListMessageMoveTasksResultEntry")
|
260
|
+
|
225
261
|
ListQueueTagsRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
|
226
262
|
ListQueueTagsRequest.struct_class = Types::ListQueueTagsRequest
|
227
263
|
|
@@ -311,6 +347,8 @@ module Aws::SQS
|
|
311
347
|
RemovePermissionRequest.add_member(:label, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Label"))
|
312
348
|
RemovePermissionRequest.struct_class = Types::RemovePermissionRequest
|
313
349
|
|
350
|
+
ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
|
351
|
+
|
314
352
|
SendMessageBatchRequest.add_member(:queue_url, Shapes::ShapeRef.new(shape: String, required: true, location_name: "QueueUrl"))
|
315
353
|
SendMessageBatchRequest.add_member(:entries, Shapes::ShapeRef.new(shape: SendMessageBatchRequestEntryList, required: true, location_name: "Entries"))
|
316
354
|
SendMessageBatchRequest.struct_class = Types::SendMessageBatchRequest
|
@@ -360,6 +398,14 @@ module Aws::SQS
|
|
360
398
|
SetQueueAttributesRequest.add_member(:attributes, Shapes::ShapeRef.new(shape: QueueAttributeMap, required: true, location_name: "Attribute"))
|
361
399
|
SetQueueAttributesRequest.struct_class = Types::SetQueueAttributesRequest
|
362
400
|
|
401
|
+
StartMessageMoveTaskRequest.add_member(:source_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "SourceArn"))
|
402
|
+
StartMessageMoveTaskRequest.add_member(:destination_arn, Shapes::ShapeRef.new(shape: String, location_name: "DestinationArn"))
|
403
|
+
StartMessageMoveTaskRequest.add_member(:max_number_of_messages_per_second, Shapes::ShapeRef.new(shape: Integer, location_name: "MaxNumberOfMessagesPerSecond"))
|
404
|
+
StartMessageMoveTaskRequest.struct_class = Types::StartMessageMoveTaskRequest
|
405
|
+
|
406
|
+
StartMessageMoveTaskResult.add_member(:task_handle, Shapes::ShapeRef.new(shape: String, location_name: "TaskHandle"))
|
407
|
+
StartMessageMoveTaskResult.struct_class = Types::StartMessageMoveTaskResult
|
408
|
+
|
363
409
|
StringList.member = Shapes::ShapeRef.new(shape: String, location_name: "StringListValue")
|
364
410
|
|
365
411
|
TagKeyList.member = Shapes::ShapeRef.new(shape: TagKey, location_name: "TagKey")
|
@@ -407,6 +453,16 @@ module Aws::SQS
|
|
407
453
|
o.errors << Shapes::ShapeRef.new(shape: OverLimit)
|
408
454
|
end)
|
409
455
|
|
456
|
+
api.add_operation(:cancel_message_move_task, Seahorse::Model::Operation.new.tap do |o|
|
457
|
+
o.name = "CancelMessageMoveTask"
|
458
|
+
o.http_method = "POST"
|
459
|
+
o.http_request_uri = "/"
|
460
|
+
o.input = Shapes::ShapeRef.new(shape: CancelMessageMoveTaskRequest)
|
461
|
+
o.output = Shapes::ShapeRef.new(shape: CancelMessageMoveTaskResult)
|
462
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
463
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperation)
|
464
|
+
end)
|
465
|
+
|
410
466
|
api.add_operation(:change_message_visibility, Seahorse::Model::Operation.new.tap do |o|
|
411
467
|
o.name = "ChangeMessageVisibility"
|
412
468
|
o.http_method = "POST"
|
@@ -502,6 +558,16 @@ module Aws::SQS
|
|
502
558
|
)
|
503
559
|
end)
|
504
560
|
|
561
|
+
api.add_operation(:list_message_move_tasks, Seahorse::Model::Operation.new.tap do |o|
|
562
|
+
o.name = "ListMessageMoveTasks"
|
563
|
+
o.http_method = "POST"
|
564
|
+
o.http_request_uri = "/"
|
565
|
+
o.input = Shapes::ShapeRef.new(shape: ListMessageMoveTasksRequest)
|
566
|
+
o.output = Shapes::ShapeRef.new(shape: ListMessageMoveTasksResult)
|
567
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
568
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperation)
|
569
|
+
end)
|
570
|
+
|
505
571
|
api.add_operation(:list_queue_tags, Seahorse::Model::Operation.new.tap do |o|
|
506
572
|
o.name = "ListQueueTags"
|
507
573
|
o.http_method = "POST"
|
@@ -584,6 +650,16 @@ module Aws::SQS
|
|
584
650
|
o.errors << Shapes::ShapeRef.new(shape: InvalidAttributeName)
|
585
651
|
end)
|
586
652
|
|
653
|
+
api.add_operation(:start_message_move_task, Seahorse::Model::Operation.new.tap do |o|
|
654
|
+
o.name = "StartMessageMoveTask"
|
655
|
+
o.http_method = "POST"
|
656
|
+
o.http_request_uri = "/"
|
657
|
+
o.input = Shapes::ShapeRef.new(shape: StartMessageMoveTaskRequest)
|
658
|
+
o.output = Shapes::ShapeRef.new(shape: StartMessageMoveTaskResult)
|
659
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
660
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperation)
|
661
|
+
end)
|
662
|
+
|
587
663
|
api.add_operation(:tag_queue, Seahorse::Model::Operation.new.tap do |o|
|
588
664
|
o.name = "TagQueue"
|
589
665
|
o.http_method = "POST"
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SQS
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
54
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
55
|
+
if self[:use_dual_stack].nil?
|
56
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
57
|
+
end
|
58
|
+
self[:use_fips] = options[:use_fips]
|
59
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
60
|
+
if self[:use_fips].nil?
|
61
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
62
|
+
end
|
63
|
+
self[:endpoint] = options[:endpoint]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SQS
|
11
|
+
class EndpointProvider
|
12
|
+
def resolve_endpoint(parameters)
|
13
|
+
region = parameters.region
|
14
|
+
use_dual_stack = parameters.use_dual_stack
|
15
|
+
use_fips = parameters.use_fips
|
16
|
+
endpoint = parameters.endpoint
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
18
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
20
|
+
end
|
21
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
25
|
+
end
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
29
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
36
|
+
if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
|
37
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs.#{region}.amazonaws.com", headers: {}, properties: {})
|
38
|
+
end
|
39
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
40
|
+
end
|
41
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
42
|
+
end
|
43
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
44
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
45
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
46
|
+
end
|
47
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
48
|
+
end
|
49
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sqs.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
50
|
+
end
|
51
|
+
end
|
52
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
53
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,338 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::SQS
|
12
|
+
# @api private
|
13
|
+
module Endpoints
|
14
|
+
|
15
|
+
class AddPermission
|
16
|
+
def self.build(context)
|
17
|
+
unless context.config.regional_endpoint
|
18
|
+
endpoint = context.config.endpoint.to_s
|
19
|
+
end
|
20
|
+
Aws::SQS::EndpointParameters.new(
|
21
|
+
region: context.config.region,
|
22
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
23
|
+
use_fips: context.config.use_fips_endpoint,
|
24
|
+
endpoint: endpoint,
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class CancelMessageMoveTask
|
30
|
+
def self.build(context)
|
31
|
+
unless context.config.regional_endpoint
|
32
|
+
endpoint = context.config.endpoint.to_s
|
33
|
+
end
|
34
|
+
Aws::SQS::EndpointParameters.new(
|
35
|
+
region: context.config.region,
|
36
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
37
|
+
use_fips: context.config.use_fips_endpoint,
|
38
|
+
endpoint: endpoint,
|
39
|
+
)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
class ChangeMessageVisibility
|
44
|
+
def self.build(context)
|
45
|
+
unless context.config.regional_endpoint
|
46
|
+
endpoint = context.config.endpoint.to_s
|
47
|
+
end
|
48
|
+
Aws::SQS::EndpointParameters.new(
|
49
|
+
region: context.config.region,
|
50
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
51
|
+
use_fips: context.config.use_fips_endpoint,
|
52
|
+
endpoint: endpoint,
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class ChangeMessageVisibilityBatch
|
58
|
+
def self.build(context)
|
59
|
+
unless context.config.regional_endpoint
|
60
|
+
endpoint = context.config.endpoint.to_s
|
61
|
+
end
|
62
|
+
Aws::SQS::EndpointParameters.new(
|
63
|
+
region: context.config.region,
|
64
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
65
|
+
use_fips: context.config.use_fips_endpoint,
|
66
|
+
endpoint: endpoint,
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
class CreateQueue
|
72
|
+
def self.build(context)
|
73
|
+
unless context.config.regional_endpoint
|
74
|
+
endpoint = context.config.endpoint.to_s
|
75
|
+
end
|
76
|
+
Aws::SQS::EndpointParameters.new(
|
77
|
+
region: context.config.region,
|
78
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
79
|
+
use_fips: context.config.use_fips_endpoint,
|
80
|
+
endpoint: endpoint,
|
81
|
+
)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
class DeleteMessage
|
86
|
+
def self.build(context)
|
87
|
+
unless context.config.regional_endpoint
|
88
|
+
endpoint = context.config.endpoint.to_s
|
89
|
+
end
|
90
|
+
Aws::SQS::EndpointParameters.new(
|
91
|
+
region: context.config.region,
|
92
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
93
|
+
use_fips: context.config.use_fips_endpoint,
|
94
|
+
endpoint: endpoint,
|
95
|
+
)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
class DeleteMessageBatch
|
100
|
+
def self.build(context)
|
101
|
+
unless context.config.regional_endpoint
|
102
|
+
endpoint = context.config.endpoint.to_s
|
103
|
+
end
|
104
|
+
Aws::SQS::EndpointParameters.new(
|
105
|
+
region: context.config.region,
|
106
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
107
|
+
use_fips: context.config.use_fips_endpoint,
|
108
|
+
endpoint: endpoint,
|
109
|
+
)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
class DeleteQueue
|
114
|
+
def self.build(context)
|
115
|
+
unless context.config.regional_endpoint
|
116
|
+
endpoint = context.config.endpoint.to_s
|
117
|
+
end
|
118
|
+
Aws::SQS::EndpointParameters.new(
|
119
|
+
region: context.config.region,
|
120
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
121
|
+
use_fips: context.config.use_fips_endpoint,
|
122
|
+
endpoint: endpoint,
|
123
|
+
)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
class GetQueueAttributes
|
128
|
+
def self.build(context)
|
129
|
+
unless context.config.regional_endpoint
|
130
|
+
endpoint = context.config.endpoint.to_s
|
131
|
+
end
|
132
|
+
Aws::SQS::EndpointParameters.new(
|
133
|
+
region: context.config.region,
|
134
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
135
|
+
use_fips: context.config.use_fips_endpoint,
|
136
|
+
endpoint: endpoint,
|
137
|
+
)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
class GetQueueUrl
|
142
|
+
def self.build(context)
|
143
|
+
unless context.config.regional_endpoint
|
144
|
+
endpoint = context.config.endpoint.to_s
|
145
|
+
end
|
146
|
+
Aws::SQS::EndpointParameters.new(
|
147
|
+
region: context.config.region,
|
148
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
149
|
+
use_fips: context.config.use_fips_endpoint,
|
150
|
+
endpoint: endpoint,
|
151
|
+
)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
class ListDeadLetterSourceQueues
|
156
|
+
def self.build(context)
|
157
|
+
unless context.config.regional_endpoint
|
158
|
+
endpoint = context.config.endpoint.to_s
|
159
|
+
end
|
160
|
+
Aws::SQS::EndpointParameters.new(
|
161
|
+
region: context.config.region,
|
162
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
163
|
+
use_fips: context.config.use_fips_endpoint,
|
164
|
+
endpoint: endpoint,
|
165
|
+
)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
class ListMessageMoveTasks
|
170
|
+
def self.build(context)
|
171
|
+
unless context.config.regional_endpoint
|
172
|
+
endpoint = context.config.endpoint.to_s
|
173
|
+
end
|
174
|
+
Aws::SQS::EndpointParameters.new(
|
175
|
+
region: context.config.region,
|
176
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
177
|
+
use_fips: context.config.use_fips_endpoint,
|
178
|
+
endpoint: endpoint,
|
179
|
+
)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
class ListQueueTags
|
184
|
+
def self.build(context)
|
185
|
+
unless context.config.regional_endpoint
|
186
|
+
endpoint = context.config.endpoint.to_s
|
187
|
+
end
|
188
|
+
Aws::SQS::EndpointParameters.new(
|
189
|
+
region: context.config.region,
|
190
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
191
|
+
use_fips: context.config.use_fips_endpoint,
|
192
|
+
endpoint: endpoint,
|
193
|
+
)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
class ListQueues
|
198
|
+
def self.build(context)
|
199
|
+
unless context.config.regional_endpoint
|
200
|
+
endpoint = context.config.endpoint.to_s
|
201
|
+
end
|
202
|
+
Aws::SQS::EndpointParameters.new(
|
203
|
+
region: context.config.region,
|
204
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
205
|
+
use_fips: context.config.use_fips_endpoint,
|
206
|
+
endpoint: endpoint,
|
207
|
+
)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
class PurgeQueue
|
212
|
+
def self.build(context)
|
213
|
+
unless context.config.regional_endpoint
|
214
|
+
endpoint = context.config.endpoint.to_s
|
215
|
+
end
|
216
|
+
Aws::SQS::EndpointParameters.new(
|
217
|
+
region: context.config.region,
|
218
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
219
|
+
use_fips: context.config.use_fips_endpoint,
|
220
|
+
endpoint: endpoint,
|
221
|
+
)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
class ReceiveMessage
|
226
|
+
def self.build(context)
|
227
|
+
unless context.config.regional_endpoint
|
228
|
+
endpoint = context.config.endpoint.to_s
|
229
|
+
end
|
230
|
+
Aws::SQS::EndpointParameters.new(
|
231
|
+
region: context.config.region,
|
232
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
233
|
+
use_fips: context.config.use_fips_endpoint,
|
234
|
+
endpoint: endpoint,
|
235
|
+
)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
class RemovePermission
|
240
|
+
def self.build(context)
|
241
|
+
unless context.config.regional_endpoint
|
242
|
+
endpoint = context.config.endpoint.to_s
|
243
|
+
end
|
244
|
+
Aws::SQS::EndpointParameters.new(
|
245
|
+
region: context.config.region,
|
246
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
247
|
+
use_fips: context.config.use_fips_endpoint,
|
248
|
+
endpoint: endpoint,
|
249
|
+
)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
class SendMessage
|
254
|
+
def self.build(context)
|
255
|
+
unless context.config.regional_endpoint
|
256
|
+
endpoint = context.config.endpoint.to_s
|
257
|
+
end
|
258
|
+
Aws::SQS::EndpointParameters.new(
|
259
|
+
region: context.config.region,
|
260
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
261
|
+
use_fips: context.config.use_fips_endpoint,
|
262
|
+
endpoint: endpoint,
|
263
|
+
)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
class SendMessageBatch
|
268
|
+
def self.build(context)
|
269
|
+
unless context.config.regional_endpoint
|
270
|
+
endpoint = context.config.endpoint.to_s
|
271
|
+
end
|
272
|
+
Aws::SQS::EndpointParameters.new(
|
273
|
+
region: context.config.region,
|
274
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
275
|
+
use_fips: context.config.use_fips_endpoint,
|
276
|
+
endpoint: endpoint,
|
277
|
+
)
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
class SetQueueAttributes
|
282
|
+
def self.build(context)
|
283
|
+
unless context.config.regional_endpoint
|
284
|
+
endpoint = context.config.endpoint.to_s
|
285
|
+
end
|
286
|
+
Aws::SQS::EndpointParameters.new(
|
287
|
+
region: context.config.region,
|
288
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
289
|
+
use_fips: context.config.use_fips_endpoint,
|
290
|
+
endpoint: endpoint,
|
291
|
+
)
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
class StartMessageMoveTask
|
296
|
+
def self.build(context)
|
297
|
+
unless context.config.regional_endpoint
|
298
|
+
endpoint = context.config.endpoint.to_s
|
299
|
+
end
|
300
|
+
Aws::SQS::EndpointParameters.new(
|
301
|
+
region: context.config.region,
|
302
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
303
|
+
use_fips: context.config.use_fips_endpoint,
|
304
|
+
endpoint: endpoint,
|
305
|
+
)
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
class TagQueue
|
310
|
+
def self.build(context)
|
311
|
+
unless context.config.regional_endpoint
|
312
|
+
endpoint = context.config.endpoint.to_s
|
313
|
+
end
|
314
|
+
Aws::SQS::EndpointParameters.new(
|
315
|
+
region: context.config.region,
|
316
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
317
|
+
use_fips: context.config.use_fips_endpoint,
|
318
|
+
endpoint: endpoint,
|
319
|
+
)
|
320
|
+
end
|
321
|
+
end
|
322
|
+
|
323
|
+
class UntagQueue
|
324
|
+
def self.build(context)
|
325
|
+
unless context.config.regional_endpoint
|
326
|
+
endpoint = context.config.endpoint.to_s
|
327
|
+
end
|
328
|
+
Aws::SQS::EndpointParameters.new(
|
329
|
+
region: context.config.region,
|
330
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
331
|
+
use_fips: context.config.use_fips_endpoint,
|
332
|
+
endpoint: endpoint,
|
333
|
+
)
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
end
|
338
|
+
end
|
data/lib/aws-sdk-sqs/errors.rb
CHANGED
@@ -41,6 +41,7 @@ module Aws::SQS
|
|
41
41
|
# * {QueueDoesNotExist}
|
42
42
|
# * {QueueNameExists}
|
43
43
|
# * {ReceiptHandleIsInvalid}
|
44
|
+
# * {ResourceNotFoundException}
|
44
45
|
# * {TooManyEntriesInBatchRequest}
|
45
46
|
# * {UnsupportedOperation}
|
46
47
|
#
|
@@ -190,6 +191,16 @@ module Aws::SQS
|
|
190
191
|
end
|
191
192
|
end
|
192
193
|
|
194
|
+
class ResourceNotFoundException < ServiceError
|
195
|
+
|
196
|
+
# @param [Seahorse::Client::RequestContext] context
|
197
|
+
# @param [String] message
|
198
|
+
# @param [Aws::SQS::Types::ResourceNotFoundException] data
|
199
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
200
|
+
super(context, message, data)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
193
204
|
class TooManyEntriesInBatchRequest < ServiceError
|
194
205
|
|
195
206
|
# @param [Seahorse::Client::RequestContext] context
|
data/lib/aws-sdk-sqs/message.rb
CHANGED
@@ -163,7 +163,9 @@ module Aws::SQS
|
|
163
163
|
queue_url: @queue_url,
|
164
164
|
receipt_handle: @receipt_handle
|
165
165
|
)
|
166
|
-
resp =
|
166
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
167
|
+
@client.change_message_visibility(options)
|
168
|
+
end
|
167
169
|
resp.data
|
168
170
|
end
|
169
171
|
|
@@ -177,7 +179,9 @@ module Aws::SQS
|
|
177
179
|
queue_url: @queue_url,
|
178
180
|
receipt_handle: @receipt_handle
|
179
181
|
)
|
180
|
-
resp =
|
182
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
183
|
+
@client.delete_message(options)
|
184
|
+
end
|
181
185
|
resp.data
|
182
186
|
end
|
183
187
|
|
@@ -242,7 +246,9 @@ module Aws::SQS
|
|
242
246
|
receipt_handle: item.receipt_handle
|
243
247
|
}
|
244
248
|
end
|
245
|
-
|
249
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
250
|
+
batch[0].client.delete_message_batch(params)
|
251
|
+
end
|
246
252
|
end
|
247
253
|
nil
|
248
254
|
end
|