File: //snap/google-cloud-cli/current/help/man/man1/gcloud_apigee_apis_deploy.1
.TH "GCLOUD_APIGEE_APIS_DEPLOY" 1
.SH "NAME"
.HP
gcloud apigee apis deploy \- deploy an API proxy to an environment
.SH "SYNOPSIS"
.HP
\f5gcloud apigee apis deploy\fR [[\fIREVISION\fR]\ \fB\-\-api\fR=\fIAPI\fR\ \fB\-\-environment\fR=\fIENVIRONMENT\fR\ \fB\-\-organization\fR=\fIORGANIZATION\fR] [\fB\-\-override\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
Deploy an API proxy to an environment.
\f5gcloud apigee apis deploy\fR installs an API proxy revision in an Apigee
runtime environment.
By default, the API proxy's base path must not already be in use by a deployed
proxy in the target environment. To allow Apigee to undeploy any conflicting API
proxy as part of the deployment, use the \f5\-\-override\fR command.
Once a particular revision of an API proxy has been deployed, that revision can
no longer be modified. Any updates to the API proxy must be saved as a new
revision.
.SH "EXAMPLES"
To deploy the latest revision of the API proxy named \f5\fIdemo\fR\fR to the
\f5\fItest\fR\fR environment, given that the API proxy and environment's
matching Cloud Platform project has been set in gcloud settings, run:
.RS 2m
$ gcloud apigee apis deploy \-\-environment=test \-\-api=demo
.RE
To deploy revision 3 of that proxy, owned by an organization named
\f5\fImy\-org\fR\fR, run, and replace any conflicting deployment that might
already exist, run:
.RS 2m
$ gcloud apigee apis deploy 3 \-\-organization=my\-org \e
\-\-environment=test \-\-api=demo \-\-override
.RE
To deploy that proxy and print the resulting deployment as a JSON object, run:
.RS 2m
$ gcloud apigee apis deploy 3 \-\-organization=my\-org \e
\-\-environment=test \-\-api=demo \-\-format=json
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Revision resource \- API proxy revision to be deployed and environment in which
to deploy it. Revisions can either be a positive revision number, or the special
value \f5\fIlatest\fR\fR, which will deploy the latest revision of the API
proxy. If revision is unspecified, the default is \f5\fIlatest\fR\fR. The
arguments in this group can be used to specify the attributes of this resource.
.RS 2m
.TP 2m
[\fIREVISION\fR]
ID of the revision or fully qualified identifier for the revision.
To set the \f5revision\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5REVISION\fR on the command line;
.IP "\(bu" 2m
leave the argument unspecified for it to be chosen automatically.
.RE
.sp
.TP 2m
\fB\-\-api\fR=\fIAPI\fR
API proxy to be deployed. To get a list of available API proxies, run \f5gcloud
apigee apis list\fR.
To set the \f5api\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5REVISION\fR on the command line with a fully specified
name;
.IP "\(bu" 2m
leave the argument unspecified for it to be chosen automatically with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-api\fR on the command line.
.RE
.sp
.TP 2m
\fB\-\-environment\fR=\fIENVIRONMENT\fR
Environment in which to deploy the API proxy. To get a list of available
environments, run \f5gcloud apigee environments list\fR.
To set the \f5environment\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5REVISION\fR on the command line with a fully specified
name;
.IP "\(bu" 2m
leave the argument unspecified for it to be chosen automatically with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-environment\fR on the command line.
.RE
.sp
.TP 2m
\fB\-\-organization\fR=\fIORGANIZATION\fR
Apigee organization of the proxy and environment. If unspecified, the Cloud
Platform project's associated organization will be used.
To set the \f5organization\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5REVISION\fR on the command line with a fully specified
name;
.IP "\(bu" 2m
leave the argument unspecified for it to be chosen automatically with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-organization\fR on the command line;
.IP "\(bu" 2m
set the property [project] or provide the argument [\-\-project] on the command
line, using a Cloud Platform project with an associated Apigee organization.
.RE
.sp
.RE
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-override\fR
Force the deployment of the new revision, overriding any currently deployed
revision that would conflict with it.
If an existing API proxy revision is deployed, set this flag to ensure seamless
deployment with zero downtime. In this case, the existing revision remains
deployed until the new revision is fully deployed.
If unset, \f5gcloud apigee apis deploy\fR will fail unless all conflicting API
proxies are first undeployed from the environment. To do this, run \f5gcloud
apigee apis undeploy\fR on the conflicting deployment.
.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 apigee apis deploy
.RE
.RS 2m
$ gcloud beta apigee apis deploy
.RE