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 haveenabledset tofalseare 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_forthen wait for a refresh to make this operation visible to search, iffalsethen 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_asAPI name:run_asprotected PutRoleMappingRequest.Builderself()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
-
enabled
Mappings that haveenabledset tofalseare 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:
metadataAdds all entries of
maptometadata. -
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:
metadataAdds 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_forthen wait for a refresh to make this operation visible to search, iffalsethen 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 ofrolesorrole_templatesmust be specified.API name:
role_templatesAdds all elements of
listtoroleTemplates. -
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 ofrolesorrole_templatesmust be specified.API name:
role_templatesAdds 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 ofrolesorrole_templatesmust be specified.API name:
role_templatesAdds a value to
roleTemplatesusing a builder lambda. -
roles
A list of role names that are granted to the users that match the role mapping rules. Exactly one ofrolesorrole_templatesmust be specified.API name:
rolesAdds all elements of
listtoroles. -
roles
A list of role names that are granted to the users that match the role mapping rules. Exactly one ofrolesorrole_templatesmust be specified.API name:
rolesAdds 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_asAdds all elements of
listtorunAs. -
runAs
API name:run_asAdds one or more values to
runAs. -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<PutRoleMappingRequest.Builder>
-
build
Builds aPutRoleMappingRequest.- Specified by:
buildin interfaceObjectBuilder<PutRoleMappingRequest>- Throws:
NullPointerException- if some of the required fields are null.
-