Class CreateToken.Request
java.lang.Object
io.helidon.integrations.common.rest.ApiJsonBuilder<CreateToken.Request>
io.helidon.integrations.common.rest.ApiJsonRequest<CreateToken.Request>
io.helidon.integrations.vault.VaultRequest<CreateToken.Request>
io.helidon.integrations.vault.auths.token.CreateToken.Request
- All Implemented Interfaces:
- ApiRequest<CreateToken.Request>
- Enclosing class:
- CreateToken
Request object. Can be configured with additional headers, query parameters etc.
- 
Method SummaryModifier and TypeMethodDescriptionaddMetadata(String key, String value) Request metadata, passed through to the audit devices.Add a policy for the token.static CreateToken.Requestbuilder()Fluent API builder for configuring a request.displayName(String displayName) The display name of the token.entityAlias(String entityAlias) Name of the entity alias to associate with during token creation.explicitMaxTtl(Duration explicitMaxTtl) If set, the token will have an explicit max TTL set upon it.The ID of the client token.noDefaultPolicy(boolean noDefaultPolicy) If configured totrue, thedefaultpolicy will not be contained in this token's policy set.noParent(boolean noParent) This argument only has effect if used by a root or sudo caller.numUses(int numUses) The maximum uses for the given token.If specified, the token will be periodic; it will have no maximum TTL (unless an "explicit-max-ttl" is also set) but every renewal will use the given period.renewable(boolean renewable) Set tofalseto disable the ability of the token to be renewed past its initial TTL.The name of the token role.The TTL period of the token.Choose token type.Methods inherited from class io.helidon.integrations.vault.VaultRequestadd, addCommaDelimitedArray, addToCommaDelimitedArray, durationToTtl, preBuildMethods inherited from class io.helidon.integrations.common.rest.ApiJsonRequestaddHeader, addQueryParam, headers, queryParams, requestId, requestId, requestMediaType, requestMediaType, responseMediaType, responseMediaTypeMethods inherited from class io.helidon.integrations.common.rest.ApiJsonBuilderadd, add, add, add, add, add, addBase64, addToArray, addToArray, addToArray, addToArray, addToArray, addToArray, addToObject, addToObject, addToObject, addToObject, addToObject, emptyArray, me, postBuild, toJsonMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.integrations.common.rest.ApiRequesttoJson
- 
Method Details- 
builderFluent API builder for configuring a request. The request builder is passed as is, without a build method. The equivalent of a build method isApiJsonBuilder.toJson(jakarta.json.JsonBuilderFactory)used by theRestApi.- Returns:
- new request builder
 
- 
addPolicyAdd a policy for the token. Policies must be a subset of the policies belonging to the token making the request, unless root. If not specified, defaults to all the policies of the calling token.- Parameters:
- policy- policy to add
- Returns:
- updated request
 
- 
addMetadataRequest metadata, passed through to the audit devices.- Parameters:
- key- name
- value- value
- Returns:
- updated request
 
- 
noParentThis argument only has effect if used by a root or sudo caller. When set to true, the token created will not have a parent.- Parameters:
- noParent- set to- trueto create an orphan token
- Returns:
- updated request
 
- 
noDefaultPolicyIf configured totrue, thedefaultpolicy will not be contained in this token's policy set.- Parameters:
- noDefaultPolicy- whether to exclude default policy
- Returns:
- updated request
 
- 
renewableSet tofalseto disable the ability of the token to be renewed past its initial TTL. Setting the value totruewill allow the token to be renewable up to the system/mount maximum TTL.Defaults to true.- Parameters:
- renewable- whether the token should be renewable
- Returns:
- updated request
 
- 
numUsesThe maximum uses for the given token. This can be used to create a one-time-token or limited use token. The value of 0 has no limit to the number of uses.- Parameters:
- numUses- number of uses, defaults to- 0- unlimited
- Returns:
- updated request
 
- 
idThe ID of the client token. Can only be specified by a root token. The ID provided may not contain a . character. Otherwise, the token ID is a randomly generated value.Note: The ID should not start with the s. prefix. - Parameters:
- id- id of the client token
- Returns:
- updated request
 
- 
roleNameThe name of the token role.- Parameters:
- roleName- role name
- Returns:
- updated request
 
- 
typeChoose token type. Defaults to "service".- Parameters:
- type- token type
- Returns:
- updated request
- See Also:
 
- 
displayNameThe display name of the token.- Parameters:
- displayName- display name
- Returns:
- updated request
 
- 
entityAliasName of the entity alias to associate with during token creation. Only works in combination with role_name argument and used entity alias must be listed in allowed_entity_aliases. If this has been specified, the entity will not be inherited from the parent.- Parameters:
- entityAlias- entity alias
- Returns:
- updated request
 
- 
periodIf specified, the token will be periodic; it will have no maximum TTL (unless an "explicit-max-ttl" is also set) but every renewal will use the given period. Requires a root token or one with the sudo capability.- Parameters:
- period- period
- Returns:
- updated request
 
- 
ttlThe TTL period of the token. If not provided, the token is valid for the default lease TTL, or indefinitely if the root policy is used.- Parameters:
- ttl- duration of the token, smallest unit is seconds
- Returns:
- updated request
 
- 
explicitMaxTtlIf set, the token will have an explicit max TTL set upon it. This maximum token TTL cannot be changed later, and unlike with normal tokens, updates to the system/mount max TTL value will have no effect at renewal time -- the token will never be able to be renewed or used past the value set at issue time.- Parameters:
- explicitMaxTtl- duration of the max TTL, smallest unit is seconds
- Returns:
- updated request
 
 
-