Class UserIndicesPrivileges.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<UserIndicesPrivileges.Builder>
co.elastic.clients.elasticsearch.security.UserIndicesPrivileges.Builder
- All Implemented Interfaces:
WithJson<UserIndicesPrivileges.Builder>
,ObjectBuilder<UserIndicesPrivileges>
- Enclosing class:
- UserIndicesPrivileges
public static class UserIndicesPrivileges.Builder extends WithJsonObjectBuilderBase<UserIndicesPrivileges.Builder> implements ObjectBuilder<UserIndicesPrivileges>
Builder for
UserIndicesPrivileges
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description UserIndicesPrivileges.Builder
allowRestrictedIndices(boolean value)
Required - Set totrue
if using wildcard or regular expressions for patterns that cover restricted indices.UserIndicesPrivileges
build()
Builds aUserIndicesPrivileges
.UserIndicesPrivileges.Builder
fieldSecurity(FieldSecurity value, FieldSecurity... values)
The document fields that the owners of the role have read access to.UserIndicesPrivileges.Builder
fieldSecurity(java.util.function.Function<FieldSecurity.Builder,ObjectBuilder<FieldSecurity>> fn)
The document fields that the owners of the role have read access to.UserIndicesPrivileges.Builder
fieldSecurity(java.util.List<FieldSecurity> list)
The document fields that the owners of the role have read access to.UserIndicesPrivileges.Builder
names(java.lang.String value, java.lang.String... values)
Required - A list of indices (or index name patterns) to which the permissions in this entry apply.UserIndicesPrivileges.Builder
names(java.util.List<java.lang.String> list)
Required - A list of indices (or index name patterns) to which the permissions in this entry apply.UserIndicesPrivileges.Builder
privileges(IndexPrivilege value, IndexPrivilege... values)
Required - The index level privileges that owners of the role have on the specified indices.UserIndicesPrivileges.Builder
privileges(java.util.List<IndexPrivilege> list)
Required - The index level privileges that owners of the role have on the specified indices.UserIndicesPrivileges.Builder
query(Query value, Query... values)
Search queries that define the documents the user has access to.UserIndicesPrivileges.Builder
query(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
Search queries that define the documents the user has access to.UserIndicesPrivileges.Builder
query(java.util.List<Query> list)
Search queries that define the documents the user has access to.protected UserIndicesPrivileges.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
fieldSecurity
The document fields that the owners of the role have read access to.API name:
field_security
Adds all elements of
list
tofieldSecurity
. -
fieldSecurity
public final UserIndicesPrivileges.Builder fieldSecurity(FieldSecurity value, FieldSecurity... values)The document fields that the owners of the role have read access to.API name:
field_security
Adds one or more values to
fieldSecurity
. -
fieldSecurity
public final UserIndicesPrivileges.Builder fieldSecurity(java.util.function.Function<FieldSecurity.Builder,ObjectBuilder<FieldSecurity>> fn)The document fields that the owners of the role have read access to.API name:
field_security
Adds a value to
fieldSecurity
using a builder lambda. -
names
Required - A list of indices (or index name patterns) to which the permissions in this entry apply.API name:
names
Adds all elements of
list
tonames
. -
names
public final UserIndicesPrivileges.Builder names(java.lang.String value, java.lang.String... values)Required - A list of indices (or index name patterns) to which the permissions in this entry apply.API name:
names
Adds one or more values to
names
. -
privileges
Required - The index level privileges that owners of the role have on the specified indices.API name:
privileges
Adds all elements of
list
toprivileges
. -
privileges
public final UserIndicesPrivileges.Builder privileges(IndexPrivilege value, IndexPrivilege... values)Required - The index level privileges that owners of the role have on the specified indices.API name:
privileges
Adds one or more values to
privileges
. -
query
Search queries that define the documents the user has access to. A document within the specified indices must match these queries for it to be accessible by the owners of the role. Use a custom query of type ("template"
,RoleTemplateScript
) for templated queriesAPI name:
query
Adds all elements of
list
toquery
. -
query
Search queries that define the documents the user has access to. A document within the specified indices must match these queries for it to be accessible by the owners of the role. Use a custom query of type ("template"
,RoleTemplateScript
) for templated queriesAPI name:
query
Adds one or more values to
query
. -
query
public final UserIndicesPrivileges.Builder query(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)Search queries that define the documents the user has access to. A document within the specified indices must match these queries for it to be accessible by the owners of the role. Use a custom query of type ("template"
,RoleTemplateScript
) for templated queriesAPI name:
query
Adds a value to
query
using a builder lambda. -
allowRestrictedIndices
Required - Set totrue
if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in thenames
list, Elasticsearch checks privileges against these indices regardless of the value set forallow_restricted_indices
.API name:
allow_restricted_indices
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<UserIndicesPrivileges.Builder>
-
build
Builds aUserIndicesPrivileges
.- Specified by:
build
in interfaceObjectBuilder<UserIndicesPrivileges>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-