« blib/lib/Paws/WAFRegional/PutPermissionPolicyResponse.pm
↑ Summary
blib/lib/Paws/WAFRegional/RegexMatchSet.pm »
| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::WAFRegional::RateBasedRule; | ||
| 3 | use Moose; | ||
| 4 | has MatchPredicates => (is => 'ro', isa => 'ArrayRef[Paws::WAFRegional::Predicate]', required => 1); | ||
| 5 | has MetricName => (is => 'ro', isa => 'Str'); | ||
| 6 | has Name => (is => 'ro', isa => 'Str'); | ||
| 7 | has RateKey => (is => 'ro', isa => 'Str', required => 1); | ||
| 8 | has RateLimit => (is => 'ro', isa => 'Int', required => 1); | ||
| 9 | has RuleId => (is => 'ro', isa => 'Str', required => 1); | ||
| 10 | |||
| 11 | 1; | ||
| 12 | |||
| 13 | ### main pod documentation begin ### | ||
| 14 | |||
| 15 | =head1 NAME | ||
| 16 | |||
| 17 | Paws::WAFRegional::RateBasedRule | ||
| 18 | |||
| 19 | =head1 USAGE | ||
| 20 | |||
| 21 | This class represents one of two things: | ||
| 22 | |||
| 23 | =head3 Arguments in a call to a service | ||
| 24 | |||
| 25 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 26 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 27 | |||
| 28 | As an example, if Att1 is expected to be a Paws::WAFRegional::RateBasedRule object: | ||
| 29 | |||
| 30 | $service_obj->Method(Att1 => { MatchPredicates => $value, ..., RuleId => $value }); | ||
| 31 | |||
| 32 | =head3 Results returned from an API call | ||
| 33 | |||
| 34 | Use accessors for each attribute. If Att1 is expected to be an Paws::WAFRegional::RateBasedRule object: | ||
| 35 | |||
| 36 | $result = $service_obj->Method(...); | ||
| 37 | $result->Att1->MatchPredicates | ||
| 38 | |||
| 39 | =head1 DESCRIPTION | ||
| 40 | |||
| 41 | This is B<AWS WAF Classic> documentation. For more information, see AWS | ||
| 42 | WAF Classic | ||
| 43 | (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) | ||
| 44 | in the developer guide. | ||
| 45 | |||
| 46 | B<For the latest version of AWS WAF>, use the AWS WAFV2 API and see the | ||
| 47 | AWS WAF Developer Guide | ||
| 48 | (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). | ||
| 49 | With the latest version, AWS WAF has a single set of endpoints for | ||
| 50 | regional and global use. | ||
| 51 | |||
| 52 | A C<RateBasedRule> is identical to a regular Rule, with one addition: a | ||
| 53 | C<RateBasedRule> counts the number of requests that arrive from a | ||
| 54 | specified IP address every five minutes. For example, based on recent | ||
| 55 | requests that you've seen from an attacker, you might create a | ||
| 56 | C<RateBasedRule> that includes the following conditions: | ||
| 57 | |||
| 58 | =over | ||
| 59 | |||
| 60 | =item * | ||
| 61 | |||
| 62 | The requests come from 192.0.2.44. | ||
| 63 | |||
| 64 | =item * | ||
| 65 | |||
| 66 | They contain the value C<BadBot> in the C<User-Agent> header. | ||
| 67 | |||
| 68 | =back | ||
| 69 | |||
| 70 | In the rule, you also define the rate limit as 1,000. | ||
| 71 | |||
| 72 | Requests that meet both of these conditions and exceed 1,000 requests | ||
| 73 | every five minutes trigger the rule's action (block or count), which is | ||
| 74 | defined in the web ACL. | ||
| 75 | |||
| 76 | =head1 ATTRIBUTES | ||
| 77 | |||
| 78 | |||
| 79 | =head2 B<REQUIRED> MatchPredicates => ArrayRef[L<Paws::WAFRegional::Predicate>] | ||
| 80 | |||
| 81 | The C<Predicates> object contains one C<Predicate> element for each | ||
| 82 | ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to | ||
| 83 | include in a C<RateBasedRule>. | ||
| 84 | |||
| 85 | |||
| 86 | =head2 MetricName => Str | ||
| 87 | |||
| 88 | A friendly name or description for the metrics for a C<RateBasedRule>. | ||
| 89 | The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with | ||
| 90 | maximum length 128 and minimum length one. It can't contain whitespace | ||
| 91 | or metric names reserved for AWS WAF, including "All" and | ||
| 92 | "Default_Action." You can't change the name of the metric after you | ||
| 93 | create the C<RateBasedRule>. | ||
| 94 | |||
| 95 | |||
| 96 | =head2 Name => Str | ||
| 97 | |||
| 98 | A friendly name or description for a C<RateBasedRule>. You can't change | ||
| 99 | the name of a C<RateBasedRule> after you create it. | ||
| 100 | |||
| 101 | |||
| 102 | =head2 B<REQUIRED> RateKey => Str | ||
| 103 | |||
| 104 | The field that AWS WAF uses to determine if requests are likely | ||
| 105 | arriving from single source and thus subject to rate monitoring. The | ||
| 106 | only valid value for C<RateKey> is C<IP>. C<IP> indicates that requests | ||
| 107 | arriving from the same IP address are subject to the C<RateLimit> that | ||
| 108 | is specified in the C<RateBasedRule>. | ||
| 109 | |||
| 110 | |||
| 111 | =head2 B<REQUIRED> RateLimit => Int | ||
| 112 | |||
| 113 | The maximum number of requests, which have an identical value in the | ||
| 114 | field specified by the C<RateKey>, allowed in a five-minute period. If | ||
| 115 | the number of requests exceeds the C<RateLimit> and the other | ||
| 116 | predicates specified in the rule are also met, AWS WAF triggers the | ||
| 117 | action that is specified for this rule. | ||
| 118 | |||
| 119 | |||
| 120 | =head2 B<REQUIRED> RuleId => Str | ||
| 121 | |||
| 122 | A unique identifier for a C<RateBasedRule>. You use C<RuleId> to get | ||
| 123 | more information about a C<RateBasedRule> (see GetRateBasedRule), | ||
| 124 | update a C<RateBasedRule> (see UpdateRateBasedRule), insert a | ||
| 125 | C<RateBasedRule> into a C<WebACL> or delete one from a C<WebACL> (see | ||
| 126 | UpdateWebACL), or delete a C<RateBasedRule> from AWS WAF (see | ||
| 127 | DeleteRateBasedRule). | ||
| 128 | |||
| 129 | |||
| 130 | |||
| 131 | =head1 SEE ALSO | ||
| 132 | |||
| 133 | This class forms part of L<Paws>, describing an object used in L<Paws::WAFRegional> | ||
| 134 | |||
| 135 | =head1 BUGS and CONTRIBUTIONS | ||
| 136 | |||
| 137 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 138 | |||
| 139 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 140 | |||
| 141 | =cut | ||
| 142 |