Recently, VMware Cloud on AWS announced the ability to create an SDDC with a single host. This is a pretty exciting update, one many of our users have been asking for. Along with the ability to deploy an SDDC in a much smaller footprint, you get access to all the automation and developer resources available such as the built-in Developer Center and the RESTful APIs.
In a post on the VMware Code blog, Automating VMware Cloud on AWS One Host SDDC Deployments, some code samples were debuted by Alan Renouf and myself to deploy a single host SDDC using direct REST calls, PowerCLI, and DCLI. This time, I’m focusing on automating the invitation process of users to the organization. This too has been a big request from our users and we’re in luck, because there’s an API to accomplish this!
User Invitation Automation Script Overview
The script can be found on the PowerCLI Community repository and the VMware Code Sample Exchange titled ‘VMWonAWS_InviteUsers.ps1’. It uses PowerShell to make REST API calls directly to the VMware Cloud on AWS service in order to authenticate, create a new user request, then display the successful invite request along with some pertinent information. The ‘newUserEmail’ parameter accepts both string and array-based input then validates said input to verify it is indeed an email address.
One item to note before downloading and running the script, you’ll need to update the variables on lines 28 and 29 with your API token and Org ID. With those updated, let’s check a couple examples of it in action!
User Invitation Script
VMware Cloud on AWS has an immense amount of functionality available through RESTful APIs, including methods to manage users within our Organization! In this blog post, we covered a newly released script which helps to automate the process of inviting new users.
Download the script from the VMware Code Sample Exchange today, and let us know in the comments what you’re looking to automate with VMware Cloud on AWS next!