Class PutRoleMappingRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutRoleMappingRequest.Builder>
co.elastic.clients.elasticsearch.security.PutRoleMappingRequest.Builder
- All Implemented Interfaces:
WithJson<PutRoleMappingRequest.Builder>
,ObjectBuilder<PutRoleMappingRequest>
- Enclosing class:
- PutRoleMappingRequest
public static class PutRoleMappingRequest.Builder
extends RequestBase.AbstractBuilder<PutRoleMappingRequest.Builder>
implements ObjectBuilder<PutRoleMappingRequest>
Builder for
PutRoleMappingRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aPutRoleMappingRequest
.Mappings that haveenabled
set tofalse
are ignored when role mapping is performed.Additional metadata that helps define which roles are assigned to each user.Additional metadata that helps define which roles are assigned to each user.Required - The distinct name that identifies the role mapping.Iftrue
(the default) then refresh the affected shards to make this operation visible to search, ifwait_for
then wait for a refresh to make this operation visible to search, iffalse
then do nothing with refreshes.A list of role names that are granted to the users that match the role mapping rules.A list of role names that are granted to the users that match the role mapping rules.roleTemplates
(RoleTemplate value, RoleTemplate... values) A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.roleTemplates
(List<RoleTemplate> list) A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.rules
(RoleMappingRule value) The rules that determine which users should be matched by the mapping.rules
(RoleMappingRuleVariant value) The rules that determine which users should be matched by the mapping.The rules that determine which users should be matched by the mapping.API name:run_as
API name:run_as
protected PutRoleMappingRequest.Builder
self()
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
-
enabled
Mappings that haveenabled
set tofalse
are ignored when role mapping is performed.API name:
enabled
-
metadata
Additional metadata that helps define which roles are assigned to each user. Within the metadata object, keys beginning with_
are reserved for system usage.API name:
metadata
Adds all entries of
map
tometadata
. -
metadata
Additional metadata that helps define which roles are assigned to each user. Within the metadata object, keys beginning with_
are reserved for system usage.API name:
metadata
Adds an entry to
metadata
. -
name
Required - The distinct name that identifies the role mapping. The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way.API name:
name
-
refresh
Iftrue
(the default) then refresh the affected shards to make this operation visible to search, ifwait_for
then wait for a refresh to make this operation visible to search, iffalse
then do nothing with refreshes.API name:
refresh
-
roleTemplates
A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. Exactly one ofroles
orrole_templates
must be specified.API name:
role_templates
Adds all elements of
list
toroleTemplates
. -
roleTemplates
public final PutRoleMappingRequest.Builder roleTemplates(RoleTemplate value, RoleTemplate... values) A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. Exactly one ofroles
orrole_templates
must be specified.API name:
role_templates
Adds one or more values to
roleTemplates
. -
roleTemplates
public final PutRoleMappingRequest.Builder roleTemplates(Function<RoleTemplate.Builder, ObjectBuilder<RoleTemplate>> fn) A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. Exactly one ofroles
orrole_templates
must be specified.API name:
role_templates
Adds a value to
roleTemplates
using a builder lambda. -
roles
A list of role names that are granted to the users that match the role mapping rules. Exactly one ofroles
orrole_templates
must be specified.API name:
roles
Adds all elements of
list
toroles
. -
roles
A list of role names that are granted to the users that match the role mapping rules. Exactly one ofroles
orrole_templates
must be specified.API name:
roles
Adds one or more values to
roles
. -
rules
The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.API name:
rules
-
rules
public final PutRoleMappingRequest.Builder rules(Function<RoleMappingRule.Builder, ObjectBuilder<RoleMappingRule>> fn) The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.API name:
rules
-
rules
The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.API name:
rules
-
runAs
API name:run_as
Adds all elements of
list
torunAs
. -
runAs
API name:run_as
Adds one or more values to
runAs
. -
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutRoleMappingRequest.Builder>
-
build
Builds aPutRoleMappingRequest
.- Specified by:
build
in interfaceObjectBuilder<PutRoleMappingRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-