aws-sdk-sns 1.55.0 → 1.57.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,152 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::SNS
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
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|
22
+ Aws::SNS::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ 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
+ end
146
+
147
+ def add_handlers(handlers, _config)
148
+ handlers.add(Handler, step: :build, priority: 75)
149
+ end
150
+ end
151
+ end
152
+ end
@@ -110,6 +110,19 @@ module Aws::SNS
110
110
  # * `Policy` – The policy that defines who can access your topic. By
111
111
  # default, only the topic owner can publish or subscribe to the topic.
112
112
  #
113
+ # * `SignatureVersion` – The signature version corresponds to the
114
+ # hashing algorithm used while creating the signature of the
115
+ # notifications, subscription confirmations, or unsubscribe
116
+ # confirmation messages sent by Amazon SNS. By default,
117
+ # `SignatureVersion` is set to 1.
118
+ #
119
+ # * `TracingConfig` – Tracing mode of an Amazon SNS topic. By default
120
+ # `TracingConfig` is set to `PassThrough`, and the topic passes
121
+ # through the tracing header it receives from an Amazon SNS publisher
122
+ # to its subscriptions. If set to Active, Amazon SNS will vend X-Ray
123
+ # segment data to topic owner account if the sampled flag in the
124
+ # tracing header is true. This is only supported on standard topics.
125
+ #
113
126
  # The following attribute applies only to [server-side encryption][1]\:
114
127
  #
115
128
  # * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
@@ -51,6 +51,14 @@ 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
+ # * `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
+ #
54
62
  # * `Owner` – The Amazon Web Services account ID of the subscription's
55
63
  # owner.
56
64
  #
@@ -165,6 +173,14 @@ module Aws::SNS
165
173
  # receive only a subset of messages, rather than receiving every
166
174
  # message published to the topic.
167
175
  #
176
+ # * `FilterPolicyScope` – This attribute lets you choose the filtering
177
+ # scope by using one of the following string value types:
178
+ #
179
+ # * `MessageAttributes` (default) – The filter is applied on the
180
+ # message attributes.
181
+ #
182
+ # * `MessageBody` – The filter is applied on the message body.
183
+ #
168
184
  # * `RawMessageDelivery` – When set to `true`, enables raw message
169
185
  # delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need
170
186
  # for the endpoints to process JSON formatting, which is otherwise
@@ -43,11 +43,29 @@ module Aws::SNS
43
43
  # * `DisplayName` – The human-readable name used in the `From` field for
44
44
  # notifications to `email` and `email-json` endpoints.
45
45
  #
46
+ # * `EffectiveDeliveryPolicy` – The JSON serialization of the effective
47
+ # delivery policy, taking system defaults into account.
48
+ #
46
49
  # * `Owner` – The Amazon Web Services account ID of the topic's owner.
47
50
  #
48
51
  # * `Policy` – The JSON serialization of the topic's access control
49
52
  # policy.
50
53
  #
54
+ # * `SignatureVersion` – The version of the Amazon SNS signature used
55
+ # for the topic.
56
+ #
57
+ # * By default, `SignatureVersion` is set to **1**. The signature is a
58
+ # Base64-encoded **SHA1withRSA** signature.
59
+ #
60
+ # * When you set `SignatureVersion` to **2**. Amazon SNS uses a
61
+ # Base64-encoded **SHA256withRSA** signature.
62
+ #
63
+ # <note markdown="1"> If the API response does not include the `SignatureVersion`
64
+ # attribute, it means that the `SignatureVersion` for the topic has
65
+ # value **1**.
66
+ #
67
+ # </note>
68
+ #
51
69
  # * `SubscriptionsConfirmed` – The number of confirmed subscriptions for
52
70
  # the topic.
53
71
  #
@@ -59,8 +77,12 @@ module Aws::SNS
59
77
  #
60
78
  # * `TopicArn` – The topic's ARN.
61
79
  #
62
- # * `EffectiveDeliveryPolicy` – The JSON serialization of the effective
63
- # delivery policy, taking system defaults into account.
80
+ # * `TracingConfig` – Tracing mode of an Amazon SNS topic. By default
81
+ # `TracingConfig` is set to `PassThrough`, and the topic passes
82
+ # through the tracing header it receives from an Amazon SNS publisher
83
+ # to its subscriptions. If set to Active, Amazon SNS will vend X-Ray
84
+ # segment data to topic owner account if the sampled flag in the
85
+ # tracing header is true. This is only supported on standard topics.
64
86
  #
65
87
  # The following attribute applies only to [server-side-encryption][1]\:
66
88
  #
@@ -380,6 +402,13 @@ module Aws::SNS
380
402
  # * `Policy` – The policy that defines who can access your topic. By
381
403
  # default, only the topic owner can publish or subscribe to the topic.
382
404
  #
405
+ # * `TracingConfig` – Tracing mode of an Amazon SNS topic. By default
406
+ # `TracingConfig` is set to `PassThrough`, and the topic passes
407
+ # through the tracing header it receives from an Amazon SNS publisher
408
+ # to its subscriptions. If set to Active, Amazon SNS will vend X-Ray
409
+ # segment data to topic owner account if the sampled flag in the
410
+ # tracing header is true. This is only supported on standard topics.
411
+ #
383
412
  # The following attribute applies only to [server-side-encryption][1]\:
384
413
  #
385
414
  # * `KmsMasterKeyId` – The ID of an Amazon Web Services managed customer
@@ -387,7 +416,10 @@ module Aws::SNS
387
416
  # information, see [Key Terms][2]. For more examples, see [KeyId][3]
388
417
  # in the *Key Management Service API Reference*.
389
418
  #
390
- # ^
419
+ # * `SignatureVersion` – The signature version corresponds to the
420
+ # hashing algorithm used while creating the signature of the
421
+ # notifications, subscription confirmations, or unsubscribe
422
+ # confirmation messages sent by Amazon SNS.
391
423
  #
392
424
  # The following attribute applies only to [FIFO topics][4]\:
393
425
  #
@@ -497,6 +529,14 @@ module Aws::SNS
497
529
  # receive only a subset of messages, rather than receiving every
498
530
  # message published to the topic.
499
531
  #
532
+ # * `FilterPolicyScope` – This attribute lets you choose the filtering
533
+ # scope by using one of the following string value types:
534
+ #
535
+ # * `MessageAttributes` (default) – The filter is applied on the
536
+ # message attributes.
537
+ #
538
+ # * `MessageBody` – The filter is applied on the message body.
539
+ #
500
540
  # * `RawMessageDelivery` – When set to `true`, enables raw message
501
541
  # delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need
502
542
  # for the endpoints to process JSON formatting, which is otherwise