Class IndicesPrivileges.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<IndicesPrivileges.Builder>
co.elastic.clients.elasticsearch.security.IndicesPrivileges.Builder
- All Implemented Interfaces:
WithJson<IndicesPrivileges.Builder>
,ObjectBuilder<IndicesPrivileges>
- Enclosing class:
- IndicesPrivileges
public static class IndicesPrivileges.Builder
extends WithJsonObjectBuilderBase<IndicesPrivileges.Builder>
implements ObjectBuilder<IndicesPrivileges>
Builder for
IndicesPrivileges
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowRestrictedIndices
(Boolean value) Set totrue
if using wildcard or regular expressions for patterns that cover restricted indices.build()
Builds aIndicesPrivileges
.fieldSecurity
(FieldSecurity value, FieldSecurity... values) The document fields that the owners of the role have read access to.The document fields that the owners of the role have read access to.fieldSecurity
(List<FieldSecurity> list) The document fields that the owners of the role have read access to.Required - A list of indices (or index name patterns) to which the permissions in this entry apply.Required - A list of indices (or index name patterns) to which the permissions in this entry apply.privileges
(String value, String... values) Required - The index level privileges that owners of the role have on the specified indices.privileges
(List<String> list) Required - The index level privileges that owners of the role have on the specified indices.A search query that defines the documents the owners of the role have access to.A search query that defines the documents the owners of the role have access to.protected IndicesPrivileges.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
-
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
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 IndicesPrivileges.Builder fieldSecurity(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
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
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
A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. Use a custom query of type ("template"
,RoleTemplateScript
) for templated queriesAPI name:
query
-
query
A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. Use a custom query of type ("template"
,RoleTemplateScript
) for templated queriesAPI name:
query
-
allowRestrictedIndices
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<IndicesPrivileges.Builder>
-
build
Builds aIndicesPrivileges
.- Specified by:
build
in interfaceObjectBuilder<IndicesPrivileges>
- Throws:
NullPointerException
- if some of the required fields are null.
-