Class PutRoleRequest.Builder

All Implemented Interfaces:
WithJson<PutRoleRequest.Builder>, ObjectBuilder<PutRoleRequest>
Enclosing class:
PutRoleRequest

public static class PutRoleRequest.Builder extends RequestBase.AbstractBuilder<PutRoleRequest.Builder> implements ObjectBuilder<PutRoleRequest>
Builder for PutRoleRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • applications

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

      API name: applications

      Adds all elements of list to applications.

    • applications

      public final PutRoleRequest.Builder applications(ApplicationPrivileges value, ApplicationPrivileges... values)
      A list of application privilege entries.

      API name: applications

      Adds one or more values to applications.

    • applications

      A list of application privilege entries.

      API name: applications

      Adds a value to applications using a builder lambda.

    • cluster

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

      API name: cluster

      Adds all elements of list to cluster.

    • cluster

      public final PutRoleRequest.Builder cluster(String value, String... values)
      A list of cluster privileges. These privileges define the cluster-level actions for users with this role.

      API name: cluster

      Adds one or more values to cluster.

    • description

      public final PutRoleRequest.Builder description(@Nullable String value)
      Optional description of the role descriptor

      API name: description

    • global

      public final PutRoleRequest.Builder global(Map<String,JsonData> map)
      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

      Adds all entries of map to global.

    • global

      public final PutRoleRequest.Builder global(String key, JsonData value)
      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

      Adds an entry to global.

    • indices

      public final PutRoleRequest.Builder indices(List<IndicesPrivileges> list)
      A list of indices permissions entries.

      API name: indices

      Adds all elements of list to indices.

    • indices

      public final PutRoleRequest.Builder indices(IndicesPrivileges value, IndicesPrivileges... values)
      A list of indices permissions entries.

      API name: indices

      Adds one or more values to indices.

    • indices

      A list of indices permissions entries.

      API name: indices

      Adds a value to indices using a builder lambda.

    • metadata

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

      API name: metadata

      Adds all entries of map to metadata.

    • metadata

      public final PutRoleRequest.Builder metadata(String key, JsonData value)
      Optional metadata. Within the metadata object, keys that begin with an underscore (_) are reserved for system use.

      API name: metadata

      Adds an entry to metadata.

    • name

      public final PutRoleRequest.Builder name(String value)
      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

      public final PutRoleRequest.Builder refresh(@Nullable Refresh value)
      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

    • remoteCluster

      public final PutRoleRequest.Builder remoteCluster(List<RemoteClusterPrivileges> list)
      A list of remote cluster permissions entries.

      API name: remote_cluster

      Adds all elements of list to remoteCluster.

    • remoteCluster

      public final PutRoleRequest.Builder remoteCluster(RemoteClusterPrivileges value, RemoteClusterPrivileges... values)
      A list of remote cluster permissions entries.

      API name: remote_cluster

      Adds one or more values to remoteCluster.

    • remoteCluster

      A list of remote cluster permissions entries.

      API name: remote_cluster

      Adds a value to remoteCluster using a builder lambda.

    • remoteIndices

      public final PutRoleRequest.Builder remoteIndices(List<RemoteIndicesPrivileges> list)
      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

      Adds all elements of list to remoteIndices.

    • remoteIndices

      public final PutRoleRequest.Builder remoteIndices(RemoteIndicesPrivileges value, RemoteIndicesPrivileges... values)
      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

      Adds one or more values to remoteIndices.

    • 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

      Adds a value to remoteIndices using a builder lambda.

    • runAs

      public final PutRoleRequest.Builder runAs(List<String> list)
      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 empty run_as field, but a non-empty list will be rejected.

      API name: run_as

      Adds all elements of list to runAs.

    • runAs

      public final PutRoleRequest.Builder runAs(String value, String... values)
      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 empty run_as field, but a non-empty list will be rejected.

      API name: run_as

      Adds one or more values to runAs.

    • transientMetadata

      public final PutRoleRequest.Builder transientMetadata(Map<String,JsonData> map)
      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

      Adds all entries of map to transientMetadata.

    • transientMetadata

      public final PutRoleRequest.Builder transientMetadata(String key, JsonData value)
      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

      Adds an entry to transientMetadata.

    • self

      protected PutRoleRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<PutRoleRequest.Builder>
    • build

      public PutRoleRequest build()
      Builds a PutRoleRequest.
      Specified by:
      build in interface ObjectBuilder<PutRoleRequest>
      Throws:
      NullPointerException - if some of the required fields are null.