Tuesday, April 14, 2015

Adding New Property Sets in vRealize Automation 6

Build Profiles in vRA are a great time saver for managing sets of custom properties that share a common purpose.  When you create Build Profiles, you can add sets of custom properties without having to refer to the vRA documentation with Property Sets.


It would be handy to create your own property sets - for example, I'm always looking up the properties needed to envoke the Guest Agent.  I just can't seem to remember them!

Fortunately, you can do this in vRA by importing an XML document with the properties you want to create a custom Property Set.

The format for the XML is -

<?xml version="1.0" encoding="UTF-16"?>

<Doc>
  <CustomProperties>
    <Property Name="propertyname" DefaultValue="somevalue" Encrypted="true_false" PromptUser="true_false"/>
  </CustomProperties>
</Doc>

So, in my case, I created an XML document for Guest Agent properties as follows -

<?xml version="1.0" encoding="UTF-16"?>

<Doc>
  <CustomProperties>
    <Property Name="VirtualMachine.Admin.UseGuestAgent" DefaultValue="true" Encrypted="false" PromptUser="false"/>
<Property Name="VirtualMachine.Admin.CustomizeGuestOSDely" Encrypted="false" PromptUser="false"/>
<Property Name="VirtualMachine.Customize.WaitComplete" DefaultValue="true" Encrypted="false" PromptUser="false"/>
<Property Name="VirtualMachine.Software0.Name" Encrypted="false" PromptUser="false"/>
<Property Name="VirtualMachine.Software0.ScriptPath" Encrypted="false" PromptUser="false"/>
  </CustomProperties>
</Doc>

From the

Infrastructure tab > Blueprints > Build Profiles section in the UI, you can select the Manage Property Sets link to import the XML (scroll down to the bottom of the screen) -




Once imported, your Property Set is ready to use in Build Profiles -



Friday, April 10, 2015

A Postman Collection of vRealize Automation 6 API Calls

I recently had a demo request for the vRealize Automation 6 consumer REST API and I put together a quick collection of Postman REST calls for the demo so I wouldn't have to type them out or search my history during the demo.  I thought I would share them here as others might find this collection useful when exploring the API.

The collection JSON can be found here.

If you aren't familiar with Postman, it is a REST client add-on for Chrome that you can use to test and view API calls - very powerful and lots of features I haven't even explored.  I prefer the "packaged app" version rather than the Chrome plugin.

As of this posting, I have 8 REST calls in the collection.


  • Authenticate - contains the URI and JSON example form for requesting a bearer token.  You'll need the token for the rest of the actions, so explore this first.  Tokens are good for 24 hours by default.
  • Get IaaS Catalog Items - this is a GET for catalog items with a query on the end of the URL for the service ID associated with your IaaS service.  To get this ID, you'll need to run the "Get All Services" and examine the output to find the IaaS service ID.
  • Get All Services - as explained above.  You can also use this to modify the Catalog Items request to find ASD catalog items, AppService catalog items, etc.
  • Get A Catalog Item - Once you have a catalog item ID, you can update the URL and replace the example ID with your own.
  • Request Catalog Item - You'll need to do a little more work here.  For the most part, the example is good but you will want to modify the JSON request in the body to align with your catalog item's fields.  You'll note that I changed several values for some keys that have to modified with your specific environment information (for example, "CATALOG ITEM ID HERE").  For the request key:values modify the requestData/entries array to match the request form you would normally see in the UI.  An easy way to do this, is to use the CloudClient to export a previous request in JSON format and then you can copy the entries array to use with this request.  You could also use Postman to get a previous request and copy/paste from there, but I just find it easier to use CloudClient for that task because I then have a copy I can refer back to without having to get the request again.
  • Status of Request - You can always go into the vRA UI and check the status of a request, but programatically you can do the same using this call.
  • Resource Action Request - This example can be used to perform an action menu item request. Use the "Get Actions for a Resource" call to obtain the pertinent information for the request.
  • Get Actions for a Resource - As indicated above, precursor for running the "Resource Action Request" but note that the action IDs are global (i.e. Power off a VM) so if you are requesting the same action on multiple machines you don't need to modify the action ID each time.
Hope this helps.  Questions in comments or hit me on twitter @johnddias.