Class QueryApiKeysRequest.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • aggregations

      public final QueryApiKeysRequest.Builder aggregations(Map<String,ApiKeyAggregation> map)
      Any aggregations to run over the corpus of returned API keys. Aggregations and queries work together. Aggregations are computed only on the API keys that match the query. This supports only a subset of aggregation types, namely: terms, range, date_range, missing, cardinality, value_count, composite, filter, and filters. Additionally, aggregations only run over the same subset of fields that query works with.

      API name: aggregations

      Adds all entries of map to aggregations.

    • aggregations

      public final QueryApiKeysRequest.Builder aggregations(String key, ApiKeyAggregation value)
      Any aggregations to run over the corpus of returned API keys. Aggregations and queries work together. Aggregations are computed only on the API keys that match the query. This supports only a subset of aggregation types, namely: terms, range, date_range, missing, cardinality, value_count, composite, filter, and filters. Additionally, aggregations only run over the same subset of fields that query works with.

      API name: aggregations

      Adds an entry to aggregations.

    • aggregations

      public final QueryApiKeysRequest.Builder aggregations(String key, ApiKeyAggregationVariant value)
      Any aggregations to run over the corpus of returned API keys. Aggregations and queries work together. Aggregations are computed only on the API keys that match the query. This supports only a subset of aggregation types, namely: terms, range, date_range, missing, cardinality, value_count, composite, filter, and filters. Additionally, aggregations only run over the same subset of fields that query works with.

      API name: aggregations

      Adds an entry to aggregations.

    • aggregations

      Any aggregations to run over the corpus of returned API keys. Aggregations and queries work together. Aggregations are computed only on the API keys that match the query. This supports only a subset of aggregation types, namely: terms, range, date_range, missing, cardinality, value_count, composite, filter, and filters. Additionally, aggregations only run over the same subset of fields that query works with.

      API name: aggregations

      Adds an entry to aggregations using a builder lambda.

    • from

      public final QueryApiKeysRequest.Builder from(@Nullable Integer value)
      The starting document offset. It must not be negative. By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the search_after parameter.

      API name: from

    • query

      public final QueryApiKeysRequest.Builder query(@Nullable ApiKeyQuery value)
      A query to filter which API keys to return. If the query parameter is missing, it is equivalent to a match_all query. The query supports a subset of query types, including match_all, bool, term, terms, match, ids, prefix, wildcard, exists, range, and simple_query_string. You can query the following public information associated with an API key: id, type, name, creation, expiration, invalidated, invalidation, username, realm, and metadata.

      NOTE: The queryable string values associated with API keys are internally mapped as keywords. Consequently, if no analyzer parameter is specified for a match query, then the provided match query string is interpreted as a single keyword value. Such a match query is hence equivalent to a term query.

      API name: query

    • query

      A query to filter which API keys to return. If the query parameter is missing, it is equivalent to a match_all query. The query supports a subset of query types, including match_all, bool, term, terms, match, ids, prefix, wildcard, exists, range, and simple_query_string. You can query the following public information associated with an API key: id, type, name, creation, expiration, invalidated, invalidation, username, realm, and metadata.

      NOTE: The queryable string values associated with API keys are internally mapped as keywords. Consequently, if no analyzer parameter is specified for a match query, then the provided match query string is interpreted as a single keyword value. Such a match query is hence equivalent to a term query.

      API name: query

    • query

      public final QueryApiKeysRequest.Builder query(ApiKeyQueryVariant value)
      A query to filter which API keys to return. If the query parameter is missing, it is equivalent to a match_all query. The query supports a subset of query types, including match_all, bool, term, terms, match, ids, prefix, wildcard, exists, range, and simple_query_string. You can query the following public information associated with an API key: id, type, name, creation, expiration, invalidated, invalidation, username, realm, and metadata.

      NOTE: The queryable string values associated with API keys are internally mapped as keywords. Consequently, if no analyzer parameter is specified for a match query, then the provided match query string is interpreted as a single keyword value. Such a match query is hence equivalent to a term query.

      API name: query

    • searchAfter

      public final QueryApiKeysRequest.Builder searchAfter(List<FieldValue> list)
      The search after definition.

      API name: search_after

      Adds all elements of list to searchAfter.

    • searchAfter

      public final QueryApiKeysRequest.Builder searchAfter(FieldValue value, FieldValue... values)
      The search after definition.

      API name: search_after

      Adds one or more values to searchAfter.

    • searchAfter

      public final QueryApiKeysRequest.Builder searchAfter(String value, String... values)
      The search after definition.

      API name: search_after

      Adds one or more values to searchAfter.

    • searchAfter

      public final QueryApiKeysRequest.Builder searchAfter(long value, long... values)
      The search after definition.

      API name: search_after

      Adds one or more values to searchAfter.

    • searchAfter

      public final QueryApiKeysRequest.Builder searchAfter(double value, double... values)
      The search after definition.

      API name: search_after

      Adds one or more values to searchAfter.

    • searchAfter

      public final QueryApiKeysRequest.Builder searchAfter(boolean value, boolean... values)
      The search after definition.

      API name: search_after

      Adds one or more values to searchAfter.

    • searchAfter

      The search after definition.

      API name: search_after

      Adds a value to searchAfter using a builder lambda.

    • size

      public final QueryApiKeysRequest.Builder size(@Nullable Integer value)
      The number of hits to return. It must not be negative. The size parameter can be set to 0, in which case no API key matches are returned, only the aggregation results. By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the search_after parameter.

      API name: size

    • sort

      public final QueryApiKeysRequest.Builder sort(List<SortOptions> list)
      The sort definition. Other than id, all public fields of an API key are eligible for sorting. In addition, sort can also be applied to the _doc field to sort by index order.

      API name: sort

      Adds all elements of list to sort.

    • sort

      public final QueryApiKeysRequest.Builder sort(SortOptions value, SortOptions... values)
      The sort definition. Other than id, all public fields of an API key are eligible for sorting. In addition, sort can also be applied to the _doc field to sort by index order.

      API name: sort

      Adds one or more values to sort.

    • sort

      The sort definition. Other than id, all public fields of an API key are eligible for sorting. In addition, sort can also be applied to the _doc field to sort by index order.

      API name: sort

      Adds a value to sort using a builder lambda.

    • withLimitedBy

      public final QueryApiKeysRequest.Builder withLimitedBy(@Nullable Boolean value)
      Return the snapshot of the owner user's role descriptors associated with the API key. An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it). An API key cannot retrieve any API key’s limited-by role descriptors (including itself) unless it has manage_api_key or higher privileges.

      API name: with_limited_by

    • withProfileUid

      public final QueryApiKeysRequest.Builder withProfileUid(@Nullable Boolean value)
      Determines whether to also retrieve the profile UID for the API key owner principal. If it exists, the profile UID is returned under the profile_uid response field for each API key.

      API name: with_profile_uid

    • self

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

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