public static class VaultTokenRequest.VaultTokenRequestBuilder extends Object
VaultTokenRequest
.Modifier and Type | Method and Description |
---|---|
VaultTokenRequest |
build()
Build a new
VaultTokenRequest instance. |
VaultTokenRequest.VaultTokenRequestBuilder |
displayName(String displayName)
Configure a display name for the token, defaults to "token".
|
VaultTokenRequest.VaultTokenRequestBuilder |
explicitMaxTtl(Duration explicitMaxTtl)
Configure the explicit maximum TTL for the token.
|
VaultTokenRequest.VaultTokenRequestBuilder |
explicitMaxTtl(long explicitMaxTtl)
Deprecated.
since 2.0, use
explicitMaxTtl(Duration) for time unit
safety. |
VaultTokenRequest.VaultTokenRequestBuilder |
explicitMaxTtl(long explicitMaxTtl,
TimeUnit timeUnit)
Configure the explicit maximum TTL for the token.
|
VaultTokenRequest.VaultTokenRequestBuilder |
id(String id)
Configure a the Id of the client token.
|
VaultTokenRequest.VaultTokenRequestBuilder |
meta(Map<String,String> meta)
Configure meta.
|
VaultTokenRequest.VaultTokenRequestBuilder |
noDefaultPolicy()
Omit the default policy in the token's policy set
|
VaultTokenRequest.VaultTokenRequestBuilder |
noDefaultPolicy(boolean noDefaultPolicy)
Configure whether the default policy should be part of the token's policy set.
|
VaultTokenRequest.VaultTokenRequestBuilder |
noParent()
Configure the token to not have the parent token of the caller.
|
VaultTokenRequest.VaultTokenRequestBuilder |
noParent(boolean noParent)
Configure the token to not have the parent token of the caller.
|
VaultTokenRequest.VaultTokenRequestBuilder |
numUses(int numUses)
Configure the maximum uses for the token.
|
VaultTokenRequest.VaultTokenRequestBuilder |
policies(Iterable<String> policies)
Configure policies.
|
VaultTokenRequest.VaultTokenRequestBuilder |
renewable()
Enable TTL extension/renewal for the token.
|
VaultTokenRequest.VaultTokenRequestBuilder |
renewable(boolean renewable)
Configure TTL extension/renewal for the token.
|
VaultTokenRequest.VaultTokenRequestBuilder |
ttl(Duration ttl)
Configure a TTL for the token using
ChronoUnit.SECONDS resolution. |
VaultTokenRequest.VaultTokenRequestBuilder |
ttl(long ttl)
Deprecated.
since 2.0, use
ttl(Duration) for time unit safety. |
VaultTokenRequest.VaultTokenRequestBuilder |
ttl(long ttl,
TimeUnit timeUnit)
Configure a TTL (seconds) for the token.
|
VaultTokenRequest.VaultTokenRequestBuilder |
withPolicy(String policy)
Add a policy.
|
public VaultTokenRequest.VaultTokenRequestBuilder id(String id)
id
- the token Id.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder policies(Iterable<String> policies)
policies
- must not be null.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder withPolicy(String policy)
policy
- must not be empty or null.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder meta(Map<String,String> meta)
meta
- must not be null.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder noParent()
this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder noParent(boolean noParent)
noParent
- true to not have the parent token of the caller.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder noDefaultPolicy()
this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder noDefaultPolicy(boolean noDefaultPolicy)
noDefaultPolicy
- true to omit the default policy in the
token's policy set.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder renewable()
this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder renewable(boolean renewable)
renewable
- false to disable the ability of the token to be
renewed past its initial TTL. true, or omitting this option, will
allow the token to be renewable up to the system/mount maximum TTL.this
VaultTokenRequest.VaultTokenRequestBuilder
.@Deprecated public VaultTokenRequest.VaultTokenRequestBuilder ttl(long ttl)
ttl(Duration)
for time unit safety.ttl
- the time to live in seconds, must not be negative.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder ttl(long ttl, TimeUnit timeUnit)
ttl
- the time to live, must not be negative.timeUnit
- the time to live time unit, must not be null.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder ttl(Duration ttl)
ChronoUnit.SECONDS
resolution.ttl
- the time to live, must not be null or negative.this
VaultTokenRequest.VaultTokenRequestBuilder
.@Deprecated public VaultTokenRequest.VaultTokenRequestBuilder explicitMaxTtl(long explicitMaxTtl)
explicitMaxTtl(Duration)
for time unit
safety.explicitMaxTtl
- the time to live in seconds, must not be negative.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder explicitMaxTtl(long explicitMaxTtl, TimeUnit timeUnit)
explicitMaxTtl
- the time to live, must not be negative.timeUnit
- the time to live, must not be null.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder explicitMaxTtl(Duration explicitMaxTtl)
explicitMaxTtl
- the time to live, must not be null or
negative.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder numUses(int numUses)
numUses
- number of uses, must not be negative.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest.VaultTokenRequestBuilder displayName(String displayName)
displayName
- must not be empty or null.this
VaultTokenRequest.VaultTokenRequestBuilder
.public VaultTokenRequest build()
VaultTokenRequest
instance.VaultCertificateRequest
.Copyright © 2016–2020 Pivotal Software, Inc.. All rights reserved.