class EmrRestController extends HerdBaseController {

    @RequestMapping(value = "/emrClusters/namespaces/{namespace}/emrClusterDefinitionNames/{emrClusterDefinitionName}/emrClusterNames/{emrClusterName}",
        method = RequestMethod.DELETE)
    @Secured(SecurityFunctions.FN_EMR_CLUSTERS_DELETE)
    public EmrCluster terminateEmrCluster(@PathVariable("namespace") String namespace,
        @PathVariable("emrClusterDefinitionName") String emrClusterDefinitionName, @PathVariable("emrClusterName") String emrClusterName,
        @RequestParam(value = "overrideTerminationProtection", required = false, defaultValue = "false") Boolean overrideTerminationProtection,
        @RequestParam(value = "emrClusterId", required = false) String emrClusterId, @RequestParam(value = "accountId", required = false) String accountId)
        throws Exception
    {
        EmrClusterAlternateKeyDto alternateKey =
            EmrClusterAlternateKeyDto.builder().withNamespace(namespace).withEmrClusterDefinitionName(emrClusterDefinitionName)
                .withEmrClusterName(emrClusterName).build();

        return emrService.terminateCluster(alternateKey, overrideTerminationProtection, emrClusterId, accountId);
    }

}