| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::WAF::ByteMatchTuple; | ||
| 3 | use Moose; | ||
| 4 | has FieldToMatch => (is => 'ro', isa => 'Paws::WAF::FieldToMatch', required => 1); | ||
| 5 | has PositionalConstraint => (is => 'ro', isa => 'Str', required => 1); | ||
| 6 | has TargetString => (is => 'ro', isa => 'Str', required => 1); | ||
| 7 | has TextTransformation => (is => 'ro', isa => 'Str', required => 1); | ||
| 8 | |||
| 9 | 1; | ||
| 10 | |||
| 11 | ### main pod documentation begin ### | ||
| 12 | |||
| 13 | =head1 NAME | ||
| 14 | |||
| 15 | Paws::WAF::ByteMatchTuple | ||
| 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::ByteMatchTuple object: | ||
| 27 | |||
| 28 | $service_obj->Method(Att1 => { FieldToMatch => $value, ..., TextTransformation => $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::ByteMatchTuple object: | ||
| 33 | |||
| 34 | $result = $service_obj->Method(...); | ||
| 35 | $result->Att1->FieldToMatch | ||
| 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 | The bytes (typically a string that corresponds with ASCII characters) | ||
| 51 | that you want AWS WAF to search for in web requests, the location in | ||
| 52 | requests that you want AWS WAF to search, and other settings. | ||
| 53 | |||
| 54 | =head1 ATTRIBUTES | ||
| 55 | |||
| 56 | |||
| 57 | =head2 B<REQUIRED> FieldToMatch => L<Paws::WAF::FieldToMatch> | ||
| 58 | |||
| 59 | The part of a web request that you want AWS WAF to search, such as a | ||
| 60 | specified header or a query string. For more information, see | ||
| 61 | FieldToMatch. | ||
| 62 | |||
| 63 | |||
| 64 | =head2 B<REQUIRED> PositionalConstraint => Str | ||
| 65 | |||
| 66 | Within the portion of a web request that you want to search (for | ||
| 67 | example, in the query string, if any), specify where you want AWS WAF | ||
| 68 | to search. Valid values include the following: | ||
| 69 | |||
| 70 | B<CONTAINS> | ||
| 71 | |||
| 72 | The specified part of the web request must include the value of | ||
| 73 | C<TargetString>, but the location doesn't matter. | ||
| 74 | |||
| 75 | B<CONTAINS_WORD> | ||
| 76 | |||
| 77 | The specified part of the web request must include the value of | ||
| 78 | C<TargetString>, and C<TargetString> must contain only alphanumeric | ||
| 79 | characters or underscore (A-Z, a-z, 0-9, or _). In addition, | ||
| 80 | C<TargetString> must be a word, which means one of the following: | ||
| 81 | |||
| 82 | =over | ||
| 83 | |||
| 84 | =item * | ||
| 85 | |||
| 86 | C<TargetString> exactly matches the value of the specified part of the | ||
| 87 | web request, such as the value of a header. | ||
| 88 | |||
| 89 | =item * | ||
| 90 | |||
| 91 | C<TargetString> is at the beginning of the specified part of the web | ||
| 92 | request and is followed by a character other than an alphanumeric | ||
| 93 | character or underscore (_), for example, C<BadBot;>. | ||
| 94 | |||
| 95 | =item * | ||
| 96 | |||
| 97 | C<TargetString> is at the end of the specified part of the web request | ||
| 98 | and is preceded by a character other than an alphanumeric character or | ||
| 99 | underscore (_), for example, C<;BadBot>. | ||
| 100 | |||
| 101 | =item * | ||
| 102 | |||
| 103 | C<TargetString> is in the middle of the specified part of the web | ||
| 104 | request and is preceded and followed by characters other than | ||
| 105 | alphanumeric characters or underscore (_), for example, C<-BadBot;>. | ||
| 106 | |||
| 107 | =back | ||
| 108 | |||
| 109 | B<EXACTLY> | ||
| 110 | |||
| 111 | The value of the specified part of the web request must exactly match | ||
| 112 | the value of C<TargetString>. | ||
| 113 | |||
| 114 | B<STARTS_WITH> | ||
| 115 | |||
| 116 | The value of C<TargetString> must appear at the beginning of the | ||
| 117 | specified part of the web request. | ||
| 118 | |||
| 119 | B<ENDS_WITH> | ||
| 120 | |||
| 121 | The value of C<TargetString> must appear at the end of the specified | ||
| 122 | part of the web request. | ||
| 123 | |||
| 124 | |||
| 125 | =head2 B<REQUIRED> TargetString => Str | ||
| 126 | |||
| 127 | The value that you want AWS WAF to search for. AWS WAF searches for the | ||
| 128 | specified string in the part of web requests that you specified in | ||
| 129 | C<FieldToMatch>. The maximum length of the value is 50 bytes. | ||
| 130 | |||
| 131 | Valid values depend on the values that you specified for | ||
| 132 | C<FieldToMatch>: | ||
| 133 | |||
| 134 | =over | ||
| 135 | |||
| 136 | =item * | ||
| 137 | |||
| 138 | C<HEADER>: The value that you want AWS WAF to search for in the request | ||
| 139 | header that you specified in FieldToMatch, for example, the value of | ||
| 140 | the C<User-Agent> or C<Referer> header. | ||
| 141 | |||
| 142 | =item * | ||
| 143 | |||
| 144 | C<METHOD>: The HTTP method, which indicates the type of operation | ||
| 145 | specified in the request. CloudFront supports the following methods: | ||
| 146 | C<DELETE>, C<GET>, C<HEAD>, C<OPTIONS>, C<PATCH>, C<POST>, and C<PUT>. | ||
| 147 | |||
| 148 | =item * | ||
| 149 | |||
| 150 | C<QUERY_STRING>: The value that you want AWS WAF to search for in the | ||
| 151 | query string, which is the part of a URL that appears after a C<?> | ||
| 152 | character. | ||
| 153 | |||
| 154 | =item * | ||
| 155 | |||
| 156 | C<URI>: The value that you want AWS WAF to search for in the part of a | ||
| 157 | URL that identifies a resource, for example, C</images/daily-ad.jpg>. | ||
| 158 | |||
| 159 | =item * | ||
| 160 | |||
| 161 | C<BODY>: The part of a request that contains any additional data that | ||
| 162 | you want to send to your web server as the HTTP request body, such as | ||
| 163 | data from a form. The request body immediately follows the request | ||
| 164 | headers. Note that only the first C<8192> bytes of the request body are | ||
| 165 | forwarded to AWS WAF for inspection. To allow or block requests based | ||
| 166 | on the length of the body, you can create a size constraint set. For | ||
| 167 | more information, see CreateSizeConstraintSet. | ||
| 168 | |||
| 169 | =item * | ||
| 170 | |||
| 171 | C<SINGLE_QUERY_ARG>: The parameter in the query string that you will | ||
| 172 | inspect, such as I<UserName> or I<SalesRegion>. The maximum length for | ||
| 173 | C<SINGLE_QUERY_ARG> is 30 characters. | ||
| 174 | |||
| 175 | =item * | ||
| 176 | |||
| 177 | C<ALL_QUERY_ARGS>: Similar to C<SINGLE_QUERY_ARG>, but instead of | ||
| 178 | inspecting a single parameter, AWS WAF inspects all parameters within | ||
| 179 | the query string for the value or regex pattern that you specify in | ||
| 180 | C<TargetString>. | ||
| 181 | |||
| 182 | =back | ||
| 183 | |||
| 184 | If C<TargetString> includes alphabetic characters A-Z and a-z, note | ||
| 185 | that the value is case sensitive. | ||
| 186 | |||
| 187 | B<If you're using the AWS WAF API> | ||
| 188 | |||
| 189 | Specify a base64-encoded version of the value. The maximum length of | ||
| 190 | the value before you base64-encode it is 50 bytes. | ||
| 191 | |||
| 192 | For example, suppose the value of C<Type> is C<HEADER> and the value of | ||
| 193 | C<Data> is C<User-Agent>. If you want to search the C<User-Agent> | ||
| 194 | header for the value C<BadBot>, you base64-encode C<BadBot> using MIME | ||
| 195 | base64-encoding and include the resulting value, C<QmFkQm90>, in the | ||
| 196 | value of C<TargetString>. | ||
| 197 | |||
| 198 | B<If you're using the AWS CLI or one of the AWS SDKs> | ||
| 199 | |||
| 200 | The value that you want AWS WAF to search for. The SDK automatically | ||
| 201 | base64 encodes the value. | ||
| 202 | |||
| 203 | |||
| 204 | =head2 B<REQUIRED> TextTransformation => Str | ||
| 205 | |||
| 206 | Text transformations eliminate some of the unusual formatting that | ||
| 207 | attackers use in web requests in an effort to bypass AWS WAF. If you | ||
| 208 | specify a transformation, AWS WAF performs the transformation on | ||
| 209 | C<FieldToMatch> before inspecting it for a match. | ||
| 210 | |||
| 211 | You can only specify a single type of TextTransformation. | ||
| 212 | |||
| 213 | B<CMD_LINE> | ||
| 214 | |||
| 215 | When you're concerned that attackers are injecting an operating system | ||
| 216 | command line command and using unusual formatting to disguise some or | ||
| 217 | all of the command, use this option to perform the following | ||
| 218 | transformations: | ||
| 219 | |||
| 220 | =over | ||
| 221 | |||
| 222 | =item * | ||
| 223 | |||
| 224 | Delete the following characters: \ " ' ^ | ||
| 225 | |||
| 226 | =item * | ||
| 227 | |||
| 228 | Delete spaces before the following characters: / ( | ||
| 229 | |||
| 230 | =item * | ||
| 231 | |||
| 232 | Replace the following characters with a space: , ; | ||
| 233 | |||
| 234 | =item * | ||
| 235 | |||
| 236 | Replace multiple spaces with one space | ||
| 237 | |||
| 238 | =item * | ||
| 239 | |||
| 240 | Convert uppercase letters (A-Z) to lowercase (a-z) | ||
| 241 | |||
| 242 | =back | ||
| 243 | |||
| 244 | B<COMPRESS_WHITE_SPACE> | ||
| 245 | |||
| 246 | Use this option to replace the following characters with a space | ||
| 247 | character (decimal 32): | ||
| 248 | |||
| 249 | =over | ||
| 250 | |||
| 251 | =item * | ||
| 252 | |||
| 253 | \f, formfeed, decimal 12 | ||
| 254 | |||
| 255 | =item * | ||
| 256 | |||
| 257 | \t, tab, decimal 9 | ||
| 258 | |||
| 259 | =item * | ||
| 260 | |||
| 261 | \n, newline, decimal 10 | ||
| 262 | |||
| 263 | =item * | ||
| 264 | |||
| 265 | \r, carriage return, decimal 13 | ||
| 266 | |||
| 267 | =item * | ||
| 268 | |||
| 269 | \v, vertical tab, decimal 11 | ||
| 270 | |||
| 271 | =item * | ||
| 272 | |||
| 273 | non-breaking space, decimal 160 | ||
| 274 | |||
| 275 | =back | ||
| 276 | |||
| 277 | C<COMPRESS_WHITE_SPACE> also replaces multiple spaces with one space. | ||
| 278 | |||
| 279 | B<HTML_ENTITY_DECODE> | ||
| 280 | |||
| 281 | Use this option to replace HTML-encoded characters with unencoded | ||
| 282 | characters. C<HTML_ENTITY_DECODE> performs the following operations: | ||
| 283 | |||
| 284 | =over | ||
| 285 | |||
| 286 | =item * | ||
| 287 | |||
| 288 | Replaces C<(ampersand)quot;> with C<"> | ||
| 289 | |||
| 290 | =item * | ||
| 291 | |||
| 292 | Replaces C<(ampersand)nbsp;> with a non-breaking space, decimal 160 | ||
| 293 | |||
| 294 | =item * | ||
| 295 | |||
| 296 | Replaces C<(ampersand)lt;> with a "less than" symbol | ||
| 297 | |||
| 298 | =item * | ||
| 299 | |||
| 300 | Replaces C<(ampersand)gt;> with C<E<gt>> | ||
| 301 | |||
| 302 | =item * | ||
| 303 | |||
| 304 | Replaces characters that are represented in hexadecimal format, | ||
| 305 | C<(ampersand)(hash)xhhhh;>, with the corresponding characters | ||
| 306 | |||
| 307 | =item * | ||
| 308 | |||
| 309 | Replaces characters that are represented in decimal format, | ||
| 310 | C<(ampersand)(hash)nnnn;>, with the corresponding characters | ||
| 311 | |||
| 312 | =back | ||
| 313 | |||
| 314 | B<LOWERCASE> | ||
| 315 | |||
| 316 | Use this option to convert uppercase letters (A-Z) to lowercase (a-z). | ||
| 317 | |||
| 318 | B<URL_DECODE> | ||
| 319 | |||
| 320 | Use this option to decode a URL-encoded value. | ||
| 321 | |||
| 322 | B<NONE> | ||
| 323 | |||
| 324 | Specify C<NONE> if you don't want to perform any text transformations. | ||
| 325 | |||
| 326 | |||
| 327 | |||
| 328 | =head1 SEE ALSO | ||
| 329 | |||
| 330 | This class forms part of L<Paws>, describing an object used in L<Paws::WAF> | ||
| 331 | |||
| 332 | =head1 BUGS and CONTRIBUTIONS | ||
| 333 | |||
| 334 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 335 | |||
| 336 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 337 | |||
| 338 | =cut | ||
| 339 |