[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-05 (世界標準時間)。"],[],[],null,["# Update BGP route policies\n=========================\n\nThis guide describes how to do the following updates to BGP route policies\nfor Cloud Router:\n\n- [Remove a BGP route policy](#remove-policy)\n- [Add BGP route policy terms](#add-bgp-route-policy-term)\n- [Update BGP route policy terms](#update-bgp-route-policy-term)\n- [Remove BGP route policy terms](#remove-bgp-route-policy-term)\n\nRemove a BGP route policy\n-------------------------\n\nRun the following: \n\n```\ngcloud compute routers remove-route-policy ROUTER_NAME \\\n --policy-name=BGP_ROUTE_POLICY_NAME\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of your Cloud Router\n- \u003cvar translate=\"no\"\u003eBGP_ROUTE_POLICY_NAME\u003c/var\u003e: the name of the BGP route policy that you want to remove\n\nAdd a BGP route policy term\n---------------------------\n\nRun the following: \n\n```\ngcloud compute routers add-route-policy-term ROUTER_NAME \\\n --policy-name=BGP_ROUTE_POLICY_NAME \\\n --priority=PRIORITY \\\n --match=CEL_MATCH_EXPRESSION \\\n --actions=CEL_ACTIONS_EXPRESSION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of your Cloud Router\n- \u003cvar translate=\"no\"\u003eBGP_ROUTE_POLICY_NAME\u003c/var\u003e: the name of the BGP route policy that you want to export\n- \u003cvar translate=\"no\"\u003ePRIORITY\u003c/var\u003e: the order of this term within the BGP route policy, where lower values indicate higher priority. The accepted range is \\[0, 2\\^31).\n- \u003cvar translate=\"no\"\u003eCEL_MATCH_EXPRESSION\u003c/var\u003e: a Common Expression Language (CEL) element that matches routes that this term applies to\n- \u003cvar translate=\"no\"\u003eCEL_ACTIONS_EXPRESSION\u003c/var\u003e: a semicolon separated CEL expression for actions to take for items that match this rule\n\nUpdate a BGP route policy term\n------------------------------\n\nRun the following: \n\n```\ngcloud compute routers update-route-policy-term ROUTER_NAME \\\n --policy-name=BGP_ROUTE_POLICY_NAME \\\n --priority=PRIORITY \\\n --match=CEL_MATCH_EXPRESSION \\\n --actions=CEL_ACTIONS_EXPRESSION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of your Cloud Router\n- \u003cvar translate=\"no\"\u003eBGP_ROUTE_POLICY_NAME\u003c/var\u003e: the name of the BGP route policy that you want to export\n- \u003cvar translate=\"no\"\u003ePRIORITY\u003c/var\u003e: The order of this term within the BGP route policy, where lower values indicate higher priority. The accepted range is \\[0, 2\\^31).\n- \u003cvar translate=\"no\"\u003eCEL_MATCH_EXPRESSION\u003c/var\u003e: a CEL element that matches routes that this term applies to\n- \u003cvar translate=\"no\"\u003eCEL_ACTIONS_EXPRESSION\u003c/var\u003e: a semicolon separated CEL expression for actions to take for items that match this rule\n- \u003cvar translate=\"no\"\u003eBGP_ROUTE_POLICY_NAME\u003c/var\u003e: the name of the BGP route policy that you want to export\n\nRemove a BGP route policy term\n------------------------------\n\nRun the following: \n\n```\ngcloud compute routers remove-route-policy-term ROUTER_NAME \\\n --policy-name=BGP_ROUTE_POLICY_NAME \\\n --priority=PRIORITY\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of your Cloud Router\n- \u003cvar translate=\"no\"\u003eBGP_ROUTE_POLICY_NAME\u003c/var\u003e: the name of the BGP route policy that you want to export\n- \u003cvar translate=\"no\"\u003ePRIORITY\u003c/var\u003e: the order of this term within the BGP route policy, where lower values indicate higher priority. The accepted range is \\[0, 2\\^31)."]]