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.
@@ -45,6 +45,13 @@ module Aws::SNS
45
45
  # * `ApplePlatformBundleID` – The app identifier used to configure
46
46
  # token-based authentication.
47
47
  #
48
+ # * `AuthenticationMethod` – Returns the credential type used when
49
+ # sending push notifications from application to APNS/APNS\_Sandbox,
50
+ # or application to GCM.
51
+ #
52
+ # * APNS – Returns the token or certificate.
53
+ #
54
+ # * GCM – Returns the token or key.
48
55
  # * `EventEndpointCreated` – Topic ARN to which EndpointCreated event
49
56
  # notifications should be sent.
50
57
  #
@@ -76,7 +83,9 @@ module Aws::SNS
76
83
  #
77
84
  # @return [self]
78
85
  def load
79
- resp = @client.get_platform_application_attributes(platform_application_arn: @arn)
86
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
87
+ @client.get_platform_application_attributes(platform_application_arn: @arn)
88
+ end
80
89
  @data = resp.data
81
90
  self
82
91
  end
@@ -120,7 +129,7 @@ module Aws::SNS
120
129
  # Arbitrary user data to associate with the endpoint. Amazon SNS does
121
130
  # not use this data. The data must be in UTF-8 format and less than 2KB.
122
131
  # @option options [Hash<String,String>] :attributes
123
- # For a list of attributes, see [SetEndpointAttributes][1].
132
+ # For a list of attributes, see [ `SetEndpointAttributes` ][1].
124
133
  #
125
134
  #
126
135
  #
@@ -128,7 +137,9 @@ module Aws::SNS
128
137
  # @return [PlatformEndpoint]
129
138
  def create_platform_endpoint(options = {})
130
139
  options = options.merge(platform_application_arn: @arn)
131
- resp = @client.create_platform_endpoint(options)
140
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
141
+ @client.create_platform_endpoint(options)
142
+ end
132
143
  PlatformEndpoint.new(
133
144
  arn: resp.data.endpoint_arn,
134
145
  client: @client
@@ -142,7 +153,9 @@ module Aws::SNS
142
153
  # @return [EmptyStructure]
143
154
  def delete(options = {})
144
155
  options = options.merge(platform_application_arn: @arn)
145
- resp = @client.delete_platform_application(options)
156
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
157
+ @client.delete_platform_application(options)
158
+ end
146
159
  resp.data
147
160
  end
148
161
 
@@ -169,8 +182,16 @@ module Aws::SNS
169
182
  # * For Apple Services using token credentials, `PlatformCredential`
170
183
  # is signing key.
171
184
  #
172
- # * For GCM (Firebase Cloud Messaging), `PlatformCredential` is API
173
- # key.
185
+ # * For GCM (Firebase Cloud Messaging) using key credentials, there is
186
+ # no `PlatformPrincipal`. The `PlatformCredential` is `API key`.
187
+ #
188
+ # * For GCM (Firebase Cloud Messaging) using token credentials, there
189
+ # is no `PlatformPrincipal`. The `PlatformCredential` is a JSON
190
+ # formatted private key file. When using the Amazon Web Services
191
+ # CLI, the file must be in string format and special characters must
192
+ # be ignored. To format the file correctly, Amazon SNS recommends
193
+ # using the following command: `` SERVICE_JSON=`jq @json <<< cat
194
+ # service.json` ``.
174
195
  # ^
175
196
  #
176
197
  # * `PlatformPrincipal` – The principal received from the notification
@@ -221,7 +242,9 @@ module Aws::SNS
221
242
  # @return [EmptyStructure]
222
243
  def set_attributes(options = {})
223
244
  options = options.merge(platform_application_arn: @arn)
224
- resp = @client.set_platform_application_attributes(options)
245
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
246
+ @client.set_platform_application_attributes(options)
247
+ end
225
248
  resp.data
226
249
  end
227
250
 
@@ -235,7 +258,9 @@ module Aws::SNS
235
258
  def endpoints(options = {})
236
259
  batches = Enumerator.new do |y|
237
260
  options = options.merge(platform_application_arn: @arn)
238
- resp = @client.list_endpoints_by_platform_application(options)
261
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
262
+ @client.list_endpoints_by_platform_application(options)
263
+ end
239
264
  resp.each_page do |page|
240
265
  batch = []
241
266
  page.data.endpoints.each do |e|
@@ -72,7 +72,9 @@ module Aws::SNS
72
72
  #
73
73
  # @return [self]
74
74
  def load
75
- resp = @client.get_endpoint_attributes(endpoint_arn: @arn)
75
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
76
+ @client.get_endpoint_attributes(endpoint_arn: @arn)
77
+ end
76
78
  @data = resp.data
77
79
  self
78
80
  end
@@ -102,7 +104,9 @@ module Aws::SNS
102
104
  # @return [EmptyStructure]
103
105
  def delete(options = {})
104
106
  options = options.merge(endpoint_arn: @arn)
105
- resp = @client.delete_endpoint(options)
107
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
108
+ @client.delete_endpoint(options)
109
+ end
106
110
  resp.data
107
111
  end
108
112
 
@@ -110,7 +114,7 @@ module Aws::SNS
110
114
  #
111
115
  # platform_endpoint.publish({
112
116
  # topic_arn: "topicARN",
113
- # phone_number: "String",
117
+ # phone_number: "PhoneNumber",
114
118
  # message: "message", # required
115
119
  # subject: "subject",
116
120
  # message_structure: "messageStructure",
@@ -196,9 +200,8 @@ module Aws::SNS
196
200
  # is delivered to email endpoints. This field will also be included, if
197
201
  # present, in the standard JSON messages delivered to other endpoints.
198
202
  #
199
- # Constraints: Subjects must be ASCII text that begins with a letter,
200
- # number, or punctuation mark; must not include line breaks or control
201
- # characters; and must be less than 100 characters long.
203
+ # Constraints: Subjects must be UTF-8 text with no line breaks or
204
+ # control characters, and less than 100 characters long.
202
205
  # @option options [String] :message_structure
203
206
  # Set `MessageStructure` to `json` if you want to send a different
204
207
  # message for each protocol. For example, using one publish action, you
@@ -218,24 +221,54 @@ module Aws::SNS
218
221
  # @option options [Hash<String,Types::MessageAttributeValue>] :message_attributes
219
222
  # Message attributes for Publish action.
220
223
  # @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.
224
+ # * This parameter applies only to FIFO (first-in-first-out) topics. The
225
+ # `MessageDeduplicationId` can contain up to 128 alphanumeric
226
+ # characters `(a-z, A-Z, 0-9)` and punctuation ``
227
+ # (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) ``.
228
+ #
229
+ # * Every message must have a unique `MessageDeduplicationId`, which is
230
+ # a token used for deduplication of sent messages within the 5 minute
231
+ # minimum deduplication interval.
232
+ #
233
+ # * The scope of deduplication depends on the `FifoThroughputScope`
234
+ # attribute, when set to `Topic` the message deduplication scope is
235
+ # across the entire topic, when set to `MessageGroup` the message
236
+ # deduplication scope is within each individual message group.
237
+ #
238
+ # * If a message with a particular `MessageDeduplicationId` is sent
239
+ # successfully, subsequent messages within the deduplication scope and
240
+ # interval, with the same `MessageDeduplicationId`, are accepted
241
+ # successfully but aren't delivered.
242
+ #
243
+ # * Every message must have a unique `MessageDeduplicationId`:
244
+ #
245
+ # * You may provide a `MessageDeduplicationId` explicitly.
246
+ #
247
+ # * If you aren't able to provide a `MessageDeduplicationId` and you
248
+ # enable `ContentBasedDeduplication` for your topic, Amazon SNS uses
249
+ # a SHA-256 hash to generate the `MessageDeduplicationId` using the
250
+ # body of the message (but not the attributes of the message).
251
+ #
252
+ # * If you don't provide a `MessageDeduplicationId` and the topic
253
+ # doesn't have `ContentBasedDeduplication` set, the action fails
254
+ # with an error.
255
+ #
256
+ # * If the topic has a `ContentBasedDeduplication` set, your
257
+ # `MessageDeduplicationId` overrides the generated one.
258
+ # * When `ContentBasedDeduplication` is in effect, messages with
259
+ # identical content sent within the deduplication scope and interval
260
+ # are treated as duplicates and only one copy of the message is
261
+ # delivered.
262
+ #
263
+ # * If you send one message with `ContentBasedDeduplication` enabled,
264
+ # and then another message with a `MessageDeduplicationId` that is the
265
+ # same as the one generated for the first `MessageDeduplicationId`,
266
+ # the two messages are treated as duplicates, within the deduplication
267
+ # scope and interval, and only one copy of the message is delivered.
235
268
  # @option options [String] :message_group_id
236
269
  # This parameter applies only to FIFO (first-in-first-out) topics. The
237
270
  # `MessageGroupId` can contain up to 128 alphanumeric characters `(a-z,
238
- # A-Z, 0-9)` and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~) ``.
271
+ # A-Z, 0-9)` and punctuation `` (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) ``.
239
272
  #
240
273
  # The `MessageGroupId` is a tag that specifies that a message belongs to
241
274
  # a specific message group. Messages that belong to the same message
@@ -245,7 +278,9 @@ module Aws::SNS
245
278
  # @return [Types::PublishResponse]
246
279
  def publish(options = {})
247
280
  options = options.merge(target_arn: @arn)
248
- resp = @client.publish(options)
281
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
282
+ @client.publish(options)
283
+ end
249
284
  resp.data
250
285
  end
251
286
 
@@ -277,7 +312,9 @@ module Aws::SNS
277
312
  # @return [EmptyStructure]
278
313
  def set_attributes(options = {})
279
314
  options = options.merge(endpoint_arn: @arn)
280
- resp = @client.set_endpoint_attributes(options)
315
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
316
+ @client.set_endpoint_attributes(options)
317
+ end
281
318
  resp.data
282
319
  end
283
320
 
@@ -14,35 +14,49 @@ module Aws::SNS
14
14
  option(
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::SNS::EndpointProvider',
17
- docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
- 'object that responds to `#resolve_endpoint(parameters)` '\
19
- 'where `parameters` is a Struct similar to '\
20
- '`Aws::SNS::EndpointParameters`'
21
- ) do |cfg|
17
+ rbs_type: 'untyped',
18
+ docstring: <<~DOCS) do |_cfg|
19
+ The endpoint provider used to resolve endpoints. Any object that responds to
20
+ `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
21
+ `Aws::SNS::EndpointParameters`.
22
+ DOCS
22
23
  Aws::SNS::EndpointProvider.new
23
24
  end
24
25
 
25
26
  # @api private
26
27
  class Handler < Seahorse::Client::Handler
27
28
  def call(context)
28
- # If endpoint was discovered, do not resolve or apply the endpoint.
29
29
  unless context[:discovered_endpoint]
30
- params = parameters_for_operation(context)
30
+ params = Aws::SNS::Endpoints.parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
34
34
  apply_endpoint_headers(context, endpoint.headers)
35
+
36
+ context[:endpoint_params] = params
37
+ context[:endpoint_properties] = endpoint.properties
35
38
  end
36
39
 
37
- context[:endpoint_params] = params
38
40
  context[:auth_scheme] =
39
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
42
 
41
- @handler.call(context)
43
+ with_metrics(context) { @handler.call(context) }
42
44
  end
43
45
 
44
46
  private
45
47
 
48
+ def with_metrics(context, &block)
49
+ metrics = []
50
+ metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
51
+ if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
52
+ metrics << 'SIGV4A_SIGNING'
53
+ end
54
+ if context.config.credentials&.credentials&.account_id
55
+ metrics << 'RESOLVED_ACCOUNT_ID'
56
+ end
57
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
58
+ end
59
+
46
60
  def apply_endpoint_headers(context, headers)
47
61
  headers.each do |key, values|
48
62
  value = values
@@ -53,95 +67,6 @@ module Aws::SNS
53
67
  context.http_request.headers[key] = value
54
68
  end
55
69
  end
56
-
57
- def parameters_for_operation(context)
58
- case context.operation_name
59
- when :add_permission
60
- Aws::SNS::Endpoints::AddPermission.build(context)
61
- when :check_if_phone_number_is_opted_out
62
- Aws::SNS::Endpoints::CheckIfPhoneNumberIsOptedOut.build(context)
63
- when :confirm_subscription
64
- Aws::SNS::Endpoints::ConfirmSubscription.build(context)
65
- when :create_platform_application
66
- Aws::SNS::Endpoints::CreatePlatformApplication.build(context)
67
- when :create_platform_endpoint
68
- Aws::SNS::Endpoints::CreatePlatformEndpoint.build(context)
69
- when :create_sms_sandbox_phone_number
70
- Aws::SNS::Endpoints::CreateSMSSandboxPhoneNumber.build(context)
71
- when :create_topic
72
- Aws::SNS::Endpoints::CreateTopic.build(context)
73
- when :delete_endpoint
74
- Aws::SNS::Endpoints::DeleteEndpoint.build(context)
75
- when :delete_platform_application
76
- Aws::SNS::Endpoints::DeletePlatformApplication.build(context)
77
- when :delete_sms_sandbox_phone_number
78
- Aws::SNS::Endpoints::DeleteSMSSandboxPhoneNumber.build(context)
79
- when :delete_topic
80
- Aws::SNS::Endpoints::DeleteTopic.build(context)
81
- when :get_data_protection_policy
82
- Aws::SNS::Endpoints::GetDataProtectionPolicy.build(context)
83
- when :get_endpoint_attributes
84
- Aws::SNS::Endpoints::GetEndpointAttributes.build(context)
85
- when :get_platform_application_attributes
86
- Aws::SNS::Endpoints::GetPlatformApplicationAttributes.build(context)
87
- when :get_sms_attributes
88
- Aws::SNS::Endpoints::GetSMSAttributes.build(context)
89
- when :get_sms_sandbox_account_status
90
- Aws::SNS::Endpoints::GetSMSSandboxAccountStatus.build(context)
91
- when :get_subscription_attributes
92
- Aws::SNS::Endpoints::GetSubscriptionAttributes.build(context)
93
- when :get_topic_attributes
94
- Aws::SNS::Endpoints::GetTopicAttributes.build(context)
95
- when :list_endpoints_by_platform_application
96
- Aws::SNS::Endpoints::ListEndpointsByPlatformApplication.build(context)
97
- when :list_origination_numbers
98
- Aws::SNS::Endpoints::ListOriginationNumbers.build(context)
99
- when :list_phone_numbers_opted_out
100
- Aws::SNS::Endpoints::ListPhoneNumbersOptedOut.build(context)
101
- when :list_platform_applications
102
- Aws::SNS::Endpoints::ListPlatformApplications.build(context)
103
- when :list_sms_sandbox_phone_numbers
104
- Aws::SNS::Endpoints::ListSMSSandboxPhoneNumbers.build(context)
105
- when :list_subscriptions
106
- Aws::SNS::Endpoints::ListSubscriptions.build(context)
107
- when :list_subscriptions_by_topic
108
- Aws::SNS::Endpoints::ListSubscriptionsByTopic.build(context)
109
- when :list_tags_for_resource
110
- Aws::SNS::Endpoints::ListTagsForResource.build(context)
111
- when :list_topics
112
- Aws::SNS::Endpoints::ListTopics.build(context)
113
- when :opt_in_phone_number
114
- Aws::SNS::Endpoints::OptInPhoneNumber.build(context)
115
- when :publish
116
- Aws::SNS::Endpoints::Publish.build(context)
117
- when :publish_batch
118
- Aws::SNS::Endpoints::PublishBatch.build(context)
119
- when :put_data_protection_policy
120
- Aws::SNS::Endpoints::PutDataProtectionPolicy.build(context)
121
- when :remove_permission
122
- Aws::SNS::Endpoints::RemovePermission.build(context)
123
- when :set_endpoint_attributes
124
- Aws::SNS::Endpoints::SetEndpointAttributes.build(context)
125
- when :set_platform_application_attributes
126
- Aws::SNS::Endpoints::SetPlatformApplicationAttributes.build(context)
127
- when :set_sms_attributes
128
- Aws::SNS::Endpoints::SetSMSAttributes.build(context)
129
- when :set_subscription_attributes
130
- Aws::SNS::Endpoints::SetSubscriptionAttributes.build(context)
131
- when :set_topic_attributes
132
- Aws::SNS::Endpoints::SetTopicAttributes.build(context)
133
- when :subscribe
134
- Aws::SNS::Endpoints::Subscribe.build(context)
135
- when :tag_resource
136
- Aws::SNS::Endpoints::TagResource.build(context)
137
- when :unsubscribe
138
- Aws::SNS::Endpoints::Unsubscribe.build(context)
139
- when :untag_resource
140
- Aws::SNS::Endpoints::UntagResource.build(context)
141
- when :verify_sms_sandbox_phone_number
142
- Aws::SNS::Endpoints::VerifySMSSandboxPhoneNumber.build(context)
143
- end
144
- end
145
70
  end
146
71
 
147
72
  def add_handlers(handlers, _config)
@@ -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
@@ -96,7 +99,7 @@ module Aws::SNS
96
99
  # @option options [Hash<String,String>] :attributes
97
100
  # A map of attributes with their corresponding values.
98
101
  #
99
- # The following lists the names, descriptions, and values of the special
102
+ # The following lists names, descriptions, and values of the special
100
103
  # request parameters that the `CreateTopic` action uses:
101
104
  #
102
105
  # * `DeliveryPolicy` – The policy that defines how Amazon SNS retries
@@ -123,7 +126,7 @@ module Aws::SNS
123
126
  # segment data to topic owner account if the sampled flag in the
124
127
  # tracing header is true. This is only supported on standard topics.
125
128
  #
126
- # The following attribute applies only to [server-side encryption][1]\:
129
+ # The following attribute applies only to [server-side encryption][1]:
127
130
  #
128
131
  # * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
129
132
  # master key (CMK) for Amazon SNS or a custom CMK. For more
@@ -132,9 +135,10 @@ module Aws::SNS
132
135
  #
133
136
  # ^
134
137
  #
135
- # The following attributes apply only to [FIFO topics][4]\:
138
+ # The following attributes apply only to [FIFO topics][4]:
136
139
  #
137
- # * `FifoTopic` – When this is set to `true`, a FIFO topic is created.
140
+ # * `ArchivePolicy` – The policy that sets the retention period for
141
+ # messages stored in the message archive of an Amazon SNS FIFO topic.
138
142
  #
139
143
  # * `ContentBasedDeduplication` – Enables content-based deduplication
140
144
  # for FIFO topics.
@@ -151,6 +155,22 @@ module Aws::SNS
151
155
  # (Optional) To override the generated value, you can specify a
152
156
  # value for the `MessageDeduplicationId` parameter for the `Publish`
153
157
  # action.
158
+ # ^
159
+ #
160
+ # * `FifoThroughputScope` – Enables higher throughput for your FIFO
161
+ # topic by adjusting the scope of deduplication. This attribute has
162
+ # two possible values:
163
+ #
164
+ # * `Topic` – The scope of message deduplication is across the entire
165
+ # topic. This is the default value and maintains existing behavior,
166
+ # with a maximum throughput of 3000 messages per second or 20MB per
167
+ # second, whichever comes first.
168
+ #
169
+ # * `MessageGroup` – The scope of deduplication is within each
170
+ # individual message group, which enables higher throughput per
171
+ # topic subject to regional quotas. For more information on quotas
172
+ # or to request an increase, see [Amazon SNS service quotas][6] in
173
+ # the Amazon Web Services General Reference.
154
174
  #
155
175
  #
156
176
  #
@@ -159,6 +179,7 @@ module Aws::SNS
159
179
  # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters
160
180
  # [4]: https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html
161
181
  # [5]: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
182
+ # [6]: https://docs.aws.amazon.com/general/latest/gr/sns.html
162
183
  # @option options [Array<Types::Tag>] :tags
163
184
  # The list of tags to add to a new topic.
164
185
  #
@@ -176,7 +197,9 @@ module Aws::SNS
176
197
  # Length Constraints: Maximum length of 30,720.
177
198
  # @return [Topic]
178
199
  def create_topic(options = {})
179
- resp = @client.create_topic(options)
200
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
201
+ @client.create_topic(options)
202
+ end
180
203
  Topic.new(
181
204
  arn: resp.data.topic_arn,
182
205
  client: @client
@@ -201,7 +224,9 @@ module Aws::SNS
201
224
  # @return [PlatformApplication::Collection]
202
225
  def platform_applications(options = {})
203
226
  batches = Enumerator.new do |y|
204
- resp = @client.list_platform_applications(options)
227
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
228
+ @client.list_platform_applications(options)
229
+ end
205
230
  resp.each_page do |page|
206
231
  batch = []
207
232
  page.data.platform_applications.each do |p|
@@ -241,7 +266,9 @@ module Aws::SNS
241
266
  # @return [Subscription::Collection]
242
267
  def subscriptions(options = {})
243
268
  batches = Enumerator.new do |y|
244
- resp = @client.list_subscriptions(options)
269
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
270
+ @client.list_subscriptions(options)
271
+ end
245
272
  resp.each_page do |page|
246
273
  batch = []
247
274
  page.data.subscriptions.each do |s|
@@ -272,7 +299,9 @@ module Aws::SNS
272
299
  # @return [Topic::Collection]
273
300
  def topics(options = {})
274
301
  batches = Enumerator.new do |y|
275
- resp = @client.list_topics(options)
302
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
303
+ @client.list_topics(options)
304
+ end
276
305
  resp.each_page do |page|
277
306
  batch = []
278
307
  page.data.topics.each do |t|
@@ -58,7 +58,6 @@ module Aws::SNS
58
58
  # message attributes.
59
59
  #
60
60
  # * `MessageBody` – The filter is applied on the message body.
61
- #
62
61
  # * `Owner` – The Amazon Web Services account ID of the subscription's
63
62
  # owner.
64
63
  #
@@ -81,20 +80,18 @@ module Aws::SNS
81
80
  #
82
81
  # * `TopicArn` – The topic ARN that the subscription is associated with.
83
82
  #
84
- # The following attribute applies only to Amazon Kinesis Data Firehose
85
- # delivery stream subscriptions:
83
+ # The following attribute applies only to Amazon Data Firehose delivery
84
+ # stream subscriptions:
86
85
  #
87
86
  # * `SubscriptionRoleArn` – The ARN of the IAM role that has the
88
87
  # following:
89
88
  #
90
- # * Permission to write to the Kinesis Data Firehose delivery stream
89
+ # * Permission to write to the Firehose delivery stream
91
90
  #
92
91
  # * Amazon SNS listed as a trusted entity
93
- #
94
- # Specifying a valid ARN for this attribute is required for Kinesis
95
- # Data Firehose delivery stream subscriptions. For more information,
96
- # see [Fanout to Kinesis Data Firehose delivery streams][2] in the
97
- # *Amazon SNS Developer Guide*.
92
+ # Specifying a valid ARN for this attribute is required for Firehose
93
+ # delivery stream subscriptions. For more information, see [Fanout to
94
+ # Firehose delivery streams][2] in the *Amazon SNS Developer Guide*.
98
95
  #
99
96
  #
100
97
  #
@@ -119,7 +116,9 @@ module Aws::SNS
119
116
  #
120
117
  # @return [self]
121
118
  def load
122
- resp = @client.get_subscription_attributes(subscription_arn: @arn)
119
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
120
+ @client.get_subscription_attributes(subscription_arn: @arn)
121
+ end
123
122
  @data = resp.data
124
123
  self
125
124
  end
@@ -149,7 +148,9 @@ module Aws::SNS
149
148
  # @return [EmptyStructure]
150
149
  def delete(options = {})
151
150
  options = options.merge(subscription_arn: @arn)
152
- resp = @client.unsubscribe(options)
151
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
152
+ @client.unsubscribe(options)
153
+ end
153
154
  resp.data
154
155
  end
155
156
 
@@ -180,7 +181,6 @@ module Aws::SNS
180
181
  # message attributes.
181
182
  #
182
183
  # * `MessageBody` – The filter is applied on the message body.
183
- #
184
184
  # * `RawMessageDelivery` – When set to `true`, enables raw message
185
185
  # delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need
186
186
  # for the endpoints to process JSON formatting, which is otherwise
@@ -193,20 +193,18 @@ module Aws::SNS
193
193
  # service that powers the subscribed endpoint becomes unavailable) are
194
194
  # held in the dead-letter queue for further analysis or reprocessing.
195
195
  #
196
- # The following attribute applies only to Amazon Kinesis Data Firehose
197
- # delivery stream subscriptions:
196
+ # The following attribute applies only to Amazon Data Firehose delivery
197
+ # stream subscriptions:
198
198
  #
199
199
  # * `SubscriptionRoleArn` – The ARN of the IAM role that has the
200
200
  # following:
201
201
  #
202
- # * Permission to write to the Kinesis Data Firehose delivery stream
202
+ # * Permission to write to the Firehose delivery stream
203
203
  #
204
204
  # * Amazon SNS listed as a trusted entity
205
- #
206
- # Specifying a valid ARN for this attribute is required for Kinesis
207
- # Data Firehose delivery stream subscriptions. For more information,
208
- # see [Fanout to Kinesis Data Firehose delivery streams][1] in the
209
- # *Amazon SNS Developer Guide*.
205
+ # Specifying a valid ARN for this attribute is required for Firehose
206
+ # delivery stream subscriptions. For more information, see [Fanout to
207
+ # Firehose delivery streams][1] in the *Amazon SNS Developer Guide*.
210
208
  #
211
209
  #
212
210
  #
@@ -216,7 +214,9 @@ module Aws::SNS
216
214
  # @return [EmptyStructure]
217
215
  def set_attributes(options = {})
218
216
  options = options.merge(subscription_arn: @arn)
219
- resp = @client.set_subscription_attributes(options)
217
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
218
+ @client.set_subscription_attributes(options)
219
+ end
220
220
  resp.data
221
221
  end
222
222