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
usernameandrealm_nameto 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
idsfield.
- 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 JsonpDeserializer<InvalidateApiKeyRequest>Json deserializer forInvalidateApiKeyRequeststatic final Endpoint<InvalidateApiKeyRequest,InvalidateApiKeyResponse, ErrorResponse> Endpoint "security.invalidate_api_key". -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringid()API name:idids()A list of API key ids.final Stringname()An API key name.static InvalidateApiKeyRequestfinal Booleanowner()Can be used to query API keys owned by the currently authenticated user.final StringThe name of an authentication realm.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Stringusername()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_nameorusername.API name:
name -
owner
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 eitheridsorname, or whenownerflag is set totrue.API name:
realm_name -
username
The username of a user. This parameter cannot be used with eitheridsorname, or whenownerflag is set totrue.API name:
username -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupInvalidateApiKeyRequestDeserializer
protected static void setupInvalidateApiKeyRequestDeserializer(ObjectDeserializer<InvalidateApiKeyRequest.Builder> op)
-