---
title: "PATCH /v1/{+name}"
method: PATCH
path: "/v1/{+name}"
tags: ["projects"]
---

# PATCH /v1/{+name}

`PATCH /v1/{+name}`

Updates the specified firewall policy.

## Path parameters

- `name` string, required

## Query parameters

- `updateMask` string

## Request body

- GoogleCloudRecaptchaenterpriseV1FirewallPolicy — A FirewallPolicy represents a single matching pattern and resulting actions to take.
  - `description` string — Optional. A description of what this policy aims to achieve, for convenience purposes. The description can at most include 256 UTF-8 characters.
  - `actions` GoogleCloudRecaptchaenterpriseV1FirewallAction[] — Optional. The actions that the caller should take regarding user access. There should be at most one terminal action. A terminal action is any action that forces a response, such as `AllowAction`, `BlockAction` or `SubstituteAction`. Zero or more non-terminal actions such as `SetHeader` might be specified. A single policy can contain up to 16 actions.
    - `allow` GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction — An allow action continues processing a request unimpeded.
    - `redirect` GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction — A redirect action returns a 307 (temporary redirect) response, pointing the user to a reCAPTCHA interstitial page to attach a token.
    - `substitute` GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction — A substitute action transparently serves a different page than the one requested.
      - `path` string — Optional. The address to redirect to. The target is a relative path in the current host. Example: "/blog/404.html".
    - `block` GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction — A block action serves an HTTP error code a prevents the request from hitting the backend.
    - `includeRecaptchaScript` GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction — 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.
    - `setHeader` GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction — 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.
      - `key` string — Optional. The header key to set in the request to the backend server.
      - `value` string — Optional. The header value to set in the request to the backend server.
  - `name` string — Identifier. The resource name for the FirewallPolicy in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.
  - `condition` string — Optional. A CEL (Common Expression Language) conditional expression that specifies if this policy applies to an incoming user request. If this condition evaluates to true and the requested path matched the path pattern, the associated actions should be executed by the caller. The condition string is checked for CEL syntax correctness on creation. For more information, see the [CEL spec](https://github.com/google/cel-spec) and its [language definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). A condition has a max length of 500 characters.
  - `path` string — Optional. The path for which this policy applies, specified as a glob pattern. For more information on glob, see the [manual page](https://man7.org/linux/man-pages/man7/glob.7.html). A path has a max length of 200 characters.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/recaptchaenterprise.md) · [All operations](https://skmtc.net/google/apis/recaptchaenterprise/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/recaptchaenterprise/versions/3b5248d3ca31/schema)
