To update the global forwarding rule "fr-elb" for a load balancer, run:
gdcloud compute forwarding-rules update fr-elb \
--backend-service=network-lb-backend-service \
--load-balancing-scheme=EXTERNAL \
--global
To update the zonal forwarding rule "fr-elb" for a load balancer, run:
gdcloud compute forwarding-rules update fr-elb \
--backend-service=network-lb-backend-service \
--load-balancing-scheme=EXTERNAL
必要標記
--backend-service string Target backend service that receives the traffic. It has to reference a backend service in the same namespace as this forwarding rule.
--load-balancing-scheme string Load balancing scheme of the forwarding rule. Available values are INTERNAL or EXTERNAL.
選用旗標
--global If set, the global forwarding rule is updated.
--zone string Zone to use for this invocation. To preset the zone flag for all commands that require it, run: "gdcloud config set core/zone ZONE". The zone flag is available only in multi-zone environments.
[[["容易理解","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-04 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003egdcloud compute forwarding-rules update\u003c/code\u003e command is used to modify existing forwarding rules for load balancers.\u003c/p\u003e\n"],["\u003cp\u003eYou must specify the forwarding rule name and the target backend service using the \u003ccode\u003e--backend-service\u003c/code\u003e flag.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--load-balancing-scheme\u003c/code\u003e flag is required to define whether the forwarding rule is \u003ccode\u003eINTERNAL\u003c/code\u003e or \u003ccode\u003eEXTERNAL\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--global\u003c/code\u003e flag is used to update a global forwarding rule, whereas omitting it will target a zonal rule.\u003c/p\u003e\n"],["\u003cp\u003eThe available values for the load-balancing-scheme are either INTERNAL or EXTERNAL.\u003c/p\u003e\n"]]],[],null,["# gdcloud compute forwarding-rules update\n\nNAME\n----\n\ngdcloud compute forwarding-rules update - Update forwarding rules for a load balancer.\n\nSYNOPSIS\n--------\n\n gdcloud compute forwarding-rules update FORWARDING_RULE_NAME [flags]\n\n### EXAMPLES\n\n To update the global forwarding rule \"fr-elb\" for a load balancer, run:\n\n gdcloud compute forwarding-rules update fr-elb \\\n --backend-service=network-lb-backend-service \\\n --load-balancing-scheme=EXTERNAL \\\n --global\n\n To update the zonal forwarding rule \"fr-elb\" for a load balancer, run:\n\n gdcloud compute forwarding-rules update fr-elb \\\n --backend-service=network-lb-backend-service \\\n --load-balancing-scheme=EXTERNAL\n\n### REQUIRED FLAGS\n\n --backend-service string Target backend service that receives the traffic. It has to reference a backend service in the same namespace as this forwarding rule.\n --load-balancing-scheme string Load balancing scheme of the forwarding rule. Available values are INTERNAL or EXTERNAL.\n\n### OPTIONAL FLAGS\n\n --global If set, the global forwarding rule is updated.\n --zone string Zone to use for this invocation. To preset the zone flag for all commands that require it, run: \"gdcloud config set core/zone ZONE\". The zone flag is available only in multi-zone environments.\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud) page."]]