/**
  * Creates a new user entity from a username, password, array of roles, and additional arguments.
  * Usernames must be unique on the system, and are used by the user to log in to Splunk.
  *
  * @param name The username for the new user entity.
  * @param password The password for the new user entity.
  * @param roles Array of roles to assign to the new user entity.
  * @param args A map of additional arguments for the new user entity.
  * @return The new user entity.
  */
 public User create(String name, String password, String[] roles, Map args) {
   args = Args.create(args);
   args.put("password", password);
   args.put("roles", roles);
   return create(name.toLowerCase(), args);
 }
Beispiel #2
0
 /**
  * Performs the requested action on this job. Valid values are: "pause", "unpause", "finalize",
  * "cancel", "touch", "setttl", "setpriority", "enablepreview", and "disablepreview".
  *
  * @param action The action to perform.
  * @param args Optional arguments for this action ("ttl" and "priority").
  * @return The search job.
  */
 public Job control(String action, Map args) {
   args = Args.create(args).add("action", action);
   service.post(actionPath("control"), args);
   invalidate();
   return this;
 }