aws-sdk-sns 1.88.0 → 1.112.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.
@@ -17,15 +17,15 @@ module Aws::SNS
17
17
  ActionsList = Shapes::ListShape.new(name: 'ActionsList')
18
18
  AddPermissionInput = Shapes::StructureShape.new(name: 'AddPermissionInput')
19
19
  AmazonResourceName = Shapes::StringShape.new(name: 'AmazonResourceName')
20
- AuthorizationErrorException = Shapes::StructureShape.new(name: 'AuthorizationErrorException', error: {"code"=>"AuthorizationError", "httpStatusCode"=>403, "senderFault"=>true})
21
- BatchEntryIdsNotDistinctException = Shapes::StructureShape.new(name: 'BatchEntryIdsNotDistinctException', error: {"code"=>"BatchEntryIdsNotDistinct", "httpStatusCode"=>400, "senderFault"=>true})
22
- BatchRequestTooLongException = Shapes::StructureShape.new(name: 'BatchRequestTooLongException', error: {"code"=>"BatchRequestTooLong", "httpStatusCode"=>400, "senderFault"=>true})
20
+ AuthorizationErrorException = Shapes::StructureShape.new(name: 'AuthorizationErrorException', error: {"code" => "AuthorizationError", "httpStatusCode" => 403, "senderFault" => true})
21
+ BatchEntryIdsNotDistinctException = Shapes::StructureShape.new(name: 'BatchEntryIdsNotDistinctException', error: {"code" => "BatchEntryIdsNotDistinct", "httpStatusCode" => 400, "senderFault" => true})
22
+ BatchRequestTooLongException = Shapes::StructureShape.new(name: 'BatchRequestTooLongException', error: {"code" => "BatchRequestTooLong", "httpStatusCode" => 400, "senderFault" => true})
23
23
  BatchResultErrorEntry = Shapes::StructureShape.new(name: 'BatchResultErrorEntry')
24
24
  BatchResultErrorEntryList = Shapes::ListShape.new(name: 'BatchResultErrorEntryList')
25
25
  Binary = Shapes::BlobShape.new(name: 'Binary')
26
26
  CheckIfPhoneNumberIsOptedOutInput = Shapes::StructureShape.new(name: 'CheckIfPhoneNumberIsOptedOutInput')
27
27
  CheckIfPhoneNumberIsOptedOutResponse = Shapes::StructureShape.new(name: 'CheckIfPhoneNumberIsOptedOutResponse')
28
- ConcurrentAccessException = Shapes::StructureShape.new(name: 'ConcurrentAccessException', error: {"code"=>"ConcurrentAccess", "httpStatusCode"=>400, "senderFault"=>true})
28
+ ConcurrentAccessException = Shapes::StructureShape.new(name: 'ConcurrentAccessException', error: {"code" => "ConcurrentAccess", "httpStatusCode" => 400, "senderFault" => true})
29
29
  ConfirmSubscriptionInput = Shapes::StructureShape.new(name: 'ConfirmSubscriptionInput')
30
30
  ConfirmSubscriptionResponse = Shapes::StructureShape.new(name: 'ConfirmSubscriptionResponse')
31
31
  CreateEndpointResponse = Shapes::StructureShape.new(name: 'CreateEndpointResponse')
@@ -42,10 +42,10 @@ module Aws::SNS
42
42
  DeleteSMSSandboxPhoneNumberInput = Shapes::StructureShape.new(name: 'DeleteSMSSandboxPhoneNumberInput')
43
43
  DeleteSMSSandboxPhoneNumberResult = Shapes::StructureShape.new(name: 'DeleteSMSSandboxPhoneNumberResult')
44
44
  DeleteTopicInput = Shapes::StructureShape.new(name: 'DeleteTopicInput')
45
- EmptyBatchRequestException = Shapes::StructureShape.new(name: 'EmptyBatchRequestException', error: {"code"=>"EmptyBatchRequest", "httpStatusCode"=>400, "senderFault"=>true})
45
+ EmptyBatchRequestException = Shapes::StructureShape.new(name: 'EmptyBatchRequestException', error: {"code" => "EmptyBatchRequest", "httpStatusCode" => 400, "senderFault" => true})
46
46
  Endpoint = Shapes::StructureShape.new(name: 'Endpoint')
47
- EndpointDisabledException = Shapes::StructureShape.new(name: 'EndpointDisabledException', error: {"code"=>"EndpointDisabled", "httpStatusCode"=>400, "senderFault"=>true})
48
- FilterPolicyLimitExceededException = Shapes::StructureShape.new(name: 'FilterPolicyLimitExceededException', error: {"code"=>"FilterPolicyLimitExceeded", "httpStatusCode"=>403, "senderFault"=>true})
47
+ EndpointDisabledException = Shapes::StructureShape.new(name: 'EndpointDisabledException', error: {"code" => "EndpointDisabled", "httpStatusCode" => 400, "senderFault" => true})
48
+ FilterPolicyLimitExceededException = Shapes::StructureShape.new(name: 'FilterPolicyLimitExceededException', error: {"code" => "FilterPolicyLimitExceeded", "httpStatusCode" => 403, "senderFault" => true})
49
49
  GetDataProtectionPolicyInput = Shapes::StructureShape.new(name: 'GetDataProtectionPolicyInput')
50
50
  GetDataProtectionPolicyResponse = Shapes::StructureShape.new(name: 'GetDataProtectionPolicyResponse')
51
51
  GetEndpointAttributesInput = Shapes::StructureShape.new(name: 'GetEndpointAttributesInput')
@@ -60,19 +60,19 @@ module Aws::SNS
60
60
  GetSubscriptionAttributesResponse = Shapes::StructureShape.new(name: 'GetSubscriptionAttributesResponse')
61
61
  GetTopicAttributesInput = Shapes::StructureShape.new(name: 'GetTopicAttributesInput')
62
62
  GetTopicAttributesResponse = Shapes::StructureShape.new(name: 'GetTopicAttributesResponse')
63
- InternalErrorException = Shapes::StructureShape.new(name: 'InternalErrorException', error: {"code"=>"InternalError", "httpStatusCode"=>500})
64
- InvalidBatchEntryIdException = Shapes::StructureShape.new(name: 'InvalidBatchEntryIdException', error: {"code"=>"InvalidBatchEntryId", "httpStatusCode"=>400, "senderFault"=>true})
65
- InvalidParameterException = Shapes::StructureShape.new(name: 'InvalidParameterException', error: {"code"=>"InvalidParameter", "httpStatusCode"=>400, "senderFault"=>true})
66
- InvalidParameterValueException = Shapes::StructureShape.new(name: 'InvalidParameterValueException', error: {"code"=>"ParameterValueInvalid", "httpStatusCode"=>400, "senderFault"=>true})
67
- InvalidSecurityException = Shapes::StructureShape.new(name: 'InvalidSecurityException', error: {"code"=>"InvalidSecurity", "httpStatusCode"=>403, "senderFault"=>true})
68
- InvalidStateException = Shapes::StructureShape.new(name: 'InvalidStateException', error: {"code"=>"InvalidState", "httpStatusCode"=>400, "senderFault"=>true})
63
+ InternalErrorException = Shapes::StructureShape.new(name: 'InternalErrorException', error: {"code" => "InternalError", "httpStatusCode" => 500})
64
+ InvalidBatchEntryIdException = Shapes::StructureShape.new(name: 'InvalidBatchEntryIdException', error: {"code" => "InvalidBatchEntryId", "httpStatusCode" => 400, "senderFault" => true})
65
+ InvalidParameterException = Shapes::StructureShape.new(name: 'InvalidParameterException', error: {"code" => "InvalidParameter", "httpStatusCode" => 400, "senderFault" => true})
66
+ InvalidParameterValueException = Shapes::StructureShape.new(name: 'InvalidParameterValueException', error: {"code" => "ParameterValueInvalid", "httpStatusCode" => 400, "senderFault" => true})
67
+ InvalidSecurityException = Shapes::StructureShape.new(name: 'InvalidSecurityException', error: {"code" => "InvalidSecurity", "httpStatusCode" => 403, "senderFault" => true})
68
+ InvalidStateException = Shapes::StructureShape.new(name: 'InvalidStateException', error: {"code" => "InvalidState", "httpStatusCode" => 400, "senderFault" => true})
69
69
  Iso2CountryCode = Shapes::StringShape.new(name: 'Iso2CountryCode')
70
- KMSAccessDeniedException = Shapes::StructureShape.new(name: 'KMSAccessDeniedException', error: {"code"=>"KMSAccessDenied", "httpStatusCode"=>400, "senderFault"=>true})
71
- KMSDisabledException = Shapes::StructureShape.new(name: 'KMSDisabledException', error: {"code"=>"KMSDisabled", "httpStatusCode"=>400, "senderFault"=>true})
72
- KMSInvalidStateException = Shapes::StructureShape.new(name: 'KMSInvalidStateException', error: {"code"=>"KMSInvalidState", "httpStatusCode"=>400, "senderFault"=>true})
73
- KMSNotFoundException = Shapes::StructureShape.new(name: 'KMSNotFoundException', error: {"code"=>"KMSNotFound", "httpStatusCode"=>400, "senderFault"=>true})
74
- KMSOptInRequired = Shapes::StructureShape.new(name: 'KMSOptInRequired', error: {"code"=>"KMSOptInRequired", "httpStatusCode"=>403, "senderFault"=>true})
75
- KMSThrottlingException = Shapes::StructureShape.new(name: 'KMSThrottlingException', error: {"code"=>"KMSThrottling", "httpStatusCode"=>400, "senderFault"=>true})
70
+ KMSAccessDeniedException = Shapes::StructureShape.new(name: 'KMSAccessDeniedException', error: {"code" => "KMSAccessDenied", "httpStatusCode" => 400, "senderFault" => true})
71
+ KMSDisabledException = Shapes::StructureShape.new(name: 'KMSDisabledException', error: {"code" => "KMSDisabled", "httpStatusCode" => 400, "senderFault" => true})
72
+ KMSInvalidStateException = Shapes::StructureShape.new(name: 'KMSInvalidStateException', error: {"code" => "KMSInvalidState", "httpStatusCode" => 400, "senderFault" => true})
73
+ KMSNotFoundException = Shapes::StructureShape.new(name: 'KMSNotFoundException', error: {"code" => "KMSNotFound", "httpStatusCode" => 400, "senderFault" => true})
74
+ KMSOptInRequired = Shapes::StructureShape.new(name: 'KMSOptInRequired', error: {"code" => "KMSOptInRequired", "httpStatusCode" => 403, "senderFault" => true})
75
+ KMSThrottlingException = Shapes::StructureShape.new(name: 'KMSThrottlingException', error: {"code" => "KMSThrottling", "httpStatusCode" => 400, "senderFault" => true})
76
76
  LanguageCodeString = Shapes::StringShape.new(name: 'LanguageCodeString')
77
77
  ListEndpointsByPlatformApplicationInput = Shapes::StructureShape.new(name: 'ListEndpointsByPlatformApplicationInput')
78
78
  ListEndpointsByPlatformApplicationResponse = Shapes::StructureShape.new(name: 'ListEndpointsByPlatformApplicationResponse')
@@ -100,20 +100,20 @@ module Aws::SNS
100
100
  MaxItemsListOriginationNumbers = Shapes::IntegerShape.new(name: 'MaxItemsListOriginationNumbers')
101
101
  MessageAttributeMap = Shapes::MapShape.new(name: 'MessageAttributeMap')
102
102
  MessageAttributeValue = Shapes::StructureShape.new(name: 'MessageAttributeValue')
103
- NotFoundException = Shapes::StructureShape.new(name: 'NotFoundException', error: {"code"=>"NotFound", "httpStatusCode"=>404, "senderFault"=>true})
103
+ NotFoundException = Shapes::StructureShape.new(name: 'NotFoundException', error: {"code" => "NotFound", "httpStatusCode" => 404, "senderFault" => true})
104
104
  NumberCapability = Shapes::StringShape.new(name: 'NumberCapability')
105
105
  NumberCapabilityList = Shapes::ListShape.new(name: 'NumberCapabilityList')
106
106
  OTPCode = Shapes::StringShape.new(name: 'OTPCode')
107
107
  OptInPhoneNumberInput = Shapes::StructureShape.new(name: 'OptInPhoneNumberInput')
108
108
  OptInPhoneNumberResponse = Shapes::StructureShape.new(name: 'OptInPhoneNumberResponse')
109
- OptedOutException = Shapes::StructureShape.new(name: 'OptedOutException', error: {"code"=>"OptedOut", "httpStatusCode"=>400, "senderFault"=>true})
109
+ OptedOutException = Shapes::StructureShape.new(name: 'OptedOutException', error: {"code" => "OptedOut", "httpStatusCode" => 400, "senderFault" => true})
110
110
  PhoneNumber = Shapes::StringShape.new(name: 'PhoneNumber')
111
111
  PhoneNumberInformation = Shapes::StructureShape.new(name: 'PhoneNumberInformation')
112
112
  PhoneNumberInformationList = Shapes::ListShape.new(name: 'PhoneNumberInformationList')
113
113
  PhoneNumberList = Shapes::ListShape.new(name: 'PhoneNumberList')
114
114
  PhoneNumberString = Shapes::StringShape.new(name: 'PhoneNumberString')
115
115
  PlatformApplication = Shapes::StructureShape.new(name: 'PlatformApplication')
116
- PlatformApplicationDisabledException = Shapes::StructureShape.new(name: 'PlatformApplicationDisabledException', error: {"code"=>"PlatformApplicationDisabled", "httpStatusCode"=>400, "senderFault"=>true})
116
+ PlatformApplicationDisabledException = Shapes::StructureShape.new(name: 'PlatformApplicationDisabledException', error: {"code" => "PlatformApplicationDisabled", "httpStatusCode" => 400, "senderFault" => true})
117
117
  PublishBatchInput = Shapes::StructureShape.new(name: 'PublishBatchInput')
118
118
  PublishBatchRequestEntry = Shapes::StructureShape.new(name: 'PublishBatchRequestEntry')
119
119
  PublishBatchRequestEntryList = Shapes::ListShape.new(name: 'PublishBatchRequestEntryList')
@@ -124,8 +124,8 @@ module Aws::SNS
124
124
  PublishResponse = Shapes::StructureShape.new(name: 'PublishResponse')
125
125
  PutDataProtectionPolicyInput = Shapes::StructureShape.new(name: 'PutDataProtectionPolicyInput')
126
126
  RemovePermissionInput = Shapes::StructureShape.new(name: 'RemovePermissionInput')
127
- ReplayLimitExceededException = Shapes::StructureShape.new(name: 'ReplayLimitExceededException', error: {"code"=>"ReplayLimitExceeded", "httpStatusCode"=>403, "senderFault"=>true})
128
- ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException', error: {"code"=>"ResourceNotFound", "httpStatusCode"=>404, "senderFault"=>true})
127
+ ReplayLimitExceededException = Shapes::StructureShape.new(name: 'ReplayLimitExceededException', error: {"code" => "ReplayLimitExceeded", "httpStatusCode" => 403, "senderFault" => true})
128
+ ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException', error: {"code" => "ResourceNotFound", "httpStatusCode" => 404, "senderFault" => true})
129
129
  RouteType = Shapes::StringShape.new(name: 'RouteType')
130
130
  SMSSandboxPhoneNumber = Shapes::StructureShape.new(name: 'SMSSandboxPhoneNumber')
131
131
  SMSSandboxPhoneNumberList = Shapes::ListShape.new(name: 'SMSSandboxPhoneNumberList')
@@ -136,35 +136,35 @@ module Aws::SNS
136
136
  SetSMSAttributesResponse = Shapes::StructureShape.new(name: 'SetSMSAttributesResponse')
137
137
  SetSubscriptionAttributesInput = Shapes::StructureShape.new(name: 'SetSubscriptionAttributesInput')
138
138
  SetTopicAttributesInput = Shapes::StructureShape.new(name: 'SetTopicAttributesInput')
139
- StaleTagException = Shapes::StructureShape.new(name: 'StaleTagException', error: {"code"=>"StaleTag", "httpStatusCode"=>400, "senderFault"=>true})
139
+ StaleTagException = Shapes::StructureShape.new(name: 'StaleTagException', error: {"code" => "StaleTag", "httpStatusCode" => 400, "senderFault" => true})
140
140
  String = Shapes::StringShape.new(name: 'String')
141
141
  SubscribeInput = Shapes::StructureShape.new(name: 'SubscribeInput')
142
142
  SubscribeResponse = Shapes::StructureShape.new(name: 'SubscribeResponse')
143
143
  Subscription = Shapes::StructureShape.new(name: 'Subscription')
144
144
  SubscriptionAttributesMap = Shapes::MapShape.new(name: 'SubscriptionAttributesMap')
145
- SubscriptionLimitExceededException = Shapes::StructureShape.new(name: 'SubscriptionLimitExceededException', error: {"code"=>"SubscriptionLimitExceeded", "httpStatusCode"=>403, "senderFault"=>true})
145
+ SubscriptionLimitExceededException = Shapes::StructureShape.new(name: 'SubscriptionLimitExceededException', error: {"code" => "SubscriptionLimitExceeded", "httpStatusCode" => 403, "senderFault" => true})
146
146
  SubscriptionsList = Shapes::ListShape.new(name: 'SubscriptionsList')
147
147
  Tag = Shapes::StructureShape.new(name: 'Tag')
148
148
  TagKey = Shapes::StringShape.new(name: 'TagKey')
149
149
  TagKeyList = Shapes::ListShape.new(name: 'TagKeyList')
150
- TagLimitExceededException = Shapes::StructureShape.new(name: 'TagLimitExceededException', error: {"code"=>"TagLimitExceeded", "httpStatusCode"=>400, "senderFault"=>true})
150
+ TagLimitExceededException = Shapes::StructureShape.new(name: 'TagLimitExceededException', error: {"code" => "TagLimitExceeded", "httpStatusCode" => 400, "senderFault" => true})
151
151
  TagList = Shapes::ListShape.new(name: 'TagList')
152
- TagPolicyException = Shapes::StructureShape.new(name: 'TagPolicyException', error: {"code"=>"TagPolicy", "httpStatusCode"=>400, "senderFault"=>true})
152
+ TagPolicyException = Shapes::StructureShape.new(name: 'TagPolicyException', error: {"code" => "TagPolicy", "httpStatusCode" => 400, "senderFault" => true})
153
153
  TagResourceRequest = Shapes::StructureShape.new(name: 'TagResourceRequest')
154
154
  TagResourceResponse = Shapes::StructureShape.new(name: 'TagResourceResponse')
155
155
  TagValue = Shapes::StringShape.new(name: 'TagValue')
156
- ThrottledException = Shapes::StructureShape.new(name: 'ThrottledException', error: {"code"=>"Throttled", "httpStatusCode"=>429, "senderFault"=>true})
156
+ ThrottledException = Shapes::StructureShape.new(name: 'ThrottledException', error: {"code" => "Throttled", "httpStatusCode" => 429, "senderFault" => true})
157
157
  Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
158
- TooManyEntriesInBatchRequestException = Shapes::StructureShape.new(name: 'TooManyEntriesInBatchRequestException', error: {"code"=>"TooManyEntriesInBatchRequest", "httpStatusCode"=>400, "senderFault"=>true})
158
+ TooManyEntriesInBatchRequestException = Shapes::StructureShape.new(name: 'TooManyEntriesInBatchRequestException', error: {"code" => "TooManyEntriesInBatchRequest", "httpStatusCode" => 400, "senderFault" => true})
159
159
  Topic = Shapes::StructureShape.new(name: 'Topic')
160
160
  TopicAttributesMap = Shapes::MapShape.new(name: 'TopicAttributesMap')
161
- TopicLimitExceededException = Shapes::StructureShape.new(name: 'TopicLimitExceededException', error: {"code"=>"TopicLimitExceeded", "httpStatusCode"=>403, "senderFault"=>true})
161
+ TopicLimitExceededException = Shapes::StructureShape.new(name: 'TopicLimitExceededException', error: {"code" => "TopicLimitExceeded", "httpStatusCode" => 403, "senderFault" => true})
162
162
  TopicsList = Shapes::ListShape.new(name: 'TopicsList')
163
163
  UnsubscribeInput = Shapes::StructureShape.new(name: 'UnsubscribeInput')
164
164
  UntagResourceRequest = Shapes::StructureShape.new(name: 'UntagResourceRequest')
165
165
  UntagResourceResponse = Shapes::StructureShape.new(name: 'UntagResourceResponse')
166
- UserErrorException = Shapes::StructureShape.new(name: 'UserErrorException', error: {"code"=>"UserError", "httpStatusCode"=>400, "senderFault"=>true})
167
- ValidationException = Shapes::StructureShape.new(name: 'ValidationException', error: {"code"=>"ValidationException", "httpStatusCode"=>400, "senderFault"=>true})
166
+ UserErrorException = Shapes::StructureShape.new(name: 'UserErrorException', error: {"code" => "UserError", "httpStatusCode" => 400, "senderFault" => true})
167
+ ValidationException = Shapes::StructureShape.new(name: 'ValidationException', error: {"code" => "ValidationException", "httpStatusCode" => 400, "senderFault" => true})
168
168
  VerificationException = Shapes::StructureShape.new(name: 'VerificationException')
169
169
  VerifySMSSandboxPhoneNumberInput = Shapes::StructureShape.new(name: 'VerifySMSSandboxPhoneNumberInput')
170
170
  VerifySMSSandboxPhoneNumberResult = Shapes::StructureShape.new(name: 'VerifySMSSandboxPhoneNumberResult')
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # utility classes
4
3
  module Aws
5
4
  module SNS
6
5
  autoload :MessageVerifier, 'aws-sdk-sns/message_verifier'
@@ -13,22 +13,22 @@ module Aws::SNS
13
13
  # @!attribute region
14
14
  # The AWS region used to dispatch the request.
15
15
  #
16
- # @return [String]
16
+ # @return [string]
17
17
  #
18
18
  # @!attribute use_dual_stack
19
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
20
  #
21
- # @return [Boolean]
21
+ # @return [boolean]
22
22
  #
23
23
  # @!attribute use_fips
24
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
25
  #
26
- # @return [Boolean]
26
+ # @return [boolean]
27
27
  #
28
28
  # @!attribute endpoint
29
29
  # Override the endpoint used to send this request
30
30
  #
31
- # @return [String]
31
+ # @return [string]
32
32
  #
33
33
  EndpointParameters = Struct.new(
34
34
  :region,
@@ -52,15 +52,18 @@ module Aws::SNS
52
52
  self[:region] = options[:region]
53
53
  self[:use_dual_stack] = options[:use_dual_stack]
54
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
55
  self[:use_fips] = options[:use_fips]
59
56
  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
57
  self[:endpoint] = options[:endpoint]
64
58
  end
59
+
60
+ def self.create(config, options={})
61
+ new({
62
+ region: config.region,
63
+ use_dual_stack: config.use_dualstack_endpoint,
64
+ use_fips: config.use_fips_endpoint,
65
+ endpoint: (config.endpoint.to_s unless config.regional_endpoint),
66
+ }.merge(options))
67
+ end
65
68
  end
66
69
  end
@@ -10,46 +10,42 @@
10
10
  module Aws::SNS
11
11
  class EndpointProvider
12
12
  def resolve_endpoint(parameters)
13
- region = parameters.region
14
- use_dual_stack = parameters.use_dual_stack
15
- use_fips = parameters.use_fips
16
- endpoint = parameters.endpoint
17
- if Aws::Endpoints::Matchers.set?(endpoint)
18
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
13
+ if Aws::Endpoints::Matchers.set?(parameters.endpoint)
14
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
19
15
  raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
20
16
  end
21
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
17
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
22
18
  raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
19
  end
24
- return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
20
+ return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
25
21
  end
26
- if Aws::Endpoints::Matchers.set?(region)
27
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
28
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
22
+ if Aws::Endpoints::Matchers.set?(parameters.region)
23
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
24
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
29
25
  if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
30
- return Aws::Endpoints::Endpoint.new(url: "https://sns-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
26
+ return Aws::Endpoints::Endpoint.new(url: "https://sns-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
27
  end
32
28
  raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
29
  end
34
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
30
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
35
31
  if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
36
- if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-east-1")
32
+ if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-gov-east-1")
37
33
  return Aws::Endpoints::Endpoint.new(url: "https://sns.us-gov-east-1.amazonaws.com", headers: {}, properties: {})
38
34
  end
39
- if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-west-1")
35
+ if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-gov-west-1")
40
36
  return Aws::Endpoints::Endpoint.new(url: "https://sns.us-gov-west-1.amazonaws.com", headers: {}, properties: {})
41
37
  end
42
- return Aws::Endpoints::Endpoint.new(url: "https://sns-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
38
+ return Aws::Endpoints::Endpoint.new(url: "https://sns-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
43
39
  end
44
40
  raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
45
41
  end
46
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
42
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
47
43
  if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
48
- return Aws::Endpoints::Endpoint.new(url: "https://sns.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
44
+ return Aws::Endpoints::Endpoint.new(url: "https://sns.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
49
45
  end
50
46
  raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
51
47
  end
52
- return Aws::Endpoints::Endpoint.new(url: "https://sns.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
48
+ return Aws::Endpoints::Endpoint.new(url: "https://sns.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
53
49
  end
54
50
  end
55
51
  raise ArgumentError, "Invalid Configuration: Missing Region"