aws-sdk-sns 1.60.0 → 1.96.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.
@@ -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
  #
@@ -86,7 +85,7 @@ module Aws::SNS
86
85
  # segment data to topic owner account if the sampled flag in the
87
86
  # tracing header is true. This is only supported on standard topics.
88
87
  #
89
- # The following attribute applies only to [server-side-encryption][1]\:
88
+ # The following attribute applies only to [server-side-encryption][1]:
90
89
  #
91
90
  # * `KmsMasterKeyId` - The ID of an Amazon Web Services managed customer
92
91
  # master key (CMK) for Amazon SNS or a custom CMK. For more
@@ -95,9 +94,15 @@ module Aws::SNS
95
94
  #
96
95
  # ^
97
96
  #
98
- # The following attributes apply only to [FIFO topics][4]\:
97
+ # The following attributes apply only to [FIFO topics][4]:
99
98
  #
100
- # * `FifoTopic` – When this is set to `true`, a FIFO topic is created.
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,9 @@ module Aws::SNS
141
147
  #
142
148
  # @return [self]
143
149
  def load
144
- resp = @client.get_topic_attributes(topic_arn: @arn)
150
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
151
+ @client.get_topic_attributes(topic_arn: @arn)
152
+ end
145
153
  @data = resp.data
146
154
  self
147
155
  end
@@ -186,7 +194,9 @@ module Aws::SNS
186
194
  # @return [EmptyStructure]
187
195
  def add_permission(options = {})
188
196
  options = options.merge(topic_arn: @arn)
189
- resp = @client.add_permission(options)
197
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
198
+ @client.add_permission(options)
199
+ end
190
200
  resp.data
191
201
  end
192
202
 
@@ -208,7 +218,9 @@ module Aws::SNS
208
218
  # @return [Subscription]
209
219
  def confirm_subscription(options = {})
210
220
  options = options.merge(topic_arn: @arn)
211
- resp = @client.confirm_subscription(options)
221
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
222
+ @client.confirm_subscription(options)
223
+ end
212
224
  Subscription.new(
213
225
  arn: resp.data.subscription_arn,
214
226
  client: @client
@@ -222,7 +234,9 @@ module Aws::SNS
222
234
  # @return [EmptyStructure]
223
235
  def delete(options = {})
224
236
  options = options.merge(topic_arn: @arn)
225
- resp = @client.delete_topic(options)
237
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
238
+ @client.delete_topic(options)
239
+ end
226
240
  resp.data
227
241
  end
228
242
 
@@ -230,7 +244,7 @@ module Aws::SNS
230
244
  #
231
245
  # topic.publish({
232
246
  # target_arn: "String",
233
- # phone_number: "String",
247
+ # phone_number: "PhoneNumber",
234
248
  # message: "message", # required
235
249
  # subject: "subject",
236
250
  # message_structure: "messageStructure",
@@ -314,9 +328,8 @@ module Aws::SNS
314
328
  # is delivered to email endpoints. This field will also be included, if
315
329
  # present, in the standard JSON messages delivered to other endpoints.
316
330
  #
317
- # Constraints: Subjects must be ASCII text that begins with a letter,
318
- # number, or punctuation mark; must not include line breaks or control
319
- # 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.
320
333
  # @option options [String] :message_structure
321
334
  # Set `MessageStructure` to `json` if you want to send a different
322
335
  # message for each protocol. For example, using one publish action, you
@@ -336,24 +349,54 @@ module Aws::SNS
336
349
  # @option options [Hash<String,Types::MessageAttributeValue>] :message_attributes
337
350
  # Message attributes for Publish action.
338
351
  # @option options [String] :message_deduplication_id
339
- # This parameter applies only to FIFO (first-in-first-out) topics. The
340
- # `MessageDeduplicationId` can contain up to 128 alphanumeric characters
341
- # `(a-z, A-Z, 0-9)` and punctuation ``
342
- # (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
343
- #
344
- # Every message must have a unique `MessageDeduplicationId`, which is a
345
- # token used for deduplication of sent messages. If a message with a
346
- # particular `MessageDeduplicationId` is sent successfully, any message
347
- # sent with the same `MessageDeduplicationId` during the 5-minute
348
- # deduplication interval is treated as a duplicate.
349
- #
350
- # If the topic has `ContentBasedDeduplication` set, the system generates
351
- # a `MessageDeduplicationId` based on the contents of the message. Your
352
- # `MessageDeduplicationId` overrides the generated one.
352
+ # * This parameter applies only to FIFO (first-in-first-out) topics. The
353
+ # `MessageDeduplicationId` can contain up to 128 alphanumeric
354
+ # characters `(a-z, A-Z, 0-9)` and punctuation ``
355
+ # (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) ``.
356
+ #
357
+ # * Every message must have a unique `MessageDeduplicationId`, which is
358
+ # a token used for deduplication of sent messages within the 5 minute
359
+ # minimum deduplication interval.
360
+ #
361
+ # * The scope of deduplication depends on the `FifoThroughputScope`
362
+ # attribute, when set to `Topic` the message deduplication scope is
363
+ # across the entire topic, when set to `MessageGroup` the message
364
+ # deduplication scope is within each individual message group.
365
+ #
366
+ # * If a message with a particular `MessageDeduplicationId` is sent
367
+ # successfully, subsequent messages within the deduplication scope and
368
+ # interval, with the same `MessageDeduplicationId`, are accepted
369
+ # successfully but aren't delivered.
370
+ #
371
+ # * Every message must have a unique `MessageDeduplicationId`:
372
+ #
373
+ # * You may provide a `MessageDeduplicationId` explicitly.
374
+ #
375
+ # * If you aren't able to provide a `MessageDeduplicationId` and you
376
+ # enable `ContentBasedDeduplication` for your topic, Amazon SNS uses
377
+ # a SHA-256 hash to generate the `MessageDeduplicationId` using the
378
+ # body of the message (but not the attributes of the message).
379
+ #
380
+ # * If you don't provide a `MessageDeduplicationId` and the topic
381
+ # doesn't have `ContentBasedDeduplication` set, the action fails
382
+ # with an error.
383
+ #
384
+ # * If the topic has a `ContentBasedDeduplication` set, your
385
+ # `MessageDeduplicationId` overrides the generated one.
386
+ # * When `ContentBasedDeduplication` is in effect, messages with
387
+ # identical content sent within the deduplication scope and interval
388
+ # are treated as duplicates and only one copy of the message is
389
+ # delivered.
390
+ #
391
+ # * If you send one message with `ContentBasedDeduplication` enabled,
392
+ # and then another message with a `MessageDeduplicationId` that is the
393
+ # same as the one generated for the first `MessageDeduplicationId`,
394
+ # the two messages are treated as duplicates, within the deduplication
395
+ # scope and interval, and only one copy of the message is delivered.
353
396
  # @option options [String] :message_group_id
354
397
  # This parameter applies only to FIFO (first-in-first-out) topics. The
355
398
  # `MessageGroupId` can contain up to 128 alphanumeric characters `(a-z,
356
- # A-Z, 0-9)` and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
399
+ # A-Z, 0-9)` and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) ``.
357
400
  #
358
401
  # The `MessageGroupId` is a tag that specifies that a message belongs to
359
402
  # a specific message group. Messages that belong to the same message
@@ -363,7 +406,9 @@ module Aws::SNS
363
406
  # @return [Types::PublishResponse]
364
407
  def publish(options = {})
365
408
  options = options.merge(topic_arn: @arn)
366
- resp = @client.publish(options)
409
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
410
+ @client.publish(options)
411
+ end
367
412
  resp.data
368
413
  end
369
414
 
@@ -378,7 +423,9 @@ module Aws::SNS
378
423
  # @return [EmptyStructure]
379
424
  def remove_permission(options = {})
380
425
  options = options.merge(topic_arn: @arn)
381
- resp = @client.remove_permission(options)
426
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
427
+ @client.remove_permission(options)
428
+ end
382
429
  resp.data
383
430
  end
384
431
 
@@ -428,7 +475,6 @@ module Aws::SNS
428
475
  # * `HTTPFailureFeedbackRoleArn` – Indicates failed message delivery
429
476
  # status for an Amazon SNS topic that is subscribed to an HTTP
430
477
  # endpoint.
431
- #
432
478
  # * Amazon Kinesis Data Firehose
433
479
  #
434
480
  # * `FirehoseSuccessFeedbackRoleArn` – Indicates successful message
@@ -442,7 +488,6 @@ module Aws::SNS
442
488
  # * `FirehoseFailureFeedbackRoleArn` – Indicates failed message
443
489
  # delivery status for an Amazon SNS topic that is subscribed to an
444
490
  # Amazon Kinesis Data Firehose endpoint.
445
- #
446
491
  # * Lambda
447
492
  #
448
493
  # * `LambdaSuccessFeedbackRoleArn` – Indicates successful message
@@ -456,7 +501,6 @@ module Aws::SNS
456
501
  # * `LambdaFailureFeedbackRoleArn` – Indicates failed message delivery
457
502
  # status for an Amazon SNS topic that is subscribed to an Lambda
458
503
  # endpoint.
459
- #
460
504
  # * Platform application endpoint
461
505
  #
462
506
  # * `ApplicationSuccessFeedbackRoleArn` – Indicates successful message
@@ -470,7 +514,6 @@ module Aws::SNS
470
514
  # * `ApplicationFailureFeedbackRoleArn` – Indicates failed message
471
515
  # delivery status for an Amazon SNS topic that is subscribed to an
472
516
  # Amazon Web Services application endpoint.
473
- #
474
517
  # <note markdown="1"> In addition to being able to configure topic attributes for message
475
518
  # delivery status of notification messages sent to Amazon SNS
476
519
  # application endpoints, you can also configure application attributes
@@ -507,7 +550,7 @@ module Aws::SNS
507
550
  #
508
551
  # </note>
509
552
  #
510
- # The following attribute applies only to [server-side-encryption][2]\:
553
+ # The following attribute applies only to [server-side-encryption][2]:
511
554
  #
512
555
  # * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
513
556
  # master key (CMK) for Amazon SNS or a custom CMK. For more
@@ -520,7 +563,10 @@ module Aws::SNS
520
563
  # confirmation messages sent by Amazon SNS. By default,
521
564
  # `SignatureVersion` is set to `1`.
522
565
  #
523
- # The following attribute applies only to [FIFO topics][5]\:
566
+ # The following attribute applies only to [FIFO topics][5]:
567
+ #
568
+ # * `ArchivePolicy` – The policy that sets the retention period for
569
+ # messages stored in the message archive of an Amazon SNS FIFO topic.
524
570
  #
525
571
  # * `ContentBasedDeduplication` – Enables content-based deduplication
526
572
  # for FIFO topics.
@@ -537,6 +583,22 @@ module Aws::SNS
537
583
  # (Optional) To override the generated value, you can specify a
538
584
  # value for the `MessageDeduplicationId` parameter for the `Publish`
539
585
  # action.
586
+ # ^
587
+ #
588
+ # * `FifoThroughputScope` – Enables higher throughput for your FIFO
589
+ # topic by adjusting the scope of deduplication. This attribute has
590
+ # two possible values:
591
+ #
592
+ # * `Topic` – The scope of message deduplication is across the entire
593
+ # topic. This is the default value and maintains existing behavior,
594
+ # with a maximum throughput of 3000 messages per second or 20MB per
595
+ # second, whichever comes first.
596
+ #
597
+ # * `MessageGroup` – The scope of deduplication is within each
598
+ # individual message group, which enables higher throughput per
599
+ # topic subject to regional quotas. For more information on quotas
600
+ # or to request an increase, see [Amazon SNS service quotas][7] in
601
+ # the Amazon Web Services General Reference.
540
602
  #
541
603
  #
542
604
  #
@@ -546,12 +608,15 @@ module Aws::SNS
546
608
  # [4]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
547
609
  # [5]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
548
610
  # [6]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
611
+ # [7]: https://docs.aws.amazon.com/general/latest/gr/sns.html
549
612
  # @option options [String] :attribute_value
550
613
  # The new value for the attribute.
551
614
  # @return [EmptyStructure]
552
615
  def set_attributes(options = {})
553
616
  options = options.merge(topic_arn: @arn)
554
- resp = @client.set_topic_attributes(options)
617
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
618
+ @client.set_topic_attributes(options)
619
+ end
555
620
  resp.data
556
621
  end
557
622
 
@@ -636,7 +701,6 @@ module Aws::SNS
636
701
  # message attributes.
637
702
  #
638
703
  # * `MessageBody` – The filter is applied on the message body.
639
- #
640
704
  # * `RawMessageDelivery` – When set to `true`, enables raw message
641
705
  # delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need
642
706
  # for the endpoints to process JSON formatting, which is otherwise
@@ -649,24 +713,44 @@ module Aws::SNS
649
713
  # service that powers the subscribed endpoint becomes unavailable) are
650
714
  # held in the dead-letter queue for further analysis or reprocessing.
651
715
  #
652
- # The following attribute applies only to Amazon Kinesis Data Firehose
653
- # delivery stream subscriptions:
716
+ # The following attribute applies only to Amazon Data Firehose delivery
717
+ # stream subscriptions:
654
718
  #
655
719
  # * `SubscriptionRoleArn` – The ARN of the IAM role that has the
656
720
  # following:
657
721
  #
658
- # * Permission to write to the Kinesis Data Firehose delivery stream
722
+ # * Permission to write to the Firehose delivery stream
659
723
  #
660
724
  # * Amazon SNS listed as a trusted entity
725
+ # Specifying a valid ARN for this attribute is required for Firehose
726
+ # delivery stream subscriptions. For more information, see [Fanout to
727
+ # Firehose delivery streams][1] in the *Amazon SNS Developer Guide*.
728
+ #
729
+ # The following attributes apply only to [FIFO topics][2]:
661
730
  #
662
- # Specifying a valid ARN for this attribute is required for Kinesis
663
- # Data Firehose delivery stream subscriptions. For more information,
664
- # see [Fanout to Kinesis Data Firehose delivery streams][1] in the
665
- # *Amazon SNS Developer Guide*.
731
+ # * `ReplayPolicy` Adds or updates an inline policy document for a
732
+ # subscription to replay messages stored in the specified Amazon SNS
733
+ # topic.
734
+ #
735
+ # * `ReplayStatus` – Retrieves the status of the subscription message
736
+ # replay, which can be one of the following:
737
+ #
738
+ # * `Completed` – The replay has successfully redelivered all
739
+ # messages, and is now delivering newly published messages. If an
740
+ # ending point was specified in the `ReplayPolicy` then the
741
+ # subscription will no longer receive newly published messages.
742
+ #
743
+ # * `In progress` – The replay is currently replaying the selected
744
+ # messages.
745
+ #
746
+ # * `Failed` – The replay was unable to complete.
747
+ #
748
+ # * `Pending` – The default state while the replay initiates.
666
749
  #
667
750
  #
668
751
  #
669
752
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html
753
+ # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
670
754
  # @option options [Boolean] :return_subscription_arn
671
755
  # Sets whether the response from the `Subscribe` request includes the
672
756
  # subscription ARN, even if the subscription is not yet confirmed.
@@ -684,7 +768,9 @@ module Aws::SNS
684
768
  # @return [Subscription]
685
769
  def subscribe(options = {})
686
770
  options = options.merge(topic_arn: @arn)
687
- resp = @client.subscribe(options)
771
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
772
+ @client.subscribe(options)
773
+ end
688
774
  Subscription.new(
689
775
  arn: resp.data.subscription_arn,
690
776
  client: @client
@@ -701,7 +787,9 @@ module Aws::SNS
701
787
  def subscriptions(options = {})
702
788
  batches = Enumerator.new do |y|
703
789
  options = options.merge(topic_arn: @arn)
704
- resp = @client.list_subscriptions_by_topic(options)
790
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
791
+ @client.list_subscriptions_by_topic(options)
792
+ end
705
793
  resp.each_page do |page|
706
794
  batch = []
707
795
  page.data.subscriptions.each do |s|