Class GetApiKeyRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.security.GetApiKeyRequest
Get API key information.
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 ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Endpoint<GetApiKeyRequest,GetApiKeyResponse, ErrorResponse> Endpoint "security.get_api_key". -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanA boolean flag that can be used to query API keys that are currently active.final Stringid()An API key id.final Stringname()An API key name.static GetApiKeyRequestfinal Booleanowner()A boolean flag that can be used to query API keys owned by the currently authenticated user.final StringThe name of an authentication realm.final Stringusername()The username of a user.final BooleanReturn the snapshot of the owner user's role descriptors associated with the API key.final BooleanDetermines whether to also retrieve the profile uid, for the API key owner principal, if it exists.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 asownerorname. Ifactive_onlyis 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_nameorusername.API name:
id -
name
An API key name. This parameter cannot be used with any ofid,realm_nameorusername. 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_nameorusernameparameters cannot be specified when this parameter is set totrueas 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 eitheridornameor whenownerflag is set totrue.API name:
realm_name -
username
The username of a user. This parameter cannot be used with eitheridornameor whenownerflag 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 -
withProfileUid
Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.API name:
with_profile_uid
-