Get catalog item resources provisioned from a vRA request
/*
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);
}