- INFORMATION
-
gcloud alpha network-services egress-routings updateis not available in universe domainuniverse. - NAME
-
- gcloud alpha network-services egress-routings update - update an Egress Routing
- SYNOPSIS
-
-
gcloud alpha network-services egress-routings update(EGRESS_ROUTING:--location=LOCATION) [--async] [--description=DESCRIPTION] [--etag=ETAG] [--gateway=GATEWAY] [--labels=[LABELS,…] |--update-labels=[UPDATE_LABELS,…]--clear-labels|--remove-labels=REMOVE_LABELS] [--sources=[workloadUri=WORKLOADURI] |--add-sources=[workloadUri=WORKLOADURI]--clear-sources|--remove-sources=[workloadUri=WORKLOADURI]] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)Updates the parameters of a single EgressRouting. - EXAMPLES
-
To update the description of the egress routing
my-egress-routingin locationus-central1, run:gcloud alpha network-services egress-routings update my-egress-routing --location=us-central1 --description="Updated description" - POSITIONAL ARGUMENTS
-
-
EgressRouting resource - Identifier. Name of the EgressRouting resource. It
matches pattern
projects/*/locations/*/egressRoutings/<egress_routing>. The arguments in this group can be used to specify the attributes of this resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways.To set the
projectattribute:-
provide the argument
egress_routingon the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
This must be specified.
EGRESS_ROUTING-
ID of the egressRouting or fully qualified identifier for the egressRouting.
To set the
egress_routingattribute:-
provide the argument
egress_routingon the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location=LOCATION-
The location id of the egressRouting resource.
To set the
locationattribute:-
provide the argument
egress_routingon the command line with a fully specified name; -
provide the argument
--locationon the command line.
-
provide the argument
-
provide the argument
-
EgressRouting resource - Identifier. Name of the EgressRouting resource. It
matches pattern
- FLAGS
-
--async- Return immediately, without waiting for the operation in progress to complete.
--description=DESCRIPTION- A free-text description of the resource. Max length 1024 characters.
--etag=ETAG- Etag of the resource. If this is provided, it must match the server's etag. If the provided etag does not match the server's etag, the request will fail with a 409 ABORTED error.
--gateway=GATEWAY-
The resource URI of the Policy Enforcement Point (PEP) where matched egress
traffic must be redirected.
Supported PEPs: Secure Web Proxy (SWP), managed Agent Gateway, and SWP behind Service Attachment (PSC-SA).
Examples: "//networkservices.googleapis.com/projects/{project_id}/locations/{location}/gateways/{gateway_id}" "//networkservices.googleapis.com/projects/{project_id}/locations/{location}/agentGateways/{agent_gateway_id}" "//compute.googleapis.com/projects/{project_id}/regions/{region}/serviceAttachments/{service_attachment_id}"
-
Update labels.
At most one of these can be specified:
--labels=[LABELS,…]-
Set labels to new value. Set of label tags associated with the EgressRouting
resource.
KEY-
Keys must start with a lowercase character and contain only hyphens
(
-), underscores (_), lowercase characters, and numbers. VALUE-
Values must contain only hyphens (
-), underscores (_), lowercase characters, and numbers.
Shorthand Example:--labels=string=string
JSON Example:--labels='{"string": "string"}'
File Example:--labels=path_to_file.(yaml|json)
-
Or at least one of these can be specified:
--update-labels=[UPDATE_LABELS,…]-
Update labels value or add key value pair. Set of label tags associated with the
EgressRouting resource.
KEY-
Keys must start with a lowercase character and contain only hyphens
(
-), underscores (_), lowercase characters, and numbers. VALUE-
Values must contain only hyphens (
-), underscores (_), lowercase characters, and numbers.
Shorthand Example:--update-labels=string=string
JSON Example:--update-labels='{"string": "string"}'
File Example:--update-labels=path_to_file.(yaml|json)
-
At most one of these can be specified:
--clear-labels- Clear labels value and set to empty map.
--remove-labels=REMOVE_LABELS-
Remove existing value from map labels. Sets
remove_labelsvalue.Shorthand Example:--remove-labels=string,stringJSON Example:--remove-labels=["string"]
File Example:--remove-labels=path_to_file.(yaml|json)
-
Update sources.
At most one of these can be specified:
--sources=[workloadUri=WORKLOADURI]-
Set sources to new value. Specifies the source workloads to which this
EgressRouting rule applies.
workloadUri-
The resource URI representing the workload, project, or location. Examples:
"//cloudresourcemanager.googleapis.com/projects/{project_id}"
"//run.googleapis.com/projects/{project_id}/locations/{location}/services/
" "//container.googleapis.com/projects/{project_id}/locations/{location}/clusters/{cluster_name}" "//container.googleapis.com/projects/{project_id}/locations/{location}/clusters/{cluster_name}/k8s/namespaces/{namespace}".
JSON Example:--sources=workloadUri=string --sources=workloadUri=string
File Example:--sources='[{"workloadUri": "string"}]'
--sources=path_to_file.(yaml|json)
-
Or at least one of these can be specified:
- --add-sources
=[workloadUri=WORKLOADURI] -
Add new value to sources list. Specifies the source workloads to which this
EgressRouting rule applies.
- workloadUri
- The resource URI representing the workload, project, or location. Examples: "//cloudresourcemanager.googleapis.com/projects/{project_id}" "//run.googleapis.com/projects/{project_id}/locations/{location}/services/" "//container.googleapis.com/projects/{project_id}/locations/{location}/clusters/{cluster_name}" "//container.googleapis.com/projects/{project_id}/locations/{location}/clusters/{cluster_name}/k8s/namespaces/{namespace}".
Shorthand Example:--add-sources=workloadUri=string --add-sources=workloadUri=string
JSON Example:--add-sources='[{"workloadUri": "string"}]'
File Example:--add-sources=path_to_file.(yaml|json)
- workloadUri
-
At most one of these can be specified:
--clear-sources- Clear sources value and set to empty list.
--remove-sources=[workloadUri=WORKLOADURI]-
Remove existing value from sources list. Specifies the source workloads to which
this EgressRouting rule applies.
workloadUri-
The resource URI representing the workload, project, or location. Examples:
"//cloudresourcemanager.googleapis.com/projects/{project_id}"
"//run.googleapis.com/projects/{project_id}/locations/{location}/services/
" "//container.googleapis.com/projects/{project_id}/locations/{location}/clusters/{cluster_name}" "//container.googleapis.com/projects/{project_id}/locations/{location}/clusters/{cluster_name}/k8s/namespaces/{namespace}".
JSON Example:--remove-sources=workloadUri=string --remove-sources=workloadUri=string
File Example:--remove-sources='[{"workloadUri": "string"}]'
--remove-sources=path_to_file.(yaml|json)
- --add-sources
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - API REFERENCE
-
This command uses the
networkservices/v1alpha1API. The full documentation for this API can be found at: https://cloud.google.com/networking - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha network-services egress-routings update
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-10-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-06 UTC."],[],[]]