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

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

  • Method Details

    • of

    • name

      public final String name()
      Required - API name: name
    • expiration

      @Nullable public final Time expiration()
      Expiration time for the API key. By default, API keys never expire.

      API name: expiration

    • roleDescriptors

      public final List<Map<String,RoleDescriptor>> roleDescriptors()
      The role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token.

      API name: role_descriptors

    • metadata

      public final Map<String,JsonData> metadata()
      Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage.

      API name: metadata

    • 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
    • setupGrantApiKeyDeserializer

      protected static void setupGrantApiKeyDeserializer(ObjectDeserializer<GrantApiKey.Builder> op)