Class: Aws::WAFV2::Types::RuleAction

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-wafv2/lib/aws-sdk-wafv2/types.rb

Overview

Note:

When making an API call, you may pass RuleAction data as a hash:

{
  block: {
    custom_response: {
      response_code: 1, # required
      custom_response_body_key: "EntityName",
      response_headers: [
        {
          name: "CustomHTTPHeaderName", # required
          value: "CustomHTTPHeaderValue", # required
        },
      ],
    },
  },
  allow: {
    custom_request_handling: {
      insert_headers: [ # required
        {
          name: "CustomHTTPHeaderName", # required
          value: "CustomHTTPHeaderValue", # required
        },
      ],
    },
  },
  count: {
    custom_request_handling: {
      insert_headers: [ # required
        {
          name: "CustomHTTPHeaderName", # required
          value: "CustomHTTPHeaderValue", # required
        },
      ],
    },
  },
  captcha: {
    custom_request_handling: {
      insert_headers: [ # required
        {
          name: "CustomHTTPHeaderName", # required
          value: "CustomHTTPHeaderValue", # required
        },
      ],
    },
  },
}

The action that WAF should take on a web request when it matches a rule's statement. Settings at the web ACL level can override the rule action setting.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#allowTypes::AllowAction

Instructs WAF to allow the web request.

Returns:



8552
8553
8554
8555
8556
8557
8558
8559
# File 'gems/aws-sdk-wafv2/lib/aws-sdk-wafv2/types.rb', line 8552

class RuleAction < Struct.new(
  :block,
  :allow,
  :count,
  :captcha)
  SENSITIVE = []
  include Aws::Structure
end

#blockTypes::BlockAction

Instructs WAF to block the web request.

Returns:



8552
8553
8554
8555
8556
8557
8558
8559
# File 'gems/aws-sdk-wafv2/lib/aws-sdk-wafv2/types.rb', line 8552

class RuleAction < Struct.new(
  :block,
  :allow,
  :count,
  :captcha)
  SENSITIVE = []
  include Aws::Structure
end

#captchaTypes::CaptchaAction

Instructs WAF to run a CAPTCHA check against the web request.



8552
8553
8554
8555
8556
8557
8558
8559
# File 'gems/aws-sdk-wafv2/lib/aws-sdk-wafv2/types.rb', line 8552

class RuleAction < Struct.new(
  :block,
  :allow,
  :count,
  :captcha)
  SENSITIVE = []
  include Aws::Structure
end

#countTypes::CountAction

Instructs WAF to count the web request and allow it.

Returns:



8552
8553
8554
8555
8556
8557
8558
8559
# File 'gems/aws-sdk-wafv2/lib/aws-sdk-wafv2/types.rb', line 8552

class RuleAction < Struct.new(
  :block,
  :allow,
  :count,
  :captcha)
  SENSITIVE = []
  include Aws::Structure
end