blib/lib/Paws/WAFV2/ByteMatchStatement.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::ByteMatchStatement;
3 use Moose;
4 has FieldToMatch => (is => 'ro', isa => 'Paws::WAFV2::FieldToMatch', required => 1);
5 has PositionalConstraint => (is => 'ro', isa => 'Str', required => 1);
6 has SearchString => (is => 'ro', isa => 'Str', required => 1);
7 has TextTransformations => (is => 'ro', isa => 'ArrayRef[Paws::WAFV2::TextTransformation]', required => 1);
8  
9 1;
10  
11 ### main pod documentation begin ###
12  
13 =head1 NAME
14  
15 Paws::WAFV2::ByteMatchStatement
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::ByteMatchStatement object:
27  
28 $service_obj->Method(Att1 => { FieldToMatch => $value, ..., TextTransformations => $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::ByteMatchStatement object:
33  
34 $result = $service_obj->Method(...);
35 $result->Att1->FieldToMatch
36  
37 =head1 DESCRIPTION
38  
39 A rule statement that defines a string match search for WAF to apply to
40 web requests. The byte match statement provides the bytes to search
41 for, the location in requests that you want WAF to search, and other
42 settings. The bytes to search for are typically a string that
43 corresponds with ASCII characters. In the WAF console and the developer
44 guide, this is refered to as a string match statement.
45  
46 =head1 ATTRIBUTES
47  
48  
49 =head2 B<REQUIRED> FieldToMatch => L<Paws::WAFV2::FieldToMatch>
50  
51 The part of a web request that you want WAF to inspect. For more
52 information, see FieldToMatch.
53  
54  
55 =head2 B<REQUIRED> PositionalConstraint => Str
56  
57 The area within the portion of a web request that you want WAF to
58 search for C<SearchString>. Valid values include the following:
59  
60 B<CONTAINS>
61  
62 The specified part of the web request must include the value of
63 C<SearchString>, but the location doesn't matter.
64  
65 B<CONTAINS_WORD>
66  
67 The specified part of the web request must include the value of
68 C<SearchString>, and C<SearchString> must contain only alphanumeric
69 characters or underscore (A-Z, a-z, 0-9, or _). In addition,
70 C<SearchString> must be a word, which means that both of the following
71 are true:
72  
73 =over
74  
75 =item *
76  
77 C<SearchString> is at the beginning of the specified part of the web
78 request or is preceded by a character other than an alphanumeric
79 character or underscore (_). Examples include the value of a header and
80 C<;BadBot>.
81  
82 =item *
83  
84 C<SearchString> is at the end of the specified part of the web request
85 or is followed by a character other than an alphanumeric character or
86 underscore (_), for example, C<BadBot;> and C<-BadBot;>.
87  
88 =back
89  
90 B<EXACTLY>
91  
92 The value of the specified part of the web request must exactly match
93 the value of C<SearchString>.
94  
95 B<STARTS_WITH>
96  
97 The value of C<SearchString> must appear at the beginning of the
98 specified part of the web request.
99  
100 B<ENDS_WITH>
101  
102 The value of C<SearchString> must appear at the end of the specified
103 part of the web request.
104  
105  
106 =head2 B<REQUIRED> SearchString => Str
107  
108 A string value that you want WAF to search for. WAF searches only in
109 the part of web requests that you designate for inspection in
110 FieldToMatch. The maximum length of the value is 50 bytes.
111  
112 Valid values depend on the component that you specify for inspection in
113 C<FieldToMatch>:
114  
115 =over
116  
117 =item *
118  
119 C<Method>: The HTTP method that you want WAF to search for. This
120 indicates the type of operation specified in the request.
121  
122 =item *
123  
124 C<UriPath>: The value that you want WAF to search for in the URI path,
125 for example, C</images/daily-ad.jpg>.
126  
127 =back
128  
129 If C<SearchString> includes alphabetic characters A-Z and a-z, note
130 that the value is case sensitive.
131  
132 B<If you're using the WAF API>
133  
134 Specify a base64-encoded version of the value. The maximum length of
135 the value before you base64-encode it is 50 bytes.
136  
137 For example, suppose the value of C<Type> is C<HEADER> and the value of
138 C<Data> is C<User-Agent>. If you want to search the C<User-Agent>
139 header for the value C<BadBot>, you base64-encode C<BadBot> using MIME
140 base64-encoding and include the resulting value, C<QmFkQm90>, in the
141 value of C<SearchString>.
142  
143 B<If you're using the CLI or one of the Amazon Web Services SDKs>
144  
145 The value that you want WAF to search for. The SDK automatically base64
146 encodes the value.
147  
148  
149 =head2 B<REQUIRED> TextTransformations => ArrayRef[L<Paws::WAFV2::TextTransformation>]
150  
151 Text transformations eliminate some of the unusual formatting that
152 attackers use in web requests in an effort to bypass detection. If you
153 specify one or more transformations in a rule statement, WAF performs
154 all transformations on the content of the request component identified
155 by C<FieldToMatch>, starting from the lowest priority setting, before
156 inspecting the content for a match.
157  
158  
159  
160 =head1 SEE ALSO
161  
162 This class forms part of L<Paws>, describing an object used in L<Paws::WAFV2>
163  
164 =head1 BUGS and CONTRIBUTIONS
165  
166 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
167  
168 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
169  
170 =cut
171