Class GetApiKeyRequest

java.lang.Object
org.elasticsearch.client.security.GetApiKeyRequest
All Implemented Interfaces:
Validatable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public final class GetApiKeyRequest
extends java.lang.Object
implements Validatable, org.elasticsearch.common.xcontent.ToXContentObject
Request for get API key
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS

    Fields inherited from interface org.elasticsearch.client.Validatable

    EMPTY
  • Method Summary

    Modifier and Type Method Description
    static GetApiKeyRequest forAllApiKeys()
    Creates get api key request to retrieve api key information for all api keys if the authenticated user is authorized to do so.
    static GetApiKeyRequest forOwnedApiKeys()
    Creates get api key request to retrieve api key information for the api keys owned by the current authenticated user.
    java.lang.String getId()  
    java.lang.String getName()  
    java.lang.String getRealmName()  
    java.lang.String getUserName()  
    boolean ownedByAuthenticatedUser()  
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  
    static GetApiKeyRequest usingApiKeyId​(java.lang.String apiKeyId, boolean ownedByAuthenticatedUser)
    Creates get API key request for given api key id
    static GetApiKeyRequest usingApiKeyName​(java.lang.String apiKeyName, boolean ownedByAuthenticatedUser)
    Creates get API key request for given api key name
    static GetApiKeyRequest usingRealmAndUserName​(java.lang.String realmName, java.lang.String userName)
    Creates get API key request for given realm and user name
    static GetApiKeyRequest usingRealmName​(java.lang.String realmName)
    Creates get API key request for given realm name
    static GetApiKeyRequest usingUserName​(java.lang.String userName)
    Creates get API key request for given user name

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject

    isFragment

    Methods inherited from interface org.elasticsearch.client.Validatable

    validate
  • Method Details

    • getRealmName

      public java.lang.String getRealmName()
    • getUserName

      public java.lang.String getUserName()
    • getId

      public java.lang.String getId()
    • getName

      public java.lang.String getName()
    • ownedByAuthenticatedUser

      public boolean ownedByAuthenticatedUser()
    • usingRealmName

      public static GetApiKeyRequest usingRealmName​(java.lang.String realmName)
      Creates get API key request for given realm name
      Parameters:
      realmName - realm name
      Returns:
      GetApiKeyRequest
    • usingUserName

      public static GetApiKeyRequest usingUserName​(java.lang.String userName)
      Creates get API key request for given user name
      Parameters:
      userName - user name
      Returns:
      GetApiKeyRequest
    • usingRealmAndUserName

      public static GetApiKeyRequest usingRealmAndUserName​(java.lang.String realmName, java.lang.String userName)
      Creates get API key request for given realm and user name
      Parameters:
      realmName - realm name
      userName - user name
      Returns:
      GetApiKeyRequest
    • usingApiKeyId

      public static GetApiKeyRequest usingApiKeyId​(java.lang.String apiKeyId, boolean ownedByAuthenticatedUser)
      Creates get API key request for given api key id
      Parameters:
      apiKeyId - api key id
      ownedByAuthenticatedUser - set true if the request is only for the API keys owned by current authenticated user elsefalse
      Returns:
      GetApiKeyRequest
    • usingApiKeyName

      public static GetApiKeyRequest usingApiKeyName​(java.lang.String apiKeyName, boolean ownedByAuthenticatedUser)
      Creates get API key request for given api key name
      Parameters:
      apiKeyName - api key name
      ownedByAuthenticatedUser - set true if the request is only for the API keys owned by current authenticated user elsefalse
      Returns:
      GetApiKeyRequest
    • forOwnedApiKeys

      public static GetApiKeyRequest forOwnedApiKeys()
      Creates get api key request to retrieve api key information for the api keys owned by the current authenticated user.
    • forAllApiKeys

      public static GetApiKeyRequest forAllApiKeys()
      Creates get api key request to retrieve api key information for all api keys if the authenticated user is authorized to do so.
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException