Module org.elasticsearch.xcore
Class CreateApiKeyRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.AbstractTransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.LegacyActionRequest
org.elasticsearch.xpack.core.security.action.apikey.AbstractCreateApiKeyRequest
org.elasticsearch.xpack.core.security.action.apikey.CreateApiKeyRequest
- All Implemented Interfaces:
Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest,TransportRequest
Request class used for the creation of an API key. The request requires a name to be provided
and optionally an expiration time and permission limitation can be provided.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.xpack.core.security.action.apikey.AbstractCreateApiKeyRequest
expiration, id, metadata, name, refreshPolicy, roleDescriptorsFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsConstructorDescriptionCreateApiKeyRequest(String name, List<RoleDescriptor> roleDescriptors, org.elasticsearch.core.TimeValue expiration) Create API Key request constructorCreateApiKeyRequest(String name, List<RoleDescriptor> roleDescriptors, org.elasticsearch.core.TimeValue expiration, Map<String, Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptiongetType()voidsetExpiration(org.elasticsearch.core.TimeValue expiration) voidsetId()voidsetMetadata(Map<String, Object> metadata) voidvoidsetRoleDescriptors(List<RoleDescriptor> roleDescriptors) validate()Methods inherited from class org.elasticsearch.xpack.core.security.action.apikey.AbstractCreateApiKeyRequest
getExpiration, getId, getMetadata, getName, getRefreshPolicy, getRoleDescriptors, setRefreshPolicy, writeToMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.AbstractTransportRequest
getParentTask, getRequestId, remoteAddress, remoteAddress, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, createTask, getDescription, setParentTask
-
Constructor Details
-
CreateApiKeyRequest
public CreateApiKeyRequest() -
CreateApiKeyRequest
public CreateApiKeyRequest(String name, @Nullable List<RoleDescriptor> roleDescriptors, @Nullable org.elasticsearch.core.TimeValue expiration) Create API Key request constructor- Parameters:
name- name for the API keyroleDescriptors- list ofRoleDescriptorsexpiration- to specify expiration for the API key
-
CreateApiKeyRequest
-
-
Method Details
-
getType
- Specified by:
getTypein classAbstractCreateApiKeyRequest
-
setId
public void setId() -
setName
-
setExpiration
public void setExpiration(@Nullable org.elasticsearch.core.TimeValue expiration) -
setRoleDescriptors
-
setMetadata
-
validate
- Overrides:
validatein classAbstractCreateApiKeyRequest
-