aws-sdk-sns 1.67.0 → 1.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +125 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-sns/client.rb +210 -114
- data/lib/aws-sdk-sns/client_api.rb +48 -33
- data/lib/aws-sdk-sns/customizations.rb +5 -1
- data/lib/aws-sdk-sns/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-sns/endpoint_provider.rb +1 -1
- data/lib/aws-sdk-sns/endpoints.rb +2 -586
- data/lib/aws-sdk-sns/errors.rb +32 -0
- data/lib/aws-sdk-sns/platform_application.rb +23 -8
- data/lib/aws-sdk-sns/platform_endpoint.rb +9 -10
- data/lib/aws-sdk-sns/plugins/endpoints.rb +23 -98
- data/lib/aws-sdk-sns/resource.rb +10 -8
- data/lib/aws-sdk-sns/subscription.rb +15 -21
- data/lib/aws-sdk-sns/topic.rb +52 -29
- data/lib/aws-sdk-sns/types.rb +162 -93
- data/lib/aws-sdk-sns.rb +19 -15
- data/sig/client.rbs +528 -0
- data/sig/errors.rbs +119 -0
- data/sig/platform_application.rbs +64 -0
- data/sig/platform_endpoint.rbs +68 -0
- data/sig/resource.rbs +131 -0
- data/sig/subscription.rbs +52 -0
- data/sig/topic.rbs +104 -0
- data/sig/types.rbs +664 -0
- data/sig/waiters.rbs +13 -0
- metadata +20 -11
data/lib/aws-sdk-sns/topic.rb
CHANGED
@@ -67,7 +67,6 @@ module Aws::SNS
|
|
67
67
|
# value **1**.
|
68
68
|
#
|
69
69
|
# </note>
|
70
|
-
#
|
71
70
|
# * `SubscriptionsConfirmed` – The number of confirmed subscriptions for
|
72
71
|
# the topic.
|
73
72
|
#
|
@@ -97,7 +96,13 @@ module Aws::SNS
|
|
97
96
|
#
|
98
97
|
# The following attributes apply only to [FIFO topics][4]:
|
99
98
|
#
|
100
|
-
# * `
|
99
|
+
# * `ArchivePolicy` – The policy that sets the retention period for
|
100
|
+
# messages stored in the message archive of an Amazon SNS FIFO topic.
|
101
|
+
#
|
102
|
+
# * `BeginningArchiveTime` – The earliest starting point at which a
|
103
|
+
# message in the topic’s archive can be replayed from. This point in
|
104
|
+
# time is based on the configured message retention period set by the
|
105
|
+
# topic’s message archiving policy.
|
101
106
|
#
|
102
107
|
# * `ContentBasedDeduplication` – Enables content-based deduplication
|
103
108
|
# for FIFO topics.
|
@@ -114,6 +119,7 @@ module Aws::SNS
|
|
114
119
|
# (Optional) To override the generated value, you can specify a
|
115
120
|
# value for the `MessageDeduplicationId` parameter for the `Publish`
|
116
121
|
# action.
|
122
|
+
# * `FifoTopic` – When this is set to `true`, a FIFO topic is created.
|
117
123
|
#
|
118
124
|
#
|
119
125
|
#
|
@@ -141,7 +147,7 @@ module Aws::SNS
|
|
141
147
|
#
|
142
148
|
# @return [self]
|
143
149
|
def load
|
144
|
-
resp = Aws::Plugins::UserAgent.
|
150
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
145
151
|
@client.get_topic_attributes(topic_arn: @arn)
|
146
152
|
end
|
147
153
|
@data = resp.data
|
@@ -188,7 +194,7 @@ module Aws::SNS
|
|
188
194
|
# @return [EmptyStructure]
|
189
195
|
def add_permission(options = {})
|
190
196
|
options = options.merge(topic_arn: @arn)
|
191
|
-
resp = Aws::Plugins::UserAgent.
|
197
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
192
198
|
@client.add_permission(options)
|
193
199
|
end
|
194
200
|
resp.data
|
@@ -212,7 +218,7 @@ module Aws::SNS
|
|
212
218
|
# @return [Subscription]
|
213
219
|
def confirm_subscription(options = {})
|
214
220
|
options = options.merge(topic_arn: @arn)
|
215
|
-
resp = Aws::Plugins::UserAgent.
|
221
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
216
222
|
@client.confirm_subscription(options)
|
217
223
|
end
|
218
224
|
Subscription.new(
|
@@ -228,7 +234,7 @@ module Aws::SNS
|
|
228
234
|
# @return [EmptyStructure]
|
229
235
|
def delete(options = {})
|
230
236
|
options = options.merge(topic_arn: @arn)
|
231
|
-
resp = Aws::Plugins::UserAgent.
|
237
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
232
238
|
@client.delete_topic(options)
|
233
239
|
end
|
234
240
|
resp.data
|
@@ -238,7 +244,7 @@ module Aws::SNS
|
|
238
244
|
#
|
239
245
|
# topic.publish({
|
240
246
|
# target_arn: "String",
|
241
|
-
# phone_number: "
|
247
|
+
# phone_number: "PhoneNumber",
|
242
248
|
# message: "message", # required
|
243
249
|
# subject: "subject",
|
244
250
|
# message_structure: "messageStructure",
|
@@ -322,9 +328,8 @@ module Aws::SNS
|
|
322
328
|
# is delivered to email endpoints. This field will also be included, if
|
323
329
|
# present, in the standard JSON messages delivered to other endpoints.
|
324
330
|
#
|
325
|
-
# Constraints: Subjects must be
|
326
|
-
#
|
327
|
-
# characters; and must be less than 100 characters long.
|
331
|
+
# Constraints: Subjects must be UTF-8 text with no line breaks or
|
332
|
+
# control characters, and less than 100 characters long.
|
328
333
|
# @option options [String] :message_structure
|
329
334
|
# Set `MessageStructure` to `json` if you want to send a different
|
330
335
|
# message for each protocol. For example, using one publish action, you
|
@@ -347,7 +352,7 @@ module Aws::SNS
|
|
347
352
|
# This parameter applies only to FIFO (first-in-first-out) topics. The
|
348
353
|
# `MessageDeduplicationId` can contain up to 128 alphanumeric characters
|
349
354
|
# `(a-z, A-Z, 0-9)` and punctuation ``
|
350
|
-
# (!"#$%&'()*+,-./:;<=>?@[\]^_
|
355
|
+
# (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) ``.
|
351
356
|
#
|
352
357
|
# Every message must have a unique `MessageDeduplicationId`, which is a
|
353
358
|
# token used for deduplication of sent messages. If a message with a
|
@@ -361,7 +366,7 @@ module Aws::SNS
|
|
361
366
|
# @option options [String] :message_group_id
|
362
367
|
# This parameter applies only to FIFO (first-in-first-out) topics. The
|
363
368
|
# `MessageGroupId` can contain up to 128 alphanumeric characters `(a-z,
|
364
|
-
# A-Z, 0-9)` and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_
|
369
|
+
# A-Z, 0-9)` and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) ``.
|
365
370
|
#
|
366
371
|
# The `MessageGroupId` is a tag that specifies that a message belongs to
|
367
372
|
# a specific message group. Messages that belong to the same message
|
@@ -371,7 +376,7 @@ module Aws::SNS
|
|
371
376
|
# @return [Types::PublishResponse]
|
372
377
|
def publish(options = {})
|
373
378
|
options = options.merge(topic_arn: @arn)
|
374
|
-
resp = Aws::Plugins::UserAgent.
|
379
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
375
380
|
@client.publish(options)
|
376
381
|
end
|
377
382
|
resp.data
|
@@ -388,7 +393,7 @@ module Aws::SNS
|
|
388
393
|
# @return [EmptyStructure]
|
389
394
|
def remove_permission(options = {})
|
390
395
|
options = options.merge(topic_arn: @arn)
|
391
|
-
resp = Aws::Plugins::UserAgent.
|
396
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
392
397
|
@client.remove_permission(options)
|
393
398
|
end
|
394
399
|
resp.data
|
@@ -440,7 +445,6 @@ module Aws::SNS
|
|
440
445
|
# * `HTTPFailureFeedbackRoleArn` – Indicates failed message delivery
|
441
446
|
# status for an Amazon SNS topic that is subscribed to an HTTP
|
442
447
|
# endpoint.
|
443
|
-
#
|
444
448
|
# * Amazon Kinesis Data Firehose
|
445
449
|
#
|
446
450
|
# * `FirehoseSuccessFeedbackRoleArn` – Indicates successful message
|
@@ -454,7 +458,6 @@ module Aws::SNS
|
|
454
458
|
# * `FirehoseFailureFeedbackRoleArn` – Indicates failed message
|
455
459
|
# delivery status for an Amazon SNS topic that is subscribed to an
|
456
460
|
# Amazon Kinesis Data Firehose endpoint.
|
457
|
-
#
|
458
461
|
# * Lambda
|
459
462
|
#
|
460
463
|
# * `LambdaSuccessFeedbackRoleArn` – Indicates successful message
|
@@ -468,7 +471,6 @@ module Aws::SNS
|
|
468
471
|
# * `LambdaFailureFeedbackRoleArn` – Indicates failed message delivery
|
469
472
|
# status for an Amazon SNS topic that is subscribed to an Lambda
|
470
473
|
# endpoint.
|
471
|
-
#
|
472
474
|
# * Platform application endpoint
|
473
475
|
#
|
474
476
|
# * `ApplicationSuccessFeedbackRoleArn` – Indicates successful message
|
@@ -482,7 +484,6 @@ module Aws::SNS
|
|
482
484
|
# * `ApplicationFailureFeedbackRoleArn` – Indicates failed message
|
483
485
|
# delivery status for an Amazon SNS topic that is subscribed to an
|
484
486
|
# Amazon Web Services application endpoint.
|
485
|
-
#
|
486
487
|
# <note markdown="1"> In addition to being able to configure topic attributes for message
|
487
488
|
# delivery status of notification messages sent to Amazon SNS
|
488
489
|
# application endpoints, you can also configure application attributes
|
@@ -534,6 +535,9 @@ module Aws::SNS
|
|
534
535
|
#
|
535
536
|
# The following attribute applies only to [FIFO topics][5]:
|
536
537
|
#
|
538
|
+
# * `ArchivePolicy` – The policy that sets the retention period for
|
539
|
+
# messages stored in the message archive of an Amazon SNS FIFO topic.
|
540
|
+
#
|
537
541
|
# * `ContentBasedDeduplication` – Enables content-based deduplication
|
538
542
|
# for FIFO topics.
|
539
543
|
#
|
@@ -563,7 +567,7 @@ module Aws::SNS
|
|
563
567
|
# @return [EmptyStructure]
|
564
568
|
def set_attributes(options = {})
|
565
569
|
options = options.merge(topic_arn: @arn)
|
566
|
-
resp = Aws::Plugins::UserAgent.
|
570
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
567
571
|
@client.set_topic_attributes(options)
|
568
572
|
end
|
569
573
|
resp.data
|
@@ -650,7 +654,6 @@ module Aws::SNS
|
|
650
654
|
# message attributes.
|
651
655
|
#
|
652
656
|
# * `MessageBody` – The filter is applied on the message body.
|
653
|
-
#
|
654
657
|
# * `RawMessageDelivery` – When set to `true`, enables raw message
|
655
658
|
# delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need
|
656
659
|
# for the endpoints to process JSON formatting, which is otherwise
|
@@ -663,24 +666,44 @@ module Aws::SNS
|
|
663
666
|
# service that powers the subscribed endpoint becomes unavailable) are
|
664
667
|
# held in the dead-letter queue for further analysis or reprocessing.
|
665
668
|
#
|
666
|
-
# The following attribute applies only to Amazon
|
667
|
-
#
|
669
|
+
# The following attribute applies only to Amazon Data Firehose delivery
|
670
|
+
# stream subscriptions:
|
668
671
|
#
|
669
672
|
# * `SubscriptionRoleArn` – The ARN of the IAM role that has the
|
670
673
|
# following:
|
671
674
|
#
|
672
|
-
# * Permission to write to the
|
675
|
+
# * Permission to write to the Firehose delivery stream
|
673
676
|
#
|
674
677
|
# * Amazon SNS listed as a trusted entity
|
678
|
+
# Specifying a valid ARN for this attribute is required for Firehose
|
679
|
+
# delivery stream subscriptions. For more information, see [Fanout to
|
680
|
+
# Firehose delivery streams][1] in the *Amazon SNS Developer Guide*.
|
681
|
+
#
|
682
|
+
# The following attributes apply only to [FIFO topics][2]:
|
683
|
+
#
|
684
|
+
# * `ReplayPolicy` – Adds or updates an inline policy document for a
|
685
|
+
# subscription to replay messages stored in the specified Amazon SNS
|
686
|
+
# topic.
|
687
|
+
#
|
688
|
+
# * `ReplayStatus` – Retrieves the status of the subscription message
|
689
|
+
# replay, which can be one of the following:
|
690
|
+
#
|
691
|
+
# * `Completed` – The replay has successfully redelivered all
|
692
|
+
# messages, and is now delivering newly published messages. If an
|
693
|
+
# ending point was specified in the `ReplayPolicy` then the
|
694
|
+
# subscription will no longer receive newly published messages.
|
695
|
+
#
|
696
|
+
# * `In progress` – The replay is currently replaying the selected
|
697
|
+
# messages.
|
698
|
+
#
|
699
|
+
# * `Failed` – The replay was unable to complete.
|
675
700
|
#
|
676
|
-
#
|
677
|
-
# Data Firehose delivery stream subscriptions. For more information,
|
678
|
-
# see [Fanout to Kinesis Data Firehose delivery streams][1] in the
|
679
|
-
# *Amazon SNS Developer Guide*.
|
701
|
+
# * `Pending` – The default state while the replay initiates.
|
680
702
|
#
|
681
703
|
#
|
682
704
|
#
|
683
705
|
# [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html
|
706
|
+
# [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
|
684
707
|
# @option options [Boolean] :return_subscription_arn
|
685
708
|
# Sets whether the response from the `Subscribe` request includes the
|
686
709
|
# subscription ARN, even if the subscription is not yet confirmed.
|
@@ -698,7 +721,7 @@ module Aws::SNS
|
|
698
721
|
# @return [Subscription]
|
699
722
|
def subscribe(options = {})
|
700
723
|
options = options.merge(topic_arn: @arn)
|
701
|
-
resp = Aws::Plugins::UserAgent.
|
724
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
702
725
|
@client.subscribe(options)
|
703
726
|
end
|
704
727
|
Subscription.new(
|
@@ -717,7 +740,7 @@ module Aws::SNS
|
|
717
740
|
def subscriptions(options = {})
|
718
741
|
batches = Enumerator.new do |y|
|
719
742
|
options = options.merge(topic_arn: @arn)
|
720
|
-
resp = Aws::Plugins::UserAgent.
|
743
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
721
744
|
@client.list_subscriptions_by_topic(options)
|
722
745
|
end
|
723
746
|
resp.each_page do |page|
|