[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# List BGP route policies\n=======================\n\nThis page describes how to list *Border Gateway Protocol (BGP)* route policies\non Cloud Router, which can help you troubleshoot your BGP route policies.\n\nBefore you begin\n----------------\n\n### gcloud\n\nIf you want to use the command-line examples in this guide, do the following:\n\n1. Install or update to the latest version of the [Google Cloud CLI](/compute/docs/gcloud-compute).\n2. Set a [default region and\n zone](/compute/docs/gcloud-compute#set_default_zone_and_region_in_your_local_client).\n\n### API\n\nIf you want to use the API examples in this guide, set up\n[API access](/compute/docs/api/prereqs).\n\nList BGP route policies\n-----------------------\n\n### Console\n\n1. In the Google Cloud console, go to the **Cloud Router** page.\n\n [Go to Cloud Router](https://console.cloud.google.com/hybrid/routers/list)\n2. On the **Cloud Router** page, click the **BGP Route Policies** tab.\n\n3. To view the BGP route policy terms for a BGP route policy, click the\n BGP route policy name.\n\n### gcloud\n\nUse the [`gcloud compute routers list-route-policies` command](/sdk/gcloud/reference/compute/routers/list-route-policies): \n\n gcloud compute routers list-route-policies \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of your Cloud Router\n\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region in which your Cloud Router\n is located\n\nThe output is similar to the following: \n\n NAME: test-policy-1\n TYPE: ROUTE_POLICY_TYPE_EXPORT\n\n NAME: test-policy-2\n TYPE: ROUTE_POLICY_TYPE_IMPORT\n\n### API\n\nUse the [`routers.listRoutePolicies` method](/compute/docs/reference/rest/v1/routers/listRoutePolicies): \n\n```\nGET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/routers/ROUTER_NAME/listRoutePolicies\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project that contains your\n Cloud Router\n\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region in which your Cloud Router\n is located\n\n- \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of your Cloud Router\n\nThe output is similar to the following: \n\n {\n \"kind\": \"compute#routersListRoutePolicies\",\n \"result\": [\n {\n \"name\": \"\u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e\",\n \"type\": \"ROUTE_POLICY_TYPE_IMPORT\",\n \"terms\": [\n {\n \"priority\": 1,\n \"match\": {\n \"expression\": \"destination != \\\"192.168.10.0/24\\\" && communities.matchesEvery([\\\"65000:1\\\", \\\"65000:2\\\"])\"\n },\n \"actions\": [\n {\n \"expression\": \"med.set(12345)\"\n }\n ]\n },\n {\n \"priority\": 2,\n \"match\": {\n \"expression\": \"destination != \\\"192.168.10.0/24\\\"\"\n },\n \"actions\": [\n {\n \"expression\": \"med.set(12345)\"\n }\n ]\n }\n ],\n \"fingerprint\": \"ulgdg-dGCms=\"\n }\n ]\n }"]]