Class CloneApiKeyRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.security.CloneApiKeyRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class CloneApiKeyRequest
extends RequestBase
implements JsonpSerializable
Clone an API key.
Create a copy of an existing API key with a new ID. The cloned key inherits the role descriptors of the source key. This is intended for applications (such as Kibana) that need to create API keys on behalf of a user using an existing API key credential, since derived API keys (API keys created by API keys) are not otherwise supported.
- 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<CloneApiKeyRequest>Json deserializer forCloneApiKeyRequeststatic final Endpoint<CloneApiKeyRequest,CloneApiKeyResponse, ErrorResponse> Endpoint "security.clone_api_key". -
Method Summary
Modifier and TypeMethodDescriptionfinal StringapiKey()Required - The credentials of the API key to clone.final TimeThe expiration time for the cloned API key.metadata()Arbitrary metadata to associate with the cloned API key.final Stringname()A name for the cloned API key.static CloneApiKeyRequestrebuild()final Refreshrefresh()Iftrue(the default) then refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalsethen do nothing with refreshes.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidMethods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forCloneApiKeyRequest -
_ENDPOINT
Endpoint "security.clone_api_key".
-
-
Method Details
-
of
public static CloneApiKeyRequest of(Function<CloneApiKeyRequest.Builder, ObjectBuilder<CloneApiKeyRequest>> fn) -
apiKey
Required - The credentials of the API key to clone. This is the secret value returned when the key was originally created.API name:
api_key -
expiration
The expiration time for the cloned API key. By default, API keys never expire. Set tonullto explicitly create a key with no expiration.API name:
expiration -
metadata
Arbitrary metadata to associate with the cloned API key. It supports nested data structure. Within the metadata object, keys beginning with_are reserved for system usage.API name:
metadata -
name
A name for the cloned API key. If not provided, the name of the source key is used.API name:
name -
refresh
Iftrue(the default) then refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalsethen do nothing with refreshes.API name:
refresh -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
rebuild
- Returns:
- New
CloneApiKeyRequest.Builderinitialized with field values of this instance
-
setupCloneApiKeyRequestDeserializer
protected static void setupCloneApiKeyRequestDeserializer(ObjectDeserializer<CloneApiKeyRequest.Builder> op)
-