Last active
March 7, 2016 15:03
-
-
Save chelnak/146d5147dc56eeb75fec to your computer and use it in GitHub Desktop.
Get catalog item resources provisioned from a vRA request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Name: getResourcesProvisionedByRequest | |
| Input: vCACCAFEHost - vCACCAFE:VCACHost | |
| Input: requestId - String | |
| Output: void | |
| Description: Get catalog item resources provisioned from a request | |
| */ | |
| var _requestId = "bc147f2c-1995-442b-8fc9-c769ec9bf9f4"; | |
| //Create an instance of vCACCAFECatalogClient | |
| var _client = vCACCAFEHost.createCatalogClient(); | |
| //Create an instance of vCACCAFECatalogConsumerRequestService | |
| var _requestService = _client.getCatalogConsumerRequestService(); | |
| //getResourcesProvisionedByRequest returns type vCACCAFEPagedResources .getContent() will return an array of vCACCAFECatalogResource | |
| var _resources = _requestService.getResourcesProvisionedByRequest(_requestId, null).getContent(); | |
| //Loop through results | |
| for (var i = 0; i < _resources.length; i++){ | |
| System.log("Id: " + _resources[i].id); | |
| System.log("Name: " + _resources[i].name); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment