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

Specifies the action setting that Shield Advanced should use in the WAF rules * that it creates on behalf of the protected resource in response to DDoS attacks. * You specify this as part of the configuration for the automatic application * layer DDoS mitigation feature, when you enable or update automatic mitigation. * Shield Advanced creates the WAF rules in a Shield Advanced-managed rule group, * inside the web ACL that you have associated with the resource.

See * Also:

AWS * API Reference

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

Specifies that Shield Advanced should configure its WAF rules with the WAF * Block action.

You must specify exactly one action, either * Block or Count.

*/ inline const BlockAction& GetBlock() const{ return m_block; } /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Block action.

You must specify exactly one action, either * Block or Count.

*/ inline bool BlockHasBeenSet() const { return m_blockHasBeenSet; } /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Block action.

You must specify exactly one action, either * Block or Count.

*/ inline void SetBlock(const BlockAction& value) { m_blockHasBeenSet = true; m_block = value; } /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Block action.

You must specify exactly one action, either * Block or Count.

*/ inline void SetBlock(BlockAction&& value) { m_blockHasBeenSet = true; m_block = std::move(value); } /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Block action.

You must specify exactly one action, either * Block or Count.

*/ inline ResponseAction& WithBlock(const BlockAction& value) { SetBlock(value); return *this;} /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Block action.

You must specify exactly one action, either * Block or Count.

*/ inline ResponseAction& WithBlock(BlockAction&& value) { SetBlock(std::move(value)); return *this;} /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Count action.

You must specify exactly one action, either * Block or Count.

*/ inline const CountAction& GetCount() const{ return m_count; } /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Count action.

You must specify exactly one action, either * Block or Count.

*/ inline bool CountHasBeenSet() const { return m_countHasBeenSet; } /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Count action.

You must specify exactly one action, either * Block or Count.

*/ inline void SetCount(const CountAction& value) { m_countHasBeenSet = true; m_count = value; } /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Count action.

You must specify exactly one action, either * Block or Count.

*/ inline void SetCount(CountAction&& value) { m_countHasBeenSet = true; m_count = std::move(value); } /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Count action.

You must specify exactly one action, either * Block or Count.

*/ inline ResponseAction& WithCount(const CountAction& value) { SetCount(value); return *this;} /** *

Specifies that Shield Advanced should configure its WAF rules with the WAF * Count action.

You must specify exactly one action, either * Block or Count.

*/ inline ResponseAction& WithCount(CountAction&& value) { SetCount(std::move(value)); return *this;} private: BlockAction m_block; bool m_blockHasBeenSet = false; CountAction m_count; bool m_countHasBeenSet = false; }; } // namespace Model } // namespace Shield } // namespace Aws