By: Paco Gomez, vCloud Air ‎Senior Solutions Architect

This is a repost from Paco’s personal blog

As a cloud provider, VMware vCloud Air has a rich set of functionality available to users through the Portal and the API. With the release of the vCloud Air Command Line Interface (vca-cli), users now have another method to access the service and leverage the benefits of scripting for automation and documentation purposes.

The vca-cli is a cross-platform tool that exposes the rich vCloud Air API with a command line interface. The following entry is an introduction on how to install and use vca-cli.

vca-cli requires Python and pip. Make sure these two components are properly installed on your system. After that, simply install vca-cli with:

You will also need a vCloud Air account, of course. Log in to vCloud Air with your credentials:


Upon successful login, list the services and virtual datacenters that you have access to:

Once you have identified your datacenter, list the gateway. Usually the gateway has the same name as the datacenter.

For convenience you can configure the default values for servicedatacenterand gateway. These values are stored in the default profile:

At any given time, you can check the status of the vca-cli and the session with the service:

vca-cli can list the vAppsVMs and templates in the datacenter:

One of the most useful features is the ability to work with the datacenter edge gateway. The nat subcommand lists the NAT rules currently defined in the edge gateway:

It is possible to add a NAT rule (DNAT or SNAT):

… and to delete NAT rules:

The vca-cli project has been released by the VMware vCloud Air team under the Open Source Apache2 license. It is hosted on the VMware public GitHub repository. We hope you’ll find it userful and we welcome feedback and contributions. On future posts, I will cover other features of vca-cli.

For more information about vCloud Air, visit

Be sure to subscribe to the the vCloud blog with your favorite RSS reader, or follow our social channels at @vCloud and for the latest updates.