import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { UpdateWebACLRequest, UpdateWebACLResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link UpdateWebACLCommand}. */ export interface UpdateWebACLCommandInput extends UpdateWebACLRequest { } /** * @public * * The output of {@link UpdateWebACLCommand}. */ export interface UpdateWebACLCommandOutput extends UpdateWebACLResponse, __MetadataBearer { } declare const UpdateWebACLCommand_base: { new (input: UpdateWebACLCommandInput): import("@smithy/core/client").CommandImpl; new (input: UpdateWebACLCommandInput): 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 ActivatedRule objects in a WebACL. Each Rule identifies * web requests that you want to allow, block, or count. When you update a WebACL, you specify the following values:

* * *

To create and configure a WebACL, perform the following steps:

*
    *
  1. *

    Create and update the predicates that you want to include in Rules. * For more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, * CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    *
  2. *
  3. *

    Create and update the Rules that you want to include in the WebACL. For more information, see * CreateRule and UpdateRule.

    *
  4. *
  5. *

    Create a WebACL. See CreateWebACL.

    *
  6. *
  7. *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an * UpdateWebACL request.

    *
  8. *
  9. *

    Submit an UpdateWebACL request to specify the Rules * that you want to include in the WebACL, to specify the default action, * and to associate the WebACL with a CloudFront distribution.

    *

    The ActivatedRule can be a rule group. If you specify a rule group * as your * ActivatedRule * , * you can exclude specific rules from that rule group.

    *

    If you already have a rule group associated with a web ACL and want to submit * an UpdateWebACL request to exclude certain rules from that rule group, * you must first remove the rule group from the web ACL, the re-insert it again, * specifying the excluded rules. * For details, * see * ActivatedRule$ExcludedRules * . *

    *
  10. *
*

Be aware that if you try to add a RATE_BASED rule to a web ACL without setting the rule type when first creating the rule, the UpdateWebACL request will fail because the request tries to add a REGULAR rule (the default rule type) with the specified ID, which does not exist.

*

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { WAFRegionalClient, UpdateWebACLCommand } from "@aws-sdk/client-waf-regional"; // ES Modules import * // const { WAFRegionalClient, UpdateWebACLCommand } = 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 = { // UpdateWebACLRequest * WebACLId: "STRING_VALUE", // required * ChangeToken: "STRING_VALUE", // required * Updates: [ // WebACLUpdates * { // WebACLUpdate * Action: "INSERT" || "DELETE", // required * ActivatedRule: { // ActivatedRule * Priority: Number("int"), // required * RuleId: "STRING_VALUE", // required * Action: { // WafAction * Type: "BLOCK" || "ALLOW" || "COUNT", // required * }, * OverrideAction: { // WafOverrideAction * Type: "NONE" || "COUNT", // required * }, * Type: "REGULAR" || "RATE_BASED" || "GROUP", * ExcludedRules: [ // ExcludedRules * { // ExcludedRule * RuleId: "STRING_VALUE", // required * }, * ], * }, * }, * ], * DefaultAction: { * Type: "BLOCK" || "ALLOW" || "COUNT", // required * }, * }; * const command = new UpdateWebACLCommand(input); * const response = await client.send(command); * // { // UpdateWebACLResponse * // ChangeToken: "STRING_VALUE", * // }; * * ``` * * @param UpdateWebACLCommandInput - {@link UpdateWebACLCommandInput} * @returns {@link UpdateWebACLCommandOutput} * @see {@link UpdateWebACLCommandInput} for command's `input` shape. * @see {@link UpdateWebACLCommandOutput} 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 WAFSubscriptionNotFoundException} (client fault) *

The specified subscription does not exist.

* * @throws {@link WAFRegionalServiceException} *

Base exception class for all service exceptions from WAFRegional service.

* * * @example To update a Web ACL * ```javascript * // The following example deletes an ActivatedRule object in a WebACL with the ID webacl-1472061481310. * const input = { * ChangeToken: "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", * DefaultAction: { * Type: "ALLOW" * }, * Updates: [ * { * Action: "DELETE", * ActivatedRule: { * Action: { * Type: "ALLOW" * }, * Priority: 1, * RuleId: "WAFRule-1-Example" * } * } * ], * WebACLId: "webacl-1472061481310" * }; * const command = new UpdateWebACLCommand(input); * const response = await client.send(command); * /* response is * { * ChangeToken: "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" * } * *\/ * ``` * * @public */ export declare class UpdateWebACLCommand extends UpdateWebACLCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: UpdateWebACLRequest; output: UpdateWebACLResponse; }; sdk: { input: UpdateWebACLCommandInput; output: UpdateWebACLCommandOutput; }; }; }