Class CreateServiceTokenRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<CreateServiceTokenRequest.Builder>
co.elastic.clients.elasticsearch.security.CreateServiceTokenRequest.Builder
- All Implemented Interfaces:
WithJson<CreateServiceTokenRequest.Builder>
,ObjectBuilder<CreateServiceTokenRequest>
- Enclosing class:
- CreateServiceTokenRequest
public static class CreateServiceTokenRequest.Builder
extends RequestBase.AbstractBuilder<CreateServiceTokenRequest.Builder>
implements ObjectBuilder<CreateServiceTokenRequest>
Builder for
CreateServiceTokenRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aCreateServiceTokenRequest
.The name for the service account token.Required - The name of the namespace, which is a top-level grouping of service accounts.Iftrue
then refresh the affected shards to make this operation visible to search, ifwait_for
(the default) then wait for a refresh to make this operation visible to search, iffalse
then do nothing with refreshes.protected CreateServiceTokenRequest.Builder
self()
Required - The name of the service.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
The name for the service account token. If omitted, a random name will be generated.Token names must be at least one and no more than 256 characters. They can contain alphanumeric characters (a-z, A-Z, 0-9), dashes (
-
), and underscores (_
), but cannot begin with an underscore.NOTE: Token names must be unique in the context of the associated service account. They must also be globally unique with their fully qualified names, which are comprised of the service account principal and token name, such as
<namespace>/<service>/<token-name>
.API name:
name
-
namespace
Required - The name of the namespace, which is a top-level grouping of service accounts.API name:
namespace
-
refresh
Iftrue
then refresh the affected shards to make this operation visible to search, ifwait_for
(the default) then wait for a refresh to make this operation visible to search, iffalse
then do nothing with refreshes.API name:
refresh
-
service
Required - The name of the service.API name:
service
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<CreateServiceTokenRequest.Builder>
-
build
Builds aCreateServiceTokenRequest
.- Specified by:
build
in interfaceObjectBuilder<CreateServiceTokenRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-