Class PutRoleMappingRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.security.PutRoleMappingRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class PutRoleMappingRequest
extends RequestBase
implements JsonpSerializable
Create or update role mappings.
Role mappings define which roles are assigned to each user. Each mapping has rules that identify users and a list of roles that are granted to those users. The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.
This API does not create roles. Rather, it maps users to existing roles. Roles can be created by using the create or update roles API or roles files.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutRoleMappingRequest>
Json deserializer forPutRoleMappingRequest
static final Endpoint<PutRoleMappingRequest,
PutRoleMappingResponse, ErrorResponse> Endpoint "security.put_role_mapping
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
enabled()
API name:enabled
metadata()
API name:metadata
final String
name()
Required - Role-mapping namestatic PutRoleMappingRequest
final Refresh
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.roles()
API name:roles
final List<RoleTemplate>
API name:role_templates
final RoleMappingRule
rules()
API name:rules
runAs()
API name:run_as
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutRoleMappingRequest
-
_ENDPOINT
Endpoint "security.put_role_mapping
".
-
-
Method Details
-
of
public static PutRoleMappingRequest of(Function<PutRoleMappingRequest.Builder, ObjectBuilder<PutRoleMappingRequest>> fn) -
enabled
API name:enabled
-
metadata
API name:metadata
-
name
Required - Role-mapping nameAPI 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
API name:role_templates
-
roles
API name:roles
-
rules
API name:rules
-
runAs
API name:run_as
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupPutRoleMappingRequestDeserializer
protected static void setupPutRoleMappingRequestDeserializer(ObjectDeserializer<PutRoleMappingRequest.Builder> op)
-