Package io.vertx.ext.consul.token
Class AclToken
- java.lang.Object
-
- io.vertx.ext.consul.token.AclToken
-
public class AclToken extends Object
-
-
Constructor Summary
Constructors Constructor Description AclToken()
AclToken(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AclToken
addPolicy(PolicyLink policyLink)
Adds a policy.String
getAccessorId()
Returns accessorIdString
getDescription()
Boolean
getLocal()
List<PolicyLink>
getPolicies()
String
getSecretId()
Returns secretIdAclToken
local()
Indicates that it is a local tokenAclToken
setDescription(String description)
Sets an optional free-form description that is human-readableAclToken
setExpirationTime(String expirationTime)
Sets the expiration time.AclToken
setNamespace(String namespace)
Sets an optional namespace.AclToken
setNodeIdentities(List<NodeTokenApplyingOptions> nodeIdentities)
Sets a list of nodesAclToken
setPolicies(List<PolicyLink> policies)
Sets policiesAclToken
setServiceIdentities(List<ServiceTokenApplyingOptions> serviceIdentities)
Sets a list of servicesJsonObject
toJson()
-
-
-
Constructor Detail
-
AclToken
public AclToken()
-
AclToken
public AclToken(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
getAccessorId
public String getAccessorId()
Returns accessorId- See Also:
accessorId
-
getSecretId
public String getSecretId()
Returns secretId- See Also:
secretId
-
getDescription
public String getDescription()
-
getPolicies
public List<PolicyLink> getPolicies()
-
getLocal
public Boolean getLocal()
-
setDescription
public AclToken setDescription(String description)
Sets an optional free-form description that is human-readable- Parameters:
description
-- See Also:
description
-
setPolicies
public AclToken setPolicies(List<PolicyLink> policies)
Sets policies- Parameters:
policies
-- See Also:
PolicyLink
-
addPolicy
public AclToken addPolicy(PolicyLink policyLink)
Adds a policy. LikesetPolicies(List)
- Parameters:
policyLink
-
-
local
public AclToken local()
Indicates that it is a local token- See Also:
local
-
setExpirationTime
public AclToken setExpirationTime(String expirationTime)
Sets the expiration time. Optional, by default NO expiration.- Parameters:
expirationTime
- must be between 1 minute and 24 hours in the future- See Also:
expirationTime
-
setNamespace
public AclToken setNamespace(String namespace)
Sets an optional namespace. Default value is ns URL query parameter or in the X-Consul-Namespace header, or 'default' namespace.- Parameters:
namespace
-- See Also:
namespace
-
setNodeIdentities
public AclToken setNodeIdentities(List<NodeTokenApplyingOptions> nodeIdentities)
Sets a list of nodes- See Also:
NodeTokenApplyingOptions
-
setServiceIdentities
public AclToken setServiceIdentities(List<ServiceTokenApplyingOptions> serviceIdentities)
Sets a list of services- See Also:
ServiceTokenApplyingOptions
-
-