/** * Creates a new Splunk user from a username, password, and role. * 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. * @param password The password for the new user. * @param role The role to assign to the new user. * @return The new user. */ public User create(String name, String password, String role) { return create(name, password, role, null); }
/** * Creates a new Splunk user from a username, password, and array of * roles. * 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. * @param password The password for the new user. * @param roles Array of roles to assign to the new user. * @return The new user. */ public User create(String name, String password, String[] roles) { return create(name, password, roles, null); }
/** * Creates a new Splunk user from a username, password, role, 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. * @param password The password for the new user. * @param role The role to assign to the new user. * @param args A map of additional arguments. For a list of available * parameters, see * <a href="http://dev.splunk.com/view/SP-CAAAEJ7#userauthparams" * target="_blank">User authentication parameters</a> on * <a href="http://dev.splunk.com/view/SP-CAAAEJ7" * target="_blank">dev.splunk.com</a>. * @return The new user. */ public User create(String name, String password, String role, Map args) { args = Args.create(args); args.put("password", password); args.put("roles", role); return create(name.toLowerCase(), args); }
/** * Creates a new Splunk user 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. * @param password The password for the new user. * @param roles Array of roles to assign to the new user. * @param args A map of additional arguments. For a list of available * parameters, see * <a href="http://dev.splunk.com/view/SP-CAAAEJ7#userauthparams" * target="_blank">User authentication parameters</a> on * <a href="http://dev.splunk.com/view/SP-CAAAEJ7" * target="_blank">dev.splunk.com</a> . * @return The new user. */ 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); } }