[[reference-security-query_role]] //////// =========================================================================================================================== || || || || || || || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || || || || || || This file is autogenerated, DO NOT send pull requests that changes this file directly. || || You should update the script that does the generation, which can be found in: || || https://github.com/elastic/elastic-client-generator-js || || || || You can run the script with the following command: || || npm run elasticsearch -- --version || || || || || || || =========================================================================================================================== //////// [discrete] === client.security.queryRole Find roles with a query. Get roles in a paginated manner. You can optionally filter the results with a query. {ref}/security-api-query-role.html[{es} documentation] [discrete] ==== Function signature [source,ts] ---- (SecurityQueryRoleRequest, options?): Promise ---- [discrete] ===== `SecurityQueryRoleRequest` [source,ts] ---- interface SecurityQueryRoleRequest extends <> { query?: SecurityQueryRoleRoleQueryContainer from?: <> sort?: <> size?: <> search_after?: <> } ---- [discrete] ===== `SecurityQueryRoleResponse` [source,ts] ---- interface SecurityQueryRoleResponse { total: <> count: <> roles: SecurityQueryRoleQueryRole[] } ----