Class PutRoleRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.security.PutRoleRequest
- All Implemented Interfaces:
JsonpSerializable
Create or update roles.
The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. The create or update roles API cannot update roles that are defined in roles files. File-based role management is not available in Elastic Serverless.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutRoleRequest>Json deserializer forPutRoleRequeststatic final Endpoint<PutRoleRequest,PutRoleResponse, ErrorResponse> Endpoint "security.put_role". -
Method Summary
Modifier and TypeMethodDescriptionfinal List<ApplicationPrivileges>A list of application privilege entries.cluster()A list of cluster privileges.final StringOptional description of the role descriptorglobal()An object defining global privileges.final List<IndicesPrivileges>indices()A list of indices permissions entries.metadata()Optional metadata.final Stringname()Required - The name of the role that is being created or updated.static PutRoleRequestfinal Refreshrefresh()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.final List<RemoteClusterPrivileges>A list of remote cluster permissions entries.final List<RemoteIndicesPrivileges>A list of remote indices permissions entries.runAs()A list of users that the owners of this role can impersonate.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidIndicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutRoleRequest -
_ENDPOINT
Endpoint "security.put_role".
-
-
Method Details
-
of
-
applications
A list of application privilege entries.API name:
applications -
cluster
A list of cluster privileges. These privileges define the cluster-level actions for users with this role.API name:
cluster -
description
Optional description of the role descriptorAPI name:
description -
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 -
indices
A list of indices permissions entries.API name:
indices -
metadata
Optional metadata. Within the metadata object, keys that begin with an underscore (_) are reserved for system use.API name:
metadata -
name
Required - The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role.API 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 -
remoteCluster
A list of remote cluster permissions entries.API name:
remote_cluster -
remoteIndices
A list of remote indices permissions entries.NOTE: Remote indices are effective for remote clusters configured with the API key based model. They have no effect for remote clusters configured with the certificate based model.
API name:
remote_indices -
runAs
A list of users that the owners of this role can impersonate. Note: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an emptyrun_asfield, but a non-empty list will be rejected.API name:
run_as -
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 -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupPutRoleRequestDeserializer
protected static void setupPutRoleRequestDeserializer(ObjectDeserializer<PutRoleRequest.Builder> op)
-