private ResourceInstance createAlertTargetResource(Long targetId) {
    Map<Resource.Type, String> mapIds = new HashMap<>();

    mapIds.put(Resource.Type.AlertTarget,
        null == targetId ? null : targetId.toString());

    return createResource(Resource.Type.AlertTarget, mapIds);
  }
Create a request capturing the target ID and resource type for an
{@link AlertTarget}.

@param targetId
         the unique ID of the target to create the query for (not
         {@code null}).
@return the instance of the query.
ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java