private ResourceInstance createResourceInstance(Long alertId) {
    Map<Resource.Type, String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.Cluster, clusterName);
    mapIds.put(Resource.Type.Service, serviceName);
    mapIds.put(Resource.Type.Host, hostName);
    mapIds.put(Resource.Type.Alert, null == alertId ? null : alertId.toString());

    return createResource(Resource.Type.Alert, mapIds);
  }
Create an alert resource instance
@param alertId the alert id, if requesting a specific one
@return the resource instance
ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertService.java