← 全部工具

apigeecli

热度 85 更新于 开发与构建

Apigee management API command-line interface

homebrewauto-collected

安装

Homebrew
brew install apigeecli

通过 Homebrew 安装。

About apigeecli

This is a tool to interact with Apigee APIs for Apigee hybrid and Apigee's managed offering. The tool lets you manage (Create,Get, List, Update, Delete, Export and Import) Apigee entities like proxies, products etc. The tools also helps you create Service Accounts in Google IAM to operate Apigee hybrid runtime.

Installation

apigeecli is a binary and you can download the appropriate one for your platform from here. Run this script to download & install the latest version (on Linux or Darwin)

curl -L https://raw.githubusercontent.com/apigee/apigeecli/main/downloadLatest.sh | sh -

Getting Started

User Tokens

The simplest way to get started with apigeecli is

token=$(gcloud auth print-access-token)

apigeecli orgs list -t $token

Metadata OAuth2 Access Tokens

If you are using apigeecli on Cloud Shell, GCE instances, Cloud Build, then you can use the metadata to get the access token

apigeecli orgs list --metadata-token

Google Default Application Credentials

You can configure gcloud to setup/create default application credentials. These credentials can be used by apigeecli.

gcloud auth application-default login
apigeecli orgs list --default-token

or through impersonation

gcloud auth application-default login --impersonate-service-account <SA>
apigeecli orgs list --default-token

Access Token Generation from Service Accounts