aws-sdk-wafregional 1.0.0.rc7 → 1.0.0.rc8
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.
- checksums.yaml +4 -4
- data/lib/aws-sdk-wafregional.rb +1 -1
- data/lib/aws-sdk-wafregional/client.rb +415 -2
- data/lib/aws-sdk-wafregional/client_api.rb +155 -0
- data/lib/aws-sdk-wafregional/types.rb +394 -10
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69c9c54113a11a8003b87a41623fb613f3837686
|
4
|
+
data.tar.gz: 2c9409f4b69d2985c338444dd9ef3467fe5cad6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c8e4637b04f30c6c350307186bbba85adbe46bfae8a446713911ec50ce75932022cfa4d09ca20d3eda9a20d591f8733077ea732d7b3a68e306719928d7ce95a
|
7
|
+
data.tar.gz: 44983b919631afc6f50671414d7455a5206989a94a3283158c74067a3a7087ccbb0e66fead67a77cea51eaec5bdb7c7f7de5253e6beb8a7334ad623d9d62c4b5
|
data/lib/aws-sdk-wafregional.rb
CHANGED
@@ -314,6 +314,143 @@ module Aws::WAFRegional
|
|
314
314
|
req.send_request(options)
|
315
315
|
end
|
316
316
|
|
317
|
+
# Creates a RateBasedRule. The `RateBasedRule` contains a `RateLimit`,
|
318
|
+
# which specifies the maximum number of requests that AWS WAF allows
|
319
|
+
# from a specified IP address in a five-minute period. The
|
320
|
+
# `RateBasedRule` also contains the `IPSet` objects, `ByteMatchSet`
|
321
|
+
# objects, and other predicates that identify the requests that you want
|
322
|
+
# to count or block if these requests exceed the `RateLimit`.
|
323
|
+
#
|
324
|
+
# If you add more than one predicate to a `RateBasedRule`, a request not
|
325
|
+
# only must exceed the `RateLimit`, but it also must match all the
|
326
|
+
# specifications to be counted or blocked. For example, suppose you add
|
327
|
+
# the following to a `RateBasedRule`\:
|
328
|
+
#
|
329
|
+
# * An `IPSet` that matches the IP address `192.0.2.44/32`
|
330
|
+
#
|
331
|
+
# * A `ByteMatchSet` that matches `BadBot` in the `User-Agent` header
|
332
|
+
#
|
333
|
+
# Further, you specify a `RateLimit` of 15,000.
|
334
|
+
#
|
335
|
+
# You then add the `RateBasedRule` to a `WebACL` and specify that you
|
336
|
+
# want to block requests that meet the conditions in the rule. For a
|
337
|
+
# request to be blocked, it must come from the IP address 192.0.2.44
|
338
|
+
# *and* the `User-Agent` header in the request must contain the value
|
339
|
+
# `BadBot`. Further, requests that match these two conditions must be
|
340
|
+
# received at a rate of more than 15,000 requests every five minutes. If
|
341
|
+
# both conditions are met and the rate is exceeded, AWS WAF blocks the
|
342
|
+
# requests. If the rate drops below 15,000 for a five-minute period, AWS
|
343
|
+
# WAF no longer blocks the requests.
|
344
|
+
#
|
345
|
+
# As a second example, suppose you want to limit requests to a
|
346
|
+
# particular page on your site. To do this, you could add the following
|
347
|
+
# to a `RateBasedRule`\:
|
348
|
+
#
|
349
|
+
# * A `ByteMatchSet` with `FieldToMatch` of `URI`
|
350
|
+
#
|
351
|
+
# * A `PositionalConstraint` of `STARTS_WITH`
|
352
|
+
#
|
353
|
+
# * A `TargetString` of `login`
|
354
|
+
#
|
355
|
+
# Further, you specify a `RateLimit` of 15,000.
|
356
|
+
#
|
357
|
+
# By adding this `RateBasedRule` to a `WebACL`, you could limit requests
|
358
|
+
# to your login page without affecting the rest of your site.
|
359
|
+
#
|
360
|
+
# To create and configure a `RateBasedRule`, perform the following
|
361
|
+
# steps:
|
362
|
+
#
|
363
|
+
# 1. Create and update the predicates that you want to include in the
|
364
|
+
# rule. For more information, see CreateByteMatchSet, CreateIPSet,
|
365
|
+
# and CreateSqlInjectionMatchSet.
|
366
|
+
#
|
367
|
+
# 2. Use GetChangeToken to get the change token that you provide in the
|
368
|
+
# `ChangeToken` parameter of a `CreateRule` request.
|
369
|
+
#
|
370
|
+
# 3. Submit a `CreateRateBasedRule` request.
|
371
|
+
#
|
372
|
+
# 4. Use `GetChangeToken` to get the change token that you provide in
|
373
|
+
# the `ChangeToken` parameter of an UpdateRule request.
|
374
|
+
#
|
375
|
+
# 5. Submit an `UpdateRateBasedRule` request to specify the predicates
|
376
|
+
# that you want to include in the rule.
|
377
|
+
#
|
378
|
+
# 6. Create and update a `WebACL` that contains the `RateBasedRule`.
|
379
|
+
# For more information, see CreateWebACL.
|
380
|
+
#
|
381
|
+
# For more information about how to use the AWS WAF API to allow or
|
382
|
+
# block HTTP requests, see the [AWS WAF Developer Guide][1].
|
383
|
+
#
|
384
|
+
#
|
385
|
+
#
|
386
|
+
# [1]: http://docs.aws.amazon.com/waf/latest/developerguide/
|
387
|
+
#
|
388
|
+
# @option params [required, String] :name
|
389
|
+
# A friendly name or description of the RateBasedRule. You can't change
|
390
|
+
# the name of a `RateBasedRule` after you create it.
|
391
|
+
#
|
392
|
+
# @option params [required, String] :metric_name
|
393
|
+
# A friendly name or description for the metrics for this
|
394
|
+
# `RateBasedRule`. The name can contain only alphanumeric characters
|
395
|
+
# (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change
|
396
|
+
# the name of the metric after you create the `RateBasedRule`.
|
397
|
+
#
|
398
|
+
# @option params [required, String] :rate_key
|
399
|
+
# The field that AWS WAF uses to determine if requests are likely
|
400
|
+
# arriving from a single source and thus subject to rate monitoring. The
|
401
|
+
# only valid value for `RateKey` is `IP`. `IP` indicates that requests
|
402
|
+
# that arrive from the same IP address are subject to the `RateLimit`
|
403
|
+
# that is specified in the `RateBasedRule`.
|
404
|
+
#
|
405
|
+
# @option params [required, Integer] :rate_limit
|
406
|
+
# The maximum number of requests, which have an identical value in the
|
407
|
+
# field that is specified by `RateKey`, allowed in a five-minute period.
|
408
|
+
# If the number of requests exceeds the `RateLimit` and the other
|
409
|
+
# predicates specified in the rule are also met, AWS WAF triggers the
|
410
|
+
# action that is specified for this rule.
|
411
|
+
#
|
412
|
+
# @option params [required, String] :change_token
|
413
|
+
# The `ChangeToken` that you used to submit the `CreateRateBasedRule`
|
414
|
+
# request. You can also use this value to query the status of the
|
415
|
+
# request. For more information, see GetChangeTokenStatus.
|
416
|
+
#
|
417
|
+
# @return [Types::CreateRateBasedRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
418
|
+
#
|
419
|
+
# * {Types::CreateRateBasedRuleResponse#rule #rule} => Types::RateBasedRule
|
420
|
+
# * {Types::CreateRateBasedRuleResponse#change_token #change_token} => String
|
421
|
+
#
|
422
|
+
# @example Request syntax with placeholder values
|
423
|
+
#
|
424
|
+
# resp = client.create_rate_based_rule({
|
425
|
+
# name: "ResourceName", # required
|
426
|
+
# metric_name: "MetricName", # required
|
427
|
+
# rate_key: "IP", # required, accepts IP
|
428
|
+
# rate_limit: 1, # required
|
429
|
+
# change_token: "ChangeToken", # required
|
430
|
+
# })
|
431
|
+
#
|
432
|
+
# @example Response structure
|
433
|
+
#
|
434
|
+
# resp.rule.rule_id #=> String
|
435
|
+
# resp.rule.name #=> String
|
436
|
+
# resp.rule.metric_name #=> String
|
437
|
+
# resp.rule.match_predicates #=> Array
|
438
|
+
# resp.rule.match_predicates[0].negated #=> Boolean
|
439
|
+
# resp.rule.match_predicates[0].type #=> String, one of "IPMatch", "ByteMatch", "SqlInjectionMatch", "SizeConstraint", "XssMatch"
|
440
|
+
# resp.rule.match_predicates[0].data_id #=> String
|
441
|
+
# resp.rule.rate_key #=> String, one of "IP"
|
442
|
+
# resp.rule.rate_limit #=> Integer
|
443
|
+
# resp.change_token #=> String
|
444
|
+
#
|
445
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRateBasedRule AWS API Documentation
|
446
|
+
#
|
447
|
+
# @overload create_rate_based_rule(params = {})
|
448
|
+
# @param [Hash] params ({})
|
449
|
+
def create_rate_based_rule(params = {}, options = {})
|
450
|
+
req = build_request(:create_rate_based_rule, params)
|
451
|
+
req.send_request(options)
|
452
|
+
end
|
453
|
+
|
317
454
|
# Creates a `Rule`, which contains the `IPSet` objects, `ByteMatchSet`
|
318
455
|
# objects, and other predicates that identify the requests that you want
|
319
456
|
# to block. If you add more than one predicate to a `Rule`, a request
|
@@ -622,6 +759,7 @@ module Aws::WAFRegional
|
|
622
759
|
# resp.web_acl.rules[0].priority #=> Integer
|
623
760
|
# resp.web_acl.rules[0].rule_id #=> String
|
624
761
|
# resp.web_acl.rules[0].action.type #=> String, one of "BLOCK", "ALLOW", "COUNT"
|
762
|
+
# resp.web_acl.rules[0].type #=> String, one of "REGULAR", "RATE_BASED"
|
625
763
|
# resp.change_token #=> String
|
626
764
|
#
|
627
765
|
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateWebACL AWS API Documentation
|
@@ -793,6 +931,54 @@ module Aws::WAFRegional
|
|
793
931
|
req.send_request(options)
|
794
932
|
end
|
795
933
|
|
934
|
+
# Permanently deletes a RateBasedRule. You can't delete a rule if it's
|
935
|
+
# still used in any `WebACL` objects or if it still includes any
|
936
|
+
# predicates, such as `ByteMatchSet` objects.
|
937
|
+
#
|
938
|
+
# If you just want to remove a rule from a `WebACL`, use UpdateWebACL.
|
939
|
+
#
|
940
|
+
# To permanently delete a `RateBasedRule` from AWS WAF, perform the
|
941
|
+
# following steps:
|
942
|
+
#
|
943
|
+
# 1. Update the `RateBasedRule` to remove predicates, if any. For more
|
944
|
+
# information, see UpdateRateBasedRule.
|
945
|
+
#
|
946
|
+
# 2. Use GetChangeToken to get the change token that you provide in the
|
947
|
+
# `ChangeToken` parameter of a `DeleteRateBasedRule` request.
|
948
|
+
#
|
949
|
+
# 3. Submit a `DeleteRateBasedRule` request.
|
950
|
+
#
|
951
|
+
# @option params [required, String] :rule_id
|
952
|
+
# The `RuleId` of the RateBasedRule that you want to delete. `RuleId` is
|
953
|
+
# returned by CreateRateBasedRule and by ListRateBasedRules.
|
954
|
+
#
|
955
|
+
# @option params [required, String] :change_token
|
956
|
+
# The value returned by the most recent call to GetChangeToken.
|
957
|
+
#
|
958
|
+
# @return [Types::DeleteRateBasedRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
959
|
+
#
|
960
|
+
# * {Types::DeleteRateBasedRuleResponse#change_token #change_token} => String
|
961
|
+
#
|
962
|
+
# @example Request syntax with placeholder values
|
963
|
+
#
|
964
|
+
# resp = client.delete_rate_based_rule({
|
965
|
+
# rule_id: "ResourceId", # required
|
966
|
+
# change_token: "ChangeToken", # required
|
967
|
+
# })
|
968
|
+
#
|
969
|
+
# @example Response structure
|
970
|
+
#
|
971
|
+
# resp.change_token #=> String
|
972
|
+
#
|
973
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRateBasedRule AWS API Documentation
|
974
|
+
#
|
975
|
+
# @overload delete_rate_based_rule(params = {})
|
976
|
+
# @param [Hash] params ({})
|
977
|
+
def delete_rate_based_rule(params = {}, options = {})
|
978
|
+
req = build_request(:delete_rate_based_rule, params)
|
979
|
+
req.send_request(options)
|
980
|
+
end
|
981
|
+
|
796
982
|
# Permanently deletes a Rule. You can't delete a `Rule` if it's still
|
797
983
|
# used in any `WebACL` objects or if it still includes any predicates,
|
798
984
|
# such as `ByteMatchSet` objects.
|
@@ -1200,6 +1386,86 @@ module Aws::WAFRegional
|
|
1200
1386
|
req.send_request(options)
|
1201
1387
|
end
|
1202
1388
|
|
1389
|
+
# Returns the RateBasedRule that is specified by the `RuleId` that you
|
1390
|
+
# included in the `GetRateBasedRule` request.
|
1391
|
+
#
|
1392
|
+
# @option params [required, String] :rule_id
|
1393
|
+
# The `RuleId` of the RateBasedRule that you want to get. `RuleId` is
|
1394
|
+
# returned by CreateRateBasedRule and by ListRateBasedRules.
|
1395
|
+
#
|
1396
|
+
# @return [Types::GetRateBasedRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1397
|
+
#
|
1398
|
+
# * {Types::GetRateBasedRuleResponse#rule #rule} => Types::RateBasedRule
|
1399
|
+
#
|
1400
|
+
# @example Request syntax with placeholder values
|
1401
|
+
#
|
1402
|
+
# resp = client.get_rate_based_rule({
|
1403
|
+
# rule_id: "ResourceId", # required
|
1404
|
+
# })
|
1405
|
+
#
|
1406
|
+
# @example Response structure
|
1407
|
+
#
|
1408
|
+
# resp.rule.rule_id #=> String
|
1409
|
+
# resp.rule.name #=> String
|
1410
|
+
# resp.rule.metric_name #=> String
|
1411
|
+
# resp.rule.match_predicates #=> Array
|
1412
|
+
# resp.rule.match_predicates[0].negated #=> Boolean
|
1413
|
+
# resp.rule.match_predicates[0].type #=> String, one of "IPMatch", "ByteMatch", "SqlInjectionMatch", "SizeConstraint", "XssMatch"
|
1414
|
+
# resp.rule.match_predicates[0].data_id #=> String
|
1415
|
+
# resp.rule.rate_key #=> String, one of "IP"
|
1416
|
+
# resp.rule.rate_limit #=> Integer
|
1417
|
+
#
|
1418
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRule AWS API Documentation
|
1419
|
+
#
|
1420
|
+
# @overload get_rate_based_rule(params = {})
|
1421
|
+
# @param [Hash] params ({})
|
1422
|
+
def get_rate_based_rule(params = {}, options = {})
|
1423
|
+
req = build_request(:get_rate_based_rule, params)
|
1424
|
+
req.send_request(options)
|
1425
|
+
end
|
1426
|
+
|
1427
|
+
# Returns an array of IP addresses currently being blocked by the
|
1428
|
+
# RateBasedRule that is specified by the `RuleId`. The maximum number of
|
1429
|
+
# managed keys that will be blocked is 10,000. If more than 10,000
|
1430
|
+
# addresses exceed the rate limit, the 10,000 addresses with the highest
|
1431
|
+
# rates will be blocked.
|
1432
|
+
#
|
1433
|
+
# @option params [required, String] :rule_id
|
1434
|
+
# The `RuleId` of the RateBasedRule for which you want to get a list of
|
1435
|
+
# `ManagedKeys`. `RuleId` is returned by CreateRateBasedRule and by
|
1436
|
+
# ListRateBasedRules.
|
1437
|
+
#
|
1438
|
+
# @option params [String] :next_marker
|
1439
|
+
# A null value and not currently used. Do not include this in your
|
1440
|
+
# request.
|
1441
|
+
#
|
1442
|
+
# @return [Types::GetRateBasedRuleManagedKeysResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1443
|
+
#
|
1444
|
+
# * {Types::GetRateBasedRuleManagedKeysResponse#managed_keys #managed_keys} => Array<String>
|
1445
|
+
# * {Types::GetRateBasedRuleManagedKeysResponse#next_marker #next_marker} => String
|
1446
|
+
#
|
1447
|
+
# @example Request syntax with placeholder values
|
1448
|
+
#
|
1449
|
+
# resp = client.get_rate_based_rule_managed_keys({
|
1450
|
+
# rule_id: "ResourceId", # required
|
1451
|
+
# next_marker: "NextMarker",
|
1452
|
+
# })
|
1453
|
+
#
|
1454
|
+
# @example Response structure
|
1455
|
+
#
|
1456
|
+
# resp.managed_keys #=> Array
|
1457
|
+
# resp.managed_keys[0] #=> String
|
1458
|
+
# resp.next_marker #=> String
|
1459
|
+
#
|
1460
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRuleManagedKeys AWS API Documentation
|
1461
|
+
#
|
1462
|
+
# @overload get_rate_based_rule_managed_keys(params = {})
|
1463
|
+
# @param [Hash] params ({})
|
1464
|
+
def get_rate_based_rule_managed_keys(params = {}, options = {})
|
1465
|
+
req = build_request(:get_rate_based_rule_managed_keys, params)
|
1466
|
+
req.send_request(options)
|
1467
|
+
end
|
1468
|
+
|
1203
1469
|
# Returns the Rule that is specified by the `RuleId` that you included
|
1204
1470
|
# in the `GetRule` request.
|
1205
1471
|
#
|
@@ -1421,6 +1687,7 @@ module Aws::WAFRegional
|
|
1421
1687
|
# resp.web_acl.rules[0].priority #=> Integer
|
1422
1688
|
# resp.web_acl.rules[0].rule_id #=> String
|
1423
1689
|
# resp.web_acl.rules[0].action.type #=> String, one of "BLOCK", "ALLOW", "COUNT"
|
1690
|
+
# resp.web_acl.rules[0].type #=> String, one of "REGULAR", "RATE_BASED"
|
1424
1691
|
#
|
1425
1692
|
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetWebACL AWS API Documentation
|
1426
1693
|
#
|
@@ -1585,6 +1852,50 @@ module Aws::WAFRegional
|
|
1585
1852
|
req.send_request(options)
|
1586
1853
|
end
|
1587
1854
|
|
1855
|
+
# Returns an array of RuleSummary objects.
|
1856
|
+
#
|
1857
|
+
# @option params [String] :next_marker
|
1858
|
+
# If you specify a value for `Limit` and you have more `Rules` than the
|
1859
|
+
# value of `Limit`, AWS WAF returns a `NextMarker` value in the response
|
1860
|
+
# that allows you to list another group of `Rules`. For the second and
|
1861
|
+
# subsequent `ListRateBasedRules` requests, specify the value of
|
1862
|
+
# `NextMarker` from the previous response to get information about
|
1863
|
+
# another batch of `Rules`.
|
1864
|
+
#
|
1865
|
+
# @option params [Integer] :limit
|
1866
|
+
# Specifies the number of `Rules` that you want AWS WAF to return for
|
1867
|
+
# this request. If you have more `Rules` than the number that you
|
1868
|
+
# specify for `Limit`, the response includes a `NextMarker` value that
|
1869
|
+
# you can use to get another batch of `Rules`.
|
1870
|
+
#
|
1871
|
+
# @return [Types::ListRateBasedRulesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1872
|
+
#
|
1873
|
+
# * {Types::ListRateBasedRulesResponse#next_marker #next_marker} => String
|
1874
|
+
# * {Types::ListRateBasedRulesResponse#rules #rules} => Array<Types::RuleSummary>
|
1875
|
+
#
|
1876
|
+
# @example Request syntax with placeholder values
|
1877
|
+
#
|
1878
|
+
# resp = client.list_rate_based_rules({
|
1879
|
+
# next_marker: "NextMarker",
|
1880
|
+
# limit: 1,
|
1881
|
+
# })
|
1882
|
+
#
|
1883
|
+
# @example Response structure
|
1884
|
+
#
|
1885
|
+
# resp.next_marker #=> String
|
1886
|
+
# resp.rules #=> Array
|
1887
|
+
# resp.rules[0].rule_id #=> String
|
1888
|
+
# resp.rules[0].name #=> String
|
1889
|
+
#
|
1890
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRateBasedRules AWS API Documentation
|
1891
|
+
#
|
1892
|
+
# @overload list_rate_based_rules(params = {})
|
1893
|
+
# @param [Hash] params ({})
|
1894
|
+
def list_rate_based_rules(params = {}, options = {})
|
1895
|
+
req = build_request(:list_rate_based_rules, params)
|
1896
|
+
req.send_request(options)
|
1897
|
+
end
|
1898
|
+
|
1588
1899
|
# Returns an array of resources associated with the specified web ACL.
|
1589
1900
|
#
|
1590
1901
|
# @option params [required, String] :web_acl_id
|
@@ -2050,6 +2361,101 @@ module Aws::WAFRegional
|
|
2050
2361
|
req.send_request(options)
|
2051
2362
|
end
|
2052
2363
|
|
2364
|
+
# Inserts or deletes Predicate objects in a rule and updates the
|
2365
|
+
# `RateLimit` in the rule.
|
2366
|
+
#
|
2367
|
+
# Each `Predicate` object identifies a predicate, such as a ByteMatchSet
|
2368
|
+
# or an IPSet, that specifies the web requests that you want to block or
|
2369
|
+
# count. The `RateLimit` specifies the number of requests every five
|
2370
|
+
# minutes that triggers the rule.
|
2371
|
+
#
|
2372
|
+
# If you add more than one predicate to a `RateBasedRule`, a request
|
2373
|
+
# must match all the predicates and exceed the `RateLimit` to be counted
|
2374
|
+
# or blocked. For example, suppose you add the following to a
|
2375
|
+
# `RateBasedRule`\:
|
2376
|
+
#
|
2377
|
+
# * An `IPSet` that matches the IP address `192.0.2.44/32`
|
2378
|
+
#
|
2379
|
+
# * A `ByteMatchSet` that matches `BadBot` in the `User-Agent` header
|
2380
|
+
#
|
2381
|
+
# Further, you specify a `RateLimit` of 15,000.
|
2382
|
+
#
|
2383
|
+
# You then add the `RateBasedRule` to a `WebACL` and specify that you
|
2384
|
+
# want to block requests that satisfy the rule. For a request to be
|
2385
|
+
# blocked, it must come from the IP address 192.0.2.44 *and* the
|
2386
|
+
# `User-Agent` header in the request must contain the value `BadBot`.
|
2387
|
+
# Further, requests that match these two conditions much be received at
|
2388
|
+
# a rate of more than 15,000 every five minutes. If the rate drops below
|
2389
|
+
# this limit, AWS WAF no longer blocks the requests.
|
2390
|
+
#
|
2391
|
+
# As a second example, suppose you want to limit requests to a
|
2392
|
+
# particular page on your site. To do this, you could add the following
|
2393
|
+
# to a `RateBasedRule`\:
|
2394
|
+
#
|
2395
|
+
# * A `ByteMatchSet` with `FieldToMatch` of `URI`
|
2396
|
+
#
|
2397
|
+
# * A `PositionalConstraint` of `STARTS_WITH`
|
2398
|
+
#
|
2399
|
+
# * A `TargetString` of `login`
|
2400
|
+
#
|
2401
|
+
# Further, you specify a `RateLimit` of 15,000.
|
2402
|
+
#
|
2403
|
+
# By adding this `RateBasedRule` to a `WebACL`, you could limit requests
|
2404
|
+
# to your login page without affecting the rest of your site.
|
2405
|
+
#
|
2406
|
+
# @option params [required, String] :rule_id
|
2407
|
+
# The `RuleId` of the `RateBasedRule` that you want to update. `RuleId`
|
2408
|
+
# is returned by `CreateRateBasedRule` and by ListRateBasedRules.
|
2409
|
+
#
|
2410
|
+
# @option params [required, String] :change_token
|
2411
|
+
# The value returned by the most recent call to GetChangeToken.
|
2412
|
+
#
|
2413
|
+
# @option params [required, Array<Types::RuleUpdate>] :updates
|
2414
|
+
# An array of `RuleUpdate` objects that you want to insert into or
|
2415
|
+
# delete from a RateBasedRule.
|
2416
|
+
#
|
2417
|
+
# @option params [required, Integer] :rate_limit
|
2418
|
+
# The maximum number of requests, which have an identical value in the
|
2419
|
+
# field specified by the `RateKey`, allowed in a five-minute period. If
|
2420
|
+
# the number of requests exceeds the `RateLimit` and the other
|
2421
|
+
# predicates specified in the rule are also met, AWS WAF triggers the
|
2422
|
+
# action that is specified for this rule.
|
2423
|
+
#
|
2424
|
+
# @return [Types::UpdateRateBasedRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2425
|
+
#
|
2426
|
+
# * {Types::UpdateRateBasedRuleResponse#change_token #change_token} => String
|
2427
|
+
#
|
2428
|
+
# @example Request syntax with placeholder values
|
2429
|
+
#
|
2430
|
+
# resp = client.update_rate_based_rule({
|
2431
|
+
# rule_id: "ResourceId", # required
|
2432
|
+
# change_token: "ChangeToken", # required
|
2433
|
+
# updates: [ # required
|
2434
|
+
# {
|
2435
|
+
# action: "INSERT", # required, accepts INSERT, DELETE
|
2436
|
+
# predicate: { # required
|
2437
|
+
# negated: false, # required
|
2438
|
+
# type: "IPMatch", # required, accepts IPMatch, ByteMatch, SqlInjectionMatch, SizeConstraint, XssMatch
|
2439
|
+
# data_id: "ResourceId", # required
|
2440
|
+
# },
|
2441
|
+
# },
|
2442
|
+
# ],
|
2443
|
+
# rate_limit: 1, # required
|
2444
|
+
# })
|
2445
|
+
#
|
2446
|
+
# @example Response structure
|
2447
|
+
#
|
2448
|
+
# resp.change_token #=> String
|
2449
|
+
#
|
2450
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRateBasedRule AWS API Documentation
|
2451
|
+
#
|
2452
|
+
# @overload update_rate_based_rule(params = {})
|
2453
|
+
# @param [Hash] params ({})
|
2454
|
+
def update_rate_based_rule(params = {}, options = {})
|
2455
|
+
req = build_request(:update_rate_based_rule, params)
|
2456
|
+
req.send_request(options)
|
2457
|
+
end
|
2458
|
+
|
2053
2459
|
# Inserts or deletes Predicate objects in a `Rule`. Each `Predicate`
|
2054
2460
|
# object identifies a predicate, such as a ByteMatchSet or an IPSet,
|
2055
2461
|
# that specifies the web requests that you want to allow, block, or
|
@@ -2397,6 +2803,12 @@ module Aws::WAFRegional
|
|
2397
2803
|
# want to include in the `WebACL`, to specify the default action,
|
2398
2804
|
# and to associate the `WebACL` with a CloudFront distribution.
|
2399
2805
|
#
|
2806
|
+
# Be aware that if you try to add a RATE\_BASED rule to a web ACL
|
2807
|
+
# without setting the rule type when first creating the rule, the
|
2808
|
+
# UpdateWebACL request will fail because the request tries to add a
|
2809
|
+
# REGULAR rule (the default rule type) with the specified ID, which does
|
2810
|
+
# not exist.
|
2811
|
+
#
|
2400
2812
|
# For more information about how to use the AWS WAF API to allow or
|
2401
2813
|
# block HTTP requests, see the [AWS WAF Developer Guide][1].
|
2402
2814
|
#
|
@@ -2420,7 +2832,7 @@ module Aws::WAFRegional
|
|
2420
2832
|
#
|
2421
2833
|
# * WebACLUpdate: Contains `Action` and `ActivatedRule`
|
2422
2834
|
#
|
2423
|
-
# * ActivatedRule: Contains `Action`, `Priority`, and `
|
2835
|
+
# * ActivatedRule: Contains `Action`, `Priority`, `RuleId`, and `Type`
|
2424
2836
|
#
|
2425
2837
|
# * WafAction: Contains `Type`
|
2426
2838
|
#
|
@@ -2447,6 +2859,7 @@ module Aws::WAFRegional
|
|
2447
2859
|
# action: { # required
|
2448
2860
|
# type: "BLOCK", # required, accepts BLOCK, ALLOW, COUNT
|
2449
2861
|
# },
|
2862
|
+
# type: "REGULAR", # accepts REGULAR, RATE_BASED
|
2450
2863
|
# },
|
2451
2864
|
# },
|
2452
2865
|
# ],
|
@@ -2576,7 +2989,7 @@ module Aws::WAFRegional
|
|
2576
2989
|
params: params,
|
2577
2990
|
config: config)
|
2578
2991
|
context[:gem_name] = 'aws-sdk-wafregional'
|
2579
|
-
context[:gem_version] = '1.0.0.
|
2992
|
+
context[:gem_version] = '1.0.0.rc8'
|
2580
2993
|
Seahorse::Client::Request.new(handlers, context)
|
2581
2994
|
end
|
2582
2995
|
|
@@ -33,6 +33,8 @@ module Aws::WAFRegional
|
|
33
33
|
CreateByteMatchSetResponse = Shapes::StructureShape.new(name: 'CreateByteMatchSetResponse')
|
34
34
|
CreateIPSetRequest = Shapes::StructureShape.new(name: 'CreateIPSetRequest')
|
35
35
|
CreateIPSetResponse = Shapes::StructureShape.new(name: 'CreateIPSetResponse')
|
36
|
+
CreateRateBasedRuleRequest = Shapes::StructureShape.new(name: 'CreateRateBasedRuleRequest')
|
37
|
+
CreateRateBasedRuleResponse = Shapes::StructureShape.new(name: 'CreateRateBasedRuleResponse')
|
36
38
|
CreateRuleRequest = Shapes::StructureShape.new(name: 'CreateRuleRequest')
|
37
39
|
CreateRuleResponse = Shapes::StructureShape.new(name: 'CreateRuleResponse')
|
38
40
|
CreateSizeConstraintSetRequest = Shapes::StructureShape.new(name: 'CreateSizeConstraintSetRequest')
|
@@ -47,6 +49,8 @@ module Aws::WAFRegional
|
|
47
49
|
DeleteByteMatchSetResponse = Shapes::StructureShape.new(name: 'DeleteByteMatchSetResponse')
|
48
50
|
DeleteIPSetRequest = Shapes::StructureShape.new(name: 'DeleteIPSetRequest')
|
49
51
|
DeleteIPSetResponse = Shapes::StructureShape.new(name: 'DeleteIPSetResponse')
|
52
|
+
DeleteRateBasedRuleRequest = Shapes::StructureShape.new(name: 'DeleteRateBasedRuleRequest')
|
53
|
+
DeleteRateBasedRuleResponse = Shapes::StructureShape.new(name: 'DeleteRateBasedRuleResponse')
|
50
54
|
DeleteRuleRequest = Shapes::StructureShape.new(name: 'DeleteRuleRequest')
|
51
55
|
DeleteRuleResponse = Shapes::StructureShape.new(name: 'DeleteRuleResponse')
|
52
56
|
DeleteSizeConstraintSetRequest = Shapes::StructureShape.new(name: 'DeleteSizeConstraintSetRequest')
|
@@ -68,6 +72,10 @@ module Aws::WAFRegional
|
|
68
72
|
GetChangeTokenStatusResponse = Shapes::StructureShape.new(name: 'GetChangeTokenStatusResponse')
|
69
73
|
GetIPSetRequest = Shapes::StructureShape.new(name: 'GetIPSetRequest')
|
70
74
|
GetIPSetResponse = Shapes::StructureShape.new(name: 'GetIPSetResponse')
|
75
|
+
GetRateBasedRuleManagedKeysRequest = Shapes::StructureShape.new(name: 'GetRateBasedRuleManagedKeysRequest')
|
76
|
+
GetRateBasedRuleManagedKeysResponse = Shapes::StructureShape.new(name: 'GetRateBasedRuleManagedKeysResponse')
|
77
|
+
GetRateBasedRuleRequest = Shapes::StructureShape.new(name: 'GetRateBasedRuleRequest')
|
78
|
+
GetRateBasedRuleResponse = Shapes::StructureShape.new(name: 'GetRateBasedRuleResponse')
|
71
79
|
GetRuleRequest = Shapes::StructureShape.new(name: 'GetRuleRequest')
|
72
80
|
GetRuleResponse = Shapes::StructureShape.new(name: 'GetRuleResponse')
|
73
81
|
GetSampledRequestsMaxItems = Shapes::IntegerShape.new(name: 'GetSampledRequestsMaxItems')
|
@@ -104,6 +112,8 @@ module Aws::WAFRegional
|
|
104
112
|
ListByteMatchSetsResponse = Shapes::StructureShape.new(name: 'ListByteMatchSetsResponse')
|
105
113
|
ListIPSetsRequest = Shapes::StructureShape.new(name: 'ListIPSetsRequest')
|
106
114
|
ListIPSetsResponse = Shapes::StructureShape.new(name: 'ListIPSetsResponse')
|
115
|
+
ListRateBasedRulesRequest = Shapes::StructureShape.new(name: 'ListRateBasedRulesRequest')
|
116
|
+
ListRateBasedRulesResponse = Shapes::StructureShape.new(name: 'ListRateBasedRulesResponse')
|
107
117
|
ListResourcesForWebACLRequest = Shapes::StructureShape.new(name: 'ListResourcesForWebACLRequest')
|
108
118
|
ListResourcesForWebACLResponse = Shapes::StructureShape.new(name: 'ListResourcesForWebACLResponse')
|
109
119
|
ListRulesRequest = Shapes::StructureShape.new(name: 'ListRulesRequest')
|
@@ -116,6 +126,8 @@ module Aws::WAFRegional
|
|
116
126
|
ListWebACLsResponse = Shapes::StructureShape.new(name: 'ListWebACLsResponse')
|
117
127
|
ListXssMatchSetsRequest = Shapes::StructureShape.new(name: 'ListXssMatchSetsRequest')
|
118
128
|
ListXssMatchSetsResponse = Shapes::StructureShape.new(name: 'ListXssMatchSetsResponse')
|
129
|
+
ManagedKey = Shapes::StringShape.new(name: 'ManagedKey')
|
130
|
+
ManagedKeys = Shapes::ListShape.new(name: 'ManagedKeys')
|
119
131
|
MatchFieldData = Shapes::StringShape.new(name: 'MatchFieldData')
|
120
132
|
MatchFieldType = Shapes::StringShape.new(name: 'MatchFieldType')
|
121
133
|
MetricName = Shapes::StringShape.new(name: 'MetricName')
|
@@ -130,6 +142,9 @@ module Aws::WAFRegional
|
|
130
142
|
Predicate = Shapes::StructureShape.new(name: 'Predicate')
|
131
143
|
PredicateType = Shapes::StringShape.new(name: 'PredicateType')
|
132
144
|
Predicates = Shapes::ListShape.new(name: 'Predicates')
|
145
|
+
RateBasedRule = Shapes::StructureShape.new(name: 'RateBasedRule')
|
146
|
+
RateKey = Shapes::StringShape.new(name: 'RateKey')
|
147
|
+
RateLimit = Shapes::IntegerShape.new(name: 'RateLimit')
|
133
148
|
ResourceArn = Shapes::StringShape.new(name: 'ResourceArn')
|
134
149
|
ResourceArns = Shapes::ListShape.new(name: 'ResourceArns')
|
135
150
|
ResourceId = Shapes::StringShape.new(name: 'ResourceId')
|
@@ -166,6 +181,8 @@ module Aws::WAFRegional
|
|
166
181
|
UpdateByteMatchSetResponse = Shapes::StructureShape.new(name: 'UpdateByteMatchSetResponse')
|
167
182
|
UpdateIPSetRequest = Shapes::StructureShape.new(name: 'UpdateIPSetRequest')
|
168
183
|
UpdateIPSetResponse = Shapes::StructureShape.new(name: 'UpdateIPSetResponse')
|
184
|
+
UpdateRateBasedRuleRequest = Shapes::StructureShape.new(name: 'UpdateRateBasedRuleRequest')
|
185
|
+
UpdateRateBasedRuleResponse = Shapes::StructureShape.new(name: 'UpdateRateBasedRuleResponse')
|
169
186
|
UpdateRuleRequest = Shapes::StructureShape.new(name: 'UpdateRuleRequest')
|
170
187
|
UpdateRuleResponse = Shapes::StructureShape.new(name: 'UpdateRuleResponse')
|
171
188
|
UpdateSizeConstraintSetRequest = Shapes::StructureShape.new(name: 'UpdateSizeConstraintSetRequest')
|
@@ -190,6 +207,7 @@ module Aws::WAFRegional
|
|
190
207
|
WAFUnavailableEntityException = Shapes::StructureShape.new(name: 'WAFUnavailableEntityException')
|
191
208
|
WafAction = Shapes::StructureShape.new(name: 'WafAction')
|
192
209
|
WafActionType = Shapes::StringShape.new(name: 'WafActionType')
|
210
|
+
WafRuleType = Shapes::StringShape.new(name: 'WafRuleType')
|
193
211
|
WebACL = Shapes::StructureShape.new(name: 'WebACL')
|
194
212
|
WebACLSummaries = Shapes::ListShape.new(name: 'WebACLSummaries')
|
195
213
|
WebACLSummary = Shapes::StructureShape.new(name: 'WebACLSummary')
|
@@ -207,6 +225,7 @@ module Aws::WAFRegional
|
|
207
225
|
ActivatedRule.add_member(:priority, Shapes::ShapeRef.new(shape: RulePriority, required: true, location_name: "Priority"))
|
208
226
|
ActivatedRule.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
209
227
|
ActivatedRule.add_member(:action, Shapes::ShapeRef.new(shape: WafAction, required: true, location_name: "Action"))
|
228
|
+
ActivatedRule.add_member(:type, Shapes::ShapeRef.new(shape: WafRuleType, location_name: "Type"))
|
210
229
|
ActivatedRule.struct_class = Types::ActivatedRule
|
211
230
|
|
212
231
|
ActivatedRules.member = Shapes::ShapeRef.new(shape: ActivatedRule)
|
@@ -258,6 +277,17 @@ module Aws::WAFRegional
|
|
258
277
|
CreateIPSetResponse.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, location_name: "ChangeToken"))
|
259
278
|
CreateIPSetResponse.struct_class = Types::CreateIPSetResponse
|
260
279
|
|
280
|
+
CreateRateBasedRuleRequest.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "Name"))
|
281
|
+
CreateRateBasedRuleRequest.add_member(:metric_name, Shapes::ShapeRef.new(shape: MetricName, required: true, location_name: "MetricName"))
|
282
|
+
CreateRateBasedRuleRequest.add_member(:rate_key, Shapes::ShapeRef.new(shape: RateKey, required: true, location_name: "RateKey"))
|
283
|
+
CreateRateBasedRuleRequest.add_member(:rate_limit, Shapes::ShapeRef.new(shape: RateLimit, required: true, location_name: "RateLimit"))
|
284
|
+
CreateRateBasedRuleRequest.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, required: true, location_name: "ChangeToken"))
|
285
|
+
CreateRateBasedRuleRequest.struct_class = Types::CreateRateBasedRuleRequest
|
286
|
+
|
287
|
+
CreateRateBasedRuleResponse.add_member(:rule, Shapes::ShapeRef.new(shape: RateBasedRule, location_name: "Rule"))
|
288
|
+
CreateRateBasedRuleResponse.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, location_name: "ChangeToken"))
|
289
|
+
CreateRateBasedRuleResponse.struct_class = Types::CreateRateBasedRuleResponse
|
290
|
+
|
261
291
|
CreateRuleRequest.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "Name"))
|
262
292
|
CreateRuleRequest.add_member(:metric_name, Shapes::ShapeRef.new(shape: MetricName, required: true, location_name: "MetricName"))
|
263
293
|
CreateRuleRequest.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, required: true, location_name: "ChangeToken"))
|
@@ -315,6 +345,13 @@ module Aws::WAFRegional
|
|
315
345
|
DeleteIPSetResponse.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, location_name: "ChangeToken"))
|
316
346
|
DeleteIPSetResponse.struct_class = Types::DeleteIPSetResponse
|
317
347
|
|
348
|
+
DeleteRateBasedRuleRequest.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
349
|
+
DeleteRateBasedRuleRequest.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, required: true, location_name: "ChangeToken"))
|
350
|
+
DeleteRateBasedRuleRequest.struct_class = Types::DeleteRateBasedRuleRequest
|
351
|
+
|
352
|
+
DeleteRateBasedRuleResponse.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, location_name: "ChangeToken"))
|
353
|
+
DeleteRateBasedRuleResponse.struct_class = Types::DeleteRateBasedRuleResponse
|
354
|
+
|
318
355
|
DeleteRuleRequest.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
319
356
|
DeleteRuleRequest.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, required: true, location_name: "ChangeToken"))
|
320
357
|
DeleteRuleRequest.struct_class = Types::DeleteRuleRequest
|
@@ -382,6 +419,20 @@ module Aws::WAFRegional
|
|
382
419
|
GetIPSetResponse.add_member(:ip_set, Shapes::ShapeRef.new(shape: IPSet, location_name: "IPSet"))
|
383
420
|
GetIPSetResponse.struct_class = Types::GetIPSetResponse
|
384
421
|
|
422
|
+
GetRateBasedRuleManagedKeysRequest.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
423
|
+
GetRateBasedRuleManagedKeysRequest.add_member(:next_marker, Shapes::ShapeRef.new(shape: NextMarker, location_name: "NextMarker"))
|
424
|
+
GetRateBasedRuleManagedKeysRequest.struct_class = Types::GetRateBasedRuleManagedKeysRequest
|
425
|
+
|
426
|
+
GetRateBasedRuleManagedKeysResponse.add_member(:managed_keys, Shapes::ShapeRef.new(shape: ManagedKeys, location_name: "ManagedKeys"))
|
427
|
+
GetRateBasedRuleManagedKeysResponse.add_member(:next_marker, Shapes::ShapeRef.new(shape: NextMarker, location_name: "NextMarker"))
|
428
|
+
GetRateBasedRuleManagedKeysResponse.struct_class = Types::GetRateBasedRuleManagedKeysResponse
|
429
|
+
|
430
|
+
GetRateBasedRuleRequest.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
431
|
+
GetRateBasedRuleRequest.struct_class = Types::GetRateBasedRuleRequest
|
432
|
+
|
433
|
+
GetRateBasedRuleResponse.add_member(:rule, Shapes::ShapeRef.new(shape: RateBasedRule, location_name: "Rule"))
|
434
|
+
GetRateBasedRuleResponse.struct_class = Types::GetRateBasedRuleResponse
|
435
|
+
|
385
436
|
GetRuleRequest.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
386
437
|
GetRuleRequest.struct_class = Types::GetRuleRequest
|
387
438
|
|
@@ -482,6 +533,14 @@ module Aws::WAFRegional
|
|
482
533
|
ListIPSetsResponse.add_member(:ip_sets, Shapes::ShapeRef.new(shape: IPSetSummaries, location_name: "IPSets"))
|
483
534
|
ListIPSetsResponse.struct_class = Types::ListIPSetsResponse
|
484
535
|
|
536
|
+
ListRateBasedRulesRequest.add_member(:next_marker, Shapes::ShapeRef.new(shape: NextMarker, location_name: "NextMarker"))
|
537
|
+
ListRateBasedRulesRequest.add_member(:limit, Shapes::ShapeRef.new(shape: PaginationLimit, location_name: "Limit"))
|
538
|
+
ListRateBasedRulesRequest.struct_class = Types::ListRateBasedRulesRequest
|
539
|
+
|
540
|
+
ListRateBasedRulesResponse.add_member(:next_marker, Shapes::ShapeRef.new(shape: NextMarker, location_name: "NextMarker"))
|
541
|
+
ListRateBasedRulesResponse.add_member(:rules, Shapes::ShapeRef.new(shape: RuleSummaries, location_name: "Rules"))
|
542
|
+
ListRateBasedRulesResponse.struct_class = Types::ListRateBasedRulesResponse
|
543
|
+
|
485
544
|
ListResourcesForWebACLRequest.add_member(:web_acl_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "WebACLId"))
|
486
545
|
ListResourcesForWebACLRequest.struct_class = Types::ListResourcesForWebACLRequest
|
487
546
|
|
@@ -528,6 +587,8 @@ module Aws::WAFRegional
|
|
528
587
|
ListXssMatchSetsResponse.add_member(:xss_match_sets, Shapes::ShapeRef.new(shape: XssMatchSetSummaries, location_name: "XssMatchSets"))
|
529
588
|
ListXssMatchSetsResponse.struct_class = Types::ListXssMatchSetsResponse
|
530
589
|
|
590
|
+
ManagedKeys.member = Shapes::ShapeRef.new(shape: ManagedKey)
|
591
|
+
|
531
592
|
Predicate.add_member(:negated, Shapes::ShapeRef.new(shape: Negated, required: true, location_name: "Negated"))
|
532
593
|
Predicate.add_member(:type, Shapes::ShapeRef.new(shape: PredicateType, required: true, location_name: "Type"))
|
533
594
|
Predicate.add_member(:data_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "DataId"))
|
@@ -535,6 +596,14 @@ module Aws::WAFRegional
|
|
535
596
|
|
536
597
|
Predicates.member = Shapes::ShapeRef.new(shape: Predicate)
|
537
598
|
|
599
|
+
RateBasedRule.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
600
|
+
RateBasedRule.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, location_name: "Name"))
|
601
|
+
RateBasedRule.add_member(:metric_name, Shapes::ShapeRef.new(shape: MetricName, location_name: "MetricName"))
|
602
|
+
RateBasedRule.add_member(:match_predicates, Shapes::ShapeRef.new(shape: Predicates, required: true, location_name: "MatchPredicates"))
|
603
|
+
RateBasedRule.add_member(:rate_key, Shapes::ShapeRef.new(shape: RateKey, required: true, location_name: "RateKey"))
|
604
|
+
RateBasedRule.add_member(:rate_limit, Shapes::ShapeRef.new(shape: RateLimit, required: true, location_name: "RateLimit"))
|
605
|
+
RateBasedRule.struct_class = Types::RateBasedRule
|
606
|
+
|
538
607
|
ResourceArns.member = Shapes::ShapeRef.new(shape: ResourceArn)
|
539
608
|
|
540
609
|
Rule.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
@@ -631,6 +700,15 @@ module Aws::WAFRegional
|
|
631
700
|
UpdateIPSetResponse.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, location_name: "ChangeToken"))
|
632
701
|
UpdateIPSetResponse.struct_class = Types::UpdateIPSetResponse
|
633
702
|
|
703
|
+
UpdateRateBasedRuleRequest.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
704
|
+
UpdateRateBasedRuleRequest.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, required: true, location_name: "ChangeToken"))
|
705
|
+
UpdateRateBasedRuleRequest.add_member(:updates, Shapes::ShapeRef.new(shape: RuleUpdates, required: true, location_name: "Updates"))
|
706
|
+
UpdateRateBasedRuleRequest.add_member(:rate_limit, Shapes::ShapeRef.new(shape: RateLimit, required: true, location_name: "RateLimit"))
|
707
|
+
UpdateRateBasedRuleRequest.struct_class = Types::UpdateRateBasedRuleRequest
|
708
|
+
|
709
|
+
UpdateRateBasedRuleResponse.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, location_name: "ChangeToken"))
|
710
|
+
UpdateRateBasedRuleResponse.struct_class = Types::UpdateRateBasedRuleResponse
|
711
|
+
|
634
712
|
UpdateRuleRequest.add_member(:rule_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "RuleId"))
|
635
713
|
UpdateRuleRequest.add_member(:change_token, Shapes::ShapeRef.new(shape: ChangeToken, required: true, location_name: "ChangeToken"))
|
636
714
|
UpdateRuleRequest.add_member(:updates, Shapes::ShapeRef.new(shape: RuleUpdates, required: true, location_name: "Updates"))
|
@@ -773,6 +851,19 @@ module Aws::WAFRegional
|
|
773
851
|
o.errors << Shapes::ShapeRef.new(shape: WAFLimitsExceededException)
|
774
852
|
end)
|
775
853
|
|
854
|
+
api.add_operation(:create_rate_based_rule, Seahorse::Model::Operation.new.tap do |o|
|
855
|
+
o.name = "CreateRateBasedRule"
|
856
|
+
o.http_method = "POST"
|
857
|
+
o.http_request_uri = "/"
|
858
|
+
o.input = Shapes::ShapeRef.new(shape: CreateRateBasedRuleRequest)
|
859
|
+
o.output = Shapes::ShapeRef.new(shape: CreateRateBasedRuleResponse)
|
860
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFStaleDataException)
|
861
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInternalErrorException)
|
862
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFDisallowedNameException)
|
863
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidParameterException)
|
864
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFLimitsExceededException)
|
865
|
+
end)
|
866
|
+
|
776
867
|
api.add_operation(:create_rule, Seahorse::Model::Operation.new.tap do |o|
|
777
868
|
o.name = "CreateRule"
|
778
869
|
o.http_method = "POST"
|
@@ -870,6 +961,20 @@ module Aws::WAFRegional
|
|
870
961
|
o.errors << Shapes::ShapeRef.new(shape: WAFNonEmptyEntityException)
|
871
962
|
end)
|
872
963
|
|
964
|
+
api.add_operation(:delete_rate_based_rule, Seahorse::Model::Operation.new.tap do |o|
|
965
|
+
o.name = "DeleteRateBasedRule"
|
966
|
+
o.http_method = "POST"
|
967
|
+
o.http_request_uri = "/"
|
968
|
+
o.input = Shapes::ShapeRef.new(shape: DeleteRateBasedRuleRequest)
|
969
|
+
o.output = Shapes::ShapeRef.new(shape: DeleteRateBasedRuleResponse)
|
970
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFStaleDataException)
|
971
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInternalErrorException)
|
972
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidAccountException)
|
973
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFNonexistentItemException)
|
974
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFReferencedItemException)
|
975
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFNonEmptyEntityException)
|
976
|
+
end)
|
977
|
+
|
873
978
|
api.add_operation(:delete_rule, Seahorse::Model::Operation.new.tap do |o|
|
874
979
|
o.name = "DeleteRule"
|
875
980
|
o.http_method = "POST"
|
@@ -993,6 +1098,29 @@ module Aws::WAFRegional
|
|
993
1098
|
o.errors << Shapes::ShapeRef.new(shape: WAFNonexistentItemException)
|
994
1099
|
end)
|
995
1100
|
|
1101
|
+
api.add_operation(:get_rate_based_rule, Seahorse::Model::Operation.new.tap do |o|
|
1102
|
+
o.name = "GetRateBasedRule"
|
1103
|
+
o.http_method = "POST"
|
1104
|
+
o.http_request_uri = "/"
|
1105
|
+
o.input = Shapes::ShapeRef.new(shape: GetRateBasedRuleRequest)
|
1106
|
+
o.output = Shapes::ShapeRef.new(shape: GetRateBasedRuleResponse)
|
1107
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInternalErrorException)
|
1108
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidAccountException)
|
1109
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFNonexistentItemException)
|
1110
|
+
end)
|
1111
|
+
|
1112
|
+
api.add_operation(:get_rate_based_rule_managed_keys, Seahorse::Model::Operation.new.tap do |o|
|
1113
|
+
o.name = "GetRateBasedRuleManagedKeys"
|
1114
|
+
o.http_method = "POST"
|
1115
|
+
o.http_request_uri = "/"
|
1116
|
+
o.input = Shapes::ShapeRef.new(shape: GetRateBasedRuleManagedKeysRequest)
|
1117
|
+
o.output = Shapes::ShapeRef.new(shape: GetRateBasedRuleManagedKeysResponse)
|
1118
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInternalErrorException)
|
1119
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidAccountException)
|
1120
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFNonexistentItemException)
|
1121
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidParameterException)
|
1122
|
+
end)
|
1123
|
+
|
996
1124
|
api.add_operation(:get_rule, Seahorse::Model::Operation.new.tap do |o|
|
997
1125
|
o.name = "GetRule"
|
998
1126
|
o.http_method = "POST"
|
@@ -1091,6 +1219,16 @@ module Aws::WAFRegional
|
|
1091
1219
|
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidAccountException)
|
1092
1220
|
end)
|
1093
1221
|
|
1222
|
+
api.add_operation(:list_rate_based_rules, Seahorse::Model::Operation.new.tap do |o|
|
1223
|
+
o.name = "ListRateBasedRules"
|
1224
|
+
o.http_method = "POST"
|
1225
|
+
o.http_request_uri = "/"
|
1226
|
+
o.input = Shapes::ShapeRef.new(shape: ListRateBasedRulesRequest)
|
1227
|
+
o.output = Shapes::ShapeRef.new(shape: ListRateBasedRulesResponse)
|
1228
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInternalErrorException)
|
1229
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidAccountException)
|
1230
|
+
end)
|
1231
|
+
|
1094
1232
|
api.add_operation(:list_resources_for_web_acl, Seahorse::Model::Operation.new.tap do |o|
|
1095
1233
|
o.name = "ListResourcesForWebACL"
|
1096
1234
|
o.http_method = "POST"
|
@@ -1185,6 +1323,23 @@ module Aws::WAFRegional
|
|
1185
1323
|
o.errors << Shapes::ShapeRef.new(shape: WAFLimitsExceededException)
|
1186
1324
|
end)
|
1187
1325
|
|
1326
|
+
api.add_operation(:update_rate_based_rule, Seahorse::Model::Operation.new.tap do |o|
|
1327
|
+
o.name = "UpdateRateBasedRule"
|
1328
|
+
o.http_method = "POST"
|
1329
|
+
o.http_request_uri = "/"
|
1330
|
+
o.input = Shapes::ShapeRef.new(shape: UpdateRateBasedRuleRequest)
|
1331
|
+
o.output = Shapes::ShapeRef.new(shape: UpdateRateBasedRuleResponse)
|
1332
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFStaleDataException)
|
1333
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInternalErrorException)
|
1334
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidAccountException)
|
1335
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidOperationException)
|
1336
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFInvalidParameterException)
|
1337
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFNonexistentContainerException)
|
1338
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFNonexistentItemException)
|
1339
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFReferencedItemException)
|
1340
|
+
o.errors << Shapes::ShapeRef.new(shape: WAFLimitsExceededException)
|
1341
|
+
end)
|
1342
|
+
|
1188
1343
|
api.add_operation(:update_rule, Seahorse::Model::Operation.new.tap do |o|
|
1189
1344
|
o.name = "UpdateRule"
|
1190
1345
|
o.http_method = "POST"
|
@@ -25,6 +25,7 @@ module Aws::WAFRegional
|
|
25
25
|
# action: { # required
|
26
26
|
# type: "BLOCK", # required, accepts BLOCK, ALLOW, COUNT
|
27
27
|
# },
|
28
|
+
# type: "REGULAR", # accepts REGULAR, RATE_BASED
|
28
29
|
# }
|
29
30
|
#
|
30
31
|
# @!attribute [rw] priority
|
@@ -59,12 +60,22 @@ module Aws::WAFRegional
|
|
59
60
|
# request based on the remaining rules in the web ACL.
|
60
61
|
# @return [Types::WafAction]
|
61
62
|
#
|
63
|
+
# @!attribute [rw] type
|
64
|
+
# The rule type, either `REGULAR`, as defined by Rule, or
|
65
|
+
# `RATE_BASED`, as defined by RateBasedRule. The default is REGULAR.
|
66
|
+
# Although this field is optional, be aware that if you try to add a
|
67
|
+
# RATE\_BASED rule to a web ACL without setting the type, the
|
68
|
+
# UpdateWebACL request will fail because the request tries to add a
|
69
|
+
# REGULAR rule with the specified ID, which does not exist.
|
70
|
+
# @return [String]
|
71
|
+
#
|
62
72
|
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ActivatedRule AWS API Documentation
|
63
73
|
#
|
64
74
|
class ActivatedRule < Struct.new(
|
65
75
|
:priority,
|
66
76
|
:rule_id,
|
67
|
-
:action
|
77
|
+
:action,
|
78
|
+
:type)
|
68
79
|
include Aws::Structure
|
69
80
|
end
|
70
81
|
|
@@ -504,6 +515,81 @@ module Aws::WAFRegional
|
|
504
515
|
include Aws::Structure
|
505
516
|
end
|
506
517
|
|
518
|
+
# @note When making an API call, you may pass CreateRateBasedRuleRequest
|
519
|
+
# data as a hash:
|
520
|
+
#
|
521
|
+
# {
|
522
|
+
# name: "ResourceName", # required
|
523
|
+
# metric_name: "MetricName", # required
|
524
|
+
# rate_key: "IP", # required, accepts IP
|
525
|
+
# rate_limit: 1, # required
|
526
|
+
# change_token: "ChangeToken", # required
|
527
|
+
# }
|
528
|
+
#
|
529
|
+
# @!attribute [rw] name
|
530
|
+
# A friendly name or description of the RateBasedRule. You can't
|
531
|
+
# change the name of a `RateBasedRule` after you create it.
|
532
|
+
# @return [String]
|
533
|
+
#
|
534
|
+
# @!attribute [rw] metric_name
|
535
|
+
# A friendly name or description for the metrics for this
|
536
|
+
# `RateBasedRule`. The name can contain only alphanumeric characters
|
537
|
+
# (A-Z, a-z, 0-9); the name can't contain whitespace. You can't
|
538
|
+
# change the name of the metric after you create the `RateBasedRule`.
|
539
|
+
# @return [String]
|
540
|
+
#
|
541
|
+
# @!attribute [rw] rate_key
|
542
|
+
# The field that AWS WAF uses to determine if requests are likely
|
543
|
+
# arriving from a single source and thus subject to rate monitoring.
|
544
|
+
# The only valid value for `RateKey` is `IP`. `IP` indicates that
|
545
|
+
# requests that arrive from the same IP address are subject to the
|
546
|
+
# `RateLimit` that is specified in the `RateBasedRule`.
|
547
|
+
# @return [String]
|
548
|
+
#
|
549
|
+
# @!attribute [rw] rate_limit
|
550
|
+
# The maximum number of requests, which have an identical value in the
|
551
|
+
# field that is specified by `RateKey`, allowed in a five-minute
|
552
|
+
# period. If the number of requests exceeds the `RateLimit` and the
|
553
|
+
# other predicates specified in the rule are also met, AWS WAF
|
554
|
+
# triggers the action that is specified for this rule.
|
555
|
+
# @return [Integer]
|
556
|
+
#
|
557
|
+
# @!attribute [rw] change_token
|
558
|
+
# The `ChangeToken` that you used to submit the `CreateRateBasedRule`
|
559
|
+
# request. You can also use this value to query the status of the
|
560
|
+
# request. For more information, see GetChangeTokenStatus.
|
561
|
+
# @return [String]
|
562
|
+
#
|
563
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRateBasedRuleRequest AWS API Documentation
|
564
|
+
#
|
565
|
+
class CreateRateBasedRuleRequest < Struct.new(
|
566
|
+
:name,
|
567
|
+
:metric_name,
|
568
|
+
:rate_key,
|
569
|
+
:rate_limit,
|
570
|
+
:change_token)
|
571
|
+
include Aws::Structure
|
572
|
+
end
|
573
|
+
|
574
|
+
# @!attribute [rw] rule
|
575
|
+
# The RateBasedRule that is returned in the `CreateRateBasedRule`
|
576
|
+
# response.
|
577
|
+
# @return [Types::RateBasedRule]
|
578
|
+
#
|
579
|
+
# @!attribute [rw] change_token
|
580
|
+
# The `ChangeToken` that you used to submit the `CreateRateBasedRule`
|
581
|
+
# request. You can also use this value to query the status of the
|
582
|
+
# request. For more information, see GetChangeTokenStatus.
|
583
|
+
# @return [String]
|
584
|
+
#
|
585
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRateBasedRuleResponse AWS API Documentation
|
586
|
+
#
|
587
|
+
class CreateRateBasedRuleResponse < Struct.new(
|
588
|
+
:rule,
|
589
|
+
:change_token)
|
590
|
+
include Aws::Structure
|
591
|
+
end
|
592
|
+
|
507
593
|
# @note When making an API call, you may pass CreateRuleRequest
|
508
594
|
# data as a hash:
|
509
595
|
#
|
@@ -836,6 +922,44 @@ module Aws::WAFRegional
|
|
836
922
|
include Aws::Structure
|
837
923
|
end
|
838
924
|
|
925
|
+
# @note When making an API call, you may pass DeleteRateBasedRuleRequest
|
926
|
+
# data as a hash:
|
927
|
+
#
|
928
|
+
# {
|
929
|
+
# rule_id: "ResourceId", # required
|
930
|
+
# change_token: "ChangeToken", # required
|
931
|
+
# }
|
932
|
+
#
|
933
|
+
# @!attribute [rw] rule_id
|
934
|
+
# The `RuleId` of the RateBasedRule that you want to delete. `RuleId`
|
935
|
+
# is returned by CreateRateBasedRule and by ListRateBasedRules.
|
936
|
+
# @return [String]
|
937
|
+
#
|
938
|
+
# @!attribute [rw] change_token
|
939
|
+
# The value returned by the most recent call to GetChangeToken.
|
940
|
+
# @return [String]
|
941
|
+
#
|
942
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRateBasedRuleRequest AWS API Documentation
|
943
|
+
#
|
944
|
+
class DeleteRateBasedRuleRequest < Struct.new(
|
945
|
+
:rule_id,
|
946
|
+
:change_token)
|
947
|
+
include Aws::Structure
|
948
|
+
end
|
949
|
+
|
950
|
+
# @!attribute [rw] change_token
|
951
|
+
# The `ChangeToken` that you used to submit the `DeleteRateBasedRule`
|
952
|
+
# request. You can also use this value to query the status of the
|
953
|
+
# request. For more information, see GetChangeTokenStatus.
|
954
|
+
# @return [String]
|
955
|
+
#
|
956
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRateBasedRuleResponse AWS API Documentation
|
957
|
+
#
|
958
|
+
class DeleteRateBasedRuleResponse < Struct.new(
|
959
|
+
:change_token)
|
960
|
+
include Aws::Structure
|
961
|
+
end
|
962
|
+
|
839
963
|
# @note When making an API call, you may pass DeleteRuleRequest
|
840
964
|
# data as a hash:
|
841
965
|
#
|
@@ -1246,6 +1370,81 @@ module Aws::WAFRegional
|
|
1246
1370
|
include Aws::Structure
|
1247
1371
|
end
|
1248
1372
|
|
1373
|
+
# @note When making an API call, you may pass GetRateBasedRuleManagedKeysRequest
|
1374
|
+
# data as a hash:
|
1375
|
+
#
|
1376
|
+
# {
|
1377
|
+
# rule_id: "ResourceId", # required
|
1378
|
+
# next_marker: "NextMarker",
|
1379
|
+
# }
|
1380
|
+
#
|
1381
|
+
# @!attribute [rw] rule_id
|
1382
|
+
# The `RuleId` of the RateBasedRule for which you want to get a list
|
1383
|
+
# of `ManagedKeys`. `RuleId` is returned by CreateRateBasedRule and by
|
1384
|
+
# ListRateBasedRules.
|
1385
|
+
# @return [String]
|
1386
|
+
#
|
1387
|
+
# @!attribute [rw] next_marker
|
1388
|
+
# A null value and not currently used. Do not include this in your
|
1389
|
+
# request.
|
1390
|
+
# @return [String]
|
1391
|
+
#
|
1392
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRuleManagedKeysRequest AWS API Documentation
|
1393
|
+
#
|
1394
|
+
class GetRateBasedRuleManagedKeysRequest < Struct.new(
|
1395
|
+
:rule_id,
|
1396
|
+
:next_marker)
|
1397
|
+
include Aws::Structure
|
1398
|
+
end
|
1399
|
+
|
1400
|
+
# @!attribute [rw] managed_keys
|
1401
|
+
# An array of IP addresses that currently are blocked by the specified
|
1402
|
+
# RateBasedRule.
|
1403
|
+
# @return [Array<String>]
|
1404
|
+
#
|
1405
|
+
# @!attribute [rw] next_marker
|
1406
|
+
# A null value and not currently used.
|
1407
|
+
# @return [String]
|
1408
|
+
#
|
1409
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRuleManagedKeysResponse AWS API Documentation
|
1410
|
+
#
|
1411
|
+
class GetRateBasedRuleManagedKeysResponse < Struct.new(
|
1412
|
+
:managed_keys,
|
1413
|
+
:next_marker)
|
1414
|
+
include Aws::Structure
|
1415
|
+
end
|
1416
|
+
|
1417
|
+
# @note When making an API call, you may pass GetRateBasedRuleRequest
|
1418
|
+
# data as a hash:
|
1419
|
+
#
|
1420
|
+
# {
|
1421
|
+
# rule_id: "ResourceId", # required
|
1422
|
+
# }
|
1423
|
+
#
|
1424
|
+
# @!attribute [rw] rule_id
|
1425
|
+
# The `RuleId` of the RateBasedRule that you want to get. `RuleId` is
|
1426
|
+
# returned by CreateRateBasedRule and by ListRateBasedRules.
|
1427
|
+
# @return [String]
|
1428
|
+
#
|
1429
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRuleRequest AWS API Documentation
|
1430
|
+
#
|
1431
|
+
class GetRateBasedRuleRequest < Struct.new(
|
1432
|
+
:rule_id)
|
1433
|
+
include Aws::Structure
|
1434
|
+
end
|
1435
|
+
|
1436
|
+
# @!attribute [rw] rule
|
1437
|
+
# Information about the RateBasedRule that you specified in the
|
1438
|
+
# `GetRateBasedRule` request.
|
1439
|
+
# @return [Types::RateBasedRule]
|
1440
|
+
#
|
1441
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRateBasedRuleResponse AWS API Documentation
|
1442
|
+
#
|
1443
|
+
class GetRateBasedRuleResponse < Struct.new(
|
1444
|
+
:rule)
|
1445
|
+
include Aws::Structure
|
1446
|
+
end
|
1447
|
+
|
1249
1448
|
# @note When making an API call, you may pass GetRuleRequest
|
1250
1449
|
# data as a hash:
|
1251
1450
|
#
|
@@ -1688,14 +1887,9 @@ module Aws::WAFRegional
|
|
1688
1887
|
# @!attribute [rw] ip_set_descriptors
|
1689
1888
|
# The IP address type (`IPV4` or `IPV6`) and the IP address range (in
|
1690
1889
|
# CIDR notation) that web requests originate from. If the `WebACL` is
|
1691
|
-
# associated with a CloudFront distribution
|
1692
|
-
#
|
1693
|
-
#
|
1694
|
-
# * `c-ip`, if the viewer did not use an HTTP proxy or a load balancer
|
1695
|
-
# to send the request
|
1696
|
-
#
|
1697
|
-
# * `x-forwarded-for`, if the viewer did use an HTTP proxy or a load
|
1698
|
-
# balancer to send the request
|
1890
|
+
# associated with a CloudFront distribution and the viewer did not use
|
1891
|
+
# an HTTP proxy or a load balancer to send the request, this is the
|
1892
|
+
# value of the c-ip field in the CloudFront access logs.
|
1699
1893
|
# @return [Array<Types::IPSetDescriptor>]
|
1700
1894
|
#
|
1701
1895
|
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/IPSet AWS API Documentation
|
@@ -1919,6 +2113,58 @@ module Aws::WAFRegional
|
|
1919
2113
|
include Aws::Structure
|
1920
2114
|
end
|
1921
2115
|
|
2116
|
+
# @note When making an API call, you may pass ListRateBasedRulesRequest
|
2117
|
+
# data as a hash:
|
2118
|
+
#
|
2119
|
+
# {
|
2120
|
+
# next_marker: "NextMarker",
|
2121
|
+
# limit: 1,
|
2122
|
+
# }
|
2123
|
+
#
|
2124
|
+
# @!attribute [rw] next_marker
|
2125
|
+
# If you specify a value for `Limit` and you have more `Rules` than
|
2126
|
+
# the value of `Limit`, AWS WAF returns a `NextMarker` value in the
|
2127
|
+
# response that allows you to list another group of `Rules`. For the
|
2128
|
+
# second and subsequent `ListRateBasedRules` requests, specify the
|
2129
|
+
# value of `NextMarker` from the previous response to get information
|
2130
|
+
# about another batch of `Rules`.
|
2131
|
+
# @return [String]
|
2132
|
+
#
|
2133
|
+
# @!attribute [rw] limit
|
2134
|
+
# Specifies the number of `Rules` that you want AWS WAF to return for
|
2135
|
+
# this request. If you have more `Rules` than the number that you
|
2136
|
+
# specify for `Limit`, the response includes a `NextMarker` value that
|
2137
|
+
# you can use to get another batch of `Rules`.
|
2138
|
+
# @return [Integer]
|
2139
|
+
#
|
2140
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRateBasedRulesRequest AWS API Documentation
|
2141
|
+
#
|
2142
|
+
class ListRateBasedRulesRequest < Struct.new(
|
2143
|
+
:next_marker,
|
2144
|
+
:limit)
|
2145
|
+
include Aws::Structure
|
2146
|
+
end
|
2147
|
+
|
2148
|
+
# @!attribute [rw] next_marker
|
2149
|
+
# If you have more `Rules` than the number that you specified for
|
2150
|
+
# `Limit` in the request, the response includes a `NextMarker` value.
|
2151
|
+
# To list more `Rules`, submit another `ListRateBasedRules` request,
|
2152
|
+
# and specify the `NextMarker` value from the response in the
|
2153
|
+
# `NextMarker` value in the next request.
|
2154
|
+
# @return [String]
|
2155
|
+
#
|
2156
|
+
# @!attribute [rw] rules
|
2157
|
+
# An array of RuleSummary objects.
|
2158
|
+
# @return [Array<Types::RuleSummary>]
|
2159
|
+
#
|
2160
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRateBasedRulesResponse AWS API Documentation
|
2161
|
+
#
|
2162
|
+
class ListRateBasedRulesResponse < Struct.new(
|
2163
|
+
:next_marker,
|
2164
|
+
:rules)
|
2165
|
+
include Aws::Structure
|
2166
|
+
end
|
2167
|
+
|
1922
2168
|
# @note When making an API call, you may pass ListResourcesForWebACLRequest
|
1923
2169
|
# data as a hash:
|
1924
2170
|
#
|
@@ -2280,6 +2526,77 @@ module Aws::WAFRegional
|
|
2280
2526
|
include Aws::Structure
|
2281
2527
|
end
|
2282
2528
|
|
2529
|
+
# A `RateBasedRule` is identical to a regular Rule, with one addition: a
|
2530
|
+
# `RateBasedRule` counts the number of requests that arrive from a
|
2531
|
+
# specified IP address every five minutes. For example, based on recent
|
2532
|
+
# requests that you've seen from an attacker, you might create a
|
2533
|
+
# `RateBasedRule` that includes the following conditions:
|
2534
|
+
#
|
2535
|
+
# * The requests come from 192.0.2.44.
|
2536
|
+
#
|
2537
|
+
# * They contain the value `BadBot` in the `User-Agent` header.
|
2538
|
+
#
|
2539
|
+
# In the rule, you also define the rate limit as 15,000.
|
2540
|
+
#
|
2541
|
+
# Requests that meet both of these conditions and exceed 15,000 requests
|
2542
|
+
# every five minutes trigger the rule's action (block or count), which
|
2543
|
+
# is defined in the web ACL.
|
2544
|
+
#
|
2545
|
+
# @!attribute [rw] rule_id
|
2546
|
+
# A unique identifier for a `RateBasedRule`. You use `RuleId` to get
|
2547
|
+
# more information about a `RateBasedRule` (see GetRateBasedRule),
|
2548
|
+
# update a `RateBasedRule` (see UpdateRateBasedRule), insert a
|
2549
|
+
# `RateBasedRule` into a `WebACL` or delete one from a `WebACL` (see
|
2550
|
+
# UpdateWebACL), or delete a `RateBasedRule` from AWS WAF (see
|
2551
|
+
# DeleteRateBasedRule).
|
2552
|
+
# @return [String]
|
2553
|
+
#
|
2554
|
+
# @!attribute [rw] name
|
2555
|
+
# A friendly name or description for a `RateBasedRule`. You can't
|
2556
|
+
# change the name of a `RateBasedRule` after you create it.
|
2557
|
+
# @return [String]
|
2558
|
+
#
|
2559
|
+
# @!attribute [rw] metric_name
|
2560
|
+
# A friendly name or description for the metrics for a
|
2561
|
+
# `RateBasedRule`. The name can contain only alphanumeric characters
|
2562
|
+
# (A-Z, a-z, 0-9); the name can't contain whitespace. You can't
|
2563
|
+
# change the name of the metric after you create the `RateBasedRule`.
|
2564
|
+
# @return [String]
|
2565
|
+
#
|
2566
|
+
# @!attribute [rw] match_predicates
|
2567
|
+
# The `Predicates` object contains one `Predicate` element for each
|
2568
|
+
# ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to
|
2569
|
+
# include in a `RateBasedRule`.
|
2570
|
+
# @return [Array<Types::Predicate>]
|
2571
|
+
#
|
2572
|
+
# @!attribute [rw] rate_key
|
2573
|
+
# The field that AWS WAF uses to determine if requests are likely
|
2574
|
+
# arriving from single source and thus subject to rate monitoring. The
|
2575
|
+
# only valid value for `RateKey` is `IP`. `IP` indicates that requests
|
2576
|
+
# arriving from the same IP address are subject to the `RateLimit`
|
2577
|
+
# that is specified in the `RateBasedRule`.
|
2578
|
+
# @return [String]
|
2579
|
+
#
|
2580
|
+
# @!attribute [rw] rate_limit
|
2581
|
+
# The maximum number of requests, which have an identical value in the
|
2582
|
+
# field specified by the `RateKey`, allowed in a five-minute period.
|
2583
|
+
# If the number of requests exceeds the `RateLimit` and the other
|
2584
|
+
# predicates specified in the rule are also met, AWS WAF triggers the
|
2585
|
+
# action that is specified for this rule.
|
2586
|
+
# @return [Integer]
|
2587
|
+
#
|
2588
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/RateBasedRule AWS API Documentation
|
2589
|
+
#
|
2590
|
+
class RateBasedRule < Struct.new(
|
2591
|
+
:rule_id,
|
2592
|
+
:name,
|
2593
|
+
:metric_name,
|
2594
|
+
:match_predicates,
|
2595
|
+
:rate_key,
|
2596
|
+
:rate_limit)
|
2597
|
+
include Aws::Structure
|
2598
|
+
end
|
2599
|
+
|
2283
2600
|
# A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet
|
2284
2601
|
# objects that identify the web requests that you want to allow, block,
|
2285
2602
|
# or count. For example, you might create a `Rule` that includes the
|
@@ -3066,6 +3383,71 @@ module Aws::WAFRegional
|
|
3066
3383
|
include Aws::Structure
|
3067
3384
|
end
|
3068
3385
|
|
3386
|
+
# @note When making an API call, you may pass UpdateRateBasedRuleRequest
|
3387
|
+
# data as a hash:
|
3388
|
+
#
|
3389
|
+
# {
|
3390
|
+
# rule_id: "ResourceId", # required
|
3391
|
+
# change_token: "ChangeToken", # required
|
3392
|
+
# updates: [ # required
|
3393
|
+
# {
|
3394
|
+
# action: "INSERT", # required, accepts INSERT, DELETE
|
3395
|
+
# predicate: { # required
|
3396
|
+
# negated: false, # required
|
3397
|
+
# type: "IPMatch", # required, accepts IPMatch, ByteMatch, SqlInjectionMatch, SizeConstraint, XssMatch
|
3398
|
+
# data_id: "ResourceId", # required
|
3399
|
+
# },
|
3400
|
+
# },
|
3401
|
+
# ],
|
3402
|
+
# rate_limit: 1, # required
|
3403
|
+
# }
|
3404
|
+
#
|
3405
|
+
# @!attribute [rw] rule_id
|
3406
|
+
# The `RuleId` of the `RateBasedRule` that you want to update.
|
3407
|
+
# `RuleId` is returned by `CreateRateBasedRule` and by
|
3408
|
+
# ListRateBasedRules.
|
3409
|
+
# @return [String]
|
3410
|
+
#
|
3411
|
+
# @!attribute [rw] change_token
|
3412
|
+
# The value returned by the most recent call to GetChangeToken.
|
3413
|
+
# @return [String]
|
3414
|
+
#
|
3415
|
+
# @!attribute [rw] updates
|
3416
|
+
# An array of `RuleUpdate` objects that you want to insert into or
|
3417
|
+
# delete from a RateBasedRule.
|
3418
|
+
# @return [Array<Types::RuleUpdate>]
|
3419
|
+
#
|
3420
|
+
# @!attribute [rw] rate_limit
|
3421
|
+
# The maximum number of requests, which have an identical value in the
|
3422
|
+
# field specified by the `RateKey`, allowed in a five-minute period.
|
3423
|
+
# If the number of requests exceeds the `RateLimit` and the other
|
3424
|
+
# predicates specified in the rule are also met, AWS WAF triggers the
|
3425
|
+
# action that is specified for this rule.
|
3426
|
+
# @return [Integer]
|
3427
|
+
#
|
3428
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRateBasedRuleRequest AWS API Documentation
|
3429
|
+
#
|
3430
|
+
class UpdateRateBasedRuleRequest < Struct.new(
|
3431
|
+
:rule_id,
|
3432
|
+
:change_token,
|
3433
|
+
:updates,
|
3434
|
+
:rate_limit)
|
3435
|
+
include Aws::Structure
|
3436
|
+
end
|
3437
|
+
|
3438
|
+
# @!attribute [rw] change_token
|
3439
|
+
# The `ChangeToken` that you used to submit the `UpdateRateBasedRule`
|
3440
|
+
# request. You can also use this value to query the status of the
|
3441
|
+
# request. For more information, see GetChangeTokenStatus.
|
3442
|
+
# @return [String]
|
3443
|
+
#
|
3444
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRateBasedRuleResponse AWS API Documentation
|
3445
|
+
#
|
3446
|
+
class UpdateRateBasedRuleResponse < Struct.new(
|
3447
|
+
:change_token)
|
3448
|
+
include Aws::Structure
|
3449
|
+
end
|
3450
|
+
|
3069
3451
|
# @note When making an API call, you may pass UpdateRuleRequest
|
3070
3452
|
# data as a hash:
|
3071
3453
|
#
|
@@ -3281,6 +3663,7 @@ module Aws::WAFRegional
|
|
3281
3663
|
# action: { # required
|
3282
3664
|
# type: "BLOCK", # required, accepts BLOCK, ALLOW, COUNT
|
3283
3665
|
# },
|
3666
|
+
# type: "REGULAR", # accepts REGULAR, RATE_BASED
|
3284
3667
|
# },
|
3285
3668
|
# },
|
3286
3669
|
# ],
|
@@ -3307,7 +3690,7 @@ module Aws::WAFRegional
|
|
3307
3690
|
#
|
3308
3691
|
# * WebACLUpdate: Contains `Action` and `ActivatedRule`
|
3309
3692
|
#
|
3310
|
-
# * ActivatedRule: Contains `Action`, `Priority`, and `
|
3693
|
+
# * ActivatedRule: Contains `Action`, `Priority`, `RuleId`, and `Type`
|
3311
3694
|
#
|
3312
3695
|
# * WafAction: Contains `Type`
|
3313
3696
|
# @return [Array<Types::WebACLUpdate>]
|
@@ -3536,6 +3919,7 @@ module Aws::WAFRegional
|
|
3536
3919
|
# action: { # required
|
3537
3920
|
# type: "BLOCK", # required, accepts BLOCK, ALLOW, COUNT
|
3538
3921
|
# },
|
3922
|
+
# type: "REGULAR", # accepts REGULAR, RATE_BASED
|
3539
3923
|
# },
|
3540
3924
|
# }
|
3541
3925
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-wafregional
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.0.
|
19
|
+
version: 3.0.0.rc13
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.0.
|
26
|
+
version: 3.0.0.rc13
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: aws-sigv4
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|