Class PutRoleRequest

All Implemented Interfaces:

public class PutRoleRequest
extends RequestBase
implements JsonpSerializable
Adds and updates roles in the native realm.
See Also:
API specification
  • Field Details

  • Method Details

    • of

      public static PutRoleRequest of​(java.util.function.Function<PutRoleRequest.Builder,​ObjectBuilder<PutRoleRequest>> fn)
    • applications

      public final java.util.List<ApplicationPrivileges> applications()
      A list of application privilege entries.

      API name: applications

    • cluster

      public final java.util.List<ClusterPrivilege> cluster()
      A list of cluster privileges. These privileges define the cluster-level actions for users with this role.

      API name: cluster

    • global

      public final java.util.Map<java.lang.String,​JsonData> 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

      public final java.util.List<IndicesPrivileges> indices()
      A list of indices permissions entries.

      API name: indices

    • metadata

      public final java.util.Map<java.lang.String,​JsonData> metadata()
      Optional metadata. Within the metadata object, keys that begin with an underscore (_) are reserved for system use.

      API name: metadata

    • name

      public final java.lang.String name()
      Required - Role name

      API name: name

    • refresh

      @Nullable public final Refresh refresh()
      If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.

      API name: refresh

    • runAs

      public final java.util.List<java.lang.String> runAs()
      A list of users that the owners of this role can impersonate.

      API name: run_as

    • transientMetadata

      @Nullable public final TransientMetadata 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. If enabled is false, the role is ignored, but is still listed in the response from the authenticate API.

      API name: transient_metadata

    • serialize

      public void serialize​( generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal​( generator, JsonpMapper mapper)
    • setupPutRoleRequestDeserializer

      protected static void setupPutRoleRequestDeserializer​(ObjectDeserializer<PutRoleRequest.Builder> op)