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_PARAMS
Fields inherited from interface org.elasticsearch.client.Validatable
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionstatic GetApiKeyRequest
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
Creates get api key request to retrieve api key information for the api keys owned by the current authenticated user.getId()
getName()
boolean
org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) static GetApiKeyRequest
usingApiKeyId
(String apiKeyId, boolean ownedByAuthenticatedUser) Creates get API key request for given api key idstatic GetApiKeyRequest
usingApiKeyName
(String apiKeyName, boolean ownedByAuthenticatedUser) Creates get API key request for given api key namestatic GetApiKeyRequest
usingRealmAndUserName
(String realmName, String userName) Creates get API key request for given realm and user namestatic GetApiKeyRequest
usingRealmName
(String realmName) Creates get API key request for given realm namestatic GetApiKeyRequest
usingUserName
(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, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
Methods 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
- settrue
if 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
- settrue
if 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:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-