/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SecurityHub { namespace Model { /** *

Details about the action that CloudFront or WAF takes when a web request * matches the conditions in the rule.

See Also:

AWS * API Reference

*/ class WafAction { public: AWS_SECURITYHUB_API WafAction(); AWS_SECURITYHUB_API WafAction(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API WafAction& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Specifies how you want WAF to respond to requests that match the settings in * a rule.

Valid settings include the following:

  • * ALLOW - WAF allows requests

  • BLOCK - * WAF blocks requests

  • COUNT - WAF increments a * counter of the requests that match all of the conditions in the rule. WAF then * continues to inspect the web request based on the remaining rules in the web * ACL. You can't specify COUNT for the default action for a web * ACL.

*/ inline const Aws::String& GetType() const{ return m_type; } /** *

Specifies how you want WAF to respond to requests that match the settings in * a rule.

Valid settings include the following:

  • * ALLOW - WAF allows requests

  • BLOCK - * WAF blocks requests

  • COUNT - WAF increments a * counter of the requests that match all of the conditions in the rule. WAF then * continues to inspect the web request based on the remaining rules in the web * ACL. You can't specify COUNT for the default action for a web * ACL.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

Specifies how you want WAF to respond to requests that match the settings in * a rule.

Valid settings include the following:

  • * ALLOW - WAF allows requests

  • BLOCK - * WAF blocks requests

  • COUNT - WAF increments a * counter of the requests that match all of the conditions in the rule. WAF then * continues to inspect the web request based on the remaining rules in the web * ACL. You can't specify COUNT for the default action for a web * ACL.

*/ inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; } /** *

Specifies how you want WAF to respond to requests that match the settings in * a rule.

Valid settings include the following:

  • * ALLOW - WAF allows requests

  • BLOCK - * WAF blocks requests

  • COUNT - WAF increments a * counter of the requests that match all of the conditions in the rule. WAF then * continues to inspect the web request based on the remaining rules in the web * ACL. You can't specify COUNT for the default action for a web * ACL.

*/ inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

Specifies how you want WAF to respond to requests that match the settings in * a rule.

Valid settings include the following:

  • * ALLOW - WAF allows requests

  • BLOCK - * WAF blocks requests

  • COUNT - WAF increments a * counter of the requests that match all of the conditions in the rule. WAF then * continues to inspect the web request based on the remaining rules in the web * ACL. You can't specify COUNT for the default action for a web * ACL.

*/ inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); } /** *

Specifies how you want WAF to respond to requests that match the settings in * a rule.

Valid settings include the following:

  • * ALLOW - WAF allows requests

  • BLOCK - * WAF blocks requests

  • COUNT - WAF increments a * counter of the requests that match all of the conditions in the rule. WAF then * continues to inspect the web request based on the remaining rules in the web * ACL. You can't specify COUNT for the default action for a web * ACL.

*/ inline WafAction& WithType(const Aws::String& value) { SetType(value); return *this;} /** *

Specifies how you want WAF to respond to requests that match the settings in * a rule.

Valid settings include the following:

  • * ALLOW - WAF allows requests

  • BLOCK - * WAF blocks requests

  • COUNT - WAF increments a * counter of the requests that match all of the conditions in the rule. WAF then * continues to inspect the web request based on the remaining rules in the web * ACL. You can't specify COUNT for the default action for a web * ACL.

*/ inline WafAction& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;} /** *

Specifies how you want WAF to respond to requests that match the settings in * a rule.

Valid settings include the following:

  • * ALLOW - WAF allows requests

  • BLOCK - * WAF blocks requests

  • COUNT - WAF increments a * counter of the requests that match all of the conditions in the rule. WAF then * continues to inspect the web request based on the remaining rules in the web * ACL. You can't specify COUNT for the default action for a web * ACL.

*/ inline WafAction& WithType(const char* value) { SetType(value); return *this;} private: Aws::String m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws