gcloud beta apigee apis import

INFORMATION
gcloud beta apigee apis import is supported in universe domain universe; however, some of the values used in the help text may not be available. Command examples may not work as-is and may requires changes before execution.
NAME
gcloud beta apigee apis import - import an Apigee API proxy from local files
SYNOPSIS
gcloud beta apigee apis import (API : --organization=ORGANIZATION) (--from-bundle=BUNDLE_PATH     | --from-template=TEMPLATE_PATH) [GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) Import an Apigee API proxy from local files.

gcloud beta apigee apis import uploads local files describing an API proxy to Apigee. If an API proxy with the given name already exists, a new revision is created; otherwise, a new API proxy is created.

The API proxy source is provided in exactly one of two formats. Use --from-bundle to upload a standard Apigee API proxy bundle ZIP, which stores the proxy configuration under an apiproxy/ directory. Use --from-template to build the API proxy from an Apigee Feature Template: a YAML file that composes one or more reusable feature files into an API proxy, which is compiled into a bundle locally before being uploaded.

When using --from-template, any feature files referenced by the template must reside in the same directory as the template file.

To use this command, the active Cloud Platform project must have an associated Apigee organization, or an organization must be specified with --organization or by providing the fully qualified name (FQN) of the API proxy as the API proxy name (for example, organizations/my-org/apis/helloworld).

EXAMPLES
To import an API proxy named helloworld from a local bundle ZIP, given that the matching Cloud Platform project has been set in gcloud settings, run:
gcloud beta apigee apis import helloworld --from-bundle=./helloworld.zip

To import an API proxy named helloworld from an Apigee Feature Template, run:

gcloud beta apigee apis import helloworld --from-template=./helloworld.yaml

To import that API proxy into an organization named my-org, run:

gcloud beta apigee apis import helloworld --organization=my-org --from-template=./helloworld.yaml

Alternatively, the organization can be specified by providing the fully qualified name of the API proxy:

gcloud beta apigee apis import organizations/my-org/apis/helloworld --from-bundle=./helloworld.zip

To import that API proxy and print the resulting revision as a JSON object, run:

gcloud beta apigee apis import helloworld --from-template=./helloworld.yaml --format=json
POSITIONAL ARGUMENTS
API proxy resource - API proxy to import or update. If an API proxy with this name already exists in the organization, a new revision is created. The arguments in this group can be used to specify the attributes of this resource.

This must be specified.

API
ID of the API proxy or fully qualified identifier for the API proxy.

To set the api attribute:

  • provide the argument API on the command line.

This positional argument must be specified if any of the other arguments in this group are specified.

--organization=ORGANIZATION
Apigee organization containing the API proxy. If unspecified, the Cloud Platform project's associated organization will be used.

To set the organization attribute:

  • provide the argument API on the command line with a fully specified name;
  • provide the argument --organization on the command line;
  • set the property [project] or provide the argument [--project] on the command line, using a Cloud Platform project with an associated Apigee organization.
REQUIRED FLAGS
Source from which to import the API proxy.

Exactly one of these must be specified:

--from-bundle=BUNDLE_PATH
Path to an Apigee API proxy bundle ZIP file to import the API proxy from.

The ZIP file must contain the API proxy configuration under an apiproxy/ directory.

--from-template=TEMPLATE_PATH
Path to an Apigee Feature Template YAML file to import the API proxy from.

The template composes one or more reusable feature files into an API proxy. Any feature files referenced by the template must reside in the same directory as the template file. The template is compiled into an API proxy bundle locally before being uploaded to Apigee.

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 help for details.

NOTES
This command is currently in beta and might change without notice. This variant is also available:
gcloud alpha apigee apis import