At the time of this writing, there is no built in vRO method to delete an entitlement. I wrote this action to meet that need for a customized approval and governance process
// Inputs to Action // entitlementObject - vCACCAFE:Entitlement // Derive CAFE Host from Entitlement Object var cafeHost = vCACCAFEEntitiesFinder.getHostForEntity(entitlementObject); // Get Entitlement ID var entID = entitlementObject.id // Set API Endpoint and create Rest Client var endpoint = "com.vmware.csp.core.cafe.catalog.api"; var restClient = cafeHost.createRestClient(endpoint); // Create Resource URL by combining "entitlements" with the Entitlements GUID resourceUrl = "entitlements/" + entID; // Execute DELETE call var response = restClient.delete(resourceUrl); //Close REST Client Connection restClient.close();
Leave a Reply