Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.1.0
info:
title: AWS WAFV2 Rate Based Rule API
version: '2019-07-29'
description: Generated from AWS's published Smithy model for AWS WAFV2. 5 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://waf.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
paths:
/#CreateRateBasedRule:
post:
operationId: CreateRateBasedRule
summary: Create Rate Based Rule
description: 'This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version,
AWS WAF has a single set of endpoints for regional and global use. Creates a RateBasedRule. The RateBasedRule contains
a RateLimit, which specifies the maximum number of requests that AWS WAF allows from a specified IP address in a five-minute
period. The RateBasedRule also contains the IPSet objects, ByteMatchSet objects, and other predicates that identify
the requests that you want to count or block if these requests exceed the RateLimit. If you add more than one predicate
to a RateBasedRule, a request not only must exceed the RateLimit, but it also must match all the conditions to be
counted or blocked. For example, suppose you add the following to a RateBasedRule: An IPSet that matches the IP address
192.0.2.44/32 A ByteMatchSet that matches BadBot in the User-Agent header Further, you specify a RateLimit of 1,000.
You then add the RateBasedRule to a WebACL and specify that you want to block requests that meet the conditions in
the rule. For a request to be '
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/CreateRateBasedRuleResponse'
'400':
description: WAFBadRequestException; WAFDisallowedNameException; WAFInvalidParameterException; WAFLimitsExceededException;
WAFStaleDataException; WAFTagOperationException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WAFBadRequestException'
'500':
description: WAFInternalErrorException; WAFTagOperationInternalErrorException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WafWAFInternalErrorException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AWSWAF_20150824.CreateRateBasedRule
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/CreateRateBasedRuleRequest'
tags:
- Rate Based Rule
/#DeleteRateBasedRule:
post:
operationId: DeleteRateBasedRule
summary: Delete Rate Based Rule
description: 'This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version,
AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a RateBasedRule. You can''t
delete a rule if it''s still used in any WebACL objects or if it still includes any predicates, such as ByteMatchSet
objects. If you just want to remove a rule from a WebACL, use UpdateWebACL. To permanently delete a RateBasedRule
from AWS WAF, perform the following steps: Update the RateBasedRule to remove predicates, if any. For more information,
see UpdateRateBasedRule. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter
of a DeleteRateBasedRule request. Submit a DeleteRateBasedRule request.'
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/DeleteRateBasedRuleResponse'
'500':
description: WAFInternalErrorException; WAFTagOperationInternalErrorException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WafWAFInternalErrorException'
'400':
description: WAFInvalidAccountException; WAFNonEmptyEntityException; WAFNonexistentItemException; WAFReferencedItemException;
WAFStaleDataException; WAFTagOperationException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WAFInvalidAccountException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AWSWAF_20150824.DeleteRateBasedRule
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/DeleteRateBasedRuleRequest'
tags:
- Rate Based Rule
/#GetRateBasedRule:
post:
operationId: GetRateBasedRule
summary: Get Rate Based Rule
description: This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version,
AWS WAF has a single set of endpoints for regional and global use. Returns the RateBasedRule that is specified by
the RuleId that you included in the GetRateBasedRule request.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/GetRateBasedRuleResponse'
'500':
description: WAFInternalErrorException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WafWAFInternalErrorException'
'400':
description: WAFInvalidAccountException; WAFNonexistentItemException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WAFInvalidAccountException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AWSWAF_20150824.GetRateBasedRule
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/GetRateBasedRuleRequest'
tags:
- Rate Based Rule
/#ListRateBasedRules:
post:
operationId: ListRateBasedRules
summary: List Rate Based Rules
description: This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version,
AWS WAF has a single set of endpoints for regional and global use. Returns an array of RuleSummary objects.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListRateBasedRulesResponse'
'500':
description: WAFInternalErrorException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WafWAFInternalErrorException'
'400':
description: WAFInvalidAccountException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WAFInvalidAccountException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AWSWAF_20150824.ListRateBasedRules
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListRateBasedRulesRequest'
tags:
- Rate Based Rule
/#UpdateRateBasedRule:
post:
operationId: UpdateRateBasedRule
summary: Update Rate Based Rule
description: 'This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version,
AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes Predicate objects in a rule
and updates the RateLimit in the rule. Each Predicate object identifies a predicate, such as a ByteMatchSet or an
IPSet, that specifies the web requests that you want to block or count. The RateLimit specifies the number of requests
every five minutes that triggers the rule. If you add more than one predicate to a RateBasedRule, a request must match
all the predicates and exceed the RateLimit to be counted or blocked. For example, suppose you add the following to
a RateBasedRule: An IPSet that matches the IP address 192.0.2.44/32 A ByteMatchSet that matches BadBot in the User-Agent
header Further, you specify a RateLimit of 1,000. You then add the RateBasedRule to a WebACL and specify that you
want to block requests that satisfy the rule. For a request to be blocked, it must come from the IP address 192.0.2.44
and the User-Agent header in the request'
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/UpdateRateBasedRuleResponse'
'500':
description: WAFInternalErrorException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WafWAFInternalErrorException'
'400':
description: WAFInvalidAccountException; WAFInvalidOperationException; WAFInvalidParameterException; WAFLimitsExceededException;
WAFNonexistentContainerException; WAFNonexistentItemException; WAFReferencedItemException; WAFStaleDataException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/WAFInvalidAccountException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AWSWAF_20150824.UpdateRateBasedRule
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/UpdateRateBasedRuleRequest'
tags:
- Rate Based Rule
components:
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: waf
schemas:
CreateRateBasedRuleRequest:
type: object
properties:
Name:
type: string
description: A friendly name or description of the RateBasedRule. You can't change the name of a RateBasedRule after
you create it.
MetricName:
type: string
description: A friendly name or description for the metrics for this RateBasedRule. The name can contain only alphanumeric
characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric
names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after
you create the RateBasedRule.
RateKey:
type: string
enum:
- IP
description: The field that AWS WAF uses to determine if requests are likely arriving from a single source and thus
subject to rate monitoring. The only valid value for RateKey is IP. IP indicates that requests that arrive from
the same IP address are subject to the RateLimit that is specified in the RateBasedRule.
RateLimit:
type: integer
description: The maximum number of requests, which have an identical value in the field that is specified by RateKey,
allowed in a five-minute period. If the number of requests exceeds the RateLimit and the other predicates specified
in the rule are also met, AWS WAF triggers the action that is specified for this rule.
ChangeToken:
type: string
description: The ChangeToken that you used to submit the CreateRateBasedRule request. You can also use this value
to query the status of the request. For more information, see GetChangeTokenStatus.
Tags:
type: array
items:
$ref: '#/components/schemas/WafTag'
required:
- Name
- MetricName
- RateKey
- RateLimit
- ChangeToken
CreateRateBasedRuleResponse:
type: object
properties:
Rule:
$ref: '#/components/schemas/RateBasedRule'
ChangeToken:
type: string
description: The ChangeToken that you used to submit the CreateRateBasedRule request. You can also use this value
to query the status of the request. For more information, see GetChangeTokenStatus.
DeleteRateBasedRuleRequest:
type: object
properties:
RuleId:
type: string
description: The RuleId of the RateBasedRule that you want to delete. RuleId is returned by CreateRateBasedRule
and by ListRateBasedRules.
ChangeToken:
type: string
description: The value returned by the most recent call to GetChangeToken.
required:
- RuleId
- ChangeToken
DeleteRateBasedRuleResponse:
type: object
properties:
ChangeToken:
type: string
description: The ChangeToken that you used to submit the DeleteRateBasedRule request. You can also use this value
to query the status of the request. For more information, see GetChangeTokenStatus.
GetRateBasedRuleRequest:
type: object
properties:
RuleId:
type: string
description: The RuleId of the RateBasedRule that you want to get. RuleId is returned by CreateRateBasedRule and
by ListRateBasedRules.
required:
- RuleId
GetRateBasedRuleResponse:
type: object
properties:
Rule:
$ref: '#/components/schemas/RateBasedRule'
ListRateBasedRulesRequest:
type: object
properties:
NextMarker:
type: string
description: If you specify a value for Limit and you have more Rules than the value of Limit, AWS WAF returns a
NextMarker value in the response that allows you to list another group of Rules. For the second and subsequent
ListRateBasedRules requests, specify the value of NextMarker from the previous response to get information about
another batch of Rules.
Limit:
type: integer
description: Specifies the number of Rules that you want AWS WAF to return for this request. If you have more Rules
than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another
batch of Rules.
ListRateBasedRulesResponse:
type: object
properties:
NextMarker:
type: string
description: If you have more Rules than the number that you specified for Limit in the request, the response includes
a NextMarker value. To list more Rules, submit another ListRateBasedRules request, and specify the NextMarker
value from the response in the NextMarker value in the next request.
Rules:
type: array
items:
$ref: '#/components/schemas/WafRuleSummary'
description: An array of RuleSummary objects.
Predicate:
type: object
properties:
Negated:
type: boolean
description: Set Negated to False if you want AWS WAF to allow, block, or count requests based on the settings in
the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, GeoMatchSet, or SizeConstraintSet.
For example, if an IPSet includes the IP address 192.0.2.44, AWS WAF will allow or block requests based on that
IP address. Set Negated to True if you want AWS WAF to allow or block a request based on the negation of the settings
in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, GeoMatchSet, or SizeConstraintSet.
For example, if an IPSet includes th
Type:
type: string
enum:
- IPMatch
- ByteMatch
- SqlInjectionMatch
- GeoMatch
- SizeConstraint
- XssMatch
- RegexMatch
description: The type of predicate in a Rule, such as ByteMatch or IPSet.
DataId:
type: string
description: A unique identifier for a predicate in a Rule, such as ByteMatchSetId or IPSetId. The ID is returned
by the corresponding Create or List command.
required:
- Negated
- Type
- DataId
RateBasedRule:
type: object
properties:
RuleId:
type: string
description: A unique identifier for a RateBasedRule. You use RuleId to get more information about a RateBasedRule
(see GetRateBasedRule), update a RateBasedRule (see UpdateRateBasedRule), insert a RateBasedRule into a WebACL
or delete one from a WebACL (see UpdateWebACL), or delete a RateBasedRule from AWS WAF (see DeleteRateBasedRule).
Name:
type: string
description: A friendly name or description for a RateBasedRule. You can't change the name of a RateBasedRule after
you create it.
MetricName:
type: string
description: A friendly name or description for the metrics for a RateBasedRule. The name can contain only alphanumeric
characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric
names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after
you create the RateBasedRule.
MatchPredicates:
type: array
items:
$ref: '#/components/schemas/Predicate'
description: The Predicates object contains one Predicate element for each ByteMatchSet, IPSet, or SqlInjectionMatchSet
object that you want to include in a RateBasedRule.
RateKey:
type: string
enum:
- IP
description: The field that AWS WAF uses to determine if requests are likely arriving from single source and thus
subject to rate monitoring. The only valid value for RateKey is IP. IP indicates that requests arriving from the
same IP address are subject to the RateLimit that is specified in the RateBasedRule.
RateLimit:
type: integer
description: The maximum number of requests, which have an identical value in the field specified by the RateKey,
allowed in a five-minute period. If the number of requests exceeds the RateLimit and the other predicates specified
in the rule are also met, AWS WAF triggers the action that is specified for this rule.
required:
- RuleId
- MatchPredicates
- RateKey
- RateLimit
RuleUpdate:
type: object
properties:
Action:
type: string
enum:
- INSERT
- DELETE
description: Specify INSERT to add a Predicate to a Rule. Use DELETE to remove a Predicate from a Rule.
Predicate:
$ref: '#/components/schemas/Predicate'
required:
- Action
- Predicate
UpdateRateBasedRuleRequest:
type: object
properties:
RuleId:
type: string
description: The RuleId of the RateBasedRule that you want to update. RuleId is returned by CreateRateBasedRule
and by ListRateBasedRules.
ChangeToken:
type: string
description: The value returned by the most recent call to GetChangeToken.
Updates:
type: array
items:
$ref: '#/components/schemas/RuleUpdate'
description: An array of RuleUpdate objects that you want to insert into or delete from a RateBasedRule.
RateLimit:
type: integer
description: The maximum number of requests, which have an identical value in the field specified by the RateKey,
allowed in a five-minute period. If the number of requests exceeds the RateLimit and the other predicates specified
in the rule are also met, AWS WAF triggers the action that is specified for this rule.
required:
- RuleId
- ChangeToken
- Updates
- RateLimit
UpdateRateBasedRuleResponse:
type: object
properties:
ChangeToken:
type: string
description: The ChangeToken that you used to submit the UpdateRateBasedRule request. You can also use this value
to query the status of the request. For more information, see GetChangeTokenStatus.
WAFBadRequestException:
type: object
properties:
message:
type: string
WAFInvalidAccountException:
type: object
properties: {}
WafRuleSummary:
type: object
properties:
RuleId:
type: string
description: A unique identifier for a Rule. You use RuleId to get more information about a Rule (see GetRule),
update a Rule (see UpdateRule), insert a Rule into a WebACL or delete one from a WebACL (see UpdateWebACL), or
delete a Rule from AWS WAF (see DeleteRule). RuleId is returned by CreateRule and by ListRules.
Name:
type: string
description: A friendly name or description of the Rule. You can't change the name of a Rule after you create it.
required:
- RuleId
- Name
WafTag:
type: object
properties:
Key:
type: string
Value:
type: string
required:
- Key
- Value
WafWAFInternalErrorException:
type: object
properties:
message:
type: string
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/waf/service/2015-08-24/waf-2015-08-24.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)