blib/lib/Paws/WAF/Rule.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::WAF::Rule;
3 use Moose;
4 has MetricName => (is => 'ro', isa => 'Str');
5 has Name => (is => 'ro', isa => 'Str');
6 has Predicates => (is => 'ro', isa => 'ArrayRef[Paws::WAF::Predicate]', required => 1);
7 has RuleId => (is => 'ro', isa => 'Str', required => 1);
8  
9 1;
10  
11 ### main pod documentation begin ###
12  
13 =head1 NAME
14  
15 Paws::WAF::Rule
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::WAF::Rule object:
27  
28 $service_obj->Method(Att1 => { MetricName => $value, ..., RuleId => $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::WAF::Rule object:
33  
34 $result = $service_obj->Method(...);
35 $result->Att1->MetricName
36  
37 =head1 DESCRIPTION
38  
39 This is B<AWS WAF Classic> documentation. For more information, see AWS
40 WAF Classic
41 (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html)
42 in the developer guide.
43  
44 B<For the latest version of AWS WAF>, use the AWS WAFV2 API and see the
45 AWS WAF Developer Guide
46 (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
47 With the latest version, AWS WAF has a single set of endpoints for
48 regional and global use.
49  
50 A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet
51 objects that identify the web requests that you want to allow, block,
52 or count. For example, you might create a C<Rule> that includes the
53 following predicates:
54  
55 =over
56  
57 =item *
58  
59 An C<IPSet> that causes AWS WAF to search for web requests that
60 originate from the IP address C<192.0.2.44>
61  
62 =item *
63  
64 A C<ByteMatchSet> that causes AWS WAF to search for web requests for
65 which the value of the C<User-Agent> header is C<BadBot>.
66  
67 =back
68  
69 To match the settings in this C<Rule>, a request must originate from
70 C<192.0.2.44> AND include a C<User-Agent> header for which the value is
71 C<BadBot>.
72  
73 =head1 ATTRIBUTES
74  
75  
76 =head2 MetricName => Str
77  
78 A friendly name or description for the metrics for this C<Rule>. The
79 name can contain only alphanumeric characters (A-Z, a-z, 0-9), with
80 maximum length 128 and minimum length one. It can't contain whitespace
81 or metric names reserved for AWS WAF, including "All" and
82 "Default_Action." You can't change C<MetricName> after you create the
83 C<Rule>.
84  
85  
86 =head2 Name => Str
87  
88 The friendly name or description for the C<Rule>. You can't change the
89 name of a C<Rule> after you create it.
90  
91  
92 =head2 B<REQUIRED> Predicates => ArrayRef[L<Paws::WAF::Predicate>]
93  
94 The C<Predicates> object contains one C<Predicate> element for each
95 ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to
96 include in a C<Rule>.
97  
98  
99 =head2 B<REQUIRED> RuleId => Str
100  
101 A unique identifier for a C<Rule>. You use C<RuleId> to get more
102 information about a C<Rule> (see GetRule), update a C<Rule> (see
103 UpdateRule), insert a C<Rule> into a C<WebACL> or delete a one from a
104 C<WebACL> (see UpdateWebACL), or delete a C<Rule> from AWS WAF (see
105 DeleteRule).
106  
107 C<RuleId> is returned by CreateRule and by ListRules.
108  
109  
110  
111 =head1 SEE ALSO
112  
113 This class forms part of L<Paws>, describing an object used in L<Paws::WAF>
114  
115 =head1 BUGS and CONTRIBUTIONS
116  
117 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
118  
119 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
120  
121 =cut
122