# Class FirewallAction (1.32.0)

1.32.0 (latest) 1.29.0 1.28.2 1.27.0 1.26.1 1.25.0 1.24.1 1.23.0 1.22.0 1.21.2 1.20.0 1.19.1 1.18.1 1.17.1 1.16.1 1.15.0 1.14.0 1.13.0 1.12.1 1.11.1 1.10.0 1.9.0 1.8.3 1.7.1 1.6.1 1.5.0 1.4.1 1.3.1 1.2.0 1.1.2 1.0.0 0.4.2 0.3.3 0.2.1 0.1.0

    FirewallAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

An individual action. Each action represents what to do if a
policy matches.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `allow` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.FirewallAction.AllowAction` The user request did not match any policy and should be allowed access to the requested resource. This field is a member of `oneof`_ `firewall_action_oneof`. |
| `block` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.FirewallAction.BlockAction` This action denies access to a given page. The user gets an HTTP error code. This field is a member of `oneof`_ `firewall_action_oneof`. |
| `include_recaptcha_script` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.FirewallAction.IncludeRecaptchaScriptAction` This action injects reCAPTCHA JavaScript code into the HTML page returned by the site backend. This field is a member of `oneof`_ `firewall_action_oneof`. |
| `redirect` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.FirewallAction.RedirectAction` This action redirects the request to a reCAPTCHA interstitial to attach a token. This field is a member of `oneof`_ `firewall_action_oneof`. |
| `substitute` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.FirewallAction.SubstituteAction` This action transparently serves a different page to an offending user. This field is a member of `oneof`_ `firewall_action_oneof`. |
| `set_header` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.FirewallAction.SetHeaderAction` This action sets a custom header but allow the request to continue to the customer backend. This field is a member of `oneof`_ `firewall_action_oneof`. |

## Classes

### AllowAction

    AllowAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

An allow action continues processing a request unimpeded.

### BlockAction

    BlockAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A block action serves an HTTP error code a prevents the
request from hitting the backend.

### IncludeRecaptchaScriptAction

    IncludeRecaptchaScriptAction(
        mapping=None, *, ignore_unknown_fields=False, **kwargs
    )

An include reCAPTCHA script action involves injecting
reCAPTCHA JavaScript code into the HTML returned by the site
backend. This reCAPTCHA script is tasked with collecting user
signals on the requested web page, issuing tokens as a cookie
within the site domain, and enabling their utilization in
subsequent page requests.

### RedirectAction

    RedirectAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A redirect action returns a 307 (temporary redirect)
response, pointing the user to a reCAPTCHA interstitial page to
attach a token.

### SetHeaderAction

    SetHeaderAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A set header action sets a header and forwards the request to
the backend. This can be used to trigger custom protection
implemented on the backend.

### SubstituteAction

    SubstituteAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A substitute action transparently serves a different page
than the one requested.