import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { UpdateRuleGroupRequest, UpdateRuleGroupResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link UpdateRuleGroupCommand}. */ export interface UpdateRuleGroupCommandInput extends UpdateRuleGroupRequest { } /** * @public * * The output of {@link UpdateRuleGroupCommand}. */ export interface UpdateRuleGroupCommandOutput extends UpdateRuleGroupResponse, __MetadataBearer { } declare const UpdateRuleGroupCommand_base: { new (input: UpdateRuleGroupCommandInput): import("@smithy/core/client").CommandImpl; new (input: UpdateRuleGroupCommandInput): 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 RuleGroup.

*

You can only insert REGULAR rules into a rule group.

*

You can have a maximum of ten rules per rule group.

* * *

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

*
    *
  1. *

    Create and update the Rules that you want to include in the RuleGroup. See CreateRule.

    *
  2. *
  3. *

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

    *
  4. *
  5. *

    Submit an UpdateRuleGroup request to add Rules to the RuleGroup.

    *
  6. *
  7. *

    Create and update a WebACL that contains the RuleGroup. See CreateWebACL.

    *
  8. *
*

If you want to replace one Rule with another, you delete the existing one and * add the new one.

*

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, UpdateRuleGroupCommand } from "@aws-sdk/client-waf-regional"; // ES Modules import * // const { WAFRegionalClient, UpdateRuleGroupCommand } = 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 = { // UpdateRuleGroupRequest * RuleGroupId: "STRING_VALUE", // required * Updates: [ // RuleGroupUpdates // required * { // RuleGroupUpdate * 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 * }, * ], * }, * }, * ], * ChangeToken: "STRING_VALUE", // required * }; * const command = new UpdateRuleGroupCommand(input); * const response = await client.send(command); * // { // UpdateRuleGroupResponse * // ChangeToken: "STRING_VALUE", * // }; * * ``` * * @param UpdateRuleGroupCommandInput - {@link UpdateRuleGroupCommandInput} * @returns {@link UpdateRuleGroupCommandOutput} * @see {@link UpdateRuleGroupCommandInput} for command's `input` shape. * @see {@link UpdateRuleGroupCommandOutput} 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 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 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 UpdateRuleGroupCommand extends UpdateRuleGroupCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: UpdateRuleGroupRequest; output: UpdateRuleGroupResponse; }; sdk: { input: UpdateRuleGroupCommandInput; output: UpdateRuleGroupCommandOutput; }; }; }