Class GrantApiKey.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<GrantApiKey.Builder>
co.elastic.clients.elasticsearch.security.grant_api_key.GrantApiKey.Builder
- All Implemented Interfaces:
WithJson<GrantApiKey.Builder>
,ObjectBuilder<GrantApiKey>
- Enclosing class:
- GrantApiKey
public static class GrantApiKey.Builder
extends WithJsonObjectBuilderBase<GrantApiKey.Builder>
implements ObjectBuilder<GrantApiKey>
Builder for
GrantApiKey
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aGrantApiKey
.final GrantApiKey.Builder
expiration
(Time value) Expiration time for the API key.final GrantApiKey.Builder
Expiration time for the API key.final GrantApiKey.Builder
Arbitrary metadata that you want to associate with the API key.final GrantApiKey.Builder
Arbitrary metadata that you want to associate with the API key.final GrantApiKey.Builder
Required - API name:name
final GrantApiKey.Builder
roleDescriptors
(List<Map<String, RoleDescriptor>> list) The role descriptors for this API key.final GrantApiKey.Builder
roleDescriptors
(Map<String, RoleDescriptor> value, Map<String, RoleDescriptor>... values) The role descriptors for this API key.protected GrantApiKey.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
-
name
Required - API name:name
-
expiration
Expiration time for the API key. By default, API keys never expire.API name:
expiration
-
expiration
Expiration time for the API key. By default, API keys never expire.API name:
expiration
-
roleDescriptors
The role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token.API name:
role_descriptors
Adds all elements of
list
toroleDescriptors
. -
roleDescriptors
public final GrantApiKey.Builder roleDescriptors(Map<String, RoleDescriptor> value, Map<String, RoleDescriptor>... values) The role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token.API name:
role_descriptors
Adds one or more values to
roleDescriptors
. -
metadata
Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within themetadata
object, keys beginning with_
are reserved for system usage.API name:
metadata
Adds all entries of
map
tometadata
. -
metadata
Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within themetadata
object, keys beginning with_
are reserved for system usage.API name:
metadata
Adds an entry to
metadata
. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<GrantApiKey.Builder>
-
build
Builds aGrantApiKey
.- Specified by:
build
in interfaceObjectBuilder<GrantApiKey>
- Throws:
NullPointerException
- if some of the required fields are null.
-