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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGrantApiKey.final GrantApiKey.Builderexpiration(Time value) Expiration time for the API key.final GrantApiKey.BuilderExpiration time for the API key.final GrantApiKey.BuilderArbitrary metadata that you want to associate with the API key.final GrantApiKey.BuilderArbitrary metadata that you want to associate with the API key.final GrantApiKey.BuilderRequired - API name:namefinal GrantApiKey.BuilderroleDescriptors(List<Map<String, RoleDescriptor>> list) The role descriptors for this API key.final GrantApiKey.BuilderroleDescriptors(Map<String, RoleDescriptor> value, Map<String, RoleDescriptor>... values) The role descriptors for this API key.protected GrantApiKey.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
-
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_descriptorsAdds all elements of
listtoroleDescriptors. -
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_descriptorsAdds one or more values to
roleDescriptors. -
metadata
Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within themetadataobject, 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 themetadataobject, keys beginning with_are reserved for system usage.API name:
metadataAdds an entry to
metadata. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<GrantApiKey.Builder>
-
build
Builds aGrantApiKey.- Specified by:
buildin interfaceObjectBuilder<GrantApiKey>- Throws:
NullPointerException- if some of the required fields are null.
-