Class UpdateApiKeyRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<UpdateApiKeyRequest.Builder>
co.elastic.clients.elasticsearch.security.UpdateApiKeyRequest.Builder
- All Implemented Interfaces:
WithJson<UpdateApiKeyRequest.Builder>
,ObjectBuilder<UpdateApiKeyRequest>
- Enclosing class:
- UpdateApiKeyRequest
public static class UpdateApiKeyRequest.Builder
extends RequestBase.AbstractBuilder<UpdateApiKeyRequest.Builder>
implements ObjectBuilder<UpdateApiKeyRequest>
Builder for
UpdateApiKeyRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aUpdateApiKeyRequest
.expiration
(Time value) The expiration time for the API key.The expiration time for the API key.Required - The ID of the API key to update.Arbitrary metadata that you want to associate with the API key.Arbitrary metadata that you want to associate with the API key.roleDescriptors
(String key, RoleDescriptor value) The role descriptors to assign to this API key.The role descriptors to assign to this API key.The role descriptors to assign to this API key.protected UpdateApiKeyRequest.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
expiration
The expiration time for the API key. By default, API keys never expire. This property can be omitted to leave the expiration unchanged.API name:
expiration
-
expiration
The expiration time for the API key. By default, API keys never expire. This property can be omitted to leave the expiration unchanged.API name:
expiration
-
id
Required - The ID of the API key to update.API name:
id
-
metadata
Arbitrary metadata that you want to associate with the API key. It supports a nested data structure. Within the metadata object, keys beginning with_
are reserved for system usage. When specified, this value fully replaces the metadata previously associated with the API key.API name:
metadata
Adds all entries of
map
tometadata
. -
metadata
Arbitrary metadata that you want to associate with the API key. It supports a nested data structure. Within the metadata object, keys beginning with_
are reserved for system usage. When specified, this value fully replaces the metadata previously associated with the API key.API name:
metadata
Adds an entry to
metadata
. -
roleDescriptors
The role descriptors to assign to this API key. The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user. You can assign new privileges by specifying them in this parameter. To remove assigned privileges, you can supply an emptyrole_descriptors
parameter, that is to say, an empty object{}
. If an API key has no assigned privileges, it inherits the owner user's full permissions. The snapshot of the owner's permissions is always updated, whether you supply therole_descriptors
parameter or not. The structure of a role descriptor is the same as the request for the create API keys API.API name:
role_descriptors
Adds all entries of
map
toroleDescriptors
. -
roleDescriptors
The role descriptors to assign to this API key. The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user. You can assign new privileges by specifying them in this parameter. To remove assigned privileges, you can supply an emptyrole_descriptors
parameter, that is to say, an empty object{}
. If an API key has no assigned privileges, it inherits the owner user's full permissions. The snapshot of the owner's permissions is always updated, whether you supply therole_descriptors
parameter or not. The structure of a role descriptor is the same as the request for the create API keys API.API name:
role_descriptors
Adds an entry to
roleDescriptors
. -
roleDescriptors
public final UpdateApiKeyRequest.Builder roleDescriptors(String key, Function<RoleDescriptor.Builder, ObjectBuilder<RoleDescriptor>> fn) The role descriptors to assign to this API key. The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user. You can assign new privileges by specifying them in this parameter. To remove assigned privileges, you can supply an emptyrole_descriptors
parameter, that is to say, an empty object{}
. If an API key has no assigned privileges, it inherits the owner user's full permissions. The snapshot of the owner's permissions is always updated, whether you supply therole_descriptors
parameter or not. The structure of a role descriptor is the same as the request for the create API keys API.API name:
role_descriptors
Adds an entry to
roleDescriptors
using a builder lambda. -
self
- Specified by:
self
in classRequestBase.AbstractBuilder<UpdateApiKeyRequest.Builder>
-
build
Builds aUpdateApiKeyRequest
.- Specified by:
build
in interfaceObjectBuilder<UpdateApiKeyRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-