blib/lib/Paws/WAFV2/RateBasedStatement.pm untested

filter: Statementstmt 0.0% 0 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 8 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::WAFV2::RateBasedStatement;
3 use Moose;
4 has AggregateKeyType => (is => 'ro', isa => 'Str', required => 1);
5 has ForwardedIPConfig => (is => 'ro', isa => 'Paws::WAFV2::ForwardedIPConfig');
6 has Limit => (is => 'ro', isa => 'Int', required => 1);
7 has ScopeDownStatement => (is => 'ro', isa => 'Paws::WAFV2::Statement');
8  
9 1;
10  
11 ### main pod documentation begin ###
12  
13 =head1 NAME
14  
15 Paws::WAFV2::RateBasedStatement
16  
17 =head1 USAGE
18  
19 This class represents one of two things:
20  
21 =head3 Arguments in a call to a service
22  
23 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
24 Each attribute should be used as a named argument in the calls that expect this type of object.
25  
26 As an example, if Att1 is expected to be a Paws::WAFV2::RateBasedStatement object:
27  
28 $service_obj->Method(Att1 => { AggregateKeyType => $value, ..., ScopeDownStatement => $value });
29  
30 =head3 Results returned from an API call
31  
32 Use accessors for each attribute. If Att1 is expected to be an Paws::WAFV2::RateBasedStatement object:
33  
34 $result = $service_obj->Method(...);
35 $result->Att1->AggregateKeyType
36  
37 =head1 DESCRIPTION
38  
39 A rate-based rule tracks the rate of requests for each originating IP
40 address, and triggers the rule action when the rate exceeds a limit
41 that you specify on the number of requests in any 5-minute time span.
42 You can use this to put a temporary block on requests from an IP
43 address that is sending excessive requests.
44  
45 When the rule action triggers, WAF blocks additional requests from the
46 IP address until the request rate falls below the limit.
47  
48 You can optionally nest another statement inside the rate-based
49 statement, to narrow the scope of the rule so that it only counts
50 requests that match the nested statement. For example, based on recent
51 requests that you have seen from an attacker, you might create a
52 rate-based rule with a nested AND rule statement that contains the
53 following nested statements:
54  
55 =over
56  
57 =item *
58  
59 An IP match statement with an IP set that specified the address
60 192.0.2.44.
61  
62 =item *
63  
64 A string match statement that searches in the User-Agent header for the
65 string BadBot.
66  
67 =back
68  
69 In this rate-based rule, you also define a rate limit. For this
70 example, the rate limit is 1,000. Requests that meet both of the
71 conditions in the statements are counted. If the count exceeds 1,000
72 requests per five minutes, the rule action triggers. Requests that do
73 not meet both conditions are not counted towards the rate limit and are
74 not affected by this rule.
75  
76 You cannot nest a C<RateBasedStatement>, for example for use inside a
77 C<NotStatement> or C<OrStatement>. It can only be referenced as a
78 top-level statement within a rule.
79  
80 =head1 ATTRIBUTES
81  
82  
83 =head2 B<REQUIRED> AggregateKeyType => Str
84  
85 Setting that indicates how to aggregate the request counts. The options
86 are the following:
87  
88 =over
89  
90 =item *
91  
92 IP - Aggregate the request counts on the IP address from the web
93 request origin.
94  
95 =item *
96  
97 FORWARDED_IP - Aggregate the request counts on the first IP address in
98 an HTTP header. If you use this, configure the C<ForwardedIPConfig>, to
99 specify the header to use.
100  
101 =back
102  
103  
104  
105 =head2 ForwardedIPConfig => L<Paws::WAFV2::ForwardedIPConfig>
106  
107 The configuration for inspecting IP addresses in an HTTP header that
108 you specify, instead of using the IP address that's reported by the web
109 request origin. Commonly, this is the X-Forwarded-For (XFF) header, but
110 you can specify any header name.
111  
112 If the specified header isn't present in the request, WAF doesn't apply
113 the rule to the web request at all.
114  
115 This is required if C<AggregateKeyType> is set to C<FORWARDED_IP>.
116  
117  
118 =head2 B<REQUIRED> Limit => Int
119  
120 The limit on requests per 5-minute period for a single originating IP
121 address. If the statement includes a C<ScopeDownStatement>, this limit
122 is applied only to the requests that match the statement.
123  
124  
125 =head2 ScopeDownStatement => L<Paws::WAFV2::Statement>
126  
127 An optional nested statement that narrows the scope of the web requests
128 that are evaluated by the rate-based statement. Requests are only
129 tracked by the rate-based statement if they match the scope-down
130 statement. You can use any nestable Statement in the scope-down
131 statement, and you can nest statements at any level, the same as you
132 can for a rule statement.
133  
134  
135  
136 =head1 SEE ALSO
137  
138 This class forms part of L<Paws>, describing an object used in L<Paws::WAFV2>
139  
140 =head1 BUGS and CONTRIBUTIONS
141  
142 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
143  
144 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
145  
146 =cut
147