Class PutUserRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutUserRequest.Builder>
co.elastic.clients.elasticsearch.security.PutUserRequest.Builder
- All Implemented Interfaces:
WithJson<PutUserRequest.Builder>
,ObjectBuilder<PutUserRequest>
- Enclosing class:
- PutUserRequest
public static class PutUserRequest.Builder
extends RequestBase.AbstractBuilder<PutUserRequest.Builder>
implements ObjectBuilder<PutUserRequest>
Builder for
PutUserRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aPutUserRequest
.final PutUserRequest.Builder
The email of the user.final PutUserRequest.Builder
Specifies whether the user is enabled.final PutUserRequest.Builder
The full name of the user.final PutUserRequest.Builder
Arbitrary metadata that you want to associate with the user.final PutUserRequest.Builder
Arbitrary metadata that you want to associate with the user.final PutUserRequest.Builder
The user's password.final PutUserRequest.Builder
passwordHash
(String value) A hash of the user's password.final PutUserRequest.Builder
Valid values aretrue
,false
, andwait_for
.final PutUserRequest.Builder
A set of roles the user has.final PutUserRequest.Builder
A set of roles the user has.protected PutUserRequest.Builder
self()
final PutUserRequest.Builder
Required - An identifier for the user.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
email
The email of the user.API name:
email
-
enabled
Specifies whether the user is enabled.API name:
enabled
-
fullName
The full name of the user.API name:
full_name
-
metadata
Arbitrary metadata that you want to associate with the user.API name:
metadata
Adds all entries of
map
tometadata
. -
metadata
Arbitrary metadata that you want to associate with the user.API name:
metadata
Adds an entry to
metadata
. -
password
The user's password. Passwords must be at least 6 characters long. When adding a user, one ofpassword
orpassword_hash
is required. When updating an existing user, the password is optional, so that other fields on the user (such as their roles) may be updated without modifying the user's passwordAPI name:
password
-
passwordHash
A hash of the user's password. This must be produced using the same hashing algorithm as has been configured for password storage. For more details, see the explanation of thexpack.security.authc.password_hashing.algorithm
setting in the user cache and password hash algorithm documentation. Using this parameter allows the client to pre-hash the password for performance and/or confidentiality reasons. Thepassword
parameter and thepassword_hash
parameter cannot be used in the same request.API name:
password_hash
-
refresh
Valid values aretrue
,false
, andwait_for
. These values have the same meaning as in the index API, but the default value for this API is true.API name:
refresh
-
roles
A set of roles the user has. The roles determine the user's access permissions. To create a user without any roles, specify an empty list ([]
).API name:
roles
Adds all elements of
list
toroles
. -
roles
A set of roles the user has. The roles determine the user's access permissions. To create a user without any roles, specify an empty list ([]
).API name:
roles
Adds one or more values to
roles
. -
username
Required - An identifier for the user.NOTE: Usernames must be at least 1 and no more than 507 characters. They can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block. Leading or trailing whitespace is not allowed.
API name:
username
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutUserRequest.Builder>
-
build
Builds aPutUserRequest
.- Specified by:
build
in interfaceObjectBuilder<PutUserRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-