Class PutRoleRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch.security.PutRoleRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<PutRoleRequest>
- Enclosing class:
- PutRoleRequest
public static class PutRoleRequest.Builder extends java.lang.Object implements ObjectBuilder<PutRoleRequest>
Builder for
PutRoleRequest.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description PutRoleRequest.BuilderaddApplications(ApplicationPrivileges value)Add a value toapplications(List), creating the list if needed.PutRoleRequest.BuilderaddApplications(java.util.function.Function<ApplicationPrivileges.Builder,ObjectBuilder<ApplicationPrivileges>> fn)Add a value toapplications(List), creating the list if needed.PutRoleRequest.BuilderaddCluster(ClusterPrivilege value)Add a value tocluster(List), creating the list if needed.PutRoleRequest.BuilderaddIndices(IndicesPrivileges value)Add a value toindices(List), creating the list if needed.PutRoleRequest.BuilderaddIndices(java.util.function.Function<IndicesPrivileges.Builder,ObjectBuilder<IndicesPrivileges>> fn)Add a value toindices(List), creating the list if needed.PutRoleRequest.BuilderaddRunAs(java.lang.String value)Add a value torunAs(List), creating the list if needed.PutRoleRequest.Builderapplications(ApplicationPrivileges... value)A list of application privilege entries.PutRoleRequest.Builderapplications(java.util.function.Function<ApplicationPrivileges.Builder,ObjectBuilder<ApplicationPrivileges>> fn)Setapplications(List)to a singleton list.PutRoleRequest.Builderapplications(java.util.List<ApplicationPrivileges> value)A list of application privilege entries.PutRoleRequestbuild()Builds aPutRoleRequest.PutRoleRequest.Buildercluster(ClusterPrivilege... value)A list of cluster privileges.PutRoleRequest.Buildercluster(java.util.List<ClusterPrivilege> value)A list of cluster privileges.PutRoleRequest.Builderglobal(java.util.Map<java.lang.String,JsonData> value)An object defining global privileges.PutRoleRequest.Builderindices(IndicesPrivileges... value)A list of indices permissions entries.PutRoleRequest.Builderindices(java.util.function.Function<IndicesPrivileges.Builder,ObjectBuilder<IndicesPrivileges>> fn)Setindices(List)to a singleton list.PutRoleRequest.Builderindices(java.util.List<IndicesPrivileges> value)A list of indices permissions entries.PutRoleRequest.Buildermetadata(java.util.Map<java.lang.String,JsonData> value)Optional metadata.PutRoleRequest.Buildername(java.lang.String value)Required - Role namePutRoleRequest.BuilderputGlobal(java.lang.String key, JsonData value)Add a key/value toglobal(Map), creating the map if needed.PutRoleRequest.BuilderputMetadata(java.lang.String key, JsonData value)Add a key/value tometadata(Map), creating the map if needed.PutRoleRequest.Builderrefresh(jakarta.json.JsonValue value)Iftrue(the default) then refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalsethen do nothing with refreshes.PutRoleRequest.BuilderrunAs(java.lang.String... value)A list of users that the owners of this role can impersonate.PutRoleRequest.BuilderrunAs(java.util.List<java.lang.String> value)A list of users that the owners of this role can impersonate.PutRoleRequest.BuildertransientMetadata(TransientMetadata value)Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security.PutRoleRequest.BuildertransientMetadata(java.util.function.Function<TransientMetadata.Builder,ObjectBuilder<TransientMetadata>> fn)Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security.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
-
name
Required - Role nameAPI name:
name -
refresh
Iftrue(the default) then refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalsethen do nothing with refreshes.API name:
refresh -
applications
A list of application privilege entries.API name:
applications -
applications
A list of application privilege entries.API name:
applications -
addApplications
Add a value toapplications(List), creating the list if needed. -
applications
public PutRoleRequest.Builder applications(java.util.function.Function<ApplicationPrivileges.Builder,ObjectBuilder<ApplicationPrivileges>> fn)Setapplications(List)to a singleton list. -
addApplications
public PutRoleRequest.Builder addApplications(java.util.function.Function<ApplicationPrivileges.Builder,ObjectBuilder<ApplicationPrivileges>> fn)Add a value toapplications(List), creating the list if needed. -
cluster
A list of cluster privileges. These privileges define the cluster-level actions for users with this role.API name:
cluster -
cluster
A list of cluster privileges. These privileges define the cluster-level actions for users with this role.API name:
cluster -
addCluster
Add a value tocluster(List), creating the list if needed. -
global
An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.API name:
global -
putGlobal
Add a key/value toglobal(Map), creating the map if needed. -
indices
A list of indices permissions entries.API name:
indices -
indices
A list of indices permissions entries.API name:
indices -
addIndices
Add a value toindices(List), creating the list if needed. -
indices
public PutRoleRequest.Builder indices(java.util.function.Function<IndicesPrivileges.Builder,ObjectBuilder<IndicesPrivileges>> fn)Setindices(List)to a singleton list. -
addIndices
public PutRoleRequest.Builder addIndices(java.util.function.Function<IndicesPrivileges.Builder,ObjectBuilder<IndicesPrivileges>> fn)Add a value toindices(List), creating the list if needed. -
metadata
Optional metadata. Within the metadata object, keys that begin with an underscore (_) are reserved for system use.API name:
metadata -
putMetadata
Add a key/value tometadata(Map), creating the map if needed. -
runAs
A list of users that the owners of this role can impersonate.API name:
run_as -
runAs
A list of users that the owners of this role can impersonate.API name:
run_as -
addRunAs
Add a value torunAs(List), creating the list if needed. -
transientMetadata
Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. Ifenabledisfalse, the role is ignored, but is still listed in the response from the authenticate API.API name:
transient_metadata -
transientMetadata
public PutRoleRequest.Builder transientMetadata(java.util.function.Function<TransientMetadata.Builder,ObjectBuilder<TransientMetadata>> fn)Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. Ifenabledisfalse, the role is ignored, but is still listed in the response from the authenticate API.API name:
transient_metadata -
build
Builds aPutRoleRequest.- Specified by:
buildin interfaceObjectBuilder<PutRoleRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-