Show / Hide Table of Contents

Interface CfnWebACL.IRuleActionProperty

The action that AWS WAF should take on a web request when it matches a rule's statement.

Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface CfnWebACL.IRuleActionProperty
Syntax (vb)
Public Interface CfnWebACL.IRuleActionProperty
Remarks

Settings at the web ACL level can override the rule action setting.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-ruleaction.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 ruleActionProperty = 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"
                         } }
                     }
                 }
             };

Synopsis

Properties

Allow

Instructs AWS WAF to allow the web request.

Block

Instructs AWS WAF to block the web request.

Captcha

Specifies that AWS WAF should run a CAPTCHA check against the request:.

Challenge

Instructs AWS WAF to run a Challenge check against the web request.

Count

Instructs AWS WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.

Properties

Allow

Instructs AWS WAF to allow the web request.

object? Allow { get; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnWebACL.IAllowActionProperty

Block

Instructs AWS WAF to block the web request.

object? Block { get; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnWebACL.IBlockActionProperty

Captcha

Specifies that AWS WAF should run a CAPTCHA check against the request:.

object? Captcha { get; }
Property Value

object

Remarks

    AWS WAF generates a response that it sends back to the client, which includes the following:

      You can configure the expiration time in the CaptchaConfig ImmunityTimeProperty setting at the rule and web ACL level. The rule setting overrides the web ACL setting.

      This action option is available for rules. It isn't available for web ACL default actions.

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

      Type union: either IResolvable or CfnWebACL.ICaptchaActionProperty

      Challenge

      Instructs AWS WAF to run a Challenge check against the web request.

      object? Challenge { get; }
      Property Value

      object

      Remarks

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

      Type union: either IResolvable or CfnWebACL.IChallengeActionProperty

      Count

      Instructs AWS WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.

      object? Count { get; }
      Property Value

      object

      Remarks

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

      Type union: either IResolvable or CfnWebACL.ICountActionProperty

      Back to top Generated by DocFX