All Implemented Interfaces:
Writeable, org.elasticsearch.core.RefCounted, TaskAwareRequest, TransportRequest

public final class CreateApiKeyRequest extends AbstractCreateApiKeyRequest
Request class used for the creation of an API key. The request requires a name to be provided and optionally an expiration time and permission limitation can be provided.
  • Constructor Details

    • CreateApiKeyRequest

      public CreateApiKeyRequest()
    • CreateApiKeyRequest

      public CreateApiKeyRequest(String name, @Nullable List<RoleDescriptor> roleDescriptors, @Nullable org.elasticsearch.core.TimeValue expiration)
      Create API Key request constructor
      Parameters:
      name - name for the API key
      roleDescriptors - list of RoleDescriptors
      expiration - to specify expiration for the API key
    • CreateApiKeyRequest

      public CreateApiKeyRequest(String name, @Nullable List<RoleDescriptor> roleDescriptors, @Nullable org.elasticsearch.core.TimeValue expiration, @Nullable Map<String,Object> metadata)
  • Method Details