ti fs disable-file-system-token
Temporarily disables a file system token without revoking it. You can re-enable the token later with ti fs enable-file-system-token. A token used by a known local mount must be drained and unmounted first. With owner token authentication, only scoped tokens can be disabled; TiDB Cloud API keys can disable either token kind.
Syntax
ti fs disable-file-system-token
--token-id <string>
[--file-system-id <string>]
[--fs-token <string>]
[--dry-run]
[--help]
[--version]
Options
--file-system-id <string>: Specify the file system that owns the token. Required when using TiDB Cloud API credentials; optional when an owner token supplies the ID.--token-id <string>: Specify the immutable token ID returned by the list command. This option is required.--fs-token <string>: Authorize the request with a file system owner token. If omitted, the command uses theTI_FS_TOKENenvironment variable. If neither is provided, the command requires TiDB Cloud API credentials and--file-system-id. It does not automatically use a locally stored owner token.--dry-run: Validate credentials, identifiers, and known local mount conflicts without disabling the token.--help: Display help information.--version: Display version information.
For options shared by all commands, see Global options.
Examples
Disable a token after stopping its local mount:
# Drain and unmount first when this token backs a mount on the current machine. ti fs drain-file-system --mount-path /path/to/workspace ti fs unmount-file-system --mount-path /path/to/workspace ti fs disable-file-system-token \ --file-system-id "<file-system-id>" \ --token-id "<token-id>"Disable a scoped token by using an owner token:
# Inject TI_FS_TOKEN from a secret manager. The owner token identifies the file system. # Drain any local mount that uses the target token first. ti fs disable-file-system-token \ --token-id "<scoped-token-id>"