Class UpdateCrossClusterApiKeyRequest
- All Implemented Interfaces:
JsonpSerializable
Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.
To use this API, you must have at least the manage_security
cluster privilege. Users can only update API keys that they created. To
update another user's API key, use the run_as
feature to submit
a request on behalf of another user.
IMPORTANT: It's not possible to use an API key as the authentication credential for this API. To update an API key, the owner user's credentials are required.
It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API.
This API supports updates to an API key's access scope, metadata, and
expiration. The owner user's information, such as the username
and realm
, is also updated automatically on every call.
NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API.
- 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<UpdateCrossClusterApiKeyRequest>
Json deserializer forUpdateCrossClusterApiKeyRequest
static final Endpoint<UpdateCrossClusterApiKeyRequest,
UpdateCrossClusterApiKeyResponse, ErrorResponse> Endpoint "security.update_cross_cluster_api_key
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Access
access()
Required - The access to be granted to this API key.final Time
The expiration time for the API key.final String
id()
Required - The ID of the cross-cluster API key to update.metadata()
Arbitrary metadata that you want to associate with the API key.of
(Function<UpdateCrossClusterApiKeyRequest.Builder, ObjectBuilder<UpdateCrossClusterApiKeyRequest>> fn) 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
setupUpdateCrossClusterApiKeyRequestDeserializer
(ObjectDeserializer<UpdateCrossClusterApiKeyRequest.Builder> op) Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forUpdateCrossClusterApiKeyRequest
-
_ENDPOINT
public static final Endpoint<UpdateCrossClusterApiKeyRequest,UpdateCrossClusterApiKeyResponse, _ENDPOINTErrorResponse> Endpoint "security.update_cross_cluster_api_key
".
-
-
Method Details
-
of
-
access
Required - The access to be granted to this API key. The access is composed of permissions for cross cluster search and cross cluster replication. At least one of them must be specified. When specified, the new access assignment fully replaces the previously assigned access.API name:
access
-
expiration
The expiration time for the API key. By default, API keys never expire. This property can be omitted to leave the value unchanged.API name:
expiration
-
id
Required - The ID of the cross-cluster API key to update.API name:
id
-
metadata
Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with_
are reserved for system usage. When specified, this information fully replaces metadata previously associated with the API key.API name:
metadata
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupUpdateCrossClusterApiKeyRequestDeserializer
protected static void setupUpdateCrossClusterApiKeyRequestDeserializer(ObjectDeserializer<UpdateCrossClusterApiKeyRequest.Builder> op)
-