Class GetApiKeyRequest
java.lang.Object
org.elasticsearch.client.security.GetApiKeyRequest
- All Implemented Interfaces:
Validatable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public final class GetApiKeyRequest
extends Object
implements Validatable, org.elasticsearch.xcontent.ToXContentObject
Request for get API key
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMSFields inherited from interface org.elasticsearch.client.Validatable
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionstatic GetApiKeyRequestCreates get api key request to retrieve api key information for all api keys if the authenticated user is authorized to do so.static GetApiKeyRequestCreates get api key request to retrieve api key information for the api keys owned by the current authenticated user.getId()getName()booleanorg.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) static GetApiKeyRequestusingApiKeyId(String apiKeyId, boolean ownedByAuthenticatedUser) Creates get API key request for given api key idstatic GetApiKeyRequestusingApiKeyName(String apiKeyName, boolean ownedByAuthenticatedUser) Creates get API key request for given api key namestatic GetApiKeyRequestusingRealmAndUserName(String realmName, String userName) Creates get API key request for given realm and user namestatic GetApiKeyRequestusingRealmName(String realmName) Creates get API key request for given realm namestatic GetApiKeyRequestusingUserName(String userName) Creates get API key request for given user nameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragmentMethods inherited from interface org.elasticsearch.client.Validatable
validate
-
Method Details
-
getRealmName
-
getUserName
-
getId
-
getName
-
ownedByAuthenticatedUser
public boolean ownedByAuthenticatedUser() -
usingRealmName
Creates get API key request for given realm name- Parameters:
realmName- realm name- Returns:
GetApiKeyRequest
-
usingUserName
Creates get API key request for given user name- Parameters:
userName- user name- Returns:
GetApiKeyRequest
-
usingRealmAndUserName
Creates get API key request for given realm and user name- Parameters:
realmName- realm nameuserName- user name- Returns:
GetApiKeyRequest
-
usingApiKeyId
Creates get API key request for given api key id- Parameters:
apiKeyId- api key idownedByAuthenticatedUser- settrueif the request is only for the API keys owned by current authenticated user elsefalse- Returns:
GetApiKeyRequest
-
usingApiKeyName
Creates get API key request for given api key name- Parameters:
apiKeyName- api key nameownedByAuthenticatedUser- settrueif the request is only for the API keys owned by current authenticated user elsefalse- Returns:
GetApiKeyRequest
-
forOwnedApiKeys
Creates get api key request to retrieve api key information for the api keys owned by the current authenticated user. -
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.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-