HeaderValidationRequestPolicy

class oci.apigateway.models.HeaderValidationRequestPolicy(**kwargs)

Bases: object

Validate the HTTP headers on the incoming API requests on a specific route.

Attributes

VALIDATION_MODE_DISABLED A constant which can be used with the validation_mode property of a HeaderValidationRequestPolicy.
VALIDATION_MODE_ENFORCING A constant which can be used with the validation_mode property of a HeaderValidationRequestPolicy.
VALIDATION_MODE_PERMISSIVE A constant which can be used with the validation_mode property of a HeaderValidationRequestPolicy.
headers Gets the headers of this HeaderValidationRequestPolicy.
validation_mode Gets the validation_mode of this HeaderValidationRequestPolicy.

Methods

__init__(**kwargs) Initializes a new HeaderValidationRequestPolicy object with values from keyword arguments.
VALIDATION_MODE_DISABLED = 'DISABLED'

A constant which can be used with the validation_mode property of a HeaderValidationRequestPolicy. This constant has a value of “DISABLED”

VALIDATION_MODE_ENFORCING = 'ENFORCING'

A constant which can be used with the validation_mode property of a HeaderValidationRequestPolicy. This constant has a value of “ENFORCING”

VALIDATION_MODE_PERMISSIVE = 'PERMISSIVE'

A constant which can be used with the validation_mode property of a HeaderValidationRequestPolicy. This constant has a value of “PERMISSIVE”

__init__(**kwargs)

Initializes a new HeaderValidationRequestPolicy object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • headers (list[oci.apigateway.models.HeaderValidationItem]) – The value to assign to the headers property of this HeaderValidationRequestPolicy.
  • validation_mode (str) – The value to assign to the validation_mode property of this HeaderValidationRequestPolicy. Allowed values for this property are: “ENFORCING”, “PERMISSIVE”, “DISABLED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
headers

Gets the headers of this HeaderValidationRequestPolicy.

Returns:The headers of this HeaderValidationRequestPolicy.
Return type:list[oci.apigateway.models.HeaderValidationItem]
validation_mode

Gets the validation_mode of this HeaderValidationRequestPolicy. Validation behavior mode.

In ENFORCING mode, upon a validation failure, the request will be rejected with a 4xx response and not sent to the backend.

In PERMISSIVE mode, the result of the validation will be exposed as metrics while the request will follow the normal path.

DISABLED type turns the validation off.

Allowed values for this property are: “ENFORCING”, “PERMISSIVE”, “DISABLED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The validation_mode of this HeaderValidationRequestPolicy.
Return type:str