aws-sdk-sns 1.42.0 → 1.77.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,14 +54,17 @@ module Aws::SNS
54
54
  # APNS (Apple Push Notification Service), APNS\_SANDBOX, and GCM
55
55
  # (Firebase Cloud Messaging).
56
56
  # @option options [required, Hash<String,String>] :attributes
57
- # For a list of attributes, see [SetPlatformApplicationAttributes][1].
57
+ # For a list of attributes, see [ `SetPlatformApplicationAttributes`
58
+ # ][1].
58
59
  #
59
60
  #
60
61
  #
61
62
  # [1]: https://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html
62
63
  # @return [PlatformApplication]
63
64
  def create_platform_application(options = {})
64
- resp = @client.create_platform_application(options)
65
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
66
+ @client.create_platform_application(options)
67
+ end
65
68
  PlatformApplication.new(
66
69
  arn: resp.data.platform_application_arn,
67
70
  client: @client
@@ -81,6 +84,7 @@ module Aws::SNS
81
84
  # value: "TagValue", # required
82
85
  # },
83
86
  # ],
87
+ # data_protection_policy: "attributeValue",
84
88
  # })
85
89
  # @param [Hash] options ({})
86
90
  # @option options [required, String] :name
@@ -95,7 +99,7 @@ module Aws::SNS
95
99
  # @option options [Hash<String,String>] :attributes
96
100
  # A map of attributes with their corresponding values.
97
101
  #
98
- # The following lists the names, descriptions, and values of the special
102
+ # The following lists names, descriptions, and values of the special
99
103
  # request parameters that the `CreateTopic` action uses:
100
104
  #
101
105
  # * `DeliveryPolicy` – The policy that defines how Amazon SNS retries
@@ -109,7 +113,20 @@ module Aws::SNS
109
113
  # * `Policy` – The policy that defines who can access your topic. By
110
114
  # default, only the topic owner can publish or subscribe to the topic.
111
115
  #
112
- # The following attribute applies only to [server-side encryption][1]\:
116
+ # * `SignatureVersion` – The signature version corresponds to the
117
+ # hashing algorithm used while creating the signature of the
118
+ # notifications, subscription confirmations, or unsubscribe
119
+ # confirmation messages sent by Amazon SNS. By default,
120
+ # `SignatureVersion` is set to `1`.
121
+ #
122
+ # * `TracingConfig` – Tracing mode of an Amazon SNS topic. By default
123
+ # `TracingConfig` is set to `PassThrough`, and the topic passes
124
+ # through the tracing header it receives from an Amazon SNS publisher
125
+ # to its subscriptions. If set to `Active`, Amazon SNS will vend X-Ray
126
+ # segment data to topic owner account if the sampled flag in the
127
+ # tracing header is true. This is only supported on standard topics.
128
+ #
129
+ # The following attribute applies only to [server-side encryption][1]:
113
130
  #
114
131
  # * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
115
132
  # master key (CMK) for Amazon SNS or a custom CMK. For more
@@ -118,9 +135,15 @@ module Aws::SNS
118
135
  #
119
136
  # ^
120
137
  #
121
- # The following attributes apply only to [FIFO topics][4]\:
138
+ # The following attributes apply only to [FIFO topics][4]:
122
139
  #
123
- # * `FifoTopic` – When this is set to `true`, a FIFO topic is created.
140
+ # * `ArchivePolicy` – Adds or updates an inline policy document to
141
+ # archive messages stored in the specified Amazon SNS topic.
142
+ #
143
+ # * `BeginningArchiveTime` – The earliest starting point at which a
144
+ # message in the topic’s archive can be replayed from. This point in
145
+ # time is based on the configured message retention period set by the
146
+ # topic’s message archiving policy.
124
147
  #
125
148
  # * `ContentBasedDeduplication` – Enables content-based deduplication
126
149
  # for FIFO topics.
@@ -152,9 +175,19 @@ module Aws::SNS
152
175
  # `sns:CreateTopic` and `sns:TagResource` permissions.
153
176
  #
154
177
  # </note>
178
+ # @option options [String] :data_protection_policy
179
+ # The body of the policy document you want to use for this topic.
180
+ #
181
+ # You can only add one policy per topic.
182
+ #
183
+ # The policy must be in JSON string format.
184
+ #
185
+ # Length Constraints: Maximum length of 30,720.
155
186
  # @return [Topic]
156
187
  def create_topic(options = {})
157
- resp = @client.create_topic(options)
188
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
189
+ @client.create_topic(options)
190
+ end
158
191
  Topic.new(
159
192
  arn: resp.data.topic_arn,
160
193
  client: @client
@@ -179,7 +212,9 @@ module Aws::SNS
179
212
  # @return [PlatformApplication::Collection]
180
213
  def platform_applications(options = {})
181
214
  batches = Enumerator.new do |y|
182
- resp = @client.list_platform_applications(options)
215
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
216
+ @client.list_platform_applications(options)
217
+ end
183
218
  resp.each_page do |page|
184
219
  batch = []
185
220
  page.data.platform_applications.each do |p|
@@ -219,7 +254,9 @@ module Aws::SNS
219
254
  # @return [Subscription::Collection]
220
255
  def subscriptions(options = {})
221
256
  batches = Enumerator.new do |y|
222
- resp = @client.list_subscriptions(options)
257
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
258
+ @client.list_subscriptions(options)
259
+ end
223
260
  resp.each_page do |page|
224
261
  batch = []
225
262
  page.data.subscriptions.each do |s|
@@ -250,7 +287,9 @@ module Aws::SNS
250
287
  # @return [Topic::Collection]
251
288
  def topics(options = {})
252
289
  batches = Enumerator.new do |y|
253
- resp = @client.list_topics(options)
290
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
291
+ @client.list_topics(options)
292
+ end
254
293
  resp.each_page do |page|
255
294
  batch = []
256
295
  page.data.topics.each do |t|
@@ -51,7 +51,16 @@ module Aws::SNS
51
51
  # subscription. For more information, see [Amazon SNS Message
52
52
  # Filtering][1] in the *Amazon SNS Developer Guide*.
53
53
  #
54
- # * `Owner` – The account ID of the subscription's owner.
54
+ # * `FilterPolicyScope` – This attribute lets you choose the filtering
55
+ # scope by using one of the following string value types:
56
+ #
57
+ # * `MessageAttributes` (default) – The filter is applied on the
58
+ # message attributes.
59
+ #
60
+ # * `MessageBody` – The filter is applied on the message body.
61
+ #
62
+ # * `Owner` – The Amazon Web Services account ID of the subscription's
63
+ # owner.
55
64
  #
56
65
  # * `PendingConfirmation` – `true` if the subscription hasn't been
57
66
  # confirmed. To confirm a pending subscription, call the
@@ -72,20 +81,19 @@ module Aws::SNS
72
81
  #
73
82
  # * `TopicArn` – The topic ARN that the subscription is associated with.
74
83
  #
75
- # The following attribute applies only to Amazon Kinesis Data Firehose
76
- # delivery stream subscriptions:
84
+ # The following attribute applies only to Amazon Data Firehose delivery
85
+ # stream subscriptions:
77
86
  #
78
87
  # * `SubscriptionRoleArn` – The ARN of the IAM role that has the
79
88
  # following:
80
89
  #
81
- # * Permission to write to the Kinesis Data Firehose delivery stream
90
+ # * Permission to write to the Firehose delivery stream
82
91
  #
83
92
  # * Amazon SNS listed as a trusted entity
84
93
  #
85
- # Specifying a valid ARN for this attribute is required for Kinesis
86
- # Data Firehose delivery stream subscriptions. For more information,
87
- # see [Fanout to Kinesis Data Firehose delivery streams][2] in the
88
- # *Amazon SNS Developer Guide*.
94
+ # Specifying a valid ARN for this attribute is required for Firehose
95
+ # delivery stream subscriptions. For more information, see [Fanout to
96
+ # Firehose delivery streams][2] in the *Amazon SNS Developer Guide*.
89
97
  #
90
98
  #
91
99
  #
@@ -110,7 +118,9 @@ module Aws::SNS
110
118
  #
111
119
  # @return [self]
112
120
  def load
113
- resp = @client.get_subscription_attributes(subscription_arn: @arn)
121
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
122
+ @client.get_subscription_attributes(subscription_arn: @arn)
123
+ end
114
124
  @data = resp.data
115
125
  self
116
126
  end
@@ -140,7 +150,9 @@ module Aws::SNS
140
150
  # @return [EmptyStructure]
141
151
  def delete(options = {})
142
152
  options = options.merge(subscription_arn: @arn)
143
- resp = @client.unsubscribe(options)
153
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
154
+ @client.unsubscribe(options)
155
+ end
144
156
  resp.data
145
157
  end
146
158
 
@@ -164,6 +176,14 @@ module Aws::SNS
164
176
  # receive only a subset of messages, rather than receiving every
165
177
  # message published to the topic.
166
178
  #
179
+ # * `FilterPolicyScope` – This attribute lets you choose the filtering
180
+ # scope by using one of the following string value types:
181
+ #
182
+ # * `MessageAttributes` (default) – The filter is applied on the
183
+ # message attributes.
184
+ #
185
+ # * `MessageBody` – The filter is applied on the message body.
186
+ #
167
187
  # * `RawMessageDelivery` – When set to `true`, enables raw message
168
188
  # delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need
169
189
  # for the endpoints to process JSON formatting, which is otherwise
@@ -176,20 +196,19 @@ module Aws::SNS
176
196
  # service that powers the subscribed endpoint becomes unavailable) are
177
197
  # held in the dead-letter queue for further analysis or reprocessing.
178
198
  #
179
- # The following attribute applies only to Amazon Kinesis Data Firehose
180
- # delivery stream subscriptions:
199
+ # The following attribute applies only to Amazon Data Firehose delivery
200
+ # stream subscriptions:
181
201
  #
182
202
  # * `SubscriptionRoleArn` – The ARN of the IAM role that has the
183
203
  # following:
184
204
  #
185
- # * Permission to write to the Kinesis Data Firehose delivery stream
205
+ # * Permission to write to the Firehose delivery stream
186
206
  #
187
207
  # * Amazon SNS listed as a trusted entity
188
208
  #
189
- # Specifying a valid ARN for this attribute is required for Kinesis
190
- # Data Firehose delivery stream subscriptions. For more information,
191
- # see [Fanout to Kinesis Data Firehose delivery streams][1] in the
192
- # *Amazon SNS Developer Guide*.
209
+ # Specifying a valid ARN for this attribute is required for Firehose
210
+ # delivery stream subscriptions. For more information, see [Fanout to
211
+ # Firehose delivery streams][1] in the *Amazon SNS Developer Guide*.
193
212
  #
194
213
  #
195
214
  #
@@ -199,7 +218,9 @@ module Aws::SNS
199
218
  # @return [EmptyStructure]
200
219
  def set_attributes(options = {})
201
220
  options = options.merge(subscription_arn: @arn)
202
- resp = @client.set_subscription_attributes(options)
221
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
222
+ @client.set_subscription_attributes(options)
223
+ end
203
224
  resp.data
204
225
  end
205
226