File Coverage

blib/lib/Paws/WAFRegional/ActivatedRule.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::WAFRegional::ActivatedRule;
2 1     1   611 use Moose;
  1         4  
  1         10  
3             has Action => (is => 'ro', isa => 'Paws::WAFRegional::WafAction', required => 1);
4             has Priority => (is => 'ro', isa => 'Int', required => 1);
5             has RuleId => (is => 'ro', isa => 'Str', required => 1);
6             has Type => (is => 'ro', isa => 'Str');
7             1;
8              
9             ### main pod documentation begin ###
10              
11             =head1 NAME
12              
13             Paws::WAFRegional::ActivatedRule
14              
15             =head1 USAGE
16              
17             This class represents one of two things:
18              
19             =head3 Arguments in a call to a service
20              
21             Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
22             Each attribute should be used as a named argument in the calls that expect this type of object.
23              
24             As an example, if Att1 is expected to be a Paws::WAFRegional::ActivatedRule object:
25              
26             $service_obj->Method(Att1 => { Action => $value, ..., Type => $value });
27              
28             =head3 Results returned from an API call
29              
30             Use accessors for each attribute. If Att1 is expected to be an Paws::WAFRegional::ActivatedRule object:
31              
32             $result = $service_obj->Method(...);
33             $result->Att1->Action
34              
35             =head1 DESCRIPTION
36              
37             The C<ActivatedRule> object in an UpdateWebACL request specifies a
38             C<Rule> that you want to insert or delete, the priority of the C<Rule>
39             in the C<WebACL>, and the action that you want AWS WAF to take when a
40             web request matches the C<Rule> (C<ALLOW>, C<BLOCK>, or C<COUNT>).
41              
42             To specify whether to insert or delete a C<Rule>, use the C<Action>
43             parameter in the WebACLUpdate data type.
44              
45             =head1 ATTRIBUTES
46              
47              
48             =head2 B<REQUIRED> Action => L<Paws::WAFRegional::WafAction>
49              
50             Specifies the action that CloudFront or AWS WAF takes when a web
51             request matches the conditions in the C<Rule>. Valid values for
52             C<Action> include the following:
53              
54             =over
55              
56             =item *
57              
58             C<ALLOW>: CloudFront responds with the requested object.
59              
60             =item *
61              
62             C<BLOCK>: CloudFront responds with an HTTP 403 (Forbidden) status code.
63              
64             =item *
65              
66             C<COUNT>: AWS WAF increments a counter of requests that match the
67             conditions in the rule and then continues to inspect the web request
68             based on the remaining rules in the web ACL.
69              
70             =back
71              
72              
73              
74             =head2 B<REQUIRED> Priority => Int
75              
76             Specifies the order in which the C<Rules> in a C<WebACL> are evaluated.
77             Rules with a lower value for C<Priority> are evaluated before C<Rules>
78             with a higher value. The value must be a unique integer. If you add
79             multiple C<Rules> to a C<WebACL>, the values don't need to be
80             consecutive.
81              
82              
83             =head2 B<REQUIRED> RuleId => Str
84              
85             The C<RuleId> for a C<Rule>. You use C<RuleId> to get more information
86             about a C<Rule> (see GetRule), update a C<Rule> (see UpdateRule),
87             insert a C<Rule> into a C<WebACL> or delete a one from a C<WebACL> (see
88             UpdateWebACL), or delete a C<Rule> from AWS WAF (see DeleteRule).
89              
90             C<RuleId> is returned by CreateRule and by ListRules.
91              
92              
93             =head2 Type => Str
94              
95             The rule type, either C<REGULAR>, as defined by Rule, or C<RATE_BASED>,
96             as defined by RateBasedRule. The default is REGULAR. Although this
97             field is optional, be aware that if you try to add a RATE_BASED rule to
98             a web ACL without setting the type, the UpdateWebACL request will fail
99             because the request tries to add a REGULAR rule with the specified ID,
100             which does not exist.
101              
102              
103              
104             =head1 SEE ALSO
105              
106             This class forms part of L<Paws>, describing an object used in L<Paws::WAFRegional>
107              
108             =head1 BUGS and CONTRIBUTIONS
109              
110             The source code is located here: https://github.com/pplu/aws-sdk-perl
111              
112             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
113              
114             =cut
115