pub struct CreateACLTokenPayload {
pub accessor_id: Option<String>,
pub secret_id: Option<String>,
pub description: Option<String>,
pub policies: Vec<ACLTokenPolicyLink>,
pub local: bool,
pub create_time: Option<String>,
pub hash: Option<String>,
pub expiration_time: Option<String>,
}Expand description
Create ACL token payload See https://developer.hashicorp.com/consul/api-docs/acl/tokens for more information. TODO: NodeIdentities,TemplatedPolicies, ServiceIdentities
Fields§
§accessor_id: Option<String>Unique ID
secret_id: Option<String>Secret for authentication
description: Option<String>Description
policies: Vec<ACLTokenPolicyLink>Policies
local: boolToken only valid in this datacenter
create_time: Option<String>Creation time
hash: Option<String>Hash
expiration_time: Option<String>Optional expiration time for the ACL token.
If set, this field specifies the point in time after which the token is considered revoked and eligible for destruction. The default value means the token does not expire.
The expiration time must be between 1 minute and 24 hours in the future. This constraint is enforced by Consul to promote security best practices, ensuring that tokens are short-lived and reducing the risk of unauthorized access in case of token compromise.
The value should be provided in RFC 3339 format, representing a date and time with optional fractional seconds and time zone offset. For example: “2025-05-29T15:00:00Z” or “2025-05-29T15:00:00+02:00”.
Added in Consul 1.5.0.
Implementations§
Source§impl CreateACLTokenPayload
impl CreateACLTokenPayload
Sourcepub fn builder() -> CreateACLTokenPayloadBuilder
pub fn builder() -> CreateACLTokenPayloadBuilder
Create an instance of CreateACLTokenPayload using the builder syntax