class AssetDetailController {

    @ApiOperation(httpMethod = "GET", value = "Get the average cost and total cost for an EC2 resource")
    @GetMapping(value = "v1/{assetGroup}/ec2/{resourceId}/cost")
    public ResponseEntity<Object> getEc2ResourceSummary(
            @PathVariable(name = "resourceId", required = true) String resourceId) throws DataException {
        Map<String, Object> dataMap = null;
        try {
            dataMap = assetService.getEC2AvgAndTotalCost(resourceId);

        } catch (Exception e) {
            LOGGER.error("Error in getEc2ResourceSummary ",e);
            dataMap = new HashMap<>();
        }
        return ResponseUtils.buildSucessResponse(dataMap);
    }

}