Class ApiKey.Builder
- All Implemented Interfaces:
WithJson<ApiKey.Builder>,ObjectBuilder<ApiKey>
- Enclosing class:
- ApiKey
ApiKey.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ApiKey.BuilderThe access granted to cross-cluster API keys.final ApiKey.BuilderThe access granted to cross-cluster API keys.build()Builds aApiKey.final ApiKey.Buildercreation(long value) Required - Creation time for the API key in milliseconds.final ApiKey.Builderexpiration(Long value) Expiration time for the API key in milliseconds.final ApiKey.BuilderRequired - Id for the API keyfinal ApiKey.Builderinvalidated(boolean value) Required - Invalidation status for the API key.final ApiKey.Builderinvalidation(Long value) If the key has been invalidated, invalidation time in milliseconds.final ApiKey.BuilderlimitedBy(List<Map<String, RoleDescriptor>> list) The owner user’s permissions associated with the API key.final ApiKey.BuilderlimitedBy(Map<String, RoleDescriptor> value, Map<String, RoleDescriptor>... values) The owner user’s permissions associated with the API key.final ApiKey.BuilderRequired - Metadata of the API keyfinal ApiKey.BuilderRequired - Metadata of the API keyfinal ApiKey.BuilderRequired - Name of the API key.final ApiKey.BuilderprofileUid(String value) The profile uid for the API key owner principal, if requested and if it existsfinal ApiKey.BuilderRequired - Realm name of the principal for which this API key was created.final ApiKey.BuilderRealm type of the principal for which this API key was createdfinal ApiKey.BuilderroleDescriptors(String key, RoleDescriptor value) The role descriptors assigned to this API key when it was created or last updated.final ApiKey.BuilderThe role descriptors assigned to this API key when it was created or last updated.final ApiKey.BuilderThe role descriptors assigned to this API key when it was created or last updated.protected ApiKey.Builderself()final ApiKey.Buildersort(boolean value, boolean... values) Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.final ApiKey.Buildersort(double value, double... values) Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.final ApiKey.Buildersort(long value, long... values) Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.final ApiKey.Buildersort(FieldValue value, FieldValue... values) Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.final ApiKey.BuilderSorting values when using thesortparameter with thesecurity.query_api_keysAPI.final ApiKey.BuilderSorting values when using thesortparameter with thesecurity.query_api_keysAPI.final ApiKey.Buildersort(List<FieldValue> list) Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.final ApiKey.Buildertype(ApiKeyType value) Required - The type of the API key (e.g.final ApiKey.BuilderRequired - Principal for which this API key was createdMethods 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 - 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.restorcross_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:
metadataAdds all entries of
maptometadata. -
metadata
Required - Metadata of the API keyAPI name:
metadataAdds 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_descriptorsAdds all entries of
maptoroleDescriptors. -
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_descriptorsAdds 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_descriptorsAdds an entry to
roleDescriptorsusing 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_byAdds all elements of
listtolimitedBy. -
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_byAdds 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 thesortparameter with thesecurity.query_api_keysAPI.API name:
_sortAdds all elements of
listtosort. -
sort
Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.API name:
_sortAdds one or more values to
sort. -
sort
Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.API name:
_sortAdds one or more values to
sort. -
sort
Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.API name:
_sortAdds one or more values to
sort. -
sort
Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.API name:
_sortAdds one or more values to
sort. -
sort
Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.API name:
_sortAdds one or more values to
sort. -
sort
Sorting values when using thesortparameter with thesecurity.query_api_keysAPI.API name:
_sortAdds a value to
sortusing a builder lambda. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<ApiKey.Builder>
-
build
Builds aApiKey.- Specified by:
buildin interfaceObjectBuilder<ApiKey>- Throws:
NullPointerException- if some of the required fields are null.
-