aws-sdk-sns 1.28.0 → 1.32.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-sns.rb +3 -2
- data/lib/aws-sdk-sns/client.rb +29 -48
- data/lib/aws-sdk-sns/message_verifier.rb +22 -5
- data/lib/aws-sdk-sns/resource.rb +1 -20
- data/lib/aws-sdk-sns/topic.rb +1 -15
- data/lib/aws-sdk-sns/types.rb +2 -37
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26b3c7ca043707d291ea47c619e2b0481b24282b95f57f031a7bca55d477fb6c
|
4
|
+
data.tar.gz: 0f12afc9f439d81955cbe98497e47e360e7fdd97cc2ff177122e9e4b1000e393
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10a4c7eabec788ff54f27ad3125798004d9ca937a80cba277215ff3901460f70fbb6faf1816bf211854073f5fd345097dd3928570418f88d7a809e088d2f8186
|
7
|
+
data.tar.gz: 1fe0e8dd6cc7609d6390de957406444b330b240e737da2a74a64d30cd494579235bd591ef4634ee41befdca623e349da6e765583e3c155dcb449c0e627eaa8bd
|
data/lib/aws-sdk-sns.rb
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
10
|
+
|
10
11
|
require 'aws-sdk-core'
|
11
12
|
require 'aws-sigv4'
|
12
13
|
|
@@ -48,9 +49,9 @@ require_relative 'aws-sdk-sns/customizations'
|
|
48
49
|
#
|
49
50
|
# See {Errors} for more information.
|
50
51
|
#
|
51
|
-
#
|
52
|
+
# @!group service
|
52
53
|
module Aws::SNS
|
53
54
|
|
54
|
-
GEM_VERSION = '1.
|
55
|
+
GEM_VERSION = '1.32.1'
|
55
56
|
|
56
57
|
end
|
data/lib/aws-sdk-sns/client.rb
CHANGED
@@ -85,13 +85,28 @@ module Aws::SNS
|
|
85
85
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
86
86
|
# credentials.
|
87
87
|
#
|
88
|
+
# * `Aws::SharedCredentials` - Used for loading static credentials from a
|
89
|
+
# shared file, such as `~/.aws/config`.
|
90
|
+
#
|
91
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
92
|
+
#
|
93
|
+
# * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
|
94
|
+
# assume a role after providing credentials via the web.
|
95
|
+
#
|
96
|
+
# * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
|
97
|
+
# access token generated from `aws login`.
|
98
|
+
#
|
99
|
+
# * `Aws::ProcessCredentials` - Used for loading credentials from a
|
100
|
+
# process that outputs to stdout.
|
101
|
+
#
|
88
102
|
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
89
103
|
# from an EC2 IMDS on an EC2 instance.
|
90
104
|
#
|
91
|
-
# * `Aws::
|
92
|
-
#
|
105
|
+
# * `Aws::ECSCredentials` - Used for loading credentials from
|
106
|
+
# instances running in ECS.
|
93
107
|
#
|
94
|
-
# * `Aws::
|
108
|
+
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
109
|
+
# from the Cognito Identity service.
|
95
110
|
#
|
96
111
|
# When `:credentials` are not configured directly, the following
|
97
112
|
# locations will be searched for credentials:
|
@@ -101,10 +116,10 @@ module Aws::SNS
|
|
101
116
|
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
102
117
|
# * `~/.aws/credentials`
|
103
118
|
# * `~/.aws/config`
|
104
|
-
# * EC2 IMDS instance profile - When used by default, the timeouts
|
105
|
-
# very aggressive. Construct and pass an instance of
|
106
|
-
# `Aws::InstanceProfileCredentails`
|
107
|
-
# timeouts.
|
119
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
120
|
+
# are very aggressive. Construct and pass an instance of
|
121
|
+
# `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
|
122
|
+
# enable retries and extended timeouts.
|
108
123
|
#
|
109
124
|
# @option options [required, String] :region
|
110
125
|
# The AWS region to connect to. The configured `:region` is
|
@@ -576,11 +591,10 @@ module Aws::SNS
|
|
576
591
|
end
|
577
592
|
|
578
593
|
# Creates a topic to which notifications can be published. Users can
|
579
|
-
# create at most 100,000
|
580
|
-
#
|
581
|
-
#
|
582
|
-
#
|
583
|
-
# topic.
|
594
|
+
# create at most 100,000 topics. For more information, see
|
595
|
+
# [https://aws.amazon.com/sns][1]. This action is idempotent, so if the
|
596
|
+
# requester already owns a topic with the specified name, that topic's
|
597
|
+
# ARN is returned without creating a new topic.
|
584
598
|
#
|
585
599
|
#
|
586
600
|
#
|
@@ -593,9 +607,6 @@ module Aws::SNS
|
|
593
607
|
# lowercase ASCII letters, numbers, underscores, and hyphens, and must
|
594
608
|
# be between 1 and 256 characters long.
|
595
609
|
#
|
596
|
-
# For a FIFO (first-in-first-out) topic, the name must end with the
|
597
|
-
# `.fifo` suffix.
|
598
|
-
#
|
599
610
|
# @option params [Hash<String,String>] :attributes
|
600
611
|
# A map of attributes with their corresponding values.
|
601
612
|
#
|
@@ -608,34 +619,18 @@ module Aws::SNS
|
|
608
619
|
# * `DisplayName` – The display name to use for a topic with SMS
|
609
620
|
# subscriptions.
|
610
621
|
#
|
611
|
-
# * `FifoTopic` – Set to true to create a FIFO topic.
|
612
|
-
#
|
613
622
|
# * `Policy` – The policy that defines who can access your topic. By
|
614
623
|
# default, only the topic owner can publish or subscribe to the topic.
|
615
624
|
#
|
616
625
|
# The following attribute applies only to [server-side-encryption][1]\:
|
617
626
|
#
|
618
|
-
# * `KmsMasterKeyId`
|
627
|
+
# * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
|
619
628
|
# (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
|
620
629
|
# Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
|
621
630
|
# Management Service API Reference*.
|
622
631
|
#
|
623
632
|
# ^
|
624
633
|
#
|
625
|
-
# The following attribute applies only to FIFO topics:
|
626
|
-
#
|
627
|
-
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
628
|
-
# Amazon SNS uses a SHA-256 hash to generate the
|
629
|
-
# `MessageDeduplicationId` using the body of the message (but not the
|
630
|
-
# attributes of the message).
|
631
|
-
#
|
632
|
-
# * When `ContentBasedDeduplication` is in effect, messages with
|
633
|
-
# identical content sent within the deduplication interval are treated
|
634
|
-
# as duplicates and only one copy of the message is delivered.
|
635
|
-
#
|
636
|
-
# * If the queue has `ContentBasedDeduplication` set, your
|
637
|
-
# `MessageDeduplicationId` overrides the generated one.
|
638
|
-
#
|
639
634
|
#
|
640
635
|
#
|
641
636
|
# [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
|
@@ -1781,27 +1776,13 @@ module Aws::SNS
|
|
1781
1776
|
#
|
1782
1777
|
# The following attribute applies only to [server-side-encryption][1]\:
|
1783
1778
|
#
|
1784
|
-
# * `KmsMasterKeyId`
|
1779
|
+
# * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
|
1785
1780
|
# (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
|
1786
1781
|
# Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
|
1787
1782
|
# Management Service API Reference*.
|
1788
1783
|
#
|
1789
1784
|
# ^
|
1790
1785
|
#
|
1791
|
-
# The following attribute applies only to FIFO topics:
|
1792
|
-
#
|
1793
|
-
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
1794
|
-
# Amazon SNS uses a SHA-256 hash to generate the
|
1795
|
-
# `MessageDeduplicationId` using the body of the message (but not the
|
1796
|
-
# attributes of the message).
|
1797
|
-
#
|
1798
|
-
# * When `ContentBasedDeduplication` is in effect, messages with
|
1799
|
-
# identical content sent within the deduplication interval are treated
|
1800
|
-
# as duplicates and only one copy of the message is delivered.
|
1801
|
-
#
|
1802
|
-
# * If the queue has `ContentBasedDeduplication` set, your
|
1803
|
-
# `MessageDeduplicationId` overrides the generated one.
|
1804
|
-
#
|
1805
1786
|
#
|
1806
1787
|
#
|
1807
1788
|
# [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
|
@@ -2090,7 +2071,7 @@ module Aws::SNS
|
|
2090
2071
|
params: params,
|
2091
2072
|
config: config)
|
2092
2073
|
context[:gem_name] = 'aws-sdk-sns'
|
2093
|
-
context[:gem_version] = '1.
|
2074
|
+
context[:gem_version] = '1.32.1'
|
2094
2075
|
Seahorse::Client::Request.new(handlers, context)
|
2095
2076
|
end
|
2096
2077
|
|
@@ -6,7 +6,6 @@ require 'base64'
|
|
6
6
|
|
7
7
|
module Aws
|
8
8
|
module SNS
|
9
|
-
|
10
9
|
# A utility class that can be used to verify the authenticity of messages
|
11
10
|
# sent by Amazon SNS.
|
12
11
|
#
|
@@ -33,16 +32,20 @@ module Aws
|
|
33
32
|
'Timestamp',
|
34
33
|
'Token',
|
35
34
|
'TopicArn',
|
36
|
-
'Type'
|
35
|
+
'Type'
|
37
36
|
].freeze
|
38
37
|
|
39
38
|
# @api private
|
40
39
|
AWS_HOSTNAMES = [
|
41
40
|
/^sns\.[a-zA-Z0-9\-]{3,}\.amazonaws\.com(\.cn)?$/
|
42
|
-
]
|
41
|
+
].freeze
|
43
42
|
|
44
|
-
|
43
|
+
# @param [Hash] http_options Supported options to be passed to Net::HTTP.
|
44
|
+
# @option http_options [String] :http_proxy A proxy to send
|
45
|
+
# requests through. Formatted like 'http://proxy.com:123'.
|
46
|
+
def initialize(http_options = {})
|
45
47
|
@cached_pems = {}
|
48
|
+
@http_proxy = http_options[:http_proxy]
|
46
49
|
end
|
47
50
|
|
48
51
|
# @param [String<JSON>] message_body
|
@@ -151,7 +154,11 @@ module Aws
|
|
151
154
|
end
|
152
155
|
|
153
156
|
def https_get(uri, failed_attempts = 0)
|
154
|
-
|
157
|
+
args = []
|
158
|
+
args << uri.host
|
159
|
+
args << uri.port
|
160
|
+
args += http_proxy_parts
|
161
|
+
http = Net::HTTP.new(*args.compact)
|
155
162
|
http.use_ssl = true
|
156
163
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
157
164
|
http.start
|
@@ -168,6 +175,16 @@ module Aws
|
|
168
175
|
raise VerificationError, error.message
|
169
176
|
end
|
170
177
|
|
178
|
+
def http_proxy_parts
|
179
|
+
# empty string if not configured, URI parts return nil
|
180
|
+
http_proxy = URI.parse(@http_proxy.to_s)
|
181
|
+
[
|
182
|
+
http_proxy.host,
|
183
|
+
http_proxy.port,
|
184
|
+
(http_proxy.user && CGI.unescape(http_proxy.user)),
|
185
|
+
(http_proxy.password && CGI.unescape(http_proxy.password))
|
186
|
+
]
|
187
|
+
end
|
171
188
|
end
|
172
189
|
end
|
173
190
|
end
|
data/lib/aws-sdk-sns/resource.rb
CHANGED
@@ -89,9 +89,6 @@ module Aws::SNS
|
|
89
89
|
# Constraints: Topic names must be made up of only uppercase and
|
90
90
|
# lowercase ASCII letters, numbers, underscores, and hyphens, and must
|
91
91
|
# be between 1 and 256 characters long.
|
92
|
-
#
|
93
|
-
# For a FIFO (first-in-first-out) topic, the name must end with the
|
94
|
-
# `.fifo` suffix.
|
95
92
|
# @option options [Hash<String,String>] :attributes
|
96
93
|
# A map of attributes with their corresponding values.
|
97
94
|
#
|
@@ -104,34 +101,18 @@ module Aws::SNS
|
|
104
101
|
# * `DisplayName` – The display name to use for a topic with SMS
|
105
102
|
# subscriptions.
|
106
103
|
#
|
107
|
-
# * `FifoTopic` – Set to true to create a FIFO topic.
|
108
|
-
#
|
109
104
|
# * `Policy` – The policy that defines who can access your topic. By
|
110
105
|
# default, only the topic owner can publish or subscribe to the topic.
|
111
106
|
#
|
112
107
|
# The following attribute applies only to [server-side-encryption][1]\:
|
113
108
|
#
|
114
|
-
# * `KmsMasterKeyId`
|
109
|
+
# * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
|
115
110
|
# (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
|
116
111
|
# Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
|
117
112
|
# Management Service API Reference*.
|
118
113
|
#
|
119
114
|
# ^
|
120
115
|
#
|
121
|
-
# The following attribute applies only to FIFO topics:
|
122
|
-
#
|
123
|
-
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
124
|
-
# Amazon SNS uses a SHA-256 hash to generate the
|
125
|
-
# `MessageDeduplicationId` using the body of the message (but not the
|
126
|
-
# attributes of the message).
|
127
|
-
#
|
128
|
-
# * When `ContentBasedDeduplication` is in effect, messages with
|
129
|
-
# identical content sent within the deduplication interval are treated
|
130
|
-
# as duplicates and only one copy of the message is delivered.
|
131
|
-
#
|
132
|
-
# * If the queue has `ContentBasedDeduplication` set, your
|
133
|
-
# `MessageDeduplicationId` overrides the generated one.
|
134
|
-
#
|
135
116
|
#
|
136
117
|
#
|
137
118
|
# [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
|
data/lib/aws-sdk-sns/topic.rb
CHANGED
@@ -332,27 +332,13 @@ module Aws::SNS
|
|
332
332
|
#
|
333
333
|
# The following attribute applies only to [server-side-encryption][1]\:
|
334
334
|
#
|
335
|
-
# * `KmsMasterKeyId`
|
335
|
+
# * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
|
336
336
|
# (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
|
337
337
|
# Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
|
338
338
|
# Management Service API Reference*.
|
339
339
|
#
|
340
340
|
# ^
|
341
341
|
#
|
342
|
-
# The following attribute applies only to FIFO topics:
|
343
|
-
#
|
344
|
-
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
345
|
-
# Amazon SNS uses a SHA-256 hash to generate the
|
346
|
-
# `MessageDeduplicationId` using the body of the message (but not the
|
347
|
-
# attributes of the message).
|
348
|
-
#
|
349
|
-
# * When `ContentBasedDeduplication` is in effect, messages with
|
350
|
-
# identical content sent within the deduplication interval are treated
|
351
|
-
# as duplicates and only one copy of the message is delivered.
|
352
|
-
#
|
353
|
-
# * If the queue has `ContentBasedDeduplication` set, your
|
354
|
-
# `MessageDeduplicationId` overrides the generated one.
|
355
|
-
#
|
356
342
|
#
|
357
343
|
#
|
358
344
|
# [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
|
data/lib/aws-sdk-sns/types.rb
CHANGED
@@ -319,9 +319,6 @@ module Aws::SNS
|
|
319
319
|
# Constraints: Topic names must be made up of only uppercase and
|
320
320
|
# lowercase ASCII letters, numbers, underscores, and hyphens, and must
|
321
321
|
# be between 1 and 256 characters long.
|
322
|
-
#
|
323
|
-
# For a FIFO (first-in-first-out) topic, the name must end with the
|
324
|
-
# `.fifo` suffix.
|
325
322
|
# @return [String]
|
326
323
|
#
|
327
324
|
# @!attribute [rw] attributes
|
@@ -336,8 +333,6 @@ module Aws::SNS
|
|
336
333
|
# * `DisplayName` – The display name to use for a topic with SMS
|
337
334
|
# subscriptions.
|
338
335
|
#
|
339
|
-
# * `FifoTopic` – Set to true to create a FIFO topic.
|
340
|
-
#
|
341
336
|
# * `Policy` – The policy that defines who can access your topic. By
|
342
337
|
# default, only the topic owner can publish or subscribe to the
|
343
338
|
# topic.
|
@@ -345,28 +340,13 @@ module Aws::SNS
|
|
345
340
|
# The following attribute applies only to
|
346
341
|
# [server-side-encryption][1]\:
|
347
342
|
#
|
348
|
-
# * `KmsMasterKeyId`
|
343
|
+
# * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
|
349
344
|
# (CMK) for Amazon SNS or a custom CMK. For more information, see
|
350
345
|
# [Key Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
|
351
346
|
# Management Service API Reference*.
|
352
347
|
#
|
353
348
|
# ^
|
354
349
|
#
|
355
|
-
# The following attribute applies only to FIFO topics:
|
356
|
-
#
|
357
|
-
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
358
|
-
# Amazon SNS uses a SHA-256 hash to generate the
|
359
|
-
# `MessageDeduplicationId` using the body of the message (but not
|
360
|
-
# the attributes of the message).
|
361
|
-
#
|
362
|
-
# * When `ContentBasedDeduplication` is in effect, messages with
|
363
|
-
# identical content sent within the deduplication interval are
|
364
|
-
# treated as duplicates and only one copy of the message is
|
365
|
-
# delivered.
|
366
|
-
#
|
367
|
-
# * If the queue has `ContentBasedDeduplication` set, your
|
368
|
-
# `MessageDeduplicationId` overrides the generated one.
|
369
|
-
#
|
370
350
|
#
|
371
351
|
#
|
372
352
|
# [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
|
@@ -1911,28 +1891,13 @@ module Aws::SNS
|
|
1911
1891
|
# The following attribute applies only to
|
1912
1892
|
# [server-side-encryption][1]\:
|
1913
1893
|
#
|
1914
|
-
# * `KmsMasterKeyId`
|
1894
|
+
# * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
|
1915
1895
|
# (CMK) for Amazon SNS or a custom CMK. For more information, see
|
1916
1896
|
# [Key Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
|
1917
1897
|
# Management Service API Reference*.
|
1918
1898
|
#
|
1919
1899
|
# ^
|
1920
1900
|
#
|
1921
|
-
# The following attribute applies only to FIFO topics:
|
1922
|
-
#
|
1923
|
-
# * `ContentBasedDeduplication` – Enables content-based deduplication.
|
1924
|
-
# Amazon SNS uses a SHA-256 hash to generate the
|
1925
|
-
# `MessageDeduplicationId` using the body of the message (but not
|
1926
|
-
# the attributes of the message).
|
1927
|
-
#
|
1928
|
-
# * When `ContentBasedDeduplication` is in effect, messages with
|
1929
|
-
# identical content sent within the deduplication interval are
|
1930
|
-
# treated as duplicates and only one copy of the message is
|
1931
|
-
# delivered.
|
1932
|
-
#
|
1933
|
-
# * If the queue has `ContentBasedDeduplication` set, your
|
1934
|
-
# `MessageDeduplicationId` overrides the generated one.
|
1935
|
-
#
|
1936
1901
|
#
|
1937
1902
|
#
|
1938
1903
|
# [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-sns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.32.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
22
|
+
version: 3.109.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
32
|
+
version: 3.109.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|