aws-sdk-sns 1.22.0 → 1.39.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
@@ -24,6 +26,7 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
26
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
27
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
28
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
27
30
  require 'aws-sdk-core/plugins/signature_v4.rb'
28
31
  require 'aws-sdk-core/plugins/protocols/query.rb'
29
32
 
@@ -32,11 +35,11 @@ Aws::Plugins::GlobalConfiguration.add_identifier(:sns)
32
35
  module Aws::SNS
33
36
  # An API client for SNS. To construct a client, you need to configure a `:region` and `:credentials`.
34
37
  #
35
- # client = Aws::SNS::Client.new(
36
- # region: region_name,
37
- # credentials: credentials,
38
- # # ...
39
- # )
38
+ # client = Aws::SNS::Client.new(
39
+ # region: region_name,
40
+ # credentials: credentials,
41
+ # # ...
42
+ # )
40
43
  #
41
44
  # For details on configuring region and credentials see
42
45
  # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
@@ -69,6 +72,7 @@ module Aws::SNS
69
72
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
70
73
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
71
74
  add_plugin(Aws::Plugins::TransferEncoding)
75
+ add_plugin(Aws::Plugins::HttpChecksum)
72
76
  add_plugin(Aws::Plugins::SignatureV4)
73
77
  add_plugin(Aws::Plugins::Protocols::Query)
74
78
 
@@ -81,13 +85,28 @@ module Aws::SNS
81
85
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
82
86
  # credentials.
83
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
+ #
84
102
  # * `Aws::InstanceProfileCredentials` - Used for loading credentials
85
103
  # from an EC2 IMDS on an EC2 instance.
86
104
  #
87
- # * `Aws::SharedCredentials` - Used for loading credentials from a
88
- # shared file, such as `~/.aws/config`.
105
+ # * `Aws::ECSCredentials` - Used for loading credentials from
106
+ # instances running in ECS.
89
107
  #
90
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
108
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
109
+ # from the Cognito Identity service.
91
110
  #
92
111
  # When `:credentials` are not configured directly, the following
93
112
  # locations will be searched for credentials:
@@ -97,15 +116,15 @@ module Aws::SNS
97
116
  # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
98
117
  # * `~/.aws/credentials`
99
118
  # * `~/.aws/config`
100
- # * EC2 IMDS instance profile - When used by default, the timeouts are
101
- # very aggressive. Construct and pass an instance of
102
- # `Aws::InstanceProfileCredentails` to enable retries and extended
103
- # 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.
104
123
  #
105
124
  # @option options [required, String] :region
106
125
  # The AWS region to connect to. The configured `:region` is
107
126
  # used to determine the service `:endpoint`. When not passed,
108
- # a default `:region` is search for in the following locations:
127
+ # a default `:region` is searched for in the following locations:
109
128
  #
110
129
  # * `Aws.config[:region]`
111
130
  # * `ENV['AWS_REGION']`
@@ -161,7 +180,7 @@ module Aws::SNS
161
180
  # @option options [String] :endpoint
162
181
  # The client endpoint is normally constructed from the `:region`
163
182
  # option. You should only configure an `:endpoint` when connecting
164
- # to test endpoints. This should be avalid HTTP(S) URI.
183
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
165
184
  #
166
185
  # @option options [Integer] :endpoint_cache_max_entries (1000)
167
186
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -176,7 +195,7 @@ module Aws::SNS
176
195
  # requests fetching endpoints information. Defaults to 60 sec.
177
196
  #
178
197
  # @option options [Boolean] :endpoint_discovery (false)
179
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
198
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
180
199
  #
181
200
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
182
201
  # The log formatter.
@@ -229,15 +248,19 @@ module Aws::SNS
229
248
  #
230
249
  # @option options [String] :retry_mode ("legacy")
231
250
  # Specifies which retry algorithm to use. Values are:
232
- # * `legacy` - The pre-existing retry behavior. This is default value if
233
- # no retry mode is provided.
234
- # * `standard` - A standardized set of retry rules across the AWS SDKs.
235
- # This includes support for retry quotas, which limit the number of
236
- # unsuccessful retries a client can make.
237
- # * `adaptive` - An experimental retry mode that includes all the
238
- # functionality of `standard` mode along with automatic client side
239
- # throttling. This is a provisional mode that may change behavior
240
- # in the future.
251
+ #
252
+ # * `legacy` - The pre-existing retry behavior. This is default value if
253
+ # no retry mode is provided.
254
+ #
255
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
256
+ # This includes support for retry quotas, which limit the number of
257
+ # unsuccessful retries a client can make.
258
+ #
259
+ # * `adaptive` - An experimental retry mode that includes all the
260
+ # functionality of `standard` mode along with automatic client side
261
+ # throttling. This is a provisional mode that may change behavior
262
+ # in the future.
263
+ #
241
264
  #
242
265
  # @option options [String] :secret_access_key
243
266
  #
@@ -265,8 +288,7 @@ module Aws::SNS
265
288
  #
266
289
  # @option options [Integer] :http_read_timeout (60) The default
267
290
  # number of seconds to wait for response data. This value can
268
- # safely be set
269
- # per-request on the session yielded by {#session_for}.
291
+ # safely be set per-request on the session.
270
292
  #
271
293
  # @option options [Float] :http_idle_timeout (5) The number of
272
294
  # seconds a connection is allowed to sit idle before it is
@@ -278,7 +300,7 @@ module Aws::SNS
278
300
  # request body. This option has no effect unless the request has
279
301
  # "Expect" header set to "100-continue". Defaults to `nil` which
280
302
  # disables this behaviour. This value can safely be set per
281
- # request on the session yielded by {#session_for}.
303
+ # request on the session.
282
304
  #
283
305
  # @option options [Boolean] :http_wire_trace (false) When `true`,
284
306
  # HTTP debug output will be sent to the `:logger`.
@@ -422,25 +444,34 @@ module Aws::SNS
422
444
  end
423
445
 
424
446
  # Creates a platform application object for one of the supported push
425
- # notification services, such as APNS and FCM, to which devices and
426
- # mobile apps may register. You must specify PlatformPrincipal and
427
- # PlatformCredential attributes when using the
428
- # `CreatePlatformApplication` action. The PlatformPrincipal is received
429
- # from the notification service. For APNS/APNS\_SANDBOX,
430
- # PlatformPrincipal is "SSL certificate". For FCM, PlatformPrincipal
431
- # is not applicable. For ADM, PlatformPrincipal is "client id". The
432
- # PlatformCredential is also received from the notification service. For
433
- # WNS, PlatformPrincipal is "Package Security Identifier". For MPNS,
434
- # PlatformPrincipal is "TLS certificate". For Baidu, PlatformPrincipal
435
- # is "API key".
436
- #
437
- # For APNS/APNS\_SANDBOX, PlatformCredential is "private key". For
438
- # FCM, PlatformCredential is "API key". For ADM, PlatformCredential is
439
- # "client secret". For WNS, PlatformCredential is "secret key". For
440
- # MPNS, PlatformCredential is "private key". For Baidu,
441
- # PlatformCredential is "secret key". The PlatformApplicationArn that
442
- # is returned when using `CreatePlatformApplication` is then used as an
443
- # attribute for the `CreatePlatformEndpoint` action.
447
+ # notification services, such as APNS and GCM (Firebase Cloud
448
+ # Messaging), to which devices and mobile apps may register. You must
449
+ # specify `PlatformPrincipal` and `PlatformCredential` attributes when
450
+ # using the `CreatePlatformApplication` action.
451
+ #
452
+ # `PlatformPrincipal` and `PlatformCredential` are received from the
453
+ # notification service.
454
+ #
455
+ # * For `ADM`, `PlatformPrincipal` is `client id` and
456
+ # `PlatformCredential` is `client secret`.
457
+ #
458
+ # * For `Baidu`, `PlatformPrincipal` is `API key` and
459
+ # `PlatformCredential` is `secret key`.
460
+ #
461
+ # * For `APNS` and `APNS_SANDBOX`, `PlatformPrincipal` is `SSL
462
+ # certificate` and `PlatformCredential` is `private key`.
463
+ #
464
+ # * For `GCM` (Firebase Cloud Messaging), there is no
465
+ # `PlatformPrincipal` and the `PlatformCredential` is `API key`.
466
+ #
467
+ # * For `MPNS`, `PlatformPrincipal` is `TLS certificate` and
468
+ # `PlatformCredential` is `private key`.
469
+ #
470
+ # * For `WNS`, `PlatformPrincipal` is `Package Security Identifier` and
471
+ # `PlatformCredential` is `secret key`.
472
+ #
473
+ # You can use the returned `PlatformApplicationArn` as an attribute for
474
+ # the `CreatePlatformEndpoint` action.
444
475
  #
445
476
  # @option params [required, String] :name
446
477
  # Application names must be made up of only uppercase and lowercase
@@ -449,7 +480,7 @@ module Aws::SNS
449
480
  #
450
481
  # @option params [required, String] :platform
451
482
  # The following platforms are supported: ADM (Amazon Device Messaging),
452
- # APNS (Apple Push Notification Service), APNS\_SANDBOX, and FCM
483
+ # APNS (Apple Push Notification Service), APNS\_SANDBOX, and GCM
453
484
  # (Firebase Cloud Messaging).
454
485
  #
455
486
  # @option params [required, Hash<String,String>] :attributes
@@ -487,16 +518,16 @@ module Aws::SNS
487
518
  end
488
519
 
489
520
  # Creates an endpoint for a device and mobile app on one of the
490
- # supported push notification services, such as FCM and APNS.
491
- # `CreatePlatformEndpoint` requires the PlatformApplicationArn that is
492
- # returned from `CreatePlatformApplication`. The EndpointArn that is
493
- # returned when using `CreatePlatformEndpoint` can then be used by the
494
- # `Publish` action to send a message to a mobile app or by the
495
- # `Subscribe` action for subscription to a topic. The
496
- # `CreatePlatformEndpoint` action is idempotent, so if the requester
497
- # already owns an endpoint with the same device token and attributes,
498
- # that endpoint's ARN is returned without creating a new endpoint. For
499
- # more information, see [Using Amazon SNS Mobile Push Notifications][1].
521
+ # supported push notification services, such as GCM (Firebase Cloud
522
+ # Messaging) and APNS. `CreatePlatformEndpoint` requires the
523
+ # `PlatformApplicationArn` that is returned from
524
+ # `CreatePlatformApplication`. You can use the returned `EndpointArn` to
525
+ # send a message to a mobile app or by the `Subscribe` action for
526
+ # subscription to a topic. The `CreatePlatformEndpoint` action is
527
+ # idempotent, so if the requester already owns an endpoint with the same
528
+ # device token and attributes, that endpoint's ARN is returned without
529
+ # creating a new endpoint. For more information, see [Using Amazon SNS
530
+ # Mobile Push Notifications][1].
500
531
  #
501
532
  # When using `CreatePlatformEndpoint` with Baidu, two attributes must be
502
533
  # provided: ChannelId and UserId. The token field must also contain the
@@ -517,8 +548,8 @@ module Aws::SNS
517
548
  # device. The specific name for Token will vary, depending on which
518
549
  # notification service is being used. For example, when using APNS as
519
550
  # the notification service, you need the device token. Alternatively,
520
- # when using FCM or ADM, the device token equivalent is called the
521
- # registration ID.
551
+ # when using GCM (Firebase Cloud Messaging) or ADM, the device token
552
+ # equivalent is called the registration ID.
522
553
  #
523
554
  # @option params [String] :custom_user_data
524
555
  # Arbitrary user data to associate with the endpoint. Amazon SNS does
@@ -560,10 +591,11 @@ module Aws::SNS
560
591
  end
561
592
 
562
593
  # Creates a topic to which notifications can be published. Users can
563
- # create at most 100,000 topics. For more information, see
564
- # [https://aws.amazon.com/sns][1]. This action is idempotent, so if the
565
- # requester already owns a topic with the specified name, that topic's
566
- # 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.
567
599
  #
568
600
  #
569
601
  #
@@ -576,6 +608,9 @@ module Aws::SNS
576
608
  # lowercase ASCII letters, numbers, underscores, and hyphens, and must
577
609
  # be between 1 and 256 characters long.
578
610
  #
611
+ # For a FIFO (first-in-first-out) topic, the name must end with the
612
+ # `.fifo` suffix.
613
+ #
579
614
  # @option params [Hash<String,String>] :attributes
580
615
  # A map of attributes with their corresponding values.
581
616
  #
@@ -588,23 +623,47 @@ module Aws::SNS
588
623
  # * `DisplayName` – The display name to use for a topic with SMS
589
624
  # subscriptions.
590
625
  #
626
+ # * `FifoTopic` – Set to true to create a FIFO topic.
627
+ #
591
628
  # * `Policy` – The policy that defines who can access your topic. By
592
629
  # default, only the topic owner can publish or subscribe to the topic.
593
630
  #
594
631
  # The following attribute applies only to [server-side-encryption][1]\:
595
632
  #
596
- # * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
633
+ # * `KmsMasterKeyId` The ID of an AWS-managed customer master key
597
634
  # (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
598
635
  # Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
599
636
  # Management Service API Reference*.
600
637
  #
601
638
  # ^
602
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
+ #
603
660
  #
604
661
  #
605
662
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
606
663
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
607
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
608
667
  #
609
668
  # @option params [Array<Types::Tag>] :tags
610
669
  # The list of tags to add to a new topic.
@@ -678,8 +737,9 @@ module Aws::SNS
678
737
  end
679
738
 
680
739
  # Deletes a platform application object for one of the supported push
681
- # notification services, such as APNS and FCM. For more information, see
682
- # [Using Amazon SNS Mobile Push Notifications][1].
740
+ # notification services, such as APNS and GCM (Firebase Cloud
741
+ # Messaging). For more information, see [Using Amazon SNS Mobile Push
742
+ # Notifications][1].
683
743
  #
684
744
  #
685
745
  #
@@ -731,8 +791,9 @@ module Aws::SNS
731
791
  end
732
792
 
733
793
  # Retrieves the endpoint attributes for a device on one of the supported
734
- # push notification services, such as FCM and APNS. For more
735
- # information, see [Using Amazon SNS Mobile Push Notifications][1].
794
+ # push notification services, such as GCM (Firebase Cloud Messaging) and
795
+ # APNS. For more information, see [Using Amazon SNS Mobile Push
796
+ # Notifications][1].
736
797
  #
737
798
  #
738
799
  #
@@ -766,8 +827,9 @@ module Aws::SNS
766
827
  end
767
828
 
768
829
  # Retrieves the attributes of the platform application object for the
769
- # supported push notification services, such as APNS and FCM. For more
770
- # information, see [Using Amazon SNS Mobile Push Notifications][1].
830
+ # supported push notification services, such as APNS and GCM (Firebase
831
+ # Cloud Messaging). For more information, see [Using Amazon SNS Mobile
832
+ # Push Notifications][1].
771
833
  #
772
834
  #
773
835
  #
@@ -901,11 +963,11 @@ module Aws::SNS
901
963
  end
902
964
 
903
965
  # Lists the endpoints and endpoint attributes for devices in a supported
904
- # push notification service, such as FCM and APNS. The results for
905
- # `ListEndpointsByPlatformApplication` are paginated and return a
906
- # limited list of endpoints, up to 100. If additional records are
907
- # available after the first page results, then a NextToken string will
908
- # be returned. To receive the next page, you call
966
+ # push notification service, such as GCM (Firebase Cloud Messaging) and
967
+ # APNS. The results for `ListEndpointsByPlatformApplication` are
968
+ # paginated and return a limited list of endpoints, up to 100. If
969
+ # additional records are available after the first page results, then a
970
+ # NextToken string will be returned. To receive the next page, you call
909
971
  # `ListEndpointsByPlatformApplication` again using the NextToken string
910
972
  # received from the previous call. When there are no more records to
911
973
  # return, NextToken will be null. For more information, see [Using
@@ -931,6 +993,8 @@ module Aws::SNS
931
993
  # * {Types::ListEndpointsByPlatformApplicationResponse#endpoints #endpoints} => Array&lt;Types::Endpoint&gt;
932
994
  # * {Types::ListEndpointsByPlatformApplicationResponse#next_token #next_token} => String
933
995
  #
996
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
997
+ #
934
998
  # @example Request syntax with placeholder values
935
999
  #
936
1000
  # resp = client.list_endpoints_by_platform_application({
@@ -998,14 +1062,15 @@ module Aws::SNS
998
1062
  end
999
1063
 
1000
1064
  # Lists the platform application objects for the supported push
1001
- # notification services, such as APNS and FCM. The results for
1002
- # `ListPlatformApplications` are paginated and return a limited list of
1003
- # applications, up to 100. If additional records are available after the
1004
- # first page results, then a NextToken string will be returned. To
1005
- # receive the next page, you call `ListPlatformApplications` using the
1006
- # NextToken string received from the previous call. When there are no
1007
- # more records to return, NextToken will be null. For more information,
1008
- # see [Using Amazon SNS Mobile Push Notifications][1].
1065
+ # notification services, such as APNS and GCM (Firebase Cloud
1066
+ # Messaging). The results for `ListPlatformApplications` are paginated
1067
+ # and return a limited list of applications, up to 100. If additional
1068
+ # records are available after the first page results, then a NextToken
1069
+ # string will be returned. To receive the next page, you call
1070
+ # `ListPlatformApplications` using the NextToken string received from
1071
+ # the previous call. When there are no more records to return,
1072
+ # `NextToken` will be null. For more information, see [Using Amazon SNS
1073
+ # Mobile Push Notifications][1].
1009
1074
  #
1010
1075
  # This action is throttled at 15 transactions per second (TPS).
1011
1076
  #
@@ -1023,6 +1088,8 @@ module Aws::SNS
1023
1088
  # * {Types::ListPlatformApplicationsResponse#platform_applications #platform_applications} => Array&lt;Types::PlatformApplication&gt;
1024
1089
  # * {Types::ListPlatformApplicationsResponse#next_token #next_token} => String
1025
1090
  #
1091
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1092
+ #
1026
1093
  # @example Request syntax with placeholder values
1027
1094
  #
1028
1095
  # resp = client.list_platform_applications({
@@ -1061,6 +1128,8 @@ module Aws::SNS
1061
1128
  # * {Types::ListSubscriptionsResponse#subscriptions #subscriptions} => Array&lt;Types::Subscription&gt;
1062
1129
  # * {Types::ListSubscriptionsResponse#next_token #next_token} => String
1063
1130
  #
1131
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1132
+ #
1064
1133
  # @example Request syntax with placeholder values
1065
1134
  #
1066
1135
  # resp = client.list_subscriptions({
@@ -1105,6 +1174,8 @@ module Aws::SNS
1105
1174
  # * {Types::ListSubscriptionsByTopicResponse#subscriptions #subscriptions} => Array&lt;Types::Subscription&gt;
1106
1175
  # * {Types::ListSubscriptionsByTopicResponse#next_token #next_token} => String
1107
1176
  #
1177
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1178
+ #
1108
1179
  # @example Request syntax with placeholder values
1109
1180
  #
1110
1181
  # resp = client.list_subscriptions_by_topic({
@@ -1182,6 +1253,8 @@ module Aws::SNS
1182
1253
  # * {Types::ListTopicsResponse#topics #topics} => Array&lt;Types::Topic&gt;
1183
1254
  # * {Types::ListTopicsResponse#next_token #next_token} => String
1184
1255
  #
1256
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1257
+ #
1185
1258
  # @example Request syntax with placeholder values
1186
1259
  #
1187
1260
  # resp = client.list_topics({
@@ -1228,8 +1301,9 @@ module Aws::SNS
1228
1301
  req.send_request(options)
1229
1302
  end
1230
1303
 
1231
- # Sends a message to an Amazon SNS topic or sends a text message (SMS
1232
- # message) directly to a phone number.
1304
+ # Sends a message to an Amazon SNS topic, a text message (SMS message)
1305
+ # directly to a phone number, or a message to a mobile platform endpoint
1306
+ # (when you specify the `TargetArn`).
1233
1307
  #
1234
1308
  # If you send a message to a topic, Amazon SNS delivers the message to
1235
1309
  # each endpoint that is subscribed to the topic. The format of the
@@ -1248,6 +1322,9 @@ module Aws::SNS
1248
1322
  # For more information about formatting messages, see [Send Custom
1249
1323
  # Platform-Specific Payloads in Messages to Mobile Devices][1].
1250
1324
  #
1325
+ # You can publish messages only to topics and endpoints in the same AWS
1326
+ # Region.
1327
+ #
1251
1328
  #
1252
1329
  #
1253
1330
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html
@@ -1354,9 +1431,37 @@ module Aws::SNS
1354
1431
  # @option params [Hash<String,Types::MessageAttributeValue>] :message_attributes
1355
1432
  # Message attributes for Publish action.
1356
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
+ #
1357
1461
  # @return [Types::PublishResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1358
1462
  #
1359
1463
  # * {Types::PublishResponse#message_id #message_id} => String
1464
+ # * {Types::PublishResponse#sequence_number #sequence_number} => String
1360
1465
  #
1361
1466
  # @example Request syntax with placeholder values
1362
1467
  #
@@ -1374,11 +1479,14 @@ module Aws::SNS
1374
1479
  # binary_value: "data",
1375
1480
  # },
1376
1481
  # },
1482
+ # message_deduplication_id: "String",
1483
+ # message_group_id: "String",
1377
1484
  # })
1378
1485
  #
1379
1486
  # @example Response structure
1380
1487
  #
1381
1488
  # resp.message_id #=> String
1489
+ # resp.sequence_number #=> String
1382
1490
  #
1383
1491
  # @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish AWS API Documentation
1384
1492
  #
@@ -1416,8 +1524,9 @@ module Aws::SNS
1416
1524
  end
1417
1525
 
1418
1526
  # Sets the attributes for an endpoint for a device on one of the
1419
- # supported push notification services, such as FCM and APNS. For more
1420
- # information, see [Using Amazon SNS Mobile Push Notifications][1].
1527
+ # supported push notification services, such as GCM (Firebase Cloud
1528
+ # Messaging) and APNS. For more information, see [Using Amazon SNS
1529
+ # Mobile Push Notifications][1].
1421
1530
  #
1422
1531
  #
1423
1532
  #
@@ -1465,11 +1574,11 @@ module Aws::SNS
1465
1574
  end
1466
1575
 
1467
1576
  # Sets the attributes of the platform application object for the
1468
- # supported push notification services, such as APNS and FCM. For more
1469
- # information, see [Using Amazon SNS Mobile Push Notifications][1]. For
1470
- # information on configuring attributes for message delivery status, see
1471
- # [Using Amazon SNS Application Attributes for Message Delivery
1472
- # Status][2].
1577
+ # supported push notification services, such as APNS and GCM (Firebase
1578
+ # Cloud Messaging). For more information, see [Using Amazon SNS Mobile
1579
+ # Push Notifications][1]. For information on configuring attributes for
1580
+ # message delivery status, see [Using Amazon SNS Application Attributes
1581
+ # for Message Delivery Status][2].
1473
1582
  #
1474
1583
  #
1475
1584
  #
@@ -1484,26 +1593,27 @@ module Aws::SNS
1484
1593
  # include the following:
1485
1594
  #
1486
1595
  # * `PlatformCredential` – The credential received from the notification
1487
- # service. For APNS/APNS\_SANDBOX, PlatformCredential is private key.
1488
- # For FCM, PlatformCredential is "API key". For ADM,
1489
- # PlatformCredential is "client secret".
1596
+ # service. For `APNS` and `APNS_SANDBOX`, `PlatformCredential` is
1597
+ # `private key`. For `GCM` (Firebase Cloud Messaging),
1598
+ # `PlatformCredential` is `API key`. For `ADM`, `PlatformCredential`
1599
+ # is `client secret`.
1490
1600
  #
1491
1601
  # * `PlatformPrincipal` – The principal received from the notification
1492
- # service. For APNS/APNS\_SANDBOX, PlatformPrincipal is SSL
1493
- # certificate. For FCM, PlatformPrincipal is not applicable. For ADM,
1494
- # PlatformPrincipal is "client id".
1602
+ # service. For `APNS` and `APNS_SANDBOX`, `PlatformPrincipal` is `SSL
1603
+ # certificate`. For `GCM` (Firebase Cloud Messaging), there is no
1604
+ # `PlatformPrincipal`. For `ADM`, `PlatformPrincipal` is `client id`.
1495
1605
  #
1496
- # * `EventEndpointCreated` – Topic ARN to which EndpointCreated event
1497
- # notifications should be sent.
1606
+ # * `EventEndpointCreated` – Topic ARN to which `EndpointCreated` event
1607
+ # notifications are sent.
1498
1608
  #
1499
- # * `EventEndpointDeleted` – Topic ARN to which EndpointDeleted event
1500
- # notifications should be sent.
1609
+ # * `EventEndpointDeleted` – Topic ARN to which `EndpointDeleted` event
1610
+ # notifications are sent.
1501
1611
  #
1502
- # * `EventEndpointUpdated` – Topic ARN to which EndpointUpdate event
1503
- # notifications should be sent.
1612
+ # * `EventEndpointUpdated` – Topic ARN to which `EndpointUpdate` event
1613
+ # notifications are sent.
1504
1614
  #
1505
- # * `EventDeliveryFailure` – Topic ARN to which DeliveryFailure event
1506
- # notifications should be sent upon Direct Publish delivery failure
1615
+ # * `EventDeliveryFailure` – Topic ARN to which `DeliveryFailure` event
1616
+ # notifications are sent upon Direct Publish delivery failure
1507
1617
  # (permanent) to one of the application's endpoints.
1508
1618
  #
1509
1619
  # * `SuccessFeedbackRoleArn` – IAM role ARN used to give Amazon SNS
@@ -1540,8 +1650,14 @@ module Aws::SNS
1540
1650
  #
1541
1651
  # You can override some of these settings for a single message when you
1542
1652
  # use the `Publish` action with the `MessageAttributes.entry.N`
1543
- # parameter. For more information, see [Sending an SMS Message][1] in
1544
- # the *Amazon SNS Developer Guide*.
1653
+ # parameter. For more information, see [Publishing to a mobile phone][1]
1654
+ # in the *Amazon SNS Developer Guide*.
1655
+ #
1656
+ # <note markdown="1"> To use this operation, you must grant the Amazon SNS service principal
1657
+ # (`sns.amazonaws.com`) permission to perform the `s3:ListBucket`
1658
+ # action.
1659
+ #
1660
+ # </note>
1545
1661
  #
1546
1662
  #
1547
1663
  #
@@ -1660,7 +1776,7 @@ module Aws::SNS
1660
1776
  # A map of attributes with their corresponding values.
1661
1777
  #
1662
1778
  # The following lists the names, descriptions, and values of the special
1663
- # request parameters that the `SetTopicAttributes` action uses:
1779
+ # request parameters that this action uses:
1664
1780
  #
1665
1781
  # * `DeliveryPolicy` – The policy that defines how Amazon SNS retries
1666
1782
  # failed deliveries to HTTP/S endpoints.
@@ -1681,6 +1797,25 @@ module Aws::SNS
1681
1797
  # service that powers the subscribed endpoint becomes unavailable) are
1682
1798
  # held in the dead-letter queue for further analysis or reprocessing.
1683
1799
  #
1800
+ # The following attribute applies only to Amazon Kinesis Data Firehose
1801
+ # delivery stream subscriptions:
1802
+ #
1803
+ # * `SubscriptionRoleArn` – The ARN of the IAM role that has the
1804
+ # following:
1805
+ #
1806
+ # * Permission to write to the Kinesis Data Firehose delivery stream
1807
+ #
1808
+ # * Amazon SNS listed as a trusted entity
1809
+ #
1810
+ # Specifying a valid ARN for this attribute is required for Kinesis
1811
+ # Data Firehose delivery stream subscriptions. For more information,
1812
+ # see [Fanout to Kinesis Data Firehose delivery streams][1] in the
1813
+ # *Amazon SNS Developer Guide*.
1814
+ #
1815
+ #
1816
+ #
1817
+ # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-kinesis-subscriber.html
1818
+ #
1684
1819
  # @option params [String] :attribute_value
1685
1820
  # The new value for the attribute in JSON format.
1686
1821
  #
@@ -1725,18 +1860,38 @@ module Aws::SNS
1725
1860
  #
1726
1861
  # The following attribute applies only to [server-side-encryption][1]\:
1727
1862
  #
1728
- # * `KmsMasterKeyId` - The ID of an AWS-managed customer master key
1863
+ # * `KmsMasterKeyId` The ID of an AWS-managed customer master key
1729
1864
  # (CMK) for Amazon SNS or a custom CMK. For more information, see [Key
1730
1865
  # Terms][2]. For more examples, see [KeyId][3] in the *AWS Key
1731
1866
  # Management Service API Reference*.
1732
1867
  #
1733
1868
  # ^
1734
1869
  #
1870
+ # The following attribute applies only to [FIFO topics][4]\:
1871
+ #
1872
+ # * `ContentBasedDeduplication` – Enables content-based deduplication
1873
+ # for FIFO topics.
1874
+ #
1875
+ # * By default, `ContentBasedDeduplication` is set to `false`. If you
1876
+ # create a FIFO topic and this attribute is `false`, you must
1877
+ # specify a value for the `MessageDeduplicationId` parameter for the
1878
+ # [Publish][5] action.
1879
+ #
1880
+ # * When you set `ContentBasedDeduplication` to `true`, Amazon SNS
1881
+ # uses a SHA-256 hash to generate the `MessageDeduplicationId` using
1882
+ # the body of the message (but not the attributes of the message).
1883
+ #
1884
+ # (Optional) To override the generated value, you can specify a
1885
+ # value for the the `MessageDeduplicationId` parameter for the
1886
+ # `Publish` action.
1887
+ #
1735
1888
  #
1736
1889
  #
1737
1890
  # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html
1738
1891
  # [2]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms
1739
1892
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
1893
+ # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
1894
+ # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
1740
1895
  #
1741
1896
  # @option params [String] :attribute_value
1742
1897
  # The new value for the attribute.
@@ -1760,11 +1915,13 @@ module Aws::SNS
1760
1915
  req.send_request(options)
1761
1916
  end
1762
1917
 
1763
- # Prepares to subscribe an endpoint by sending the endpoint a
1764
- # confirmation message. To actually create a subscription, the endpoint
1765
- # owner must call the `ConfirmSubscription` action with the token from
1766
- # the confirmation message. Confirmation tokens are valid for three
1767
- # days.
1918
+ # Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is
1919
+ # HTTP/S or email, or if the endpoint and the topic are not in the same
1920
+ # AWS account, the endpoint owner must run the `ConfirmSubscription`
1921
+ # action to confirm the subscription.
1922
+ #
1923
+ # You call the `ConfirmSubscription` action with the token from the
1924
+ # subscription response. Confirmation tokens are valid for three days.
1768
1925
  #
1769
1926
  # This action is throttled at 100 transactions per second (TPS).
1770
1927
  #
@@ -1772,7 +1929,7 @@ module Aws::SNS
1772
1929
  # The ARN of the topic you want to subscribe to.
1773
1930
  #
1774
1931
  # @option params [required, String] :protocol
1775
- # The protocol you want to use. Supported protocols include:
1932
+ # The protocol that you want to use. Supported protocols include:
1776
1933
  #
1777
1934
  # * `http` – delivery of JSON-encoded message via HTTP POST
1778
1935
  #
@@ -1787,36 +1944,42 @@ module Aws::SNS
1787
1944
  # * `sqs` – delivery of JSON-encoded message to an Amazon SQS queue
1788
1945
  #
1789
1946
  # * `application` – delivery of JSON-encoded message to an EndpointArn
1790
- # for a mobile app and device.
1947
+ # for a mobile app and device
1791
1948
  #
1792
- # * `lambda` – delivery of JSON-encoded message to an Amazon Lambda
1793
- # function.
1949
+ # * `lambda` – delivery of JSON-encoded message to an AWS Lambda
1950
+ # function
1951
+ #
1952
+ # * `firehose` – delivery of JSON-encoded message to an Amazon Kinesis
1953
+ # Data Firehose delivery stream.
1794
1954
  #
1795
1955
  # @option params [String] :endpoint
1796
1956
  # The endpoint that you want to receive notifications. Endpoints vary by
1797
1957
  # protocol:
1798
1958
  #
1799
- # * For the `http` protocol, the endpoint is an URL beginning with
1800
- # `http://`
1959
+ # * For the `http` protocol, the (public) endpoint is a URL beginning
1960
+ # with `http://`.
1801
1961
  #
1802
- # * For the `https` protocol, the endpoint is a URL beginning with
1803
- # `https://`
1962
+ # * For the `https` protocol, the (public) endpoint is a URL beginning
1963
+ # with `https://`.
1804
1964
  #
1805
- # * For the `email` protocol, the endpoint is an email address
1965
+ # * For the `email` protocol, the endpoint is an email address.
1806
1966
  #
1807
- # * For the `email-json` protocol, the endpoint is an email address
1967
+ # * For the `email-json` protocol, the endpoint is an email address.
1808
1968
  #
1809
1969
  # * For the `sms` protocol, the endpoint is a phone number of an
1810
- # SMS-enabled device
1970
+ # SMS-enabled device.
1811
1971
  #
1812
1972
  # * For the `sqs` protocol, the endpoint is the ARN of an Amazon SQS
1813
- # queue
1973
+ # queue.
1814
1974
  #
1815
1975
  # * For the `application` protocol, the endpoint is the EndpointArn of a
1816
1976
  # mobile app and device.
1817
1977
  #
1818
- # * For the `lambda` protocol, the endpoint is the ARN of an Amazon
1819
- # Lambda function.
1978
+ # * For the `lambda` protocol, the endpoint is the ARN of an AWS Lambda
1979
+ # function.
1980
+ #
1981
+ # * For the `firehose` protocol, the endpoint is the ARN of an Amazon
1982
+ # Kinesis Data Firehose delivery stream.
1820
1983
  #
1821
1984
  # @option params [Hash<String,String>] :attributes
1822
1985
  # A map of attributes with their corresponding values.
@@ -1843,20 +2006,37 @@ module Aws::SNS
1843
2006
  # service that powers the subscribed endpoint becomes unavailable) are
1844
2007
  # held in the dead-letter queue for further analysis or reprocessing.
1845
2008
  #
2009
+ # The following attribute applies only to Amazon Kinesis Data Firehose
2010
+ # delivery stream subscriptions:
2011
+ #
2012
+ # * `SubscriptionRoleArn` – The ARN of the IAM role that has the
2013
+ # following:
2014
+ #
2015
+ # * Permission to write to the Kinesis Data Firehose delivery stream
2016
+ #
2017
+ # * Amazon SNS listed as a trusted entity
2018
+ #
2019
+ # Specifying a valid ARN for this attribute is required for Kinesis
2020
+ # Data Firehose delivery stream subscriptions. For more information,
2021
+ # see [Fanout to Kinesis Data Firehose delivery streams][1] in the
2022
+ # *Amazon SNS Developer Guide*.
2023
+ #
2024
+ #
2025
+ #
2026
+ # [1]: https://docs.aws.amazon.com/sns/latest/dg/sns-kinesis-subscriber.html
2027
+ #
1846
2028
  # @option params [Boolean] :return_subscription_arn
1847
2029
  # Sets whether the response from the `Subscribe` request includes the
1848
2030
  # subscription ARN, even if the subscription is not yet confirmed.
1849
2031
  #
1850
- # * If you have the subscription ARN returned, the response includes the
1851
- # ARN in all cases, even if the subscription is not yet confirmed.
2032
+ # If you set this parameter to `true`, the response includes the ARN in
2033
+ # all cases, even if the subscription is not yet confirmed. In addition
2034
+ # to the ARN for confirmed subscriptions, the response also includes the
2035
+ # `pending subscription` ARN value for subscriptions that aren't yet
2036
+ # confirmed. A subscription becomes confirmed when the subscriber calls
2037
+ # the `ConfirmSubscription` action with a confirmation token.
1852
2038
  #
1853
- # * If you don't have the subscription ARN returned, in addition to the
1854
- # ARN for confirmed subscriptions, the response also includes the
1855
- # `pending subscription` ARN value for subscriptions that aren't yet
1856
- # confirmed. A subscription becomes confirmed when the subscriber
1857
- # calls the `ConfirmSubscription` action with a confirmation token.
1858
2039
  #
1859
- # If you set this parameter to `true`, .
1860
2040
  #
1861
2041
  # The default value is `false`.
1862
2042
  #
@@ -2017,7 +2197,7 @@ module Aws::SNS
2017
2197
  params: params,
2018
2198
  config: config)
2019
2199
  context[:gem_name] = 'aws-sdk-sns'
2020
- context[:gem_version] = '1.22.0'
2200
+ context[:gem_version] = '1.39.0'
2021
2201
  Seahorse::Client::Request.new(handlers, context)
2022
2202
  end
2023
2203