Class SearchAccess.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<SearchAccess.Builder>
co.elastic.clients.elasticsearch.security.SearchAccess.Builder
- All Implemented Interfaces:
WithJson<SearchAccess.Builder>,ObjectBuilder<SearchAccess>
- Enclosing class:
- SearchAccess
public static class SearchAccess.Builder
extends WithJsonObjectBuilderBase<SearchAccess.Builder>
implements ObjectBuilder<SearchAccess>
Builder for
SearchAccess.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal SearchAccess.BuilderallowRestrictedIndices(Boolean value) Set totrueif using wildcard or regular expressions for patterns that cover restricted indices.build()Builds aSearchAccess.final SearchAccess.BuilderfieldSecurity(FieldSecurity value) The document fields that the owners of the role have read access to.final SearchAccess.BuilderThe document fields that the owners of the role have read access to.final SearchAccess.BuilderRequired - A list of indices (or index name patterns) to which the permissions in this entry apply.final SearchAccess.BuilderRequired - A list of indices (or index name patterns) to which the permissions in this entry apply.final SearchAccess.Builderquery(IndicesPrivilegesQuery value) A search query that defines the documents the owners of the role have access to.final SearchAccess.BuilderA search query that defines the documents the owners of the role have access to.protected SearchAccess.Builderself()Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods 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 -
fieldSecurity
public final SearchAccess.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 -
names
Required - A list of indices (or index name patterns) to which the permissions in this entry apply.API name:
namesAdds all elements of
listtonames. -
names
Required - A list of indices (or index name patterns) to which the permissions in this entry apply.API name:
namesAdds one or more values to
names. -
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.API name:
query -
query
public final SearchAccess.Builder query(Function<IndicesPrivilegesQuery.Builder, ObjectBuilder<IndicesPrivilegesQuery>> fn) 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.API name:
query -
allowRestrictedIndices
Set totrueif 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 thenameslist, Elasticsearch checks privileges against these indices regardless of the value set forallow_restricted_indices.API name:
allow_restricted_indices -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<SearchAccess.Builder>
-
build
Builds aSearchAccess.- Specified by:
buildin interfaceObjectBuilder<SearchAccess>- Throws:
NullPointerException- if some of the required fields are null.
-