Class QueryRoleRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.security.QueryRoleRequest
- All Implemented Interfaces:
JsonpSerializable
Find roles with a query.
Get roles in a paginated manner. The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. You can optionally filter the results with a query. Also, the results can be paginated and sorted.
- 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<QueryRoleRequest>
Json deserializer forQueryRoleRequest
static final Endpoint<QueryRoleRequest,
QueryRoleResponse, ErrorResponse> Endpoint "security.query_role
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Integer
from()
The starting document offset.static QueryRoleRequest
final RoleQuery
query()
A query to filter which roles to return.final List<FieldValue>
The search after definition.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
final Integer
size()
The number of hits to return.final List<SortOptions>
sort()
The sort definition.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forQueryRoleRequest
-
_ENDPOINT
Endpoint "security.query_role
".
-
-
Method Details
-
of
public static QueryRoleRequest of(Function<QueryRoleRequest.Builder, ObjectBuilder<QueryRoleRequest>> fn) -
from
The starting document offset. It must not be negative. By default, you cannot page through more than 10,000 hits using thefrom
andsize
parameters. To page through more hits, use thesearch_after
parameter.API name:
from
-
query
A query to filter which roles to return. If the query parameter is missing, it is equivalent to amatch_all
query. The query supports a subset of query types, includingmatch_all
,bool
,term
,terms
,match
,ids
,prefix
,wildcard
,exists
,range
, andsimple_query_string
. You can query the following information associated with roles:name
,description
,metadata
,applications.application
,applications.privileges
, andapplications.resources
.API name:
query
-
searchAfter
The search after definition.API name:
search_after
-
size
The number of hits to return. It must not be negative. By default, you cannot page through more than 10,000 hits using thefrom
andsize
parameters. To page through more hits, use thesearch_after
parameter.API name:
size
-
sort
The sort definition. You can sort onusername
,roles
, orenabled
. In addition, sort can also be applied to the_doc
field to sort by index order.API name:
sort
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupQueryRoleRequestDeserializer
protected static void setupQueryRoleRequestDeserializer(ObjectDeserializer<QueryRoleRequest.Builder> op)
-