Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond

Working with Windows Azure Virtual Machines using the Windows Azure REST API

BizTalk Blogs

This group is for blogs related to BizTalk Server. This includes Community Syndicated blogs and Stephen W. Thomas’s blog.

Stephen W. Thomas BizTalk MVP

Insight and guidance on Microsoft BizTalk Server, Windows Azure, Infrastructure as a Service, and related Microsoft technologies.

Working with Windows Azure Virtual Machines using the Windows Azure REST API

Rate This
  • Comments 3

Windows Azure has a rich Management REST API for working with all types of artifacts. 

Continuing on with my current theme of working with the Windows Azure Virtual Machines in Preview mode I came across some details of the REST API that might be helpful to others.  While the documentation seem to say for GET and DELETE requests you need something like the following:<subscription-id>/services/hostedservices/<service-name>/deployments/<deployment-name>/roles/<role-name>

The only way I have been able to get GET and DELTET requests to work is using “deploymentslots” rather than “deployments”.  Below are some samples of REST API URLs that I was able to get working.  For POST requests, the below URL was used for sending in a Request Body with additional XML payload details.

The Service Name listed below is the Virtual Machine Name witch is usually the same as the underlying Service (although it does not have to be).  When deleting, the Hosted Service used by the Virtual Machine may also need to be deleted.

To Get Virtual Machine Details – HTTP GET<Subscription-ID>/services/hostedservices/<Service-Name>/deploymentslots/Production

To Delete a Virtual Machine – HTTP DELETE<Subscription-ID>/services/hostedservices/<Service-Name>/deploymentslots/Production

Make sure to clean up the Service – HTTP DELETE<Subscription-ID>/services/hostedservices/<Service-Name>

To Import a VM State (exported using PowerShell): – HTTP POST with Post Body<Subscription-ID>/services/hostedservices/<Service-Name>/deployments

To use Quick Create or Create a New Virtual Machine: – HTTP POST with Post Body<Subscription-ID>/services/hostedservices/<Service-Name>/deployments

Hope this helps someone else trying to use the Windows Azure REST API with Virtual Machines.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Post
  • Windows Azure has a few different, somewhat disjointed, toolsets available to create new artifacts and

  • While I call this post “tricks” for deleting a Windows Azure Virtual Machine it really is not a trick

  • Thanks Stephen for the help here.

Page 1 of 1 (3 items)