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.BuilderThe email of the user.final PutUserRequest.BuilderSpecifies whether the user is enabled.final PutUserRequest.BuilderThe full name of the user.final PutUserRequest.BuilderArbitrary metadata that you want to associate with the user.final PutUserRequest.BuilderArbitrary metadata that you want to associate with the user.final PutUserRequest.BuilderThe user's password.final PutUserRequest.BuilderpasswordHash(String value) A hash of the user's password.final PutUserRequest.BuilderValid values aretrue,false, andwait_for.final PutUserRequest.BuilderA set of roles the user has.final PutUserRequest.BuilderA set of roles the user has.protected PutUserRequest.Builderself()final PutUserRequest.BuilderRequired - An identifier for the user.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods 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:
metadataAdds all entries of
maptometadata. -
metadata
Arbitrary metadata that you want to associate with the user.API name:
metadataAdds an entry to
metadata. -
password
The user's password. Passwords must be at least 6 characters long. When adding a user, one ofpasswordorpassword_hashis 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.algorithmsetting 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. Thepasswordparameter and thepassword_hashparameter 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:
rolesAdds all elements of
listtoroles. -
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:
rolesAdds 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:
selfin classRequestBase.AbstractBuilder<PutUserRequest.Builder>
-
build
Builds aPutUserRequest.- Specified by:
buildin interfaceObjectBuilder<PutUserRequest>- Throws:
NullPointerException- if some of the required fields are null.
-