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

filter: Statementstmt 0.0% 0 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 11 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::Rule;
3 use Moose;
4 has Action => (is => 'ro', isa => 'Paws::WAFV2::RuleAction');
5 has Name => (is => 'ro', isa => 'Str', required => 1);
6 has OverrideAction => (is => 'ro', isa => 'Paws::WAFV2::OverrideAction');
7 has Priority => (is => 'ro', isa => 'Int', required => 1);
8 has RuleLabels => (is => 'ro', isa => 'ArrayRef[Paws::WAFV2::Label]');
9 has Statement => (is => 'ro', isa => 'Paws::WAFV2::Statement', required => 1);
10 has VisibilityConfig => (is => 'ro', isa => 'Paws::WAFV2::VisibilityConfig', required => 1);
11  
12 1;
13  
14 ### main pod documentation begin ###
15  
16 =head1 NAME
17  
18 Paws::WAFV2::Rule
19  
20 =head1 USAGE
21  
22 This class represents one of two things:
23  
24 =head3 Arguments in a call to a service
25  
26 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
27 Each attribute should be used as a named argument in the calls that expect this type of object.
28  
29 As an example, if Att1 is expected to be a Paws::WAFV2::Rule object:
30  
31 $service_obj->Method(Att1 => { Action => $value, ..., VisibilityConfig => $value });
32  
33 =head3 Results returned from an API call
34  
35 Use accessors for each attribute. If Att1 is expected to be an Paws::WAFV2::Rule object:
36  
37 $result = $service_obj->Method(...);
38 $result->Att1->Action
39  
40 =head1 DESCRIPTION
41  
42 A single rule, which you can use in a WebACL or RuleGroup to identify
43 web requests that you want to allow, block, or count. Each rule
44 includes one top-level Statement that WAF uses to identify matching web
45 requests, and parameters that govern how WAF handles them.
46  
47 =head1 ATTRIBUTES
48  
49  
50 =head2 Action => L<Paws::WAFV2::RuleAction>
51  
52 The action that WAF should take on a web request when it matches the
53 rule statement. Settings at the web ACL level can override the rule
54 action setting.
55  
56 This is used only for rules whose statements do not reference a rule
57 group. Rule statements that reference a rule group include
58 C<RuleGroupReferenceStatement> and C<ManagedRuleGroupStatement>.
59  
60 You must specify either this C<Action> setting or the rule
61 C<OverrideAction> setting, but not both:
62  
63 =over
64  
65 =item *
66  
67 If the rule statement does not reference a rule group, use this rule
68 action setting and not the rule override action setting.
69  
70 =item *
71  
72 If the rule statement references a rule group, use the override action
73 setting and not this action setting.
74  
75 =back
76  
77  
78  
79 =head2 B<REQUIRED> Name => Str
80  
81 The name of the rule. You can't change the name of a C<Rule> after you
82 create it.
83  
84  
85 =head2 OverrideAction => L<Paws::WAFV2::OverrideAction>
86  
87 The override action to apply to the rules in a rule group. Used only
88 for rule statements that reference a rule group, like
89 C<RuleGroupReferenceStatement> and C<ManagedRuleGroupStatement>.
90  
91 Set the override action to none to leave the rule actions in effect.
92 Set it to count to only count matches, regardless of the rule action
93 settings.
94  
95 In a Rule, you must specify either this C<OverrideAction> setting or
96 the rule C<Action> setting, but not both:
97  
98 =over
99  
100 =item *
101  
102 If the rule statement references a rule group, use this override action
103 setting and not the action setting.
104  
105 =item *
106  
107 If the rule statement does not reference a rule group, use the rule
108 action setting and not this rule override action setting.
109  
110 =back
111  
112  
113  
114 =head2 B<REQUIRED> Priority => Int
115  
116 If you define more than one C<Rule> in a C<WebACL>, WAF evaluates each
117 request against the C<Rules> in order based on the value of
118 C<Priority>. WAF processes rules with lower priority first. The
119 priorities don't need to be consecutive, but they must all be
120 different.
121  
122  
123 =head2 RuleLabels => ArrayRef[L<Paws::WAFV2::Label>]
124  
125 Labels to apply to web requests that match the rule match statement.
126 WAF applies fully qualified labels to matching web requests. A fully
127 qualified label is the concatenation of a label namespace and a rule
128 label. The rule's rule group or web ACL defines the label namespace.
129  
130 Rules that run after this rule in the web ACL can match against these
131 labels using a C<LabelMatchStatement>.
132  
133 For each label, provide a case-sensitive string containing optional
134 namespaces and a label name, according to the following guidelines:
135  
136 =over
137  
138 =item *
139  
140 Separate each component of the label with a colon.
141  
142 =item *
143  
144 Each namespace or name can have up to 128 characters.
145  
146 =item *
147  
148 You can specify up to 5 namespaces in a label.
149  
150 =item *
151  
152 Don't use the following reserved words in your label specification:
153 C<aws>, C<waf>, C<managed>, C<rulegroup>, C<webacl>,
154 C<regexpatternset>, or C<ipset>.
155  
156 =back
157  
158 For example, C<myLabelName> or C<nameSpace1:nameSpace2:myLabelName>.
159  
160  
161 =head2 B<REQUIRED> Statement => L<Paws::WAFV2::Statement>
162  
163 The WAF processing statement for the rule, for example
164 ByteMatchStatement or SizeConstraintStatement.
165  
166  
167 =head2 B<REQUIRED> VisibilityConfig => L<Paws::WAFV2::VisibilityConfig>
168  
169 Defines and enables Amazon CloudWatch metrics and web request sample
170 collection.
171  
172  
173  
174 =head1 SEE ALSO
175  
176 This class forms part of L<Paws>, describing an object used in L<Paws::WAFV2>
177  
178 =head1 BUGS and CONTRIBUTIONS
179  
180 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
181  
182 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
183  
184 =cut
185