blib/lib/Paws/WAF/ActivatedRule.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 10 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::WAF::ActivatedRule;
3 use Moose;
4 has Action => (is => 'ro', isa => 'Paws::WAF::WafAction');
5 has ExcludedRules => (is => 'ro', isa => 'ArrayRef[Paws::WAF::ExcludedRule]');
6 has OverrideAction => (is => 'ro', isa => 'Paws::WAF::WafOverrideAction');
7 has Priority => (is => 'ro', isa => 'Int', required => 1);
8 has RuleId => (is => 'ro', isa => 'Str', required => 1);
9 has Type => (is => 'ro', isa => 'Str');
10  
11 1;
12  
13 ### main pod documentation begin ###
14  
15 =head1 NAME
16  
17 Paws::WAF::ActivatedRule
18  
19 =head1 USAGE
20  
21 This class represents one of two things:
22  
23 =head3 Arguments in a call to a service
24  
25 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
26 Each attribute should be used as a named argument in the calls that expect this type of object.
27  
28 As an example, if Att1 is expected to be a Paws::WAF::ActivatedRule object:
29  
30 $service_obj->Method(Att1 => { Action => $value, ..., Type => $value });
31  
32 =head3 Results returned from an API call
33  
34 Use accessors for each attribute. If Att1 is expected to be an Paws::WAF::ActivatedRule object:
35  
36 $result = $service_obj->Method(...);
37 $result->Att1->Action
38  
39 =head1 DESCRIPTION
40  
41 This is B<AWS WAF Classic> documentation. For more information, see AWS
42 WAF Classic
43 (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html)
44 in the developer guide.
45  
46 B<For the latest version of AWS WAF>, use the AWS WAFV2 API and see the
47 AWS WAF Developer Guide
48 (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
49 With the latest version, AWS WAF has a single set of endpoints for
50 regional and global use.
51  
52 The C<ActivatedRule> object in an UpdateWebACL request specifies a
53 C<Rule> that you want to insert or delete, the priority of the C<Rule>
54 in the C<WebACL>, and the action that you want AWS WAF to take when a
55 web request matches the C<Rule> (C<ALLOW>, C<BLOCK>, or C<COUNT>).
56  
57 To specify whether to insert or delete a C<Rule>, use the C<Action>
58 parameter in the WebACLUpdate data type.
59  
60 =head1 ATTRIBUTES
61  
62  
63 =head2 Action => L<Paws::WAF::WafAction>
64  
65 Specifies the action that CloudFront or AWS WAF takes when a web
66 request matches the conditions in the C<Rule>. Valid values for
67 C<Action> include the following:
68  
69 =over
70  
71 =item *
72  
73 C<ALLOW>: CloudFront responds with the requested object.
74  
75 =item *
76  
77 C<BLOCK>: CloudFront responds with an HTTP 403 (Forbidden) status code.
78  
79 =item *
80  
81 C<COUNT>: AWS WAF increments a counter of requests that match the
82 conditions in the rule and then continues to inspect the web request
83 based on the remaining rules in the web ACL.
84  
85 =back
86  
87 C<ActivatedRule|OverrideAction> applies only when updating or adding a
88 C<RuleGroup> to a C<WebACL>. In this case, you do not use
89 C<ActivatedRule|Action>. For all other update requests,
90 C<ActivatedRule|Action> is used instead of
91 C<ActivatedRule|OverrideAction>.
92  
93  
94 =head2 ExcludedRules => ArrayRef[L<Paws::WAF::ExcludedRule>]
95  
96 An array of rules to exclude from a rule group. This is applicable only
97 when the C<ActivatedRule> refers to a C<RuleGroup>.
98  
99 Sometimes it is necessary to troubleshoot rule groups that are blocking
100 traffic unexpectedly (false positives). One troubleshooting technique
101 is to identify the specific rule within the rule group that is blocking
102 the legitimate traffic and then disable (exclude) that particular rule.
103 You can exclude rules from both your own rule groups and AWS
104 Marketplace rule groups that have been associated with a web ACL.
105  
106 Specifying C<ExcludedRules> does not remove those rules from the rule
107 group. Rather, it changes the action for the rules to C<COUNT>.
108 Therefore, requests that match an C<ExcludedRule> are counted but not
109 blocked. The C<RuleGroup> owner will receive COUNT metrics for each
110 C<ExcludedRule>.
111  
112 If you want to exclude rules from a rule group that is already
113 associated with a web ACL, perform the following steps:
114  
115 =over
116  
117 =item 1.
118  
119 Use the AWS WAF logs to identify the IDs of the rules that you want to
120 exclude. For more information about the logs, see Logging Web ACL
121 Traffic Information
122 (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html).
123  
124 =item 2.
125  
126 Submit an UpdateWebACL request that has two actions:
127  
128 =over
129  
130 =item *
131  
132 The first action deletes the existing rule group from the web ACL. That
133 is, in the UpdateWebACL request, the first C<Updates:Action> should be
134 C<DELETE> and C<Updates:ActivatedRule:RuleId> should be the rule group
135 that contains the rules that you want to exclude.
136  
137 =item *
138  
139 The second action inserts the same rule group back in, but specifying
140 the rules to exclude. That is, the second C<Updates:Action> should be
141 C<INSERT>, C<Updates:ActivatedRule:RuleId> should be the rule group
142 that you just removed, and C<ExcludedRules> should contain the rules
143 that you want to exclude.
144  
145 =back
146  
147 =back
148  
149  
150  
151 =head2 OverrideAction => L<Paws::WAF::WafOverrideAction>
152  
153 Use the C<OverrideAction> to test your C<RuleGroup>.
154  
155 Any rule in a C<RuleGroup> can potentially block a request. If you set
156 the C<OverrideAction> to C<None>, the C<RuleGroup> will block a request
157 if any individual rule in the C<RuleGroup> matches the request and is
158 configured to block that request. However if you first want to test the
159 C<RuleGroup>, set the C<OverrideAction> to C<Count>. The C<RuleGroup>
160 will then override any block action specified by individual rules
161 contained within the group. Instead of blocking matching requests,
162 those requests will be counted. You can view a record of counted
163 requests using GetSampledRequests.
164  
165 C<ActivatedRule|OverrideAction> applies only when updating or adding a
166 C<RuleGroup> to a C<WebACL>. In this case you do not use
167 C<ActivatedRule|Action>. For all other update requests,
168 C<ActivatedRule|Action> is used instead of
169 C<ActivatedRule|OverrideAction>.
170  
171  
172 =head2 B<REQUIRED> Priority => Int
173  
174 Specifies the order in which the C<Rules> in a C<WebACL> are evaluated.
175 Rules with a lower value for C<Priority> are evaluated before C<Rules>
176 with a higher value. The value must be a unique integer. If you add
177 multiple C<Rules> to a C<WebACL>, the values don't need to be
178 consecutive.
179  
180  
181 =head2 B<REQUIRED> RuleId => Str
182  
183 The C<RuleId> for a C<Rule>. You use C<RuleId> to get more information
184 about a C<Rule> (see GetRule), update a C<Rule> (see UpdateRule),
185 insert a C<Rule> into a C<WebACL> or delete a one from a C<WebACL> (see
186 UpdateWebACL), or delete a C<Rule> from AWS WAF (see DeleteRule).
187  
188 C<RuleId> is returned by CreateRule and by ListRules.
189  
190  
191 =head2 Type => Str
192  
193 The rule type, either C<REGULAR>, as defined by Rule, C<RATE_BASED>, as
194 defined by RateBasedRule, or C<GROUP>, as defined by RuleGroup. The
195 default is REGULAR. Although this field is optional, be aware that if
196 you try to add a RATE_BASED rule to a web ACL without setting the type,
197 the UpdateWebACL request will fail because the request tries to add a
198 REGULAR rule with the specified ID, which does not exist.
199  
200  
201  
202 =head1 SEE ALSO
203  
204 This class forms part of L<Paws>, describing an object used in L<Paws::WAF>
205  
206 =head1 BUGS and CONTRIBUTIONS
207  
208 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
209  
210 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
211  
212 =cut
213