pub struct CreateVariable {
pub path: String,
pub value: String,
pub is_secret: bool,
pub description: String,
pub account: Option<i32>,
pub is_oauth: Option<bool>,
pub expires_at: Option<String>,
pub value_valid_until: Option<String>,
pub labels: Option<Vec<String>>,
pub ws_specific: Option<bool>,
}Fields§
§path: StringThe path to the variable
value: StringThe value of the variable. For a secret, $external:vault://<path>#<key> stores a reference to an existing secret in the instance’s external HashiCorp Vault (path as vault kv get takes it) instead of a value; without #<key> it reads the whole secret as a JSON object of its fields. It is resolved on each read, only under the path prefixes a superadmin allowed for the workspace, and is returned as-is when the secret is not decrypted.
is_secret: boolWhether the variable is a secret
description: StringThe description of the variable
account: Option<i32>Ignored. A variable is linked to an OAuth account only when createAccount creates both.
is_oauth: Option<bool>Whether the variable is an OAuth variable
expires_at: Option<String>When to garbage-collect the variable. Used for ephemeral secrets; the variable is deleted once this is reached. Not the value’s expiry — see value_valid_until.
value_valid_until: Option<String>When the value stored in this variable stops working. Triggers the workspace’s variable expiration handler ahead of it, by the handler’s notify_before_secs (1 day by default); never causes the variable to be deleted.
labels: Option<Vec<String>>§ws_specific: Option<bool>