Nitfix for SecurityDocumentationIT dad6f1c9fe

This commit is contained in:
Albert Zaharovits 2018-12-10 11:54:50 +02:00
parent dad6f1c9fe
commit 0b1e7e96be
1 changed files with 3 additions and 1 deletions

View File

@ -1023,12 +1023,14 @@ public class SecurityDocumentationIT extends ESRestHighLevelClientTestCase {
RestHighLevelClient client = highLevelClient();
{
// tag::put-role-execute
// tag::put-role-request
final Role role = Role.builder()
.name("testPutRole")
.clusterPrivileges(randomSubsetOf(1, Role.ClusterPrivilegeName.ALL_ARRAY))
.build();
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);
// end::put-role-execute
// tag::put-role-response