interface RuleActionOverrideProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.WAFv2.CfnWebACL.RuleActionOverrideProperty |
Java | software.amazon.awscdk.services.wafv2.CfnWebACL.RuleActionOverrideProperty |
Python | aws_cdk.aws_wafv2.CfnWebACL.RuleActionOverrideProperty |
TypeScript | @aws-cdk/aws-wafv2 » CfnWebACL » RuleActionOverrideProperty |
Action setting to use in the place of a rule action that is configured inside the rule group.
You specify one override for each rule whose action you want to change.
You can use overrides for testing, for example you can override all of rule actions to Count
and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as wafv2 from '@aws-cdk/aws-wafv2';
const ruleActionOverrideProperty: wafv2.CfnWebACL.RuleActionOverrideProperty = {
actionToUse: {
allow: {
customRequestHandling: {
insertHeaders: [{
name: 'name',
value: 'value',
}],
},
},
block: {
customResponse: {
responseCode: 123,
// the properties below are optional
customResponseBodyKey: 'customResponseBodyKey',
responseHeaders: [{
name: 'name',
value: 'value',
}],
},
},
captcha: {
customRequestHandling: {
insertHeaders: [{
name: 'name',
value: 'value',
}],
},
},
challenge: {
customRequestHandling: {
insertHeaders: [{
name: 'name',
value: 'value',
}],
},
},
count: {
customRequestHandling: {
insertHeaders: [{
name: 'name',
value: 'value',
}],
},
},
},
name: 'name',
};
Properties
Name | Type | Description |
---|---|---|
action | IResolvable | Rule | The override action to use, in place of the configured action of the rule in the rule group. |
name | string | The name of the rule to override. |
actionToUse
Type:
IResolvable
|
Rule
The override action to use, in place of the configured action of the rule in the rule group.
name
Type:
string
The name of the rule to override.