---
title: "POST /projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy"
method: POST
path: "/projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy"
tags: ["routers"]
---

# POST /projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy

`POST /projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy`

Updates or creates new Route Policy

## Path parameters

- `project` string, required
- `region` string, required
- `router` string, required

## Query parameters

- `requestId` string

## Request body

- RoutePolicy
  - `type` 'ROUTE_POLICY_TYPE_EXPORT' | 'ROUTE_POLICY_TYPE_IMPORT'
  - `fingerprint` string, byte — A fingerprint for the Route Policy being applied to this Router, which is essentially a hash of the Route Policy used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update Route Policy. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make a getRoutePolicy() request to retrieve a Route Policy.
  - `name` string — Route Policy name, which must be a resource ID segment and unique within all the router's Route Policies. Name should conform to RFC1035.
  - `description` string — An optional description of route policy.
  - `terms` RoutePolicyPolicyTerm[] — List of terms (the order in the list is not important, they are evaluated in order of priority). Order of policies is not retained and might change when getting policy later.
    - `match` Expr — Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
      - `description` string — Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
      - `expression` string — Textual representation of an expression in Common Expression Language syntax.
      - `title` string — Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
      - `location` string — Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
    - `actions` Expr[] — CEL expressions to evaluate to modify a route when this term matches.
      - `description` string — Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
      - `expression` string — Textual representation of an expression in Common Expression Language syntax.
      - `title` string — Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
      - `location` string — Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
    - `priority` integer — The evaluation priority for this term, which must be between 0 (inclusive) and 2^31 (exclusive), and unique within the list.

## Response `200`

Successful response

---

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