| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::WAF::SizeConstraint; | ||
| 3 | use Moose; | ||
| 4 | has ComparisonOperator => (is => 'ro', isa => 'Str', required => 1); | ||
| 5 | has FieldToMatch => (is => 'ro', isa => 'Paws::WAF::FieldToMatch', required => 1); | ||
| 6 | has Size => (is => 'ro', isa => 'Int', 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::SizeConstraint | ||
| 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::SizeConstraint object: | ||
| 27 | |||
| 28 | $service_obj->Method(Att1 => { ComparisonOperator => $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::SizeConstraint object: | ||
| 33 | |||
| 34 | $result = $service_obj->Method(...); | ||
| 35 | $result->Att1->ComparisonOperator | ||
| 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 | Specifies a constraint on the size of a part of the web request. AWS | ||
| 51 | WAF uses the C<Size>, C<ComparisonOperator>, and C<FieldToMatch> to | ||
| 52 | build an expression in the form of "C<Size> C<ComparisonOperator> size | ||
| 53 | in bytes of C<FieldToMatch>". If that expression is true, the | ||
| 54 | C<SizeConstraint> is considered to match. | ||
| 55 | |||
| 56 | =head1 ATTRIBUTES | ||
| 57 | |||
| 58 | |||
| 59 | =head2 B<REQUIRED> ComparisonOperator => Str | ||
| 60 | |||
| 61 | The type of comparison you want AWS WAF to perform. AWS WAF uses this | ||
| 62 | in combination with the provided C<Size> and C<FieldToMatch> to build | ||
| 63 | an expression in the form of "C<Size> C<ComparisonOperator> size in | ||
| 64 | bytes of C<FieldToMatch>". If that expression is true, the | ||
| 65 | C<SizeConstraint> is considered to match. | ||
| 66 | |||
| 67 | B<EQ>: Used to test if the C<Size> is equal to the size of the | ||
| 68 | C<FieldToMatch> | ||
| 69 | |||
| 70 | B<NE>: Used to test if the C<Size> is not equal to the size of the | ||
| 71 | C<FieldToMatch> | ||
| 72 | |||
| 73 | B<LE>: Used to test if the C<Size> is less than or equal to the size of | ||
| 74 | the C<FieldToMatch> | ||
| 75 | |||
| 76 | B<LT>: Used to test if the C<Size> is strictly less than the size of | ||
| 77 | the C<FieldToMatch> | ||
| 78 | |||
| 79 | B<GE>: Used to test if the C<Size> is greater than or equal to the size | ||
| 80 | of the C<FieldToMatch> | ||
| 81 | |||
| 82 | B<GT>: Used to test if the C<Size> is strictly greater than the size of | ||
| 83 | the C<FieldToMatch> | ||
| 84 | |||
| 85 | |||
| 86 | =head2 B<REQUIRED> FieldToMatch => L<Paws::WAF::FieldToMatch> | ||
| 87 | |||
| 88 | Specifies where in a web request to look for the size constraint. | ||
| 89 | |||
| 90 | |||
| 91 | =head2 B<REQUIRED> Size => Int | ||
| 92 | |||
| 93 | The size in bytes that you want AWS WAF to compare against the size of | ||
| 94 | the specified C<FieldToMatch>. AWS WAF uses this in combination with | ||
| 95 | C<ComparisonOperator> and C<FieldToMatch> to build an expression in the | ||
| 96 | form of "C<Size> C<ComparisonOperator> size in bytes of | ||
| 97 | C<FieldToMatch>". If that expression is true, the C<SizeConstraint> is | ||
| 98 | considered to match. | ||
| 99 | |||
| 100 | Valid values for size are 0 - 21474836480 bytes (0 - 20 GB). | ||
| 101 | |||
| 102 | If you specify C<URI> for the value of C<Type>, the / in the URI counts | ||
| 103 | as one character. For example, the URI C</logo.jpg> is nine characters | ||
| 104 | long. | ||
| 105 | |||
| 106 | |||
| 107 | =head2 B<REQUIRED> TextTransformation => Str | ||
| 108 | |||
| 109 | Text transformations eliminate some of the unusual formatting that | ||
| 110 | attackers use in web requests in an effort to bypass AWS WAF. If you | ||
| 111 | specify a transformation, AWS WAF performs the transformation on | ||
| 112 | C<FieldToMatch> before inspecting it for a match. | ||
| 113 | |||
| 114 | You can only specify a single type of TextTransformation. | ||
| 115 | |||
| 116 | Note that if you choose C<BODY> for the value of C<Type>, you must | ||
| 117 | choose C<NONE> for C<TextTransformation> because CloudFront forwards | ||
| 118 | only the first 8192 bytes for inspection. | ||
| 119 | |||
| 120 | B<NONE> | ||
| 121 | |||
| 122 | Specify C<NONE> if you don't want to perform any text transformations. | ||
| 123 | |||
| 124 | B<CMD_LINE> | ||
| 125 | |||
| 126 | When you're concerned that attackers are injecting an operating system | ||
| 127 | command line command and using unusual formatting to disguise some or | ||
| 128 | all of the command, use this option to perform the following | ||
| 129 | transformations: | ||
| 130 | |||
| 131 | =over | ||
| 132 | |||
| 133 | =item * | ||
| 134 | |||
| 135 | Delete the following characters: \ " ' ^ | ||
| 136 | |||
| 137 | =item * | ||
| 138 | |||
| 139 | Delete spaces before the following characters: / ( | ||
| 140 | |||
| 141 | =item * | ||
| 142 | |||
| 143 | Replace the following characters with a space: , ; | ||
| 144 | |||
| 145 | =item * | ||
| 146 | |||
| 147 | Replace multiple spaces with one space | ||
| 148 | |||
| 149 | =item * | ||
| 150 | |||
| 151 | Convert uppercase letters (A-Z) to lowercase (a-z) | ||
| 152 | |||
| 153 | =back | ||
| 154 | |||
| 155 | B<COMPRESS_WHITE_SPACE> | ||
| 156 | |||
| 157 | Use this option to replace the following characters with a space | ||
| 158 | character (decimal 32): | ||
| 159 | |||
| 160 | =over | ||
| 161 | |||
| 162 | =item * | ||
| 163 | |||
| 164 | \f, formfeed, decimal 12 | ||
| 165 | |||
| 166 | =item * | ||
| 167 | |||
| 168 | \t, tab, decimal 9 | ||
| 169 | |||
| 170 | =item * | ||
| 171 | |||
| 172 | \n, newline, decimal 10 | ||
| 173 | |||
| 174 | =item * | ||
| 175 | |||
| 176 | \r, carriage return, decimal 13 | ||
| 177 | |||
| 178 | =item * | ||
| 179 | |||
| 180 | \v, vertical tab, decimal 11 | ||
| 181 | |||
| 182 | =item * | ||
| 183 | |||
| 184 | non-breaking space, decimal 160 | ||
| 185 | |||
| 186 | =back | ||
| 187 | |||
| 188 | C<COMPRESS_WHITE_SPACE> also replaces multiple spaces with one space. | ||
| 189 | |||
| 190 | B<HTML_ENTITY_DECODE> | ||
| 191 | |||
| 192 | Use this option to replace HTML-encoded characters with unencoded | ||
| 193 | characters. C<HTML_ENTITY_DECODE> performs the following operations: | ||
| 194 | |||
| 195 | =over | ||
| 196 | |||
| 197 | =item * | ||
| 198 | |||
| 199 | Replaces C<(ampersand)quot;> with C<"> | ||
| 200 | |||
| 201 | =item * | ||
| 202 | |||
| 203 | Replaces C<(ampersand)nbsp;> with a non-breaking space, decimal 160 | ||
| 204 | |||
| 205 | =item * | ||
| 206 | |||
| 207 | Replaces C<(ampersand)lt;> with a "less than" symbol | ||
| 208 | |||
| 209 | =item * | ||
| 210 | |||
| 211 | Replaces C<(ampersand)gt;> with C<E<gt>> | ||
| 212 | |||
| 213 | =item * | ||
| 214 | |||
| 215 | Replaces characters that are represented in hexadecimal format, | ||
| 216 | C<(ampersand)(hash)xhhhh;>, with the corresponding characters | ||
| 217 | |||
| 218 | =item * | ||
| 219 | |||
| 220 | Replaces characters that are represented in decimal format, | ||
| 221 | C<(ampersand)(hash)nnnn;>, with the corresponding characters | ||
| 222 | |||
| 223 | =back | ||
| 224 | |||
| 225 | B<LOWERCASE> | ||
| 226 | |||
| 227 | Use this option to convert uppercase letters (A-Z) to lowercase (a-z). | ||
| 228 | |||
| 229 | B<URL_DECODE> | ||
| 230 | |||
| 231 | Use this option to decode a URL-encoded value. | ||
| 232 | |||
| 233 | |||
| 234 | |||
| 235 | =head1 SEE ALSO | ||
| 236 | |||
| 237 | This class forms part of L<Paws>, describing an object used in L<Paws::WAF> | ||
| 238 | |||
| 239 | =head1 BUGS and CONTRIBUTIONS | ||
| 240 | |||
| 241 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 242 | |||
| 243 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 244 | |||
| 245 | =cut | ||
| 246 |