Class GetApiKeyRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<GetApiKeyRequest.Builder>
co.elastic.clients.elasticsearch.security.GetApiKeyRequest.Builder
- All Implemented Interfaces:
WithJson<GetApiKeyRequest.Builder>
,ObjectBuilder<GetApiKeyRequest>
- Enclosing class:
- GetApiKeyRequest
public static class GetApiKeyRequest.Builder
extends RequestBase.AbstractBuilder<GetApiKeyRequest.Builder>
implements ObjectBuilder<GetApiKeyRequest>
Builder for
GetApiKeyRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal GetApiKeyRequest.Builder
activeOnly
(Boolean value) A boolean flag that can be used to query API keys that are currently active.build()
Builds aGetApiKeyRequest
.final GetApiKeyRequest.Builder
An API key id.final GetApiKeyRequest.Builder
An API key name.final GetApiKeyRequest.Builder
A boolean flag that can be used to query API keys owned by the currently authenticated user.final GetApiKeyRequest.Builder
The name of an authentication realm.protected GetApiKeyRequest.Builder
self()
final GetApiKeyRequest.Builder
The username of a user.final GetApiKeyRequest.Builder
withLimitedBy
(Boolean value) Return the snapshot of the owner user's role descriptors associated with the API key.final GetApiKeyRequest.Builder
withProfileUid
(Boolean value) Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
-
withProfileUid
Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.API name:
with_profile_uid
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<GetApiKeyRequest.Builder>
-
build
Builds aGetApiKeyRequest
.- Specified by:
build
in interfaceObjectBuilder<GetApiKeyRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-