java.lang.Object
co.elastic.clients.elasticsearch.security.ApiKey
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class ApiKey extends Object implements JsonpSerializable
See Also:
  • Field Details

  • Method Details

    • of

    • creation

      @Nullable public final Long creation()
      Creation time for the API key in milliseconds.

      API name: creation

    • expiration

      @Nullable public final Long expiration()
      Expiration time for the API key in milliseconds.

      API name: expiration

    • id

      public final String id()
      Required - Id for the API key

      API name: id

    • invalidated

      @Nullable public final Boolean invalidated()
      Invalidation status for the API key. If the key has been invalidated, it has a value of true. Otherwise, it is false.

      API name: invalidated

    • name

      public final String name()
      Required - Name of the API key.

      API name: name

    • realm

      @Nullable public final String realm()
      Realm name of the principal for which this API key was created.

      API name: realm

    • username

      @Nullable public final String username()
      Principal for which this API key was created

      API name: username

    • metadata

      public final Map<String,JsonData> metadata()
      Metadata of the API key

      API name: metadata

    • roleDescriptors

      public final Map<String,RoleDescriptor> roleDescriptors()
      The role descriptors assigned to this API key when it was created or last updated. An empty role descriptor means the API key inherits the owner user’s permissions.

      API name: role_descriptors

    • limitedBy

      public final List<Map<String,RoleDescriptor>> limitedBy()
      The owner user’s permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions.

      API name: limited_by

    • sort

      public final List<FieldValue> sort()
      API name: _sort
    • serialize

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

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupApiKeyDeserializer

      protected static void setupApiKeyDeserializer(ObjectDeserializer<ApiKey.Builder> op)