Show / Hide Table of Contents

Class CfnWebACL.RuleActionOverrideProperty

Action setting to use in the place of a rule action that is configured inside the rule group.

Inheritance
object
CfnWebACL.RuleActionOverrideProperty
Implements
CfnWebACL.IRuleActionOverrideProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnWebACL.RuleActionOverrideProperty : CfnWebACL.IRuleActionOverrideProperty
Syntax (vb)
Public Class CfnWebACL.RuleActionOverrideProperty Implements CfnWebACL.IRuleActionOverrideProperty
Remarks

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleactionoverride.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.WAFv2;

             var ruleActionOverrideProperty = new RuleActionOverrideProperty {
                 ActionToUse = new RuleActionProperty {
                     Allow = new AllowActionProperty {
                         CustomRequestHandling = new CustomRequestHandlingProperty {
                             InsertHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     },
                     Block = new BlockActionProperty {
                         CustomResponse = new CustomResponseProperty {
                             ResponseCode = 123,

                             // the properties below are optional
                             CustomResponseBodyKey = "customResponseBodyKey",
                             ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     },
                     Captcha = new CaptchaActionProperty {
                         CustomRequestHandling = new CustomRequestHandlingProperty {
                             InsertHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     },
                     Challenge = new ChallengeActionProperty {
                         CustomRequestHandling = new CustomRequestHandlingProperty {
                             InsertHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     },
                     Count = new CountActionProperty {
                         CustomRequestHandling = new CustomRequestHandlingProperty {
                             InsertHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     }
                 },
                 Name = "name"
             };

Synopsis

Constructors

RuleActionOverrideProperty()

Action setting to use in the place of a rule action that is configured inside the rule group.

Properties

ActionToUse

The override action to use, in place of the configured action of the rule in the rule group.

Name

The name of the rule to override.

Constructors

RuleActionOverrideProperty()

Action setting to use in the place of a rule action that is configured inside the rule group.

public RuleActionOverrideProperty()
Remarks

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleactionoverride.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.WAFv2;

             var ruleActionOverrideProperty = new RuleActionOverrideProperty {
                 ActionToUse = new RuleActionProperty {
                     Allow = new AllowActionProperty {
                         CustomRequestHandling = new CustomRequestHandlingProperty {
                             InsertHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     },
                     Block = new BlockActionProperty {
                         CustomResponse = new CustomResponseProperty {
                             ResponseCode = 123,

                             // the properties below are optional
                             CustomResponseBodyKey = "customResponseBodyKey",
                             ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     },
                     Captcha = new CaptchaActionProperty {
                         CustomRequestHandling = new CustomRequestHandlingProperty {
                             InsertHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     },
                     Challenge = new ChallengeActionProperty {
                         CustomRequestHandling = new CustomRequestHandlingProperty {
                             InsertHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     },
                     Count = new CountActionProperty {
                         CustomRequestHandling = new CustomRequestHandlingProperty {
                             InsertHeaders = new [] { new CustomHTTPHeaderProperty {
                                 Name = "name",
                                 Value = "value"
                             } }
                         }
                     }
                 },
                 Name = "name"
             };

Properties

ActionToUse

The override action to use, in place of the configured action of the rule in the rule group.

public object ActionToUse { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleactionoverride.html#cfn-wafv2-webacl-ruleactionoverride-actiontouse

Type union: either IResolvable or CfnWebACL.IRuleActionProperty

Name

The name of the rule to override.

public string Name { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleactionoverride.html#cfn-wafv2-webacl-ruleactionoverride-name

Implements

CfnWebACL.IRuleActionOverrideProperty
Back to top Generated by DocFX