Class GetApiKeyRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.security.GetApiKeyRequest
Retrieves information for one or more API keys. NOTE: If you have only the
manage_own_api_key
privilege, this API returns only the API keys
that you own. If you have read_security
,
manage_api_key
or greater privileges (including
manage_security
), this API returns all API keys regardless of
ownership.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Endpoint<GetApiKeyRequest,
GetApiKeyResponse, ErrorResponse> Endpoint "security.get_api_key
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
A boolean flag that can be used to query API keys that are currently active.final String
id()
An API key id.final String
name()
An API key name.static GetApiKeyRequest
final Boolean
owner()
A boolean flag that can be used to query API keys owned by the currently authenticated user.final String
The name of an authentication realm.final String
username()
The username of a user.final Boolean
Return the snapshot of the owner user's role descriptors associated with the API key.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_ENDPOINT
Endpoint "security.get_api_key
".
-
-
Method Details
-
of
public static GetApiKeyRequest of(Function<GetApiKeyRequest.Builder, ObjectBuilder<GetApiKeyRequest>> fn) -
activeOnly
A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such asowner
orname
. Ifactive_only
is false, the response will include both active and inactive (expired or invalidated) keys.API name:
active_only
-
id
An API key id. This parameter cannot be used with any ofname
,realm_name
orusername
.API name:
id
-
name
An API key name. This parameter cannot be used with any ofid
,realm_name
orusername
. It supports prefix search with wildcard.API name:
name
-
owner
A boolean flag that can be used to query API keys owned by the currently authenticated user. Therealm_name
orusername
parameters cannot be specified when this parameter is set totrue
as they are assumed to be the currently authenticated ones.API name:
owner
-
realmName
The name of an authentication realm. This parameter cannot be used with eitherid
orname
or whenowner
flag is set totrue
.API name:
realm_name
-
username
The username of a user. This parameter cannot be used with eitherid
orname
or whenowner
flag is set totrue
.API name:
username
-
withLimitedBy
Return the snapshot of the owner user's role descriptors associated with the API key. An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.API name:
with_limited_by
-