import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { UpdateRateBasedRuleRequest, UpdateRateBasedRuleResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link UpdateRateBasedRuleCommand}. */ export interface UpdateRateBasedRuleCommandInput extends UpdateRateBasedRuleRequest { } /** * @public * * The output of {@link UpdateRateBasedRuleCommand}. */ export interface UpdateRateBasedRuleCommandOutput extends UpdateRateBasedRuleResponse, __MetadataBearer { } declare const UpdateRateBasedRuleCommand_base: { new (input: UpdateRateBasedRuleCommandInput): import("@smithy/core/client").CommandImpl; new (input: UpdateRateBasedRuleCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** * *

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:

* *

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 must contain the value BadBot. Further, requests that match * these two conditions much be received at a rate of more than 1,000 every five minutes. If * the rate drops below this limit, AWS WAF no longer blocks the requests.

* *

As a second example, suppose you want to limit requests to a particular page on your site. To do this, you could add the following to a * RateBasedRule:

* * * *

Further, you specify a RateLimit of 1,000.

*

By adding this RateBasedRule to a WebACL, you could limit requests to your login page without affecting the rest of your site.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { WAFRegionalClient, UpdateRateBasedRuleCommand } from "@aws-sdk/client-waf-regional"; // ES Modules import * // const { WAFRegionalClient, UpdateRateBasedRuleCommand } = require("@aws-sdk/client-waf-regional"); // CommonJS import * // import type { WAFRegionalClientConfig } from "@aws-sdk/client-waf-regional"; * const config = {}; // type is WAFRegionalClientConfig * const client = new WAFRegionalClient(config); * const input = { // UpdateRateBasedRuleRequest * RuleId: "STRING_VALUE", // required * ChangeToken: "STRING_VALUE", // required * Updates: [ // RuleUpdates // required * { // RuleUpdate * Action: "INSERT" || "DELETE", // required * Predicate: { // Predicate * Negated: true || false, // required * Type: "IPMatch" || "ByteMatch" || "SqlInjectionMatch" || "GeoMatch" || "SizeConstraint" || "XssMatch" || "RegexMatch", // required * DataId: "STRING_VALUE", // required * }, * }, * ], * RateLimit: Number("long"), // required * }; * const command = new UpdateRateBasedRuleCommand(input); * const response = await client.send(command); * // { // UpdateRateBasedRuleResponse * // ChangeToken: "STRING_VALUE", * // }; * * ``` * * @param UpdateRateBasedRuleCommandInput - {@link UpdateRateBasedRuleCommandInput} * @returns {@link UpdateRateBasedRuleCommandOutput} * @see {@link UpdateRateBasedRuleCommandInput} for command's `input` shape. * @see {@link UpdateRateBasedRuleCommandOutput} for command's `response` shape. * @see {@link WAFRegionalClientResolvedConfig | config} for WAFRegionalClient's `config` shape. * * @throws {@link WAFInternalErrorException} (server fault) *

The operation failed because of a system problem, even though the request was valid. Retry your request.

* * @throws {@link WAFInvalidAccountException} (client fault) *

The operation failed because you tried to create, update, or delete an object by using an invalid account identifier.

* * @throws {@link WAFInvalidOperationException} (client fault) *

The operation failed because there was nothing to do. For example:

* * * @throws {@link WAFInvalidParameterException} (client fault) *

The operation failed because AWS WAF didn't recognize a parameter in the request. For example:

* * * @throws {@link WAFLimitsExceededException} (client fault) *

The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create * for an AWS account. For more information, see * Limits in the AWS WAF Developer Guide.

* * @throws {@link WAFNonexistentContainerException} (client fault) *

The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example:

* * * @throws {@link WAFNonexistentItemException} (client fault) *

The operation failed because the referenced object doesn't exist.

* * @throws {@link WAFReferencedItemException} (client fault) *

The operation failed because you tried to delete an object that is still in use. For example:

* * * @throws {@link WAFStaleDataException} (client fault) *

The operation failed because you tried to create, update, or delete an object by using a change token that has already been used.

* * @throws {@link WAFRegionalServiceException} *

Base exception class for all service exceptions from WAFRegional service.

* * * @public */ export declare class UpdateRateBasedRuleCommand extends UpdateRateBasedRuleCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: UpdateRateBasedRuleRequest; output: UpdateRateBasedRuleResponse; }; sdk: { input: UpdateRateBasedRuleCommandInput; output: UpdateRateBasedRuleCommandOutput; }; }; }