mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
[HLRC] Put Role (#36209)
This commit adds support for the put role API in the java high level rest client.
This commit is contained in:
parent
bf2c61d2d0
commit
dad6f1c9fe
18 changed files with 665 additions and 88 deletions
37
docs/java-rest/high-level/security/put-role.asciidoc
Normal file
37
docs/java-rest/high-level/security/put-role.asciidoc
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
--
|
||||
:api: put-role
|
||||
:request: PutRoleRequest
|
||||
:response: PutRoleResponse
|
||||
--
|
||||
|
||||
[id="{upid}-{api}"]
|
||||
=== Put Role API
|
||||
|
||||
[id="{upid}-{api}-request"]
|
||||
==== Put Role Request
|
||||
|
||||
The +{request}+ class is used to create or update a role in the Native Roles
|
||||
Store. The request contains a single role, which encapsulates privileges over
|
||||
resources. A role can be assigned to an user using the
|
||||
<<{upid}-put-role-mapping, Put Role Mapping API>>.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request]
|
||||
--------------------------------------------------
|
||||
|
||||
include::../execution.asciidoc[]
|
||||
|
||||
[id="{upid}-{api}-response"]
|
||||
==== Put Role Response
|
||||
|
||||
The returned +{response}+ contains a single field, `created`. This field
|
||||
serves as an indication if the role was created or if an existing entry was
|
||||
updated.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-response]
|
||||
--------------------------------------------------
|
||||
<1> `created` is a boolean indicating whether the role was created or updated
|
|
@ -385,6 +385,7 @@ The Java High Level REST Client supports the following Security APIs:
|
|||
* <<java-rest-high-security-enable-user>>
|
||||
* <<java-rest-high-security-disable-user>>
|
||||
* <<java-rest-high-security-change-password>>
|
||||
* <<{upid}-put-role>>
|
||||
* <<{upid}-get-roles>>
|
||||
* <<java-rest-high-security-delete-role>>
|
||||
* <<{upid}-clear-roles-cache>>
|
||||
|
@ -406,6 +407,7 @@ include::security/delete-user.asciidoc[]
|
|||
include::security/enable-user.asciidoc[]
|
||||
include::security/disable-user.asciidoc[]
|
||||
include::security/change-password.asciidoc[]
|
||||
include::security/put-role.asciidoc[]
|
||||
include::security/get-roles.asciidoc[]
|
||||
include::security/delete-role.asciidoc[]
|
||||
include::security/delete-privileges.asciidoc[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue