Nitfix for SecurityDocumentationIT dad6f1c9fe
This commit is contained in:
parent
dad6f1c9fe
commit
0b1e7e96be
|
@ -1023,12 +1023,14 @@ public class SecurityDocumentationIT extends ESRestHighLevelClientTestCase {
|
||||||
RestHighLevelClient client = highLevelClient();
|
RestHighLevelClient client = highLevelClient();
|
||||||
|
|
||||||
{
|
{
|
||||||
// tag::put-role-execute
|
// tag::put-role-request
|
||||||
final Role role = Role.builder()
|
final Role role = Role.builder()
|
||||||
.name("testPutRole")
|
.name("testPutRole")
|
||||||
.clusterPrivileges(randomSubsetOf(1, Role.ClusterPrivilegeName.ALL_ARRAY))
|
.clusterPrivileges(randomSubsetOf(1, Role.ClusterPrivilegeName.ALL_ARRAY))
|
||||||
.build();
|
.build();
|
||||||
final PutRoleRequest request = new PutRoleRequest(role, RefreshPolicy.NONE);
|
final PutRoleRequest request = new PutRoleRequest(role, RefreshPolicy.NONE);
|
||||||
|
// end::put-role-request
|
||||||
|
// tag::put-role-execute
|
||||||
final PutRoleResponse response = client.security().putRole(request, RequestOptions.DEFAULT);
|
final PutRoleResponse response = client.security().putRole(request, RequestOptions.DEFAULT);
|
||||||
// end::put-role-execute
|
// end::put-role-execute
|
||||||
// tag::put-role-response
|
// tag::put-role-response
|
||||||
|
|
Loading…
Reference in New Issue