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.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) An array of role descriptors for this API key.An array of role descriptors for this API key.An array of role descriptors for this API key.protected UpdateApiKeyRequest.Builderself()Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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 nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage.API name:
metadataAdds all entries of
maptometadata. -
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.API name:
metadataAdds an entry to
metadata. -
roleDescriptors
An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.API name:
role_descriptorsAdds all entries of
maptoroleDescriptors. -
roleDescriptors
An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.API name:
role_descriptorsAdds an entry to
roleDescriptors. -
roleDescriptors
public final UpdateApiKeyRequest.Builder roleDescriptors(String key, Function<RoleDescriptor.Builder, ObjectBuilder<RoleDescriptor>> fn) An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.API name:
role_descriptorsAdds an entry to
roleDescriptorsusing a builder lambda. -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<UpdateApiKeyRequest.Builder>
-
build
Builds aUpdateApiKeyRequest.- Specified by:
buildin interfaceObjectBuilder<UpdateApiKeyRequest>- Throws:
NullPointerException- if some of the required fields are null.
-