Class ApiKey
java.lang.Object
co.elastic.clients.elasticsearch.security.ApiKey
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<ApiKey>
Json deserializer forApiKey
-
Method Summary
Modifier and TypeMethodDescriptionfinal Access
access()
The access granted to cross-cluster API keys.final long
creation()
Required - Creation time for the API key in milliseconds.final Long
Expiration time for the API key in milliseconds.final String
id()
Required - Id for the API keyfinal boolean
Required - Invalidation status for the API key.final Long
If the key has been invalidated, invalidation time in milliseconds.final List<Map<String,
RoleDescriptor>> The owner user’s permissions associated with the API key.metadata()
Required - Metadata of the API keyfinal String
name()
Required - Name of the API key.static ApiKey
final String
The profile uid for the API key owner principal, if requested and if it existsfinal String
realm()
Required - Realm name of the principal for which this API key was created.final String
Realm type of the principal for which this API key was createdfinal Map<String,
RoleDescriptor> The role descriptors assigned to this API key when it was created or last updated.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 List<FieldValue>
sort()
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.toString()
final ApiKeyType
type()
Required - The type of the API key (e.g.final String
username()
Required - Principal for which this API key was created
-
Field Details
-
_DESERIALIZER
Json deserializer forApiKey
-
-
Method Details
-
of
-
id
Required - Id for the API keyAPI name:
id
-
name
Required - Name of the API key.API name:
name
-
type
Required - The type of the API key (e.g.rest
orcross_cluster
).API name:
type
-
creation
public final long creation()Required - Creation time for the API key in milliseconds.API name:
creation
-
expiration
Expiration time for the API key in milliseconds.API name:
expiration
-
invalidated
public final boolean invalidated()Required - Invalidation status for the API key. If the key has been invalidated, it has a value oftrue
. Otherwise, it isfalse
.API name:
invalidated
-
invalidation
If the key has been invalidated, invalidation time in milliseconds.API name:
invalidation
-
username
Required - Principal for which this API key was createdAPI name:
username
-
realm
Required - Realm name of the principal for which this API key was created.API name:
realm
-
realmType
Realm type of the principal for which this API key was createdAPI name:
realm_type
-
metadata
Required - Metadata of the API keyAPI name:
metadata
-
roleDescriptors
The role descriptors assigned to this API key when it was created or last updated. An empty role descriptor means the API key inherits the owner user’s permissions.API name:
role_descriptors
-
limitedBy
The owner user’s permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions.API name:
limited_by
-
access
The access granted to cross-cluster API keys. 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
-
profileUid
The profile uid for the API key owner principal, if requested and if it existsAPI name:
profile_uid
-
sort
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.API name:
_sort
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupApiKeyDeserializer
-