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

The operation failed because AWS WAF didn't recognize a parameter in the * request. For example:

  • You specified an invalid parameter * name.

  • You specified an invalid value.

  • You * tried to update an object (ByteMatchSet, IPSet, * Rule, or WebACL) using an action other than * INSERT or DELETE.

  • You tried to * create a WebACL with a DefaultAction Type * other than ALLOW, BLOCK, or COUNT.

    *
  • You tried to create a RateBasedRule with a * RateKey value other than IP.

  • You * tried to update a WebACL with a WafAction * Type other than ALLOW, BLOCK, or * COUNT.

  • You tried to update a * ByteMatchSet with a FieldToMatch Type * other than HEADER, METHOD, QUERY_STRING, URI, or BODY.

  • You * tried to update a ByteMatchSet with a Field of * HEADER but no value for Data.

  • Your * request references an ARN that is malformed, or corresponds to a resource with * which a web ACL cannot be associated.

See Also:

AWS * API Reference

*/ class WAFInvalidParameterException { public: AWS_WAF_API WAFInvalidParameterException(); AWS_WAF_API WAFInvalidParameterException(Aws::Utils::Json::JsonView jsonValue); AWS_WAF_API WAFInvalidParameterException& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_WAF_API Aws::Utils::Json::JsonValue Jsonize() const; inline const ParameterExceptionField& GetField() const{ return m_field; } inline bool FieldHasBeenSet() const { return m_fieldHasBeenSet; } inline void SetField(const ParameterExceptionField& value) { m_fieldHasBeenSet = true; m_field = value; } inline void SetField(ParameterExceptionField&& value) { m_fieldHasBeenSet = true; m_field = std::move(value); } inline WAFInvalidParameterException& WithField(const ParameterExceptionField& value) { SetField(value); return *this;} inline WAFInvalidParameterException& WithField(ParameterExceptionField&& value) { SetField(std::move(value)); return *this;} inline const Aws::String& GetParameter() const{ return m_parameter; } inline bool ParameterHasBeenSet() const { return m_parameterHasBeenSet; } inline void SetParameter(const Aws::String& value) { m_parameterHasBeenSet = true; m_parameter = value; } inline void SetParameter(Aws::String&& value) { m_parameterHasBeenSet = true; m_parameter = std::move(value); } inline void SetParameter(const char* value) { m_parameterHasBeenSet = true; m_parameter.assign(value); } inline WAFInvalidParameterException& WithParameter(const Aws::String& value) { SetParameter(value); return *this;} inline WAFInvalidParameterException& WithParameter(Aws::String&& value) { SetParameter(std::move(value)); return *this;} inline WAFInvalidParameterException& WithParameter(const char* value) { SetParameter(value); return *this;} inline const ParameterExceptionReason& GetReason() const{ return m_reason; } inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } inline void SetReason(const ParameterExceptionReason& value) { m_reasonHasBeenSet = true; m_reason = value; } inline void SetReason(ParameterExceptionReason&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } inline WAFInvalidParameterException& WithReason(const ParameterExceptionReason& value) { SetReason(value); return *this;} inline WAFInvalidParameterException& WithReason(ParameterExceptionReason&& value) { SetReason(std::move(value)); return *this;} private: ParameterExceptionField m_field; bool m_fieldHasBeenSet = false; Aws::String m_parameter; bool m_parameterHasBeenSet = false; ParameterExceptionReason m_reason; bool m_reasonHasBeenSet = false; }; } // namespace Model } // namespace WAF } // namespace Aws