aws-sdk-wafv2 1.46.0 → 1.48.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 +13 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-wafv2/client.rb +373 -29
- data/lib/aws-sdk-wafv2/client_api.rb +76 -4
- data/lib/aws-sdk-wafv2/endpoint_parameters.rb +0 -3
- data/lib/aws-sdk-wafv2/endpoint_provider.rb +116 -94
- data/lib/aws-sdk-wafv2/types.rb +379 -24
- data/lib/aws-sdk-wafv2.rb +1 -1
- metadata +2 -2
@@ -13,6 +13,7 @@ module Aws::WAFV2
|
|
13
13
|
|
14
14
|
include Seahorse::Model
|
15
15
|
|
16
|
+
AWSManagedRulesATPRuleSet = Shapes::StructureShape.new(name: 'AWSManagedRulesATPRuleSet')
|
16
17
|
AWSManagedRulesBotControlRuleSet = Shapes::StructureShape.new(name: 'AWSManagedRulesBotControlRuleSet')
|
17
18
|
Action = Shapes::StringShape.new(name: 'Action')
|
18
19
|
ActionCondition = Shapes::StructureShape.new(name: 'ActionCondition')
|
@@ -91,7 +92,9 @@ module Aws::WAFV2
|
|
91
92
|
ErrorReason = Shapes::StringShape.new(name: 'ErrorReason')
|
92
93
|
ExcludedRule = Shapes::StructureShape.new(name: 'ExcludedRule')
|
93
94
|
ExcludedRules = Shapes::ListShape.new(name: 'ExcludedRules')
|
95
|
+
FailureCode = Shapes::IntegerShape.new(name: 'FailureCode')
|
94
96
|
FailureReason = Shapes::StringShape.new(name: 'FailureReason')
|
97
|
+
FailureValue = Shapes::StringShape.new(name: 'FailureValue')
|
95
98
|
FallbackBehavior = Shapes::StringShape.new(name: 'FallbackBehavior')
|
96
99
|
FieldIdentifier = Shapes::StringShape.new(name: 'FieldIdentifier')
|
97
100
|
FieldToMatch = Shapes::StructureShape.new(name: 'FieldToMatch')
|
@@ -250,12 +253,27 @@ module Aws::WAFV2
|
|
250
253
|
ReleaseNotes = Shapes::StringShape.new(name: 'ReleaseNotes')
|
251
254
|
ReleaseSummaries = Shapes::ListShape.new(name: 'ReleaseSummaries')
|
252
255
|
ReleaseSummary = Shapes::StructureShape.new(name: 'ReleaseSummary')
|
256
|
+
RequestInspection = Shapes::StructureShape.new(name: 'RequestInspection')
|
253
257
|
ResourceArn = Shapes::StringShape.new(name: 'ResourceArn')
|
254
258
|
ResourceArns = Shapes::ListShape.new(name: 'ResourceArns')
|
255
259
|
ResourceType = Shapes::StringShape.new(name: 'ResourceType')
|
256
260
|
ResponseCode = Shapes::IntegerShape.new(name: 'ResponseCode')
|
257
261
|
ResponseContent = Shapes::StringShape.new(name: 'ResponseContent')
|
258
262
|
ResponseContentType = Shapes::StringShape.new(name: 'ResponseContentType')
|
263
|
+
ResponseInspection = Shapes::StructureShape.new(name: 'ResponseInspection')
|
264
|
+
ResponseInspectionBodyContains = Shapes::StructureShape.new(name: 'ResponseInspectionBodyContains')
|
265
|
+
ResponseInspectionBodyContainsFailureStrings = Shapes::ListShape.new(name: 'ResponseInspectionBodyContainsFailureStrings')
|
266
|
+
ResponseInspectionBodyContainsSuccessStrings = Shapes::ListShape.new(name: 'ResponseInspectionBodyContainsSuccessStrings')
|
267
|
+
ResponseInspectionHeader = Shapes::StructureShape.new(name: 'ResponseInspectionHeader')
|
268
|
+
ResponseInspectionHeaderFailureValues = Shapes::ListShape.new(name: 'ResponseInspectionHeaderFailureValues')
|
269
|
+
ResponseInspectionHeaderName = Shapes::StringShape.new(name: 'ResponseInspectionHeaderName')
|
270
|
+
ResponseInspectionHeaderSuccessValues = Shapes::ListShape.new(name: 'ResponseInspectionHeaderSuccessValues')
|
271
|
+
ResponseInspectionJson = Shapes::StructureShape.new(name: 'ResponseInspectionJson')
|
272
|
+
ResponseInspectionJsonFailureValues = Shapes::ListShape.new(name: 'ResponseInspectionJsonFailureValues')
|
273
|
+
ResponseInspectionJsonSuccessValues = Shapes::ListShape.new(name: 'ResponseInspectionJsonSuccessValues')
|
274
|
+
ResponseInspectionStatusCode = Shapes::StructureShape.new(name: 'ResponseInspectionStatusCode')
|
275
|
+
ResponseInspectionStatusCodeFailureCodes = Shapes::ListShape.new(name: 'ResponseInspectionStatusCodeFailureCodes')
|
276
|
+
ResponseInspectionStatusCodeSuccessCodes = Shapes::ListShape.new(name: 'ResponseInspectionStatusCodeSuccessCodes')
|
259
277
|
ResponseStatusCode = Shapes::IntegerShape.new(name: 'ResponseStatusCode')
|
260
278
|
Rule = Shapes::StructureShape.new(name: 'Rule')
|
261
279
|
RuleAction = Shapes::StructureShape.new(name: 'RuleAction')
|
@@ -284,6 +302,9 @@ module Aws::WAFV2
|
|
284
302
|
SqliMatchStatement = Shapes::StructureShape.new(name: 'SqliMatchStatement')
|
285
303
|
Statement = Shapes::StructureShape.new(name: 'Statement')
|
286
304
|
Statements = Shapes::ListShape.new(name: 'Statements')
|
305
|
+
String = Shapes::StringShape.new(name: 'String')
|
306
|
+
SuccessCode = Shapes::IntegerShape.new(name: 'SuccessCode')
|
307
|
+
SuccessValue = Shapes::StringShape.new(name: 'SuccessValue')
|
287
308
|
Tag = Shapes::StructureShape.new(name: 'Tag')
|
288
309
|
TagInfoForResource = Shapes::StructureShape.new(name: 'TagInfoForResource')
|
289
310
|
TagKey = Shapes::StringShape.new(name: 'TagKey')
|
@@ -345,6 +366,11 @@ module Aws::WAFV2
|
|
345
366
|
WebACLSummary = Shapes::StructureShape.new(name: 'WebACLSummary')
|
346
367
|
XssMatchStatement = Shapes::StructureShape.new(name: 'XssMatchStatement')
|
347
368
|
|
369
|
+
AWSManagedRulesATPRuleSet.add_member(:login_path, Shapes::ShapeRef.new(shape: String, required: true, location_name: "LoginPath"))
|
370
|
+
AWSManagedRulesATPRuleSet.add_member(:request_inspection, Shapes::ShapeRef.new(shape: RequestInspection, location_name: "RequestInspection"))
|
371
|
+
AWSManagedRulesATPRuleSet.add_member(:response_inspection, Shapes::ShapeRef.new(shape: ResponseInspection, location_name: "ResponseInspection"))
|
372
|
+
AWSManagedRulesATPRuleSet.struct_class = Types::AWSManagedRulesATPRuleSet
|
373
|
+
|
348
374
|
AWSManagedRulesBotControlRuleSet.add_member(:inspection_level, Shapes::ShapeRef.new(shape: InspectionLevel, required: true, location_name: "InspectionLevel"))
|
349
375
|
AWSManagedRulesBotControlRuleSet.struct_class = Types::AWSManagedRulesBotControlRuleSet
|
350
376
|
|
@@ -923,11 +949,12 @@ module Aws::WAFV2
|
|
923
949
|
LoggingFilter.add_member(:default_behavior, Shapes::ShapeRef.new(shape: FilterBehavior, required: true, location_name: "DefaultBehavior"))
|
924
950
|
LoggingFilter.struct_class = Types::LoggingFilter
|
925
951
|
|
926
|
-
ManagedRuleGroupConfig.add_member(:login_path, Shapes::ShapeRef.new(shape: LoginPathString, location_name: "LoginPath"))
|
927
|
-
ManagedRuleGroupConfig.add_member(:payload_type, Shapes::ShapeRef.new(shape: PayloadType, location_name: "PayloadType"))
|
928
|
-
ManagedRuleGroupConfig.add_member(:username_field, Shapes::ShapeRef.new(shape: UsernameField, location_name: "UsernameField"))
|
929
|
-
ManagedRuleGroupConfig.add_member(:password_field, Shapes::ShapeRef.new(shape: PasswordField, location_name: "PasswordField"))
|
952
|
+
ManagedRuleGroupConfig.add_member(:login_path, Shapes::ShapeRef.new(shape: LoginPathString, deprecated: true, location_name: "LoginPath", metadata: {"deprecatedMessage"=>"Deprecated. Use AWSManagedRulesATPRuleSet LoginPath"}))
|
953
|
+
ManagedRuleGroupConfig.add_member(:payload_type, Shapes::ShapeRef.new(shape: PayloadType, deprecated: true, location_name: "PayloadType", metadata: {"deprecatedMessage"=>"Deprecated. Use AWSManagedRulesATPRuleSet RequestInspection PayloadType"}))
|
954
|
+
ManagedRuleGroupConfig.add_member(:username_field, Shapes::ShapeRef.new(shape: UsernameField, deprecated: true, location_name: "UsernameField", metadata: {"deprecatedMessage"=>"Deprecated. Use AWSManagedRulesATPRuleSet RequestInspection UsernameField"}))
|
955
|
+
ManagedRuleGroupConfig.add_member(:password_field, Shapes::ShapeRef.new(shape: PasswordField, deprecated: true, location_name: "PasswordField", metadata: {"deprecatedMessage"=>"Deprecated. Use AWSManagedRulesATPRuleSet RequestInspection PasswordField"}))
|
930
956
|
ManagedRuleGroupConfig.add_member(:aws_managed_rules_bot_control_rule_set, Shapes::ShapeRef.new(shape: AWSManagedRulesBotControlRuleSet, location_name: "AWSManagedRulesBotControlRuleSet"))
|
957
|
+
ManagedRuleGroupConfig.add_member(:aws_managed_rules_atp_rule_set, Shapes::ShapeRef.new(shape: AWSManagedRulesATPRuleSet, location_name: "AWSManagedRulesATPRuleSet"))
|
931
958
|
ManagedRuleGroupConfig.struct_class = Types::ManagedRuleGroupConfig
|
932
959
|
|
933
960
|
ManagedRuleGroupConfigs.member = Shapes::ShapeRef.new(shape: ManagedRuleGroupConfig)
|
@@ -1082,8 +1109,53 @@ module Aws::WAFV2
|
|
1082
1109
|
ReleaseSummary.add_member(:timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "Timestamp"))
|
1083
1110
|
ReleaseSummary.struct_class = Types::ReleaseSummary
|
1084
1111
|
|
1112
|
+
RequestInspection.add_member(:payload_type, Shapes::ShapeRef.new(shape: PayloadType, required: true, location_name: "PayloadType"))
|
1113
|
+
RequestInspection.add_member(:username_field, Shapes::ShapeRef.new(shape: UsernameField, required: true, location_name: "UsernameField"))
|
1114
|
+
RequestInspection.add_member(:password_field, Shapes::ShapeRef.new(shape: PasswordField, required: true, location_name: "PasswordField"))
|
1115
|
+
RequestInspection.struct_class = Types::RequestInspection
|
1116
|
+
|
1085
1117
|
ResourceArns.member = Shapes::ShapeRef.new(shape: ResourceArn)
|
1086
1118
|
|
1119
|
+
ResponseInspection.add_member(:status_code, Shapes::ShapeRef.new(shape: ResponseInspectionStatusCode, location_name: "StatusCode"))
|
1120
|
+
ResponseInspection.add_member(:header, Shapes::ShapeRef.new(shape: ResponseInspectionHeader, location_name: "Header"))
|
1121
|
+
ResponseInspection.add_member(:body_contains, Shapes::ShapeRef.new(shape: ResponseInspectionBodyContains, location_name: "BodyContains"))
|
1122
|
+
ResponseInspection.add_member(:json, Shapes::ShapeRef.new(shape: ResponseInspectionJson, location_name: "Json"))
|
1123
|
+
ResponseInspection.struct_class = Types::ResponseInspection
|
1124
|
+
|
1125
|
+
ResponseInspectionBodyContains.add_member(:success_strings, Shapes::ShapeRef.new(shape: ResponseInspectionBodyContainsSuccessStrings, required: true, location_name: "SuccessStrings"))
|
1126
|
+
ResponseInspectionBodyContains.add_member(:failure_strings, Shapes::ShapeRef.new(shape: ResponseInspectionBodyContainsFailureStrings, required: true, location_name: "FailureStrings"))
|
1127
|
+
ResponseInspectionBodyContains.struct_class = Types::ResponseInspectionBodyContains
|
1128
|
+
|
1129
|
+
ResponseInspectionBodyContainsFailureStrings.member = Shapes::ShapeRef.new(shape: FailureValue)
|
1130
|
+
|
1131
|
+
ResponseInspectionBodyContainsSuccessStrings.member = Shapes::ShapeRef.new(shape: SuccessValue)
|
1132
|
+
|
1133
|
+
ResponseInspectionHeader.add_member(:name, Shapes::ShapeRef.new(shape: ResponseInspectionHeaderName, required: true, location_name: "Name"))
|
1134
|
+
ResponseInspectionHeader.add_member(:success_values, Shapes::ShapeRef.new(shape: ResponseInspectionHeaderSuccessValues, required: true, location_name: "SuccessValues"))
|
1135
|
+
ResponseInspectionHeader.add_member(:failure_values, Shapes::ShapeRef.new(shape: ResponseInspectionHeaderFailureValues, required: true, location_name: "FailureValues"))
|
1136
|
+
ResponseInspectionHeader.struct_class = Types::ResponseInspectionHeader
|
1137
|
+
|
1138
|
+
ResponseInspectionHeaderFailureValues.member = Shapes::ShapeRef.new(shape: FailureValue)
|
1139
|
+
|
1140
|
+
ResponseInspectionHeaderSuccessValues.member = Shapes::ShapeRef.new(shape: SuccessValue)
|
1141
|
+
|
1142
|
+
ResponseInspectionJson.add_member(:identifier, Shapes::ShapeRef.new(shape: FieldIdentifier, required: true, location_name: "Identifier"))
|
1143
|
+
ResponseInspectionJson.add_member(:success_values, Shapes::ShapeRef.new(shape: ResponseInspectionJsonSuccessValues, required: true, location_name: "SuccessValues"))
|
1144
|
+
ResponseInspectionJson.add_member(:failure_values, Shapes::ShapeRef.new(shape: ResponseInspectionJsonFailureValues, required: true, location_name: "FailureValues"))
|
1145
|
+
ResponseInspectionJson.struct_class = Types::ResponseInspectionJson
|
1146
|
+
|
1147
|
+
ResponseInspectionJsonFailureValues.member = Shapes::ShapeRef.new(shape: FailureValue)
|
1148
|
+
|
1149
|
+
ResponseInspectionJsonSuccessValues.member = Shapes::ShapeRef.new(shape: SuccessValue)
|
1150
|
+
|
1151
|
+
ResponseInspectionStatusCode.add_member(:success_codes, Shapes::ShapeRef.new(shape: ResponseInspectionStatusCodeSuccessCodes, required: true, location_name: "SuccessCodes"))
|
1152
|
+
ResponseInspectionStatusCode.add_member(:failure_codes, Shapes::ShapeRef.new(shape: ResponseInspectionStatusCodeFailureCodes, required: true, location_name: "FailureCodes"))
|
1153
|
+
ResponseInspectionStatusCode.struct_class = Types::ResponseInspectionStatusCode
|
1154
|
+
|
1155
|
+
ResponseInspectionStatusCodeFailureCodes.member = Shapes::ShapeRef.new(shape: FailureCode)
|
1156
|
+
|
1157
|
+
ResponseInspectionStatusCodeSuccessCodes.member = Shapes::ShapeRef.new(shape: SuccessCode)
|
1158
|
+
|
1087
1159
|
Rule.add_member(:name, Shapes::ShapeRef.new(shape: EntityName, required: true, location_name: "Name"))
|
1088
1160
|
Rule.add_member(:priority, Shapes::ShapeRef.new(shape: RulePriority, required: true, location_name: "Priority"))
|
1089
1161
|
Rule.add_member(:statement, Shapes::ShapeRef.new(shape: Statement, required: true, location_name: "Statement"))
|
@@ -50,9 +50,6 @@ module Aws::WAFV2
|
|
50
50
|
|
51
51
|
def initialize(options = {})
|
52
52
|
self[:region] = options[:region]
|
53
|
-
if self[:region].nil?
|
54
|
-
raise ArgumentError, "Missing required EndpointParameter: :region"
|
55
|
-
end
|
56
53
|
self[:use_dual_stack] = options[:use_dual_stack]
|
57
54
|
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
58
55
|
if self[:use_dual_stack].nil?
|
@@ -9,102 +9,124 @@
|
|
9
9
|
|
10
10
|
module Aws::WAFV2
|
11
11
|
class EndpointProvider
|
12
|
-
def
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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)
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
20
|
+
end
|
21
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
21
25
|
end
|
22
|
-
|
23
|
-
|
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)
|
29
|
+
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://wafv2-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
36
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
37
|
+
end
|
38
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
39
|
+
end
|
40
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
41
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
43
|
+
end
|
44
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
45
|
+
end
|
46
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "af-south-1")
|
47
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.af-south-1.amazonaws.com", headers: {}, properties: {})
|
48
|
+
end
|
49
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-east-1")
|
50
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.ap-east-1.amazonaws.com", headers: {}, properties: {})
|
51
|
+
end
|
52
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-northeast-1")
|
53
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.ap-northeast-1.amazonaws.com", headers: {}, properties: {})
|
54
|
+
end
|
55
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-northeast-2")
|
56
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.ap-northeast-2.amazonaws.com", headers: {}, properties: {})
|
57
|
+
end
|
58
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-northeast-3")
|
59
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.ap-northeast-3.amazonaws.com", headers: {}, properties: {})
|
60
|
+
end
|
61
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-south-1")
|
62
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.ap-south-1.amazonaws.com", headers: {}, properties: {})
|
63
|
+
end
|
64
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-southeast-1")
|
65
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.ap-southeast-1.amazonaws.com", headers: {}, properties: {})
|
66
|
+
end
|
67
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-southeast-2")
|
68
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.ap-southeast-2.amazonaws.com", headers: {}, properties: {})
|
69
|
+
end
|
70
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-southeast-3")
|
71
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.ap-southeast-3.amazonaws.com", headers: {}, properties: {})
|
72
|
+
end
|
73
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ca-central-1")
|
74
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.ca-central-1.amazonaws.com", headers: {}, properties: {})
|
75
|
+
end
|
76
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-central-1")
|
77
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.eu-central-1.amazonaws.com", headers: {}, properties: {})
|
78
|
+
end
|
79
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-north-1")
|
80
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.eu-north-1.amazonaws.com", headers: {}, properties: {})
|
81
|
+
end
|
82
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-south-1")
|
83
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.eu-south-1.amazonaws.com", headers: {}, properties: {})
|
84
|
+
end
|
85
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-west-1")
|
86
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.eu-west-1.amazonaws.com", headers: {}, properties: {})
|
87
|
+
end
|
88
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-west-2")
|
89
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.eu-west-2.amazonaws.com", headers: {}, properties: {})
|
90
|
+
end
|
91
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-west-3")
|
92
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.eu-west-3.amazonaws.com", headers: {}, properties: {})
|
93
|
+
end
|
94
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "me-south-1")
|
95
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.me-south-1.amazonaws.com", headers: {}, properties: {})
|
96
|
+
end
|
97
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "sa-east-1")
|
98
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.sa-east-1.amazonaws.com", headers: {}, properties: {})
|
99
|
+
end
|
100
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
|
101
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.us-east-1.amazonaws.com", headers: {}, properties: {})
|
102
|
+
end
|
103
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-2")
|
104
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.us-east-2.amazonaws.com", headers: {}, properties: {})
|
105
|
+
end
|
106
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-west-1")
|
107
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.us-west-1.amazonaws.com", headers: {}, properties: {})
|
108
|
+
end
|
109
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-west-2")
|
110
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.us-west-2.amazonaws.com", headers: {}, properties: {})
|
111
|
+
end
|
112
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "cn-north-1")
|
113
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.cn-north-1.amazonaws.com.cn", headers: {}, properties: {})
|
114
|
+
end
|
115
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "cn-northwest-1")
|
116
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.cn-northwest-1.amazonaws.com.cn", headers: {}, properties: {})
|
117
|
+
end
|
118
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-east-1")
|
119
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.us-gov-east-1.amazonaws.com", headers: {}, properties: {})
|
120
|
+
end
|
121
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-west-1")
|
122
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.us-gov-west-1.amazonaws.com", headers: {}, properties: {})
|
123
|
+
end
|
124
|
+
return Aws::Endpoints::Endpoint.new(url: "https://wafv2.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
125
|
+
end
|
126
|
+
end
|
127
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
128
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
24
129
|
|
25
|
-
def resolve_endpoint(parameters)
|
26
|
-
@provider.resolve_endpoint(parameters)
|
27
130
|
end
|
28
|
-
|
29
|
-
# @api private
|
30
|
-
RULES = <<-JSON
|
31
|
-
eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
|
32
|
-
bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOnRydWUsImRvY3VtZW50
|
33
|
-
YXRpb24iOiJUaGUgQVdTIHJlZ2lvbiB1c2VkIHRvIGRpc3BhdGNoIHRoZSBy
|
34
|
-
ZXF1ZXN0LiIsInR5cGUiOiJTdHJpbmcifSwiVXNlRHVhbFN0YWNrIjp7ImJ1
|
35
|
-
aWx0SW4iOiJBV1M6OlVzZUR1YWxTdGFjayIsInJlcXVpcmVkIjp0cnVlLCJk
|
36
|
-
ZWZhdWx0IjpmYWxzZSwiZG9jdW1lbnRhdGlvbiI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