Class InvalidateApiKeyRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.security.InvalidateApiKeyRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class InvalidateApiKeyRequest
extends RequestBase
implements JsonpSerializable
Invalidates one or more API keys. The
manage_api_key
privilege
allows deleting any API keys. The manage_own_api_key
only allows
deleting API keys that are owned by the user. In addition, with the
manage_own_api_key
privilege, an invalidation request must be
issued in one of the three formats:
- Set the parameter
owner=true
. - Or, set both
username
andrealm_name
to match the user’s identity. - Or, if the request is issued by an API key, i.e. an API key invalidates
itself, specify its ID in the
ids
field.
- 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 JsonpDeserializer<InvalidateApiKeyRequest>
Json deserializer forInvalidateApiKeyRequest
static final Endpoint<InvalidateApiKeyRequest,
InvalidateApiKeyResponse, ErrorResponse> Endpoint "security.invalidate_api_key
". -
Method Summary
Modifier and TypeMethodDescriptionfinal String
id()
API name:id
ids()
A list of API key ids.final String
name()
An API key name.static InvalidateApiKeyRequest
final Boolean
owner()
Can be used to query API keys owned by the currently authenticated user.final String
The name of an authentication realm.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final String
username()
The username of a user.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forInvalidateApiKeyRequest
-
_ENDPOINT
public static final Endpoint<InvalidateApiKeyRequest,InvalidateApiKeyResponse, _ENDPOINTErrorResponse> Endpoint "security.invalidate_api_key
".
-
-
Method Details
-
of
public static InvalidateApiKeyRequest of(Function<InvalidateApiKeyRequest.Builder, ObjectBuilder<InvalidateApiKeyRequest>> fn) -
id
API name:id
-
ids
A list of API key ids. This parameter cannot be used with any ofname
,realm_name
, orusername
.API name:
ids
-
name
An API key name. This parameter cannot be used with any ofids
,realm_name
orusername
.API name:
name
-
owner
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 eitherids
orname
, or whenowner
flag is set totrue
.API name:
realm_name
-
username
The username of a user. This parameter cannot be used with eitherids
orname
, or whenowner
flag is set totrue
.API name:
username
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupInvalidateApiKeyRequestDeserializer
protected static void setupInvalidateApiKeyRequestDeserializer(ObjectDeserializer<InvalidateApiKeyRequest.Builder> op)
-