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.Builder
addApplications(ApplicationPrivileges value)
Add a value toapplications(List)
, creating the list if needed.PutRoleRequest.Builder
addApplications(java.util.function.Function<ApplicationPrivileges.Builder,ObjectBuilder<ApplicationPrivileges>> fn)
Add a value toapplications(List)
, creating the list if needed.PutRoleRequest.Builder
addCluster(ClusterPrivilege value)
Add a value tocluster(List)
, creating the list if needed.PutRoleRequest.Builder
addIndices(IndicesPrivileges value)
Add a value toindices(List)
, creating the list if needed.PutRoleRequest.Builder
addIndices(java.util.function.Function<IndicesPrivileges.Builder,ObjectBuilder<IndicesPrivileges>> fn)
Add a value toindices(List)
, creating the list if needed.PutRoleRequest.Builder
addRunAs(java.lang.String value)
Add a value torunAs(List)
, creating the list if needed.PutRoleRequest.Builder
applications(ApplicationPrivileges... value)
A list of application privilege entries.PutRoleRequest.Builder
applications(java.util.function.Function<ApplicationPrivileges.Builder,ObjectBuilder<ApplicationPrivileges>> fn)
Setapplications(List)
to a singleton list.PutRoleRequest.Builder
applications(java.util.List<ApplicationPrivileges> value)
A list of application privilege entries.PutRoleRequest
build()
Builds aPutRoleRequest
.PutRoleRequest.Builder
cluster(ClusterPrivilege... value)
A list of cluster privileges.PutRoleRequest.Builder
cluster(java.util.List<ClusterPrivilege> value)
A list of cluster privileges.PutRoleRequest.Builder
global(java.util.Map<java.lang.String,JsonData> value)
An object defining global privileges.PutRoleRequest.Builder
indices(IndicesPrivileges... value)
A list of indices permissions entries.PutRoleRequest.Builder
indices(java.util.function.Function<IndicesPrivileges.Builder,ObjectBuilder<IndicesPrivileges>> fn)
Setindices(List)
to a singleton list.PutRoleRequest.Builder
indices(java.util.List<IndicesPrivileges> value)
A list of indices permissions entries.PutRoleRequest.Builder
metadata(java.util.Map<java.lang.String,JsonData> value)
Optional metadata.PutRoleRequest.Builder
name(java.lang.String value)
Required - Role namePutRoleRequest.Builder
putGlobal(java.lang.String key, JsonData value)
Add a key/value toglobal(Map)
, creating the map if needed.PutRoleRequest.Builder
putMetadata(java.lang.String key, JsonData value)
Add a key/value tometadata(Map)
, creating the map if needed.PutRoleRequest.Builder
refresh(jakarta.json.JsonValue value)
Iftrue
(the default) then refresh the affected shards to make this operation visible to search, ifwait_for
then wait for a refresh to make this operation visible to search, iffalse
then do nothing with refreshes.PutRoleRequest.Builder
runAs(java.lang.String... value)
A list of users that the owners of this role can impersonate.PutRoleRequest.Builder
runAs(java.util.List<java.lang.String> value)
A list of users that the owners of this role can impersonate.PutRoleRequest.Builder
transientMetadata(TransientMetadata value)
Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security.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.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_for
then wait for a refresh to make this operation visible to search, iffalse
then 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. Ifenabled
isfalse
, 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. Ifenabled
isfalse
, the role is ignored, but is still listed in the response from the authenticate API.API name:
transient_metadata
-
build
Builds aPutRoleRequest
.- Specified by:
build
in interfaceObjectBuilder<PutRoleRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-