BrettK1
Enthusiast
Enthusiast

vRA 8.8 - Get VMs in a Deployment - Deployment Action Completed Subscription

Trying to replicate another 7.6 feature in 8.x.  'Change Owner' of a VM in 7.6 would set the vSphere Custom Attribute 'VRM Owner'.

I have vRO workflow to set the VRM Owner on Post Deployment Create.  Now I'd like to change that as appropriate when a Day 2 'Deployment Action Completed' of 'Change Owner' occurs, seems like it should be super simple, except very little data about the deployment is sent to vRO, ack!

How does one get a list of VM Resources that are part of the Deployment?
Is this something that can be done in vRO (where I need it now) and/or ABX?

0 Kudos
3 Replies
Ankush11s
VMware Employee
VMware Employee

To get the List of resources , you can make get call to below API
Get:  /deployment/api/deployments/{deploymentId}/resources
and To perform action on deployment
Post :  /deployment/api/deployments/{deploymentId}/requests
To perform an action on resource of deployment 
Post Call :  /deployment/api/deployments/{deploymentId}/resources/{resourceId}/requests

0 Kudos
BrettK1
Enthusiast
Enthusiast

I was afraid you'd say that - I have done no REST work at all, and given the integration between vRO and vRA (and ABX being PART of vRA), on top of multiple markup and programing languages, this seems like a LOT of unnecessary overhead.  I had read about REST being a possibility, but what little I've learned about it seems like it is not a good 'in app' solution, and is more suited to external programmatic users.  Could be I'm missing a lot, but the whole idea of a 24 hour bearer token (or even 'yet another credential' to update if you extend the bearer token longer) makes this quite messy and prone to more 'upkeep failures'?

0 Kudos
Ankush11s
VMware Employee
VMware Employee

I have suggested the api which can be used with vra plugin in vRO 
sorry i do not follow when bearer token part , If you are using the Plugin , Plugin will take of bearer token , If outside of plugin Bearer token is only valid for 30 mins or so.

0 Kudos