Class ApiKey.Builder
- All Implemented Interfaces:
WithJson<ApiKey.Builder>
,ObjectBuilder<ApiKey>
- Enclosing class:
- ApiKey
ApiKey
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ApiKey.Builder
The access granted to cross-cluster API keys.final ApiKey.Builder
The access granted to cross-cluster API keys.build()
Builds aApiKey
.final ApiKey.Builder
creation
(long value) Required - Creation time for the API key in milliseconds.final ApiKey.Builder
expiration
(Long value) Expiration time for the API key in milliseconds.final ApiKey.Builder
Required - Id for the API keyfinal ApiKey.Builder
invalidated
(boolean value) Required - Invalidation status for the API key.final ApiKey.Builder
invalidation
(Long value) If the key has been invalidated, invalidation time in milliseconds.final ApiKey.Builder
limitedBy
(List<Map<String, RoleDescriptor>> list) The owner user’s permissions associated with the API key.final ApiKey.Builder
limitedBy
(Map<String, RoleDescriptor> value, Map<String, RoleDescriptor>... values) The owner user’s permissions associated with the API key.final ApiKey.Builder
Required - Metadata of the API keyfinal ApiKey.Builder
Required - Metadata of the API keyfinal ApiKey.Builder
Required - Name of the API key.final ApiKey.Builder
profileUid
(String value) The profile uid for the API key owner principal, if requested and if it existsfinal ApiKey.Builder
Required - Realm name of the principal for which this API key was created.final ApiKey.Builder
Realm type of the principal for which this API key was createdfinal ApiKey.Builder
roleDescriptors
(String key, RoleDescriptor value) The role descriptors assigned to this API key when it was created or last updated.final ApiKey.Builder
The role descriptors assigned to this API key when it was created or last updated.final ApiKey.Builder
The role descriptors assigned to this API key when it was created or last updated.protected ApiKey.Builder
self()
final ApiKey.Builder
sort
(boolean value, boolean... values) Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.final ApiKey.Builder
sort
(double value, double... values) Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.final ApiKey.Builder
sort
(long value, long... values) Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.final ApiKey.Builder
sort
(FieldValue value, FieldValue... values) Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.final ApiKey.Builder
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.final ApiKey.Builder
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.final ApiKey.Builder
sort
(List<FieldValue> list) Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.final ApiKey.Builder
type
(ApiKeyType value) Required - The type of the API key (e.g.final ApiKey.Builder
Required - Principal for which this API key was createdMethods 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
-
id
Required - Id for the API keyAPI name:
id
-
name
Required - Name of the API key.API name:
name
-
type
Required - The type of the API key (e.g.rest
orcross_cluster
).API name:
type
-
creation
Required - Creation time for the API key in milliseconds.API name:
creation
-
expiration
Expiration time for the API key in milliseconds.API name:
expiration
-
invalidated
Required - Invalidation status for the API key. If the key has been invalidated, it has a value oftrue
. Otherwise, it isfalse
.API name:
invalidated
-
invalidation
If the key has been invalidated, invalidation time in milliseconds.API name:
invalidation
-
username
Required - Principal for which this API key was createdAPI name:
username
-
realm
Required - Realm name of the principal for which this API key was created.API name:
realm
-
realmType
Realm type of the principal for which this API key was createdAPI name:
realm_type
-
metadata
Required - Metadata of the API keyAPI name:
metadata
Adds all entries of
map
tometadata
. -
metadata
Required - Metadata of the API keyAPI name:
metadata
Adds an entry to
metadata
. -
roleDescriptors
The role descriptors assigned to this API key when it was created or last updated. An empty role descriptor means the API key inherits the owner user’s permissions.API name:
role_descriptors
Adds all entries of
map
toroleDescriptors
. -
roleDescriptors
The role descriptors assigned to this API key when it was created or last updated. An empty role descriptor means the API key inherits the owner user’s permissions.API name:
role_descriptors
Adds an entry to
roleDescriptors
. -
roleDescriptors
public final ApiKey.Builder roleDescriptors(String key, Function<RoleDescriptor.Builder, ObjectBuilder<RoleDescriptor>> fn) The role descriptors assigned to this API key when it was created or last updated. An empty role descriptor means the API key inherits the owner user’s permissions.API name:
role_descriptors
Adds an entry to
roleDescriptors
using a builder lambda. -
limitedBy
The owner user’s permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions.API name:
limited_by
Adds all elements of
list
tolimitedBy
. -
limitedBy
public final ApiKey.Builder limitedBy(Map<String, RoleDescriptor> value, Map<String, RoleDescriptor>... values) The owner user’s permissions associated with the API key. It is a point-in-time snapshot captured at creation and subsequent updates. An API key’s effective permissions are an intersection of its assigned privileges and the owner user’s permissions.API name:
limited_by
Adds one or more values to
limitedBy
. -
access
The access granted to cross-cluster API keys. The access is composed of permissions for cross cluster search and cross cluster replication. At least one of them must be specified. When specified, the new access assignment fully replaces the previously assigned access.API name:
access
-
access
The access granted to cross-cluster API keys. The access is composed of permissions for cross cluster search and cross cluster replication. At least one of them must be specified. When specified, the new access assignment fully replaces the previously assigned access.API name:
access
-
profileUid
The profile uid for the API key owner principal, if requested and if it existsAPI name:
profile_uid
-
sort
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.API name:
_sort
Adds all elements of
list
tosort
. -
sort
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.API name:
_sort
Adds one or more values to
sort
. -
sort
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.API name:
_sort
Adds one or more values to
sort
. -
sort
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.API name:
_sort
Adds one or more values to
sort
. -
sort
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.API name:
_sort
Adds one or more values to
sort
. -
sort
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.API name:
_sort
Adds one or more values to
sort
. -
sort
Sorting values when using thesort
parameter with thesecurity.query_api_keys
API.API name:
_sort
Adds a value to
sort
using a builder lambda. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<ApiKey.Builder>
-
build
Builds aApiKey
.- Specified by:
build
in interfaceObjectBuilder<ApiKey>
- Throws:
NullPointerException
- if some of the required fields are null.
-