HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/help/man/man1/gcloud_compute_routers_upload-route-policy.1
.TH "GCLOUD_COMPUTE_ROUTERS_UPLOAD\-ROUTE\-POLICY" 1



.SH "NAME"
.HP
gcloud compute routers upload\-route\-policy \- upload a route policy into a Compute Engine router



.SH "SYNOPSIS"
.HP
\f5gcloud compute routers upload\-route\-policy\fR \fINAME\fR \fB\-\-file\-name\fR=\fIFILE_NAME\fR [\fB\-\-file\-format\fR=\fIFILE_FORMAT\fR] [\fB\-\-policy\-name\fR=\fIPOLICY_NAME\fR] [\fB\-\-region\fR=\fIREGION\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fBgcloud compute routers upload\-route\-policy\fR uploads a route policy into a
Compute Engine router.



.SH "EXAMPLES"

To upload a route policy \f5my\-import\-policy\fR from a file
\f5my\-import\-policy.yaml\fR into a router \f5my\-router\fR in region
\f5us\-central1\fR, run:

.RS 2m
$ gcloud compute routers upload\-route\-policy my\-router \e
\-\-region=us\-central1 \-\-policy\-name=my\-import\-policy \e
\-\-file\-name=my\-import\-policy.yaml"
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
\fINAME\fR

Name of the router to upload.


.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-file\-name\fR=\fIFILE_NAME\fR

Local path to the file defining the policy


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-file\-format\fR=\fIFILE_FORMAT\fR

Format of the file passed to \-\-file\-name. \fIFILE_FORMAT\fR must be one of:
\fBjson\fR, \fByaml\fR.

.TP 2m
\fB\-\-policy\-name\fR=\fIPOLICY_NAME\fR

Name of the route policy to add/replace.

.TP 2m
\fB\-\-region\fR=\fIREGION\fR

Region of the router to upload. If not specified, you might be prompted to
select a region (interactive mode only).

To avoid prompting when this flag is omitted, you can set the
\f5\fIcompute/region\fR\fR property:

.RS 2m
$ gcloud config set compute/region REGION
.RE

A list of regions can be fetched by running:

.RS 2m
$ gcloud compute regions list
.RE

To unset the property, run:

.RS 2m
$ gcloud config unset compute/region
.RE

Alternatively, the region can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_REGION\fR\fR.


.RE
.sp

.SH "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 \fB$ gcloud help\fR for details.



.SH "NOTES"

These variants are also available:

.RS 2m
$ gcloud alpha compute routers upload\-route\-policy
.RE

.RS 2m
$ gcloud beta compute routers upload\-route\-policy
.RE