Class CreateCrossClusterApiKeyRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<CreateCrossClusterApiKeyRequest.Builder>
co.elastic.clients.elasticsearch.security.CreateCrossClusterApiKeyRequest.Builder
- All Implemented Interfaces:
WithJson<CreateCrossClusterApiKeyRequest.Builder>
,ObjectBuilder<CreateCrossClusterApiKeyRequest>
- Enclosing class:
- CreateCrossClusterApiKeyRequest
public static class CreateCrossClusterApiKeyRequest.Builder
extends RequestBase.AbstractBuilder<CreateCrossClusterApiKeyRequest.Builder>
implements ObjectBuilder<CreateCrossClusterApiKeyRequest>
Builder for
CreateCrossClusterApiKeyRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequired - The access to be granted to this API key.Required - The access to be granted to this API key.build()
Builds aCreateCrossClusterApiKeyRequest
.expiration
(Time value) Expiration time for the API key.Expiration time for the API key.Arbitrary metadata that you want to associate with the API key.Arbitrary metadata that you want to associate with the API key.Required - Specifies the name for this API key.protected CreateCrossClusterApiKeyRequest.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
-
access
Required - The access to be granted to this API key. The access is composed of permissions for cross-cluster search and cross-cluster replication. At least one of them must be specified.NOTE: No explicit privileges should be specified for either search or replication access. The creation process automatically converts the access specification to a role descriptor which has relevant privileges assigned accordingly.
API name:
access
-
access
public final CreateCrossClusterApiKeyRequest.Builder access(Function<Access.Builder, ObjectBuilder<Access>> fn) Required - The access to be granted to this API key. The access is composed of permissions for cross-cluster search and cross-cluster replication. At least one of them must be specified.NOTE: No explicit privileges should be specified for either search or replication access. The creation process automatically converts the access specification to a role descriptor which has relevant privileges assigned accordingly.
API name:
access
-
expiration
Expiration time for the API key. By default, API keys never expire.API name:
expiration
-
expiration
public final CreateCrossClusterApiKeyRequest.Builder expiration(Function<Time.Builder, ObjectBuilder<Time>> fn) Expiration time for the API key. By default, API keys never expire.API name:
expiration
-
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:
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 the metadata object, keys beginning with_
are reserved for system usage.API name:
metadata
Adds an entry to
metadata
. -
name
Required - Specifies the name for this API key.API name:
name
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<CreateCrossClusterApiKeyRequest.Builder>
-
build
Builds aCreateCrossClusterApiKeyRequest
.- Specified by:
build
in interfaceObjectBuilder<CreateCrossClusterApiKeyRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-