WAFRegional / Client / exceptions / WAFInvalidParameterException

WAFInvalidParameterException#

class WAFRegional.Client.exceptions.WAFInvalidParameterException#

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.

Example

try:
  ...
except client.exceptions.WAFInvalidParameterException as e:
  print(e.response)
response#

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'field': 'CHANGE_ACTION'|'WAF_ACTION'|'WAF_OVERRIDE_ACTION'|'PREDICATE_TYPE'|'IPSET_TYPE'|'BYTE_MATCH_FIELD_TYPE'|'SQL_INJECTION_MATCH_FIELD_TYPE'|'BYTE_MATCH_TEXT_TRANSFORMATION'|'BYTE_MATCH_POSITIONAL_CONSTRAINT'|'SIZE_CONSTRAINT_COMPARISON_OPERATOR'|'GEO_MATCH_LOCATION_TYPE'|'GEO_MATCH_LOCATION_VALUE'|'RATE_KEY'|'RULE_TYPE'|'NEXT_MARKER'|'RESOURCE_ARN'|'TAGS'|'TAG_KEYS',
    'parameter': 'string',
    'reason': 'INVALID_OPTION'|'ILLEGAL_COMBINATION'|'ILLEGAL_ARGUMENT'|'INVALID_TAG_KEY',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    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.

    • field (string) –

    • parameter (string) –

    • reason (string) –

    • Error (dict) – Normalized access to common exception attributes.

      • Code (string) – An identifier specifying the exception type.

      • Message (string) – A descriptive message explaining why the exception occured.