aws-sdk-sns 1.31.0 → 1.35.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4fe19340f06adcfa469913cdcc901ae51789ebd2d93b99691f92f844969e8903
4
- data.tar.gz: dfae04e4e071c19c3856d400cbea6163da349a036a6afc974dbc033b5e1830d6
3
+ metadata.gz: 700050d1caca2f17f9bc2c6bce7fcd843a421567ea0544f69ded4baadf4f8f62
4
+ data.tar.gz: c298ec3ac5cd53a80f243bf2230e38fc32d8a73d5791f78aa4c42759be1538e1
5
5
  SHA512:
6
- metadata.gz: 9973ad8e8b6d1e51b699eb2b027ada1d327d5e7ea48a4ad77cf94a5f41f760e588645a7e525b0f09285e2bb2a751884ad74a89aa49b4195955d349dc79d3cc32
7
- data.tar.gz: f0ce828e17054a55cabb53a8d7f7a67b0e32e54ae0c0566570f8e612ab3e173d474d93df893c06b41329bbd6503c75f2f3c978cc17ed3716324a409a2005f51f
6
+ metadata.gz: 8d157627d17d268d0f63252689a1daeff3f774dfe7f23f64f47f4c44ffc39299a6e64bd497ddad54eda66745b157bebd1c24cb6608cbcec6a89ef39e9d88276e
7
+ data.tar.gz: 432750570c818e08f6d70e02821880ca44b71830959ecd98d7868534ca26602b772b5cfd4852efd339ce9bdef146c026ed27793e3a2c08e0f8b8bdfb3a8287b2
@@ -52,6 +52,6 @@ require_relative 'aws-sdk-sns/customizations'
52
52
  # @!group service
53
53
  module Aws::SNS
54
54
 
55
- GEM_VERSION = '1.31.0'
55
+ GEM_VERSION = '1.35.0'
56
56
 
57
57
  end
@@ -591,10 +591,11 @@ module Aws::SNS
591
591
  end
592
592
 
593
593
  # Creates a topic to which notifications can be published. Users can
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.
594
+ # create at most 100,000 standard topics (at most 1,000 FIFO topics).
595
+ # For more information, see [https://aws.amazon.com/sns][1]. This action
596
+ # is idempotent, so if the requester already owns a topic with the
597
+ # specified name, that topic's ARN is returned without creating a new
598
+ # topic.
598
599
  #
599
600
  #
600
601
  #
@@ -607,6 +608,9 @@ module Aws::SNS
607
608
  # lowercase ASCII letters, numbers, underscores, and hyphens, and must
608
609
  # be between 1 and 256 characters long.
609
610
  #
611
+ # For a FIFO (first-in-first-out) topic, the name must end with the
612
+ # `.fifo` suffix.
613
+ #
610
614
  # @option params [Hash<String,String>] :attributes
611
615
  # A map of attributes with their corresponding values.
612
616
  #
@@ -619,23 +623,47 @@ module Aws::SNS
619
623
  # * `DisplayName` – The display name to use for a topic with SMS
620
624
  # subscriptions.
621
625
  #
626
+ # * `FifoTopic` – Set to true to create a FIFO topic.
627
+ #
622
628
  # * `Policy` – The policy that defines who can access your topic. By
623
629
  # default, only the topic owner can publish or subscribe to the topic.
624
630
  #
625
631
  # The following attribute applies only to [server-side-encryption][1]\:
626
632
  #
627
- # * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
633
+ # * `KmsMasterKeyId` The ID of an AWS-managed customer master key
628
634
  # (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
629
635
  # Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
630
636
  # Management Service API Reference*.
631
637
  #
632
638
  # ^
633
639
  #
640
+ # The following attributes apply only to [FIFO topics][4]\:
641
+ #
642
+ # * `FifoTopic` – When this is set to `true`, a FIFO topic is created.
643
+ #
644
+ # * `ContentBasedDeduplication` – Enables content-based deduplication
645
+ # for FIFO topics.
646
+ #
647
+ # * By default, `ContentBasedDeduplication` is set to `false`. If you
648
+ # create a FIFO topic and this attribute is `false`, you must
649
+ # specify a value for the `MessageDeduplicationId` parameter for the
650
+ # [Publish][5] action.
651
+ #
652
+ # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
653
+ # uses a SHA-256 hash to generate the `MessageDeduplicationId` using
654
+ # the body of the message (but not the attributes of the message).
655
+ #
656
+ # (Optional) To override the generated value, you can specify a
657
+ # value for the the `MessageDeduplicationId` parameter for the
658
+ # `Publish` action.
659
+ #
634
660
  #
635
661
  #
636
662
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
637
663
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
638
664
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
665
+ # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
666
+ # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
639
667
  #
640
668
  # @option params [Array<Types::Tag>] :tags
641
669
  # The list of tags to add to a new topic.
@@ -1403,9 +1431,37 @@ module Aws::SNS
1403
1431
  # @option params [Hash<String,Types::MessageAttributeValue>] :message_attributes
1404
1432
  # Message attributes for Publish action.
1405
1433
  #
1434
+ # @option params [String] :message_deduplication_id
1435
+ # This parameter applies only to FIFO (first-in-first-out) topics. The
1436
+ # `MessageDeduplicationId` can contain up to 128 alphanumeric characters
1437
+ # (a-z, A-Z, 0-9) and punctuation ``
1438
+ # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
1439
+ #
1440
+ # Every message must have a unique `MessageDeduplicationId`, which is a
1441
+ # token used for deduplication of sent messages. If a message with a
1442
+ # particular `MessageDeduplicationId` is sent successfully, any message
1443
+ # sent with the same `MessageDeduplicationId` during the 5-minute
1444
+ # deduplication interval is treated as a duplicate.
1445
+ #
1446
+ # If the topic has `ContentBasedDeduplication` set, the system generates
1447
+ # a `MessageDeduplicationId` based on the contents of the message. Your
1448
+ # `MessageDeduplicationId` overrides the generated one.
1449
+ #
1450
+ # @option params [String] :message_group_id
1451
+ # This parameter applies only to FIFO (first-in-first-out) topics. The
1452
+ # `MessageGroupId` can contain up to 128 alphanumeric characters (a-z,
1453
+ # A-Z, 0-9) and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
1454
+ #
1455
+ # The `MessageGroupId` is a tag that specifies that a message belongs to
1456
+ # a specific message group. Messages that belong to the same message
1457
+ # group are processed in a FIFO manner (however, messages in different
1458
+ # message groups might be processed out of order). Every message must
1459
+ # include a `MessageGroupId`.
1460
+ #
1406
1461
  # @return [Types::PublishResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1407
1462
  #
1408
1463
  # * {Types::PublishResponse#message_id #message_id} => String
1464
+ # * {Types::PublishResponse#sequence_number #sequence_number} => String
1409
1465
  #
1410
1466
  # @example Request syntax with placeholder values
1411
1467
  #
@@ -1423,11 +1479,14 @@ module Aws::SNS
1423
1479
  # binary_value: "data",
1424
1480
  # },
1425
1481
  # },
1482
+ # message_deduplication_id: "String",
1483
+ # message_group_id: "String",
1426
1484
  # })
1427
1485
  #
1428
1486
  # @example Response structure
1429
1487
  #
1430
1488
  # resp.message_id #=> String
1489
+ # resp.sequence_number #=> String
1431
1490
  #
1432
1491
  # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish AWS API Documentation
1433
1492
  #
@@ -1591,8 +1650,8 @@ module Aws::SNS
1591
1650
  #
1592
1651
  # You can override some of these settings for a single message when you
1593
1652
  # use the `Publish` action with the `MessageAttributes.entry.N`
1594
- # parameter. For more information, see [Sending an SMS Message][1] in
1595
- # the *Amazon SNS Developer Guide*.
1653
+ # parameter. For more information, see [Publishing to a mobile phone][1]
1654
+ # in the *Amazon SNS Developer Guide*.
1596
1655
  #
1597
1656
  #
1598
1657
  #
@@ -1776,18 +1835,38 @@ module Aws::SNS
1776
1835
  #
1777
1836
  # The following attribute applies only to [server-side-encryption][1]\:
1778
1837
  #
1779
- # * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
1838
+ # * `KmsMasterKeyId` The ID of an AWS-managed customer master key
1780
1839
  # (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
1781
1840
  # Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
1782
1841
  # Management Service API Reference*.
1783
1842
  #
1784
1843
  # ^
1785
1844
  #
1845
+ # The following attribute applies only to [FIFO topics][4]\:
1846
+ #
1847
+ # * `ContentBasedDeduplication` – Enables content-based deduplication
1848
+ # for FIFO topics.
1849
+ #
1850
+ # * By default, `ContentBasedDeduplication` is set to `false`. If you
1851
+ # create a FIFO topic and this attribute is `false`, you must
1852
+ # specify a value for the `MessageDeduplicationId` parameter for the
1853
+ # [Publish][5] action.
1854
+ #
1855
+ # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
1856
+ # uses a SHA-256 hash to generate the `MessageDeduplicationId` using
1857
+ # the body of the message (but not the attributes of the message).
1858
+ #
1859
+ # (Optional) To override the generated value, you can specify a
1860
+ # value for the the `MessageDeduplicationId` parameter for the
1861
+ # `Publish` action.
1862
+ #
1786
1863
  #
1787
1864
  #
1788
1865
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
1789
1866
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
1790
1867
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
1868
+ # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
1869
+ # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
1791
1870
  #
1792
1871
  # @option params [String] :attribute_value
1793
1872
  # The new value for the attribute.
@@ -1900,15 +1979,12 @@ module Aws::SNS
1900
1979
  # Sets whether the response from the `Subscribe` request includes the
1901
1980
  # subscription ARN, even if the subscription is not yet confirmed.
1902
1981
  #
1903
- # * If you set this parameter to `true`, the response includes the ARN
1904
- # in all cases, even if the subscription is not yet confirmed. In
1905
- # addition to the ARN for confirmed subscriptions, the response also
1906
- # includes the `pending subscription` ARN value for subscriptions that
1907
- # aren't yet confirmed. A subscription becomes confirmed when the
1908
- # subscriber calls the `ConfirmSubscription` action with a
1909
- # confirmation token.
1910
- #
1911
- # ^
1982
+ # If you set this parameter to `true`, the response includes the ARN in
1983
+ # all cases, even if the subscription is not yet confirmed. In addition
1984
+ # to the ARN for confirmed subscriptions, the response also includes the
1985
+ # `pending subscription` ARN value for subscriptions that aren't yet
1986
+ # confirmed. A subscription becomes confirmed when the subscriber calls
1987
+ # the `ConfirmSubscription` action with a confirmation token.
1912
1988
  #
1913
1989
  #
1914
1990
  #
@@ -2071,7 +2147,7 @@ module Aws::SNS
2071
2147
  params: params,
2072
2148
  config: config)
2073
2149
  context[:gem_name] = 'aws-sdk-sns'
2074
- context[:gem_version] = '1.31.0'
2150
+ context[:gem_version] = '1.35.0'
2075
2151
  Seahorse::Client::Request.new(handlers, context)
2076
2152
  end
2077
2153
 
@@ -364,9 +364,12 @@ module Aws::SNS
364
364
  PublishInput.add_member(:subject, Shapes::ShapeRef.new(shape: subject, location_name: "Subject"))
365
365
  PublishInput.add_member(:message_structure, Shapes::ShapeRef.new(shape: messageStructure, location_name: "MessageStructure"))
366
366
  PublishInput.add_member(:message_attributes, Shapes::ShapeRef.new(shape: MessageAttributeMap, location_name: "MessageAttributes"))
367
+ PublishInput.add_member(:message_deduplication_id, Shapes::ShapeRef.new(shape: String, location_name: "MessageDeduplicationId"))
368
+ PublishInput.add_member(:message_group_id, Shapes::ShapeRef.new(shape: String, location_name: "MessageGroupId"))
367
369
  PublishInput.struct_class = Types::PublishInput
368
370
 
369
371
  PublishResponse.add_member(:message_id, Shapes::ShapeRef.new(shape: messageId, location_name: "MessageId"))
372
+ PublishResponse.add_member(:sequence_number, Shapes::ShapeRef.new(shape: String, location_name: "SequenceNumber"))
370
373
  PublishResponse.struct_class = Types::PublishResponse
371
374
 
372
375
  RemovePermissionInput.add_member(:topic_arn, Shapes::ShapeRef.new(shape: topicARN, required: true, location_name: "TopicArn"))
@@ -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
- def initialize
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
- http = Net::HTTP.new(uri.host, uri.port)
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
@@ -121,6 +121,8 @@ module Aws::SNS
121
121
  # binary_value: "data",
122
122
  # },
123
123
  # },
124
+ # message_deduplication_id: "String",
125
+ # message_group_id: "String",
124
126
  # })
125
127
  # @param [Hash] options ({})
126
128
  # @option options [String] :topic_arn
@@ -215,6 +217,31 @@ module Aws::SNS
215
217
  # Valid value: `json`
216
218
  # @option options [Hash<String,Types::MessageAttributeValue>] :message_attributes
217
219
  # Message attributes for Publish action.
220
+ # @option options [String] :message_deduplication_id
221
+ # This parameter applies only to FIFO (first-in-first-out) topics. The
222
+ # `MessageDeduplicationId` can contain up to 128 alphanumeric characters
223
+ # (a-z, A-Z, 0-9) and punctuation ``
224
+ # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
225
+ #
226
+ # Every message must have a unique `MessageDeduplicationId`, which is a
227
+ # token used for deduplication of sent messages. If a message with a
228
+ # particular `MessageDeduplicationId` is sent successfully, any message
229
+ # sent with the same `MessageDeduplicationId` during the 5-minute
230
+ # deduplication interval is treated as a duplicate.
231
+ #
232
+ # If the topic has `ContentBasedDeduplication` set, the system generates
233
+ # a `MessageDeduplicationId` based on the contents of the message. Your
234
+ # `MessageDeduplicationId` overrides the generated one.
235
+ # @option options [String] :message_group_id
236
+ # This parameter applies only to FIFO (first-in-first-out) topics. The
237
+ # `MessageGroupId` can contain up to 128 alphanumeric characters (a-z,
238
+ # A-Z, 0-9) and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
239
+ #
240
+ # The `MessageGroupId` is a tag that specifies that a message belongs to
241
+ # a specific message group. Messages that belong to the same message
242
+ # group are processed in a FIFO manner (however, messages in different
243
+ # message groups might be processed out of order). Every message must
244
+ # include a `MessageGroupId`.
218
245
  # @return [Types::PublishResponse]
219
246
  def publish(options = {})
220
247
  options = options.merge(target_arn: @arn)
@@ -89,6 +89,9 @@ 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.
92
95
  # @option options [Hash<String,String>] :attributes
93
96
  # A map of attributes with their corresponding values.
94
97
  #
@@ -101,23 +104,47 @@ module Aws::SNS
101
104
  # * `DisplayName` – The display name to use for a topic with SMS
102
105
  # subscriptions.
103
106
  #
107
+ # * `FifoTopic` – Set to true to create a FIFO topic.
108
+ #
104
109
  # * `Policy` – The policy that defines who can access your topic. By
105
110
  # default, only the topic owner can publish or subscribe to the topic.
106
111
  #
107
112
  # The following attribute applies only to [server-side-encryption][1]\:
108
113
  #
109
- # * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
114
+ # * `KmsMasterKeyId` The ID of an AWS-managed customer master key
110
115
  # (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
111
116
  # Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
112
117
  # Management Service API Reference*.
113
118
  #
114
119
  # ^
115
120
  #
121
+ # The following attributes apply only to [FIFO topics][4]\:
122
+ #
123
+ # * `FifoTopic` – When this is set to `true`, a FIFO topic is created.
124
+ #
125
+ # * `ContentBasedDeduplication` – Enables content-based deduplication
126
+ # for FIFO topics.
127
+ #
128
+ # * By default, `ContentBasedDeduplication` is set to `false`. If you
129
+ # create a FIFO topic and this attribute is `false`, you must
130
+ # specify a value for the `MessageDeduplicationId` parameter for the
131
+ # [Publish][5] action.
132
+ #
133
+ # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
134
+ # uses a SHA-256 hash to generate the `MessageDeduplicationId` using
135
+ # the body of the message (but not the attributes of the message).
136
+ #
137
+ # (Optional) To override the generated value, you can specify a
138
+ # value for the the `MessageDeduplicationId` parameter for the
139
+ # `Publish` action.
140
+ #
116
141
  #
117
142
  #
118
143
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
119
144
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
120
145
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
146
+ # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
147
+ # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
121
148
  # @option options [Array<Types::Tag>] :tags
122
149
  # The list of tags to add to a new topic.
123
150
  #
@@ -71,11 +71,33 @@ module Aws::SNS
71
71
  #
72
72
  # ^
73
73
  #
74
+ # The following attributes apply only to [FIFO topics][4]\:
75
+ #
76
+ # * `FifoTopic` – When this is set to `true`, a FIFO topic is created.
77
+ #
78
+ # * `ContentBasedDeduplication` – Enables content-based deduplication
79
+ # for FIFO topics.
80
+ #
81
+ # * By default, `ContentBasedDeduplication` is set to `false`. If you
82
+ # create a FIFO topic and this attribute is `false`, you must
83
+ # specify a value for the `MessageDeduplicationId` parameter for the
84
+ # [Publish][5] action.
85
+ #
86
+ # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
87
+ # uses a SHA-256 hash to generate the `MessageDeduplicationId` using
88
+ # the body of the message (but not the attributes of the message).
89
+ #
90
+ # (Optional) To override the generated value, you can specify a
91
+ # value for the the `MessageDeduplicationId` parameter for the
92
+ # `Publish` action.
93
+ #
74
94
  #
75
95
  #
76
96
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
77
97
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
78
98
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
99
+ # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
100
+ # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
79
101
  # @return [Hash<String,String>]
80
102
  def attributes
81
103
  data[:attributes]
@@ -194,6 +216,8 @@ module Aws::SNS
194
216
  # binary_value: "data",
195
217
  # },
196
218
  # },
219
+ # message_deduplication_id: "String",
220
+ # message_group_id: "String",
197
221
  # })
198
222
  # @param [Hash] options ({})
199
223
  # @option options [String] :target_arn
@@ -286,6 +310,31 @@ module Aws::SNS
286
310
  # Valid value: `json`
287
311
  # @option options [Hash<String,Types::MessageAttributeValue>] :message_attributes
288
312
  # Message attributes for Publish action.
313
+ # @option options [String] :message_deduplication_id
314
+ # This parameter applies only to FIFO (first-in-first-out) topics. The
315
+ # `MessageDeduplicationId` can contain up to 128 alphanumeric characters
316
+ # (a-z, A-Z, 0-9) and punctuation ``
317
+ # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
318
+ #
319
+ # Every message must have a unique `MessageDeduplicationId`, which is a
320
+ # token used for deduplication of sent messages. If a message with a
321
+ # particular `MessageDeduplicationId` is sent successfully, any message
322
+ # sent with the same `MessageDeduplicationId` during the 5-minute
323
+ # deduplication interval is treated as a duplicate.
324
+ #
325
+ # If the topic has `ContentBasedDeduplication` set, the system generates
326
+ # a `MessageDeduplicationId` based on the contents of the message. Your
327
+ # `MessageDeduplicationId` overrides the generated one.
328
+ # @option options [String] :message_group_id
329
+ # This parameter applies only to FIFO (first-in-first-out) topics. The
330
+ # `MessageGroupId` can contain up to 128 alphanumeric characters (a-z,
331
+ # A-Z, 0-9) and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
332
+ #
333
+ # The `MessageGroupId` is a tag that specifies that a message belongs to
334
+ # a specific message group. Messages that belong to the same message
335
+ # group are processed in a FIFO manner (however, messages in different
336
+ # message groups might be processed out of order). Every message must
337
+ # include a `MessageGroupId`.
289
338
  # @return [Types::PublishResponse]
290
339
  def publish(options = {})
291
340
  options = options.merge(topic_arn: @arn)
@@ -332,18 +381,38 @@ module Aws::SNS
332
381
  #
333
382
  # The following attribute applies only to [server-side-encryption][1]\:
334
383
  #
335
- # * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
384
+ # * `KmsMasterKeyId` The ID of an AWS-managed customer master key
336
385
  # (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
337
386
  # Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
338
387
  # Management Service API Reference*.
339
388
  #
340
389
  # ^
341
390
  #
391
+ # The following attribute applies only to [FIFO topics][4]\:
392
+ #
393
+ # * `ContentBasedDeduplication` – Enables content-based deduplication
394
+ # for FIFO topics.
395
+ #
396
+ # * By default, `ContentBasedDeduplication` is set to `false`. If you
397
+ # create a FIFO topic and this attribute is `false`, you must
398
+ # specify a value for the `MessageDeduplicationId` parameter for the
399
+ # [Publish][5] action.
400
+ #
401
+ # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
402
+ # uses a SHA-256 hash to generate the `MessageDeduplicationId` using
403
+ # the body of the message (but not the attributes of the message).
404
+ #
405
+ # (Optional) To override the generated value, you can specify a
406
+ # value for the the `MessageDeduplicationId` parameter for the
407
+ # `Publish` action.
408
+ #
342
409
  #
343
410
  #
344
411
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
345
412
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
346
413
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
414
+ # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
415
+ # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
347
416
  # @option options [String] :attribute_value
348
417
  # The new value for the attribute.
349
418
  # @return [EmptyStructure]
@@ -437,15 +506,12 @@ module Aws::SNS
437
506
  # Sets whether the response from the `Subscribe` request includes the
438
507
  # subscription ARN, even if the subscription is not yet confirmed.
439
508
  #
440
- # * If you set this parameter to `true`, the response includes the ARN
441
- # in all cases, even if the subscription is not yet confirmed. In
442
- # addition to the ARN for confirmed subscriptions, the response also
443
- # includes the `pending subscription` ARN value for subscriptions that
444
- # aren't yet confirmed. A subscription becomes confirmed when the
445
- # subscriber calls the `ConfirmSubscription` action with a
446
- # confirmation token.
447
- #
448
- # ^
509
+ # If you set this parameter to `true`, the response includes the ARN in
510
+ # all cases, even if the subscription is not yet confirmed. In addition
511
+ # to the ARN for confirmed subscriptions, the response also includes the
512
+ # `pending subscription` ARN value for subscriptions that aren't yet
513
+ # confirmed. A subscription becomes confirmed when the subscriber calls
514
+ # the `ConfirmSubscription` action with a confirmation token.
449
515
  #
450
516
  #
451
517
  #
@@ -319,6 +319,9 @@ 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.
322
325
  # @return [String]
323
326
  #
324
327
  # @!attribute [rw] attributes
@@ -333,6 +336,8 @@ module Aws::SNS
333
336
  # * `DisplayName` – The display name to use for a topic with SMS
334
337
  # subscriptions.
335
338
  #
339
+ # * `FifoTopic` – Set to true to create a FIFO topic.
340
+ #
336
341
  # * `Policy` – The policy that defines who can access your topic. By
337
342
  # default, only the topic owner can publish or subscribe to the
338
343
  # topic.
@@ -340,18 +345,41 @@ module Aws::SNS
340
345
  # The following attribute applies only to
341
346
  # [server-side-encryption][1]\:
342
347
  #
343
- # * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
348
+ # * `KmsMasterKeyId` The ID of an AWS-managed customer master key
344
349
  # (CMK) for Amazon SNS or a custom CMK. For more information, see
345
350
  # [Key Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
346
351
  # Management Service API Reference*.
347
352
  #
348
353
  # ^
349
354
  #
355
+ # The following attributes apply only to [FIFO topics][4]\:
356
+ #
357
+ # * `FifoTopic` – When this is set to `true`, a FIFO topic is created.
358
+ #
359
+ # * `ContentBasedDeduplication` – Enables content-based deduplication
360
+ # for FIFO topics.
361
+ #
362
+ # * By default, `ContentBasedDeduplication` is set to `false`. If
363
+ # you create a FIFO topic and this attribute is `false`, you must
364
+ # specify a value for the `MessageDeduplicationId` parameter for
365
+ # the [Publish][5] action.
366
+ #
367
+ # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
368
+ # uses a SHA-256 hash to generate the `MessageDeduplicationId`
369
+ # using the body of the message (but not the attributes of the
370
+ # message).
371
+ #
372
+ # (Optional) To override the generated value, you can specify a
373
+ # value for the the `MessageDeduplicationId` parameter for the
374
+ # `Publish` action.
375
+ #
350
376
  #
351
377
  #
352
378
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
353
379
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
354
380
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
381
+ # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
382
+ # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
355
383
  # @return [Hash<String,String>]
356
384
  #
357
385
  # @!attribute [rw] tags
@@ -781,11 +809,34 @@ module Aws::SNS
781
809
  #
782
810
  # ^
783
811
  #
812
+ # The following attributes apply only to [FIFO topics][4]\:
813
+ #
814
+ # * `FifoTopic` – When this is set to `true`, a FIFO topic is created.
815
+ #
816
+ # * `ContentBasedDeduplication` – Enables content-based deduplication
817
+ # for FIFO topics.
818
+ #
819
+ # * By default, `ContentBasedDeduplication` is set to `false`. If
820
+ # you create a FIFO topic and this attribute is `false`, you must
821
+ # specify a value for the `MessageDeduplicationId` parameter for
822
+ # the [Publish][5] action.
823
+ #
824
+ # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
825
+ # uses a SHA-256 hash to generate the `MessageDeduplicationId`
826
+ # using the body of the message (but not the attributes of the
827
+ # message).
828
+ #
829
+ # (Optional) To override the generated value, you can specify a
830
+ # value for the the `MessageDeduplicationId` parameter for the
831
+ # `Publish` action.
832
+ #
784
833
  #
785
834
  #
786
835
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
787
836
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
788
837
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
838
+ # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
839
+ # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
789
840
  # @return [Hash<String,String>]
790
841
  #
791
842
  # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetTopicAttributesResponse AWS API Documentation
@@ -1255,12 +1306,14 @@ module Aws::SNS
1255
1306
  # message body should not be empty or null. All parts of the message
1256
1307
  # attribute, including name, type, and value, are included in the
1257
1308
  # message size restriction, which is currently 256 KB (262,144 bytes).
1258
- # For more information, see [Using Amazon SNS Message Attributes][2].
1309
+ # For more information, see [Amazon SNS message attributes][2] and
1310
+ # [Publishing to a mobile phone][3] in the *Amazon SNS Developer Guide.*
1259
1311
  #
1260
1312
  #
1261
1313
  #
1262
1314
  # [1]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
1263
1315
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html
1316
+ # [3]: https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html
1264
1317
  #
1265
1318
  # @note When making an API call, you may pass MessageAttributeValue
1266
1319
  # data as a hash:
@@ -1397,6 +1450,8 @@ module Aws::SNS
1397
1450
  # binary_value: "data",
1398
1451
  # },
1399
1452
  # },
1453
+ # message_deduplication_id: "String",
1454
+ # message_group_id: "String",
1400
1455
  # }
1401
1456
  #
1402
1457
  # @!attribute [rw] topic_arn
@@ -1511,6 +1566,36 @@ module Aws::SNS
1511
1566
  # Message attributes for Publish action.
1512
1567
  # @return [Hash<String,Types::MessageAttributeValue>]
1513
1568
  #
1569
+ # @!attribute [rw] message_deduplication_id
1570
+ # This parameter applies only to FIFO (first-in-first-out) topics. The
1571
+ # `MessageDeduplicationId` can contain up to 128 alphanumeric
1572
+ # characters (a-z, A-Z, 0-9) and punctuation ``
1573
+ # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
1574
+ #
1575
+ # Every message must have a unique `MessageDeduplicationId`, which is
1576
+ # a token used for deduplication of sent messages. If a message with a
1577
+ # particular `MessageDeduplicationId` is sent successfully, any
1578
+ # message sent with the same `MessageDeduplicationId` during the
1579
+ # 5-minute deduplication interval is treated as a duplicate.
1580
+ #
1581
+ # If the topic has `ContentBasedDeduplication` set, the system
1582
+ # generates a `MessageDeduplicationId` based on the contents of the
1583
+ # message. Your `MessageDeduplicationId` overrides the generated one.
1584
+ # @return [String]
1585
+ #
1586
+ # @!attribute [rw] message_group_id
1587
+ # This parameter applies only to FIFO (first-in-first-out) topics. The
1588
+ # `MessageGroupId` can contain up to 128 alphanumeric characters (a-z,
1589
+ # A-Z, 0-9) and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~)
1590
+ # ``.
1591
+ #
1592
+ # The `MessageGroupId` is a tag that specifies that a message belongs
1593
+ # to a specific message group. Messages that belong to the same
1594
+ # message group are processed in a FIFO manner (however, messages in
1595
+ # different message groups might be processed out of order). Every
1596
+ # message must include a `MessageGroupId`.
1597
+ # @return [String]
1598
+ #
1514
1599
  # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/PublishInput AWS API Documentation
1515
1600
  #
1516
1601
  class PublishInput < Struct.new(
@@ -1520,7 +1605,9 @@ module Aws::SNS
1520
1605
  :message,
1521
1606
  :subject,
1522
1607
  :message_structure,
1523
- :message_attributes)
1608
+ :message_attributes,
1609
+ :message_deduplication_id,
1610
+ :message_group_id)
1524
1611
  SENSITIVE = []
1525
1612
  include Aws::Structure
1526
1613
  end
@@ -1533,10 +1620,21 @@ module Aws::SNS
1533
1620
  # Length Constraint: Maximum 100 characters
1534
1621
  # @return [String]
1535
1622
  #
1623
+ # @!attribute [rw] sequence_number
1624
+ # This response element applies only to FIFO (first-in-first-out)
1625
+ # topics.
1626
+ #
1627
+ # The sequence number is a large, non-consecutive number that Amazon
1628
+ # SNS assigns to each message. The length of `SequenceNumber` is 128
1629
+ # bits. `SequenceNumber` continues to increase for each
1630
+ # `MessageGroupId`.
1631
+ # @return [String]
1632
+ #
1536
1633
  # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/PublishResponse AWS API Documentation
1537
1634
  #
1538
1635
  class PublishResponse < Struct.new(
1539
- :message_id)
1636
+ :message_id,
1637
+ :sequence_number)
1540
1638
  SENSITIVE = []
1541
1639
  include Aws::Structure
1542
1640
  end
@@ -1891,18 +1989,39 @@ module Aws::SNS
1891
1989
  # The following attribute applies only to
1892
1990
  # [server-side-encryption][1]\:
1893
1991
  #
1894
- # * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
1992
+ # * `KmsMasterKeyId` The ID of an AWS-managed customer master key
1895
1993
  # (CMK) for Amazon SNS or a custom CMK. For more information, see
1896
1994
  # [Key Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
1897
1995
  # Management Service API Reference*.
1898
1996
  #
1899
1997
  # ^
1900
1998
  #
1999
+ # The following attribute applies only to [FIFO topics][4]\:
2000
+ #
2001
+ # * `ContentBasedDeduplication` – Enables content-based deduplication
2002
+ # for FIFO topics.
2003
+ #
2004
+ # * By default, `ContentBasedDeduplication` is set to `false`. If
2005
+ # you create a FIFO topic and this attribute is `false`, you must
2006
+ # specify a value for the `MessageDeduplicationId` parameter for
2007
+ # the [Publish][5] action.
2008
+ #
2009
+ # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
2010
+ # uses a SHA-256 hash to generate the `MessageDeduplicationId`
2011
+ # using the body of the message (but not the attributes of the
2012
+ # message).
2013
+ #
2014
+ # (Optional) To override the generated value, you can specify a
2015
+ # value for the the `MessageDeduplicationId` parameter for the
2016
+ # `Publish` action.
2017
+ #
1901
2018
  #
1902
2019
  #
1903
2020
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
1904
2021
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
1905
2022
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
2023
+ # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
2024
+ # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
1906
2025
  # @return [String]
1907
2026
  #
1908
2027
  # @!attribute [rw] attribute_value
@@ -2033,15 +2152,13 @@ module Aws::SNS
2033
2152
  # Sets whether the response from the `Subscribe` request includes the
2034
2153
  # subscription ARN, even if the subscription is not yet confirmed.
2035
2154
  #
2036
- # * If you set this parameter to `true`, the response includes the ARN
2037
- # in all cases, even if the subscription is not yet confirmed. In
2038
- # addition to the ARN for confirmed subscriptions, the response also
2039
- # includes the `pending subscription` ARN value for subscriptions
2040
- # that aren't yet confirmed. A subscription becomes confirmed when
2041
- # the subscriber calls the `ConfirmSubscription` action with a
2042
- # confirmation token.
2043
- #
2044
- # ^
2155
+ # If you set this parameter to `true`, the response includes the ARN
2156
+ # in all cases, even if the subscription is not yet confirmed. In
2157
+ # addition to the ARN for confirmed subscriptions, the response also
2158
+ # includes the `pending subscription` ARN value for subscriptions that
2159
+ # aren't yet confirmed. A subscription becomes confirmed when the
2160
+ # subscriber calls the `ConfirmSubscription` action with a
2161
+ # confirmation token.
2045
2162
  #
2046
2163
  #
2047
2164
  #
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.31.0
4
+ version: 1.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-15 00:00:00.000000000 Z
11
+ date: 2020-10-30 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.99.0
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.99.0
32
+ version: 3.109.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement