class AssetDetailController {

    @ApiOperation(httpMethod = "GET", value = "Get the details from a particular data source for a particular  resource")
    @GetMapping(value = "v1/{assetGroup}/{resourceType}/{resourceId}/details")
    public ResponseEntity<Object> getEc2ResourceDetail(@PathVariable(name = "assetGroup", required = true) String ag,
            @PathVariable(name = "resourceType", required = true) String resourceType,
            @PathVariable(name = "resourceId", required = true) String resourceId) {
        Map<String, Object> assetDetail;

        try {
            if ("ec2".equals(resourceType)) {
                assetDetail = assetService.getEc2ResourceDetail(ag, resourceId);
            } else {
                assetDetail = assetService.getGenericResourceDetail(ag, resourceType, resourceId);
            }
        } catch (Exception e) {
            LOGGER.error("Error in getEc2ResourceDetail ",e);
            assetDetail = new HashMap<>();
        }
        return ResponseUtils.buildSucessResponse(assetDetail);
    }

}