ticloud serverless audit-log filter-rule update
June 24, 2025 ยท View on GitHub
Update an audit log filter rule for a TiDB Cloud Serverless cluster.
ticloud serverless audit-log filter-rule update [flags]
Or use the following alias command:
ticloud serverless audit-log filter update [flags]
Examples
Update an audit log filter rule in interactive mode:
ticloud serverless audit-log filter update
Enable an audit log filter rule in non-interactive mode:
ticloud serverless audit-log filter update --cluster-id <cluster-id> --name <rule-name> --enabled
Disable an audit log filter rule in non-interactive mode:
ticloud serverless audit-log filter update --cluster-id <cluster-id> --name <rule-name> --enabled=false
Update filters of an audit log filter rule in non-interactive mode:
ticloud serverless audit-log filter update --cluster-id <cluster-id> --name <rule-name> --rule '{"users":["%@%"],"filters":[{"classes":["QUERY"],"tables":["test.t"]}]}'
Flags
In non-interactive mode, you need to manually enter the required flags. In interactive mode, you can just follow CLI prompts to fill them in.
| Flag | Description | Required | Note |
|---|---|---|---|
| -c, --cluster-id string | The ID of the cluster. | Yes | Only works in non-interactive mode. |
| --name string | The name of the filter rule to update. | Yes | Only works in non-interactive mode. |
| --enabled | Enables or disables the filter rule. | No | Only works in non-interactive mode. |
| --rule string | The new, complete filter rule expression. Use ticloud serverless audit-log filter template to see filter templates. | No | Only works in non-interactive mode. |
| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. |
Inherited flags
| Flag | Description | Required | Note |
|---|---|---|---|
| --no-color | Disables color in output. | No | Only works in non-interactive mode. In interactive mode, disabling color might not work with some UI components. |
| -P, --profile string | Specifies the active user profile used in this command. | No | Works in both non-interactive and interactive modes. |
| -D, --debug | Enables debug mode. | No | Works in both non-interactive and interactive modes. |
Feedback
If you have any questions or suggestions on the TiDB Cloud CLI, feel free to create an issue. Also, we welcome any contributions.