aws-sdk-sns 1.54.0 → 1.56.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-sns/client.rb +105 -3
- data/lib/aws-sdk-sns/client_api.rb +42 -0
- data/lib/aws-sdk-sns/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-sns/endpoint_provider.rb +119 -0
- data/lib/aws-sdk-sns/endpoints.rb +603 -0
- data/lib/aws-sdk-sns/plugins/endpoints.rb +152 -0
- data/lib/aws-sdk-sns/resource.rb +9 -0
- data/lib/aws-sdk-sns/types.rb +88 -1
- data/lib/aws-sdk-sns.rb +5 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e517ee82c52585fbd4c2414e1788f6479c572cedb40eea6dfa1d502d00711206
|
4
|
+
data.tar.gz: f8b9442b62796acfbdaa0041bf41c66f82b2731cc7d3439341753a51539bf853
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cecff7f053e5f86e0588f246f05a0eae92f3d8a5a40ebcfe26ac901d83fe5d7e6de71b6b8b2f239ee4af8525b2b34ff174d29b833196b215f40f945778563c4f
|
7
|
+
data.tar.gz: 3954d087958ae0a941af3555bbb58706cc529aecd98ded5915441a3ff584fd24f14a78b88a2440c4ed8e587357f548e9838ff4c2ff271561ddedb63b976ab47c
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.56.0 (2022-10-25)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.55.0 (2022-09-07)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Amazon SNS introduces the Data Protection Policy APIs, which enable customers to attach a data protection policy to an SNS topic. This allows topic owners to enable the new message data protection feature to audit and block sensitive data that is exchanged through their topics.
|
13
|
+
|
4
14
|
1.54.0 (2022-08-22)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.56.0
|
data/lib/aws-sdk-sns/client.rb
CHANGED
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
|
|
30
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
31
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
32
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
|
-
require 'aws-sdk-core/plugins/
|
33
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
34
34
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
35
35
|
|
36
36
|
Aws::Plugins::GlobalConfiguration.add_identifier(:sns)
|
@@ -79,8 +79,9 @@ module Aws::SNS
|
|
79
79
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
80
80
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
81
|
add_plugin(Aws::Plugins::RecursionDetection)
|
82
|
-
add_plugin(Aws::Plugins::
|
82
|
+
add_plugin(Aws::Plugins::Sign)
|
83
83
|
add_plugin(Aws::Plugins::Protocols::Query)
|
84
|
+
add_plugin(Aws::SNS::Plugins::Endpoints)
|
84
85
|
|
85
86
|
# @overload initialize(options)
|
86
87
|
# @param [Hash] options
|
@@ -287,6 +288,19 @@ module Aws::SNS
|
|
287
288
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
288
289
|
# requests are made, and retries are disabled.
|
289
290
|
#
|
291
|
+
# @option options [Aws::TokenProvider] :token_provider
|
292
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
293
|
+
# following classes:
|
294
|
+
#
|
295
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
296
|
+
# tokens.
|
297
|
+
#
|
298
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
299
|
+
# access token generated from `aws login`.
|
300
|
+
#
|
301
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
302
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
303
|
+
#
|
290
304
|
# @option options [Boolean] :use_dualstack_endpoint
|
291
305
|
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
292
306
|
# will be used if available.
|
@@ -300,6 +314,9 @@ module Aws::SNS
|
|
300
314
|
# When `true`, request parameters are validated before
|
301
315
|
# sending the request.
|
302
316
|
#
|
317
|
+
# @option options [Aws::SNS::EndpointProvider] :endpoint_provider
|
318
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SNS::EndpointParameters`
|
319
|
+
#
|
303
320
|
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
304
321
|
# requests through. Formatted like 'http://proxy.com:123'.
|
305
322
|
#
|
@@ -748,6 +765,15 @@ module Aws::SNS
|
|
748
765
|
#
|
749
766
|
# </note>
|
750
767
|
#
|
768
|
+
# @option params [String] :data_protection_policy
|
769
|
+
# The body of the policy document you want to use for this topic.
|
770
|
+
#
|
771
|
+
# You can only add one policy per topic.
|
772
|
+
#
|
773
|
+
# The policy must be in JSON string format.
|
774
|
+
#
|
775
|
+
# Length Constraints: Maximum length of 30,720.
|
776
|
+
#
|
751
777
|
# @return [Types::CreateTopicResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
752
778
|
#
|
753
779
|
# * {Types::CreateTopicResponse#topic_arn #topic_arn} => String
|
@@ -765,6 +791,7 @@ module Aws::SNS
|
|
765
791
|
# value: "TagValue", # required
|
766
792
|
# },
|
767
793
|
# ],
|
794
|
+
# data_protection_policy: "attributeValue",
|
768
795
|
# })
|
769
796
|
#
|
770
797
|
# @example Response structure
|
@@ -902,6 +929,42 @@ module Aws::SNS
|
|
902
929
|
req.send_request(options)
|
903
930
|
end
|
904
931
|
|
932
|
+
# Retrieves the specified inline `DataProtectionPolicy` document that is
|
933
|
+
# stored in the specified Amazon SNS topic.
|
934
|
+
#
|
935
|
+
# @option params [required, String] :resource_arn
|
936
|
+
# The ARN of the topic whose `DataProtectionPolicy` you want to get.
|
937
|
+
#
|
938
|
+
# For more information about ARNs, see [Amazon Resource Names (ARNs)][1]
|
939
|
+
# in the Amazon Web Services General Reference.
|
940
|
+
#
|
941
|
+
#
|
942
|
+
#
|
943
|
+
# [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
944
|
+
#
|
945
|
+
# @return [Types::GetDataProtectionPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
946
|
+
#
|
947
|
+
# * {Types::GetDataProtectionPolicyResponse#data_protection_policy #data_protection_policy} => String
|
948
|
+
#
|
949
|
+
# @example Request syntax with placeholder values
|
950
|
+
#
|
951
|
+
# resp = client.get_data_protection_policy({
|
952
|
+
# resource_arn: "topicARN", # required
|
953
|
+
# })
|
954
|
+
#
|
955
|
+
# @example Response structure
|
956
|
+
#
|
957
|
+
# resp.data_protection_policy #=> String
|
958
|
+
#
|
959
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetDataProtectionPolicy AWS API Documentation
|
960
|
+
#
|
961
|
+
# @overload get_data_protection_policy(params = {})
|
962
|
+
# @param [Hash] params ({})
|
963
|
+
def get_data_protection_policy(params = {}, options = {})
|
964
|
+
req = build_request(:get_data_protection_policy, params)
|
965
|
+
req.send_request(options)
|
966
|
+
end
|
967
|
+
|
905
968
|
# Retrieves the endpoint attributes for a device on one of the supported
|
906
969
|
# push notification services, such as GCM (Firebase Cloud Messaging) and
|
907
970
|
# APNS. For more information, see [Using Amazon SNS Mobile Push
|
@@ -1836,6 +1899,45 @@ module Aws::SNS
|
|
1836
1899
|
req.send_request(options)
|
1837
1900
|
end
|
1838
1901
|
|
1902
|
+
# Adds or updates an inline policy document that is stored in the
|
1903
|
+
# specified Amazon SNS topic.
|
1904
|
+
#
|
1905
|
+
# @option params [required, String] :resource_arn
|
1906
|
+
# The ARN of the topic whose `DataProtectionPolicy` you want to add or
|
1907
|
+
# update.
|
1908
|
+
#
|
1909
|
+
# For more information about ARNs, see [Amazon Resource Names (ARNs)][1]
|
1910
|
+
# in the Amazon Web Services General Reference.
|
1911
|
+
#
|
1912
|
+
#
|
1913
|
+
#
|
1914
|
+
# [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
1915
|
+
#
|
1916
|
+
# @option params [required, String] :data_protection_policy
|
1917
|
+
# The JSON serialization of the topic's `DataProtectionPolicy`.
|
1918
|
+
#
|
1919
|
+
# The `DataProtectionPolicy` must be in JSON string format.
|
1920
|
+
#
|
1921
|
+
# Length Constraints: Maximum length of 30,720.
|
1922
|
+
#
|
1923
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1924
|
+
#
|
1925
|
+
# @example Request syntax with placeholder values
|
1926
|
+
#
|
1927
|
+
# resp = client.put_data_protection_policy({
|
1928
|
+
# resource_arn: "topicARN", # required
|
1929
|
+
# data_protection_policy: "attributeValue", # required
|
1930
|
+
# })
|
1931
|
+
#
|
1932
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/PutDataProtectionPolicy AWS API Documentation
|
1933
|
+
#
|
1934
|
+
# @overload put_data_protection_policy(params = {})
|
1935
|
+
# @param [Hash] params ({})
|
1936
|
+
def put_data_protection_policy(params = {}, options = {})
|
1937
|
+
req = build_request(:put_data_protection_policy, params)
|
1938
|
+
req.send_request(options)
|
1939
|
+
end
|
1940
|
+
|
1839
1941
|
# Removes a statement from a topic's access control policy.
|
1840
1942
|
#
|
1841
1943
|
# @option params [required, String] :topic_arn
|
@@ -2606,7 +2708,7 @@ module Aws::SNS
|
|
2606
2708
|
params: params,
|
2607
2709
|
config: config)
|
2608
2710
|
context[:gem_name] = 'aws-sdk-sns'
|
2609
|
-
context[:gem_version] = '1.
|
2711
|
+
context[:gem_version] = '1.56.0'
|
2610
2712
|
Seahorse::Client::Request.new(handlers, context)
|
2611
2713
|
end
|
2612
2714
|
|
@@ -45,6 +45,8 @@ module Aws::SNS
|
|
45
45
|
Endpoint = Shapes::StructureShape.new(name: 'Endpoint')
|
46
46
|
EndpointDisabledException = Shapes::StructureShape.new(name: 'EndpointDisabledException')
|
47
47
|
FilterPolicyLimitExceededException = Shapes::StructureShape.new(name: 'FilterPolicyLimitExceededException')
|
48
|
+
GetDataProtectionPolicyInput = Shapes::StructureShape.new(name: 'GetDataProtectionPolicyInput')
|
49
|
+
GetDataProtectionPolicyResponse = Shapes::StructureShape.new(name: 'GetDataProtectionPolicyResponse')
|
48
50
|
GetEndpointAttributesInput = Shapes::StructureShape.new(name: 'GetEndpointAttributesInput')
|
49
51
|
GetEndpointAttributesResponse = Shapes::StructureShape.new(name: 'GetEndpointAttributesResponse')
|
50
52
|
GetPlatformApplicationAttributesInput = Shapes::StructureShape.new(name: 'GetPlatformApplicationAttributesInput')
|
@@ -118,6 +120,7 @@ module Aws::SNS
|
|
118
120
|
PublishBatchResultEntryList = Shapes::ListShape.new(name: 'PublishBatchResultEntryList')
|
119
121
|
PublishInput = Shapes::StructureShape.new(name: 'PublishInput')
|
120
122
|
PublishResponse = Shapes::StructureShape.new(name: 'PublishResponse')
|
123
|
+
PutDataProtectionPolicyInput = Shapes::StructureShape.new(name: 'PutDataProtectionPolicyInput')
|
121
124
|
RemovePermissionInput = Shapes::StructureShape.new(name: 'RemovePermissionInput')
|
122
125
|
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
123
126
|
RouteType = Shapes::StringShape.new(name: 'RouteType')
|
@@ -251,6 +254,7 @@ module Aws::SNS
|
|
251
254
|
CreateTopicInput.add_member(:name, Shapes::ShapeRef.new(shape: topicName, required: true, location_name: "Name"))
|
252
255
|
CreateTopicInput.add_member(:attributes, Shapes::ShapeRef.new(shape: TopicAttributesMap, location_name: "Attributes"))
|
253
256
|
CreateTopicInput.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
|
257
|
+
CreateTopicInput.add_member(:data_protection_policy, Shapes::ShapeRef.new(shape: attributeValue, location_name: "DataProtectionPolicy"))
|
254
258
|
CreateTopicInput.struct_class = Types::CreateTopicInput
|
255
259
|
|
256
260
|
CreateTopicResponse.add_member(:topic_arn, Shapes::ShapeRef.new(shape: topicARN, location_name: "TopicArn"))
|
@@ -285,6 +289,12 @@ module Aws::SNS
|
|
285
289
|
FilterPolicyLimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: string, location_name: "message"))
|
286
290
|
FilterPolicyLimitExceededException.struct_class = Types::FilterPolicyLimitExceededException
|
287
291
|
|
292
|
+
GetDataProtectionPolicyInput.add_member(:resource_arn, Shapes::ShapeRef.new(shape: topicARN, required: true, location_name: "ResourceArn"))
|
293
|
+
GetDataProtectionPolicyInput.struct_class = Types::GetDataProtectionPolicyInput
|
294
|
+
|
295
|
+
GetDataProtectionPolicyResponse.add_member(:data_protection_policy, Shapes::ShapeRef.new(shape: attributeValue, location_name: "DataProtectionPolicy"))
|
296
|
+
GetDataProtectionPolicyResponse.struct_class = Types::GetDataProtectionPolicyResponse
|
297
|
+
|
288
298
|
GetEndpointAttributesInput.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointArn"))
|
289
299
|
GetEndpointAttributesInput.struct_class = Types::GetEndpointAttributesInput
|
290
300
|
|
@@ -509,6 +519,10 @@ module Aws::SNS
|
|
509
519
|
PublishResponse.add_member(:sequence_number, Shapes::ShapeRef.new(shape: String, location_name: "SequenceNumber"))
|
510
520
|
PublishResponse.struct_class = Types::PublishResponse
|
511
521
|
|
522
|
+
PutDataProtectionPolicyInput.add_member(:resource_arn, Shapes::ShapeRef.new(shape: topicARN, required: true, location_name: "ResourceArn"))
|
523
|
+
PutDataProtectionPolicyInput.add_member(:data_protection_policy, Shapes::ShapeRef.new(shape: attributeValue, required: true, location_name: "DataProtectionPolicy"))
|
524
|
+
PutDataProtectionPolicyInput.struct_class = Types::PutDataProtectionPolicyInput
|
525
|
+
|
512
526
|
RemovePermissionInput.add_member(:topic_arn, Shapes::ShapeRef.new(shape: topicARN, required: true, location_name: "TopicArn"))
|
513
527
|
RemovePermissionInput.add_member(:label, Shapes::ShapeRef.new(shape: label, required: true, location_name: "Label"))
|
514
528
|
RemovePermissionInput.struct_class = Types::RemovePermissionInput
|
@@ -796,6 +810,19 @@ module Aws::SNS
|
|
796
810
|
o.errors << Shapes::ShapeRef.new(shape: ConcurrentAccessException)
|
797
811
|
end)
|
798
812
|
|
813
|
+
api.add_operation(:get_data_protection_policy, Seahorse::Model::Operation.new.tap do |o|
|
814
|
+
o.name = "GetDataProtectionPolicy"
|
815
|
+
o.http_method = "POST"
|
816
|
+
o.http_request_uri = "/"
|
817
|
+
o.input = Shapes::ShapeRef.new(shape: GetDataProtectionPolicyInput)
|
818
|
+
o.output = Shapes::ShapeRef.new(shape: GetDataProtectionPolicyResponse)
|
819
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
820
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
|
821
|
+
o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
|
822
|
+
o.errors << Shapes::ShapeRef.new(shape: AuthorizationErrorException)
|
823
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidSecurityException)
|
824
|
+
end)
|
825
|
+
|
799
826
|
api.add_operation(:get_endpoint_attributes, Seahorse::Model::Operation.new.tap do |o|
|
800
827
|
o.name = "GetEndpointAttributes"
|
801
828
|
o.http_method = "POST"
|
@@ -1050,6 +1077,7 @@ module Aws::SNS
|
|
1050
1077
|
o.errors << Shapes::ShapeRef.new(shape: KMSThrottlingException)
|
1051
1078
|
o.errors << Shapes::ShapeRef.new(shape: KMSAccessDeniedException)
|
1052
1079
|
o.errors << Shapes::ShapeRef.new(shape: InvalidSecurityException)
|
1080
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
1053
1081
|
end)
|
1054
1082
|
|
1055
1083
|
api.add_operation(:publish_batch, Seahorse::Model::Operation.new.tap do |o|
|
@@ -1077,6 +1105,20 @@ module Aws::SNS
|
|
1077
1105
|
o.errors << Shapes::ShapeRef.new(shape: KMSThrottlingException)
|
1078
1106
|
o.errors << Shapes::ShapeRef.new(shape: KMSAccessDeniedException)
|
1079
1107
|
o.errors << Shapes::ShapeRef.new(shape: InvalidSecurityException)
|
1108
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
1109
|
+
end)
|
1110
|
+
|
1111
|
+
api.add_operation(:put_data_protection_policy, Seahorse::Model::Operation.new.tap do |o|
|
1112
|
+
o.name = "PutDataProtectionPolicy"
|
1113
|
+
o.http_method = "POST"
|
1114
|
+
o.http_request_uri = "/"
|
1115
|
+
o.input = Shapes::ShapeRef.new(shape: PutDataProtectionPolicyInput)
|
1116
|
+
o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
|
1117
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
1118
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
|
1119
|
+
o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
|
1120
|
+
o.errors << Shapes::ShapeRef.new(shape: AuthorizationErrorException)
|
1121
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidSecurityException)
|
1080
1122
|
end)
|
1081
1123
|
|
1082
1124
|
api.add_operation(:remove_permission, Seahorse::Model::Operation.new.tap do |o|
|
@@ -0,0 +1,66 @@
|
|
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
|
+
module Aws::SNS
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
54
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
55
|
+
if self[:use_dual_stack].nil?
|
56
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
57
|
+
end
|
58
|
+
self[:use_fips] = options[:use_fips]
|
59
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
60
|
+
if self[:use_fips].nil?
|
61
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
62
|
+
end
|
63
|
+
self[:endpoint] = options[:endpoint]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,119 @@
|
|
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
|
+
module Aws::SNS
|
11
|
+
class EndpointProvider
|
12
|
+
def initialize(rule_set = nil)
|
13
|
+
@@rule_set ||= begin
|
14
|
+
endpoint_rules = Aws::Json.load(Base64.decode64(RULES))
|
15
|
+
Aws::Endpoints::RuleSet.new(
|
16
|
+
version: endpoint_rules['version'],
|
17
|
+
service_id: endpoint_rules['serviceId'],
|
18
|
+
parameters: endpoint_rules['parameters'],
|
19
|
+
rules: endpoint_rules['rules']
|
20
|
+
)
|
21
|
+
end
|
22
|
+
@provider = Aws::Endpoints::RulesProvider.new(rule_set || @@rule_set)
|
23
|
+
end
|
24
|
+
|
25
|
+
def resolve_endpoint(parameters)
|
26
|
+
@provider.resolve_endpoint(parameters)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @api private
|
30
|
+
RULES = <<-JSON
|
31
|
+
eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
|
32
|
+
bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOmZhbHNlLCJkb2N1bWVu
|
33
|
+
dGF0aW9uIjoiVGhlIEFXUyByZWdpb24gdXNlZCB0byBkaXNwYXRjaCB0aGUg
|
34
|
+
cmVxdWVzdC4iLCJ0eXBlIjoiU3RyaW5nIn0sIlVzZUR1YWxTdGFjayI6eyJi
|
35
|
+
d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