diff --git a/TOC-tidb-cloud-essential.md b/TOC-tidb-cloud-essential.md index 83664bac8e801..20a9b349cd35b 100644 --- a/TOC-tidb-cloud-essential.md +++ b/TOC-tidb-cloud-essential.md @@ -605,6 +605,18 @@ - [delete](/tidb-cloud/ticloud-serverless-authorized-network-delete.md) - [list](/tidb-cloud/ticloud-serverless-authorized-network-list.md) - [update](/tidb-cloud/ticloud-serverless-authorized-network-update.md) + - audit-log + - config + - [update](/tidb-cloud/ticloud-serverless-audit-log-config-update.md) + - [describe](/tidb-cloud/ticloud-serverless-audit-log-config-describe.md) + - filter-rule + - [create](/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md) + - [delete](/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md) + - [describe](/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md) + - [list](/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md) + - [update](/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md) + - [template](/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md) + - [download](/tidb-cloud/ticloud-serverless-audit-log-download.md) - [ai](/tidb-cloud/ticloud-ai.md) - [completion](/tidb-cloud/ticloud-completion.md) - config diff --git a/tidb-cloud/ticloud-auditlog-config.md b/tidb-cloud/ticloud-auditlog-config.md deleted file mode 100644 index 2b2c88d0abd80..0000000000000 --- a/tidb-cloud/ticloud-auditlog-config.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: ticloud serverless audit-log config -summary: The reference of `ticloud serverless audit-log config`. ---- - -# ticloud serverless audit-log config - -Configure the database audit logging for a {{{ .starter }}} or {{{ .essential }}} cluster. - -```shell -ticloud serverless audit-log config [flags] -``` - -## Examples - -Configure the database audit logging in interactive mode: - -```shell -ticloud serverless audit-log config -``` - -Enable the database audit logging in non-interactive mode: - -```shell -ticloud serverless audit-log config -c --enabled -``` - -Disable the database audit logging in non-interactive mode: - -```shell -ticloud serverless audit-log config -c --enabled=false -``` - -Unredact the database audit logging in non-interactive mode: - -```shell -ticloud serverless audit-log config -c --unredacted -``` - -## 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. | -| --enabled | Enable or disable the database audit logging. | No | Only works in non-interactive mode. | -| --unredacted | Enable or disable data redaction in audit logs. | 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](/tidb-cloud/cli-reference.md#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](https://github.com/tidbcloud/tidbcloud-cli/issues/new/choose). Also, we welcome any contributions. diff --git a/tidb-cloud/ticloud-auditlog-download.md b/tidb-cloud/ticloud-auditlog-download.md deleted file mode 100644 index 9ac6a5f522938..0000000000000 --- a/tidb-cloud/ticloud-auditlog-download.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: ticloud serverless audit-log download -summary: The reference of `ticloud serverless audit-log download`. ---- - -# ticloud serverless audit-log download - -Download the database audit logs from a {{{ .starter }}} or {{{ .essential }}} cluster. - -```shell -ticloud serverless audit-log download [flags] -``` - -## Examples - -Download the database audit logs in interactive mode: - -```shell -ticloud serverless audit-log download -``` - -Download the database audit logs in non-interactive mode: - -```shell -ticloud serverless audit-log download -c --start-date --end-date -``` - -## 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 | Cluster ID. | Yes | Only works in non-interactive mode. | -| --start-date string | The start date of the audit log you want to download in the format of `YYYY-MM-DD`, for example `2025-01-01`. | Yes | Only works in non-interactive mode. | -| --end-date string | The end date of the audit log you want to download in the format of `YYYY-MM-DD`, for example `2025-01-01`. | Yes | Only works in non-interactive mode. | -| --output-path string | The path where you want to download the audit logs. If not specified, logs are downloaded to the current directory. | No | Only works in non-interactive mode. | -| --concurrency int | Download concurrency (`3` by default). | No | Works in both non-interactive and interactive modes. | -| --force | Download without confirmation. | No | Works in both non-interactive and interactive modes. | -| -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](/tidb-cloud/cli-reference.md#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](https://github.com/tidbcloud/tidbcloud-cli/issues/new/choose). Also, we welcome any contributions. diff --git a/tidb-cloud/ticloud-auditlog-describe.md b/tidb-cloud/ticloud-serverless-audit-log-config-describe.md similarity index 59% rename from tidb-cloud/ticloud-auditlog-describe.md rename to tidb-cloud/ticloud-serverless-audit-log-config-describe.md index 34fed7e537a89..98aabe3ed0636 100644 --- a/tidb-cloud/ticloud-auditlog-describe.md +++ b/tidb-cloud/ticloud-serverless-audit-log-config-describe.md @@ -1,20 +1,14 @@ --- -title: ticloud serverless audit-log describe -summary: The reference of `ticloud serverless audit-log describe`. +title: ticloud serverless audit-log config describe +summary: The reference of `ticloud serverless audit-log config describe`. --- -# ticloud serverless audit-log describe +# ticloud serverless audit-log config describe -Describe the database audit logging configuration for a {{{ .starter }}} or {{{ .essential }}} cluster. +Describe the database audit logging configuration for a TiDB Cloud Essential cluster. ```shell -ticloud serverless audit-log describe [flags] -``` - -Or use the following alias command: - -```shell -ticloud serverless audit-log get [flags] +ticloud serverless audit-log config describe [flags] ``` ## Examples @@ -22,31 +16,30 @@ ticloud serverless audit-log get [flags] Get the database audit logging configuration in interactive mode: ```shell -ticloud serverless audit-log describe +ticloud serverless audit-log config describe ``` Get the database audit logging configuration in non-interactive mode: ```shell -ticloud serverless audit-log describe -c +ticloud serverless audit-log config describe -c ``` ## 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 cluster ID. | Yes | Only works in non-interactive mode. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | +| -h, --help | Shows help information for this command. | No | Works in both interactive and non-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. | -| -D, --debug | Enables debug mode. | No | Works in both non-interactive and interactive modes. | +| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disable color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback -If you have any questions or suggestions on the TiDB Cloud CLI, feel free to create an [issue](https://github.com/tidbcloud/tidbcloud-cli/issues/new/choose). Also, we welcome any contributions. \ No newline at end of file +If you have any questions or suggestions on the TiDB Cloud CLI, feel free to create an [issue](https://github.com/tidbcloud/tidbcloud-cli/issues/new/choose). Also, we welcome any contributions. diff --git a/tidb-cloud/ticloud-serverless-audit-log-config-update.md b/tidb-cloud/ticloud-serverless-audit-log-config-update.md new file mode 100644 index 0000000000000..054640cb6c071 --- /dev/null +++ b/tidb-cloud/ticloud-serverless-audit-log-config-update.md @@ -0,0 +1,79 @@ +--- +title: ticloud serverless audit-log config update +summary: The reference of `ticloud serverless audit-log config update`. +--- + +# ticloud serverless audit-log config update + +Update the database audit logging configuration for a TiDB Cloud Essential cluster. + +```shell +ticloud serverless audit-log config update [flags] +``` + +## Examples + +Configure database audit logging in interactive mode: + +```shell +ticloud serverless audit-log config update +``` + +Unredact the database audit log in non-interactive mode: + +```shell +ticloud serverless audit-log config update -c --unredacted +``` + +Enable database audit logging with S3 Cloud Storage in non-interactive mode: + +```shell +ticloud serverless audit-log config update -c --enabled --cloud-storage S3 --s3.uri --s3.access-key-id --s3.secret-access-key +``` + +Configure database audit logging rotation strategy in non-interactive mode: + +```shell +ticloud serverless audit-log config update -c --rotation-interval-minutes --rotation-size-mib +``` + +Disable database audit logging in non-interactive mode: + +```shell +ticloud serverless audit-log config update -c --enabled=false +``` + +## Flags + +| Flag | Description | Required | Note | +|------|-------------|----------|------| +| --azblob.sas-token string | The SAS token of Azure Blob. | No | Only works in non-interactive mode. | +| --azblob.uri string | The Azure Blob URI in `azure://.blob.core.windows.net//` format. | No | Only works in non-interactive mode. | +| --cloud-storage string | The cloud storage. One of [`"TIDB_CLOUD"`, `"S3"`, `"GCS"`, `"AZURE_BLOB"`, `"OSS"`]. | No | Only works in non-interactive mode. | +| -c, --cluster-id string | The ID of the cluster to be updated. | Yes | Only works in non-interactive mode. | +| --enabled | Enable or disable database audit logging. | No | Only works in non-interactive mode. | +| --gcs.service-account-key string | The base64 encoded service account key of GCS. | No | Only works in non-interactive mode. | +| --gcs.uri string | The GCS URI in `gs:///` format. | No | Only works in non-interactive mode. | +| --oss.access-key-id string | The access key ID of the OSS. | No | Only works in non-interactive mode. | +| --oss.access-key-secret string | The access key secret of the OSS. | No | Only works in non-interactive mode. | +| --oss.uri string | The OSS URI in `oss:///` format. | No | Only works in non-interactive mode. | +| --rotation-interval-minutes int32 | The rotation interval in minutes, range [10, 1440]. | No | Only works in non-interactive mode. | +| --rotation-size-mib int32 | The rotation size in MiB, range [1, 1024]. | No | Only works in non-interactive mode. | +| --s3.access-key-id string | The access key ID of S3. You only need to set one of the `s3.role-arn` and [`s3.access-key-id`, `s3.secret-access-key`]. | No | Only works in non-interactive mode. | +| --s3.role-arn string | The role ARN of S3. You only need to set one of the `s3.role-arn` and [`s3.access-key-id`, `s3.secret-access-key`]. | No | Only works in non-interactive mode. | +| --s3.secret-access-key string | The secret access key of S3. You only need to set one of the `s3.role-arn` and [`s3.access-key-id`, `s3.secret-access-key`]. | No | Only works in non-interactive mode. | +| --s3.uri string | The S3 URI in `s3:///` format. | No | Only works in non-interactive mode. | +| --unredacted | Unredact or redact the database audit log. | No | Only works in non-interactive mode. | +| -h, --help | Shows help information for this command. | No | Works in both interactive and non-interactive modes. | + +## Inherited flags + +| Flag | Description | Required | Note | +|------|-------------|----------|------| +| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disable color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | + +## Feedback + +If you have any questions or suggestions on the TiDB Cloud CLI, feel free to create an [issue](https://github.com/tidbcloud/tidbcloud-cli/issues/new/choose). Also, we welcome any contributions. \ No newline at end of file diff --git a/tidb-cloud/ticloud-serverless-audit-log-download.md b/tidb-cloud/ticloud-serverless-audit-log-download.md new file mode 100644 index 0000000000000..e72bcf373cbc0 --- /dev/null +++ b/tidb-cloud/ticloud-serverless-audit-log-download.md @@ -0,0 +1,50 @@ +--- +title: ticloud serverless audit-log download +summary: The reference of `ticloud serverless audit-log download`. +--- + +# ticloud serverless audit-log download + +Download the database audit log files from a TiDB Cloud Essential cluster. + +```shell +ticloud serverless audit-log download [flags] +``` + +## Examples + +Download the database audit logs in interactive mode: + +```shell +ticloud serverless audit-log download +``` + +Download the database audit logs in non-interactive mode: + +```shell +ticloud serverless audit-log download -c --start-date --end-date +``` + +## Flags + +| Flag | Description | Required | Note | +|-------------------------|-----------------------------------------------------------------------------------------------|----------|------------------------------------------------------| +| -c, --cluster-id string | The ID of the cluster. | Yes | Only works in non-interactive mode. | +| --start-date string | The start date of the audit log you want to download in the format of `YYYY-MM-DD`, for example, `2025-01-01`. | Yes | Only works in non-interactive mode. | +| --end-date string | The end date of the audit log you want to download in the format of `YYYY-MM-DD`, for example, `2025-01-01`. | Yes | Only works in non-interactive mode. | +| --output-path string | The path to download the audit logs. If not specified, logs are downloaded to the current directory. | No | Only works in non-interactive mode. | +| --concurrency int | Download concurrency. (default 3) | No | Works in both interactive and non-interactive modes. | +| --force | Download without confirmation. | No | Works in both interactive and non-interactive modes. | +| -h, --help | Shows help information for this command. | No | Works in both interactive and non-interactive modes. | + +## Inherited flags + +| Flag | Description | Required | Note | +|----------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------------| +| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disable color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | + +## Feedback + +If you have any questions or suggestions on the TiDB Cloud CLI, feel free to create an [issue](https://github.com/tidbcloud/tidbcloud-cli/issues/new/choose). Also, we welcome any contributions. diff --git a/tidb-cloud/ticloud-auditlog-filter-create.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md similarity index 57% rename from tidb-cloud/ticloud-auditlog-filter-create.md rename to tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md index f52e858b1a8c0..6e2964f33fd64 100644 --- a/tidb-cloud/ticloud-auditlog-filter-create.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md @@ -5,56 +5,48 @@ summary: The reference of `ticloud serverless audit-log filter-rule create`. # ticloud serverless audit-log filter-rule create -Create an audit log filter rule for a {{{ .starter }}} or {{{ .essential }}} cluster. +Create an audit log filter rule for a TiDB Cloud Essential cluster. ```shell ticloud serverless audit-log filter-rule create [flags] ``` -Or use the following alias command: - -```shell -ticloud serverless audit-log filter create [flags] -``` - ## Examples Create a filter rule in interactive mode: ```shell -ticloud serverless audit-log filter create +ticloud serverless audit-log filter-rule create ``` -Create a filter rule that captures all audit logs in non-interactive mode: +Create a filter rule to capture all audit logs in non-interactive mode: ```shell -ticloud serverless audit-log filter create --cluster-id --name --rule '{"users":["%@%"],"filters":[{}]}' +ticloud serverless audit-log filter-rule create --cluster-id --display-name --rule '{"users":["%@%"],"filters":[{}]}' ``` -Create a filter rule that filters `QUERY` and `EXECUTE` events for the `test.t` table and filters `QUERY` events for all tables in non-interactive mode: +Create a filter rule to capture `QUERY` and `EXECUTE` events for the `test.t` table, and `QUERY` events for all tables in non-interactive mode: ```shell -ticloud serverless audit-log filter create --cluster-id --name --rule '{"users":["%@%"],"filters":[{"classes":["QUERY","EXECUTE"],"tables":["test.t"]},{"classes":["QUERY"]}]}' +ticloud serverless audit-log filter-rule create --cluster-id --display-name --rule '{"users":["%@%"],"filters":[{"classes":["QUERY","EXECUTE"],"tables":["test.t"]},{"classes":["QUERY"]}]}' ``` ## 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. | Yes | Only works in non-interactive mode. | -| --rule string | Filter rule expressions. Use `ticloud serverless audit-log filter template` to see filter templates. | Yes | Only works in non-interactive mode. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | +| --display-name string | The display name of the filter rule. | Yes | Only works in non-interactive mode. | +| --rule string | Filter rule expressions. Use `ticloud serverless audit-log filter-rule template` to see filter templates. | Yes | Only works in non-interactive mode. | +| -h, --help | Shows help information for this command. | No | Works in both interactive and non-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](/tidb-cloud/cli-reference.md#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. | +| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disable color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-auditlog-filter-delete.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md similarity index 61% rename from tidb-cloud/ticloud-auditlog-filter-delete.md rename to tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md index 62c84224a68ff..2d47dc0f9d17d 100644 --- a/tidb-cloud/ticloud-auditlog-filter-delete.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md @@ -5,50 +5,42 @@ summary: The reference of `ticloud serverless audit-log filter-rule delete`. # ticloud serverless audit-log filter-rule delete -Delete an audit log filter rule for a {{{ .starter }}} or {{{ .essential }}} cluster. +Delete an audit log filter rule for a TiDB Cloud Essential cluster. ```shell ticloud serverless audit-log filter-rule delete [flags] ``` -Or use the following alias command: - -```shell -ticloud serverless audit-log filter delete [flags] -``` - ## Examples Delete an audit log filter rule in interactive mode: ```shell -ticloud serverless audit-log filter delete +ticloud serverless audit-log filter-rule delete ``` Delete an audit log filter rule in non-interactive mode: ```shell -ticloud serverless audit-log filter delete --cluster-id --name +ticloud serverless audit-log filter-rule delete --cluster-id --filter-rule-id ``` ## 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. | Yes | Only works in non-interactive mode. | -| --force | Deletes the filter rule without confirmation. | No | Works in both non-interactive and interactive modes. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | +| --filter-rule-id string | The ID of the filter rule. | Yes | Only works in non-interactive mode. | +| --force | Delete without confirmation. | No | Works in both interactive and non-interactive modes. | +| -h, --help | Shows help information for this command. | No | Works in both interactive and non-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](/tidb-cloud/cli-reference.md#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. | +| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disable color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-auditlog-filter-describe.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md similarity index 63% rename from tidb-cloud/ticloud-auditlog-filter-describe.md rename to tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md index 583a8c54bab95..da05cc59cf357 100644 --- a/tidb-cloud/ticloud-auditlog-filter-describe.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md @@ -5,49 +5,41 @@ summary: The reference of `ticloud serverless audit-log filter-rule describe`. # ticloud serverless audit-log filter-rule describe -Describe an audit log filter rule for a {{{ .starter }}} or {{{ .essential }}} cluster. +Describe an audit log filter rule for a TiDB Cloud Essential cluster. ```shell ticloud serverless audit-log filter-rule describe [flags] ``` -Or use the following alias command: - -```shell -ticloud serverless audit-log filter describe [flags] -``` - ## Examples Describe an audit log filter rule in interactive mode: ```shell -ticloud serverless audit-log filter describe +ticloud serverless audit-log filter-rule describe ``` Describe an audit log filter rule in non-interactive mode: ```shell -ticloud serverless audit-log filter describe --cluster-id --name +ticloud serverless audit-log filter-rule describe --cluster-id --filter-rule-id ``` ## 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. | Yes | Only works in non-interactive mode. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | +| --filter-rule-id string | The ID of the filter rule. | Yes | Only works in non-interactive mode. | +| -h, --help | Shows help information for this command. | No | Works in both interactive and non-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](/tidb-cloud/cli-reference.md#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. | +| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disable color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-auditlog-filter-list.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md similarity index 57% rename from tidb-cloud/ticloud-auditlog-filter-list.md rename to tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md index a56588e260cea..7649899b63f0c 100644 --- a/tidb-cloud/ticloud-auditlog-filter-list.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md @@ -5,55 +5,47 @@ summary: The reference of `ticloud serverless audit-log filter-rule list`. # ticloud serverless audit-log filter-rule list -List audit log filter rules for a {{{ .starter }}} or {{{ .essential }}} cluster. +List audit log filter rules for a TiDB Cloud Essential cluster. ```shell ticloud serverless audit-log filter-rule list [flags] ``` -Or use the following alias command: - -```shell -ticloud serverless audit-log filter list [flags] -``` - ## Examples List all audit log filter rules in interactive mode: ```shell -ticloud serverless audit-log filter list +ticloud serverless audit-log filter-rule list ``` List all audit log filter rules in non-interactive mode: ```shell -ticloud serverless audit-log filter list -c +ticloud serverless audit-log filter-rule list -c ``` List all audit log filter rules with JSON format in non-interactive mode: ```shell -ticloud serverless audit-log filter list -c -o json +ticloud serverless audit-log filter-rule list -c -o json ``` ## 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 whose audit log filter rules you want to list. | No | Only works in non-interactive mode. | -| -o, --output string | Specifies the output format (`human` by default). Valid values are `human` or `json`. To get a complete result, use the `json` format. | No | Works in both non-interactive and interactive modes. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | +| -c, --cluster-id string | The ID of the cluster. | No | Only works in non-interactive mode. | +| -o, --output string | Specifies the output format. Valid values are `human` (default) or `json`. For the complete result, use the `json` format. | No | Works in both interactive and non-interactive modes. | +| -h, --help | Shows help information for this command. | No | Works in both interactive and non-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](/tidb-cloud/cli-reference.md#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. | +| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disable color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-auditlog-filter-template.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md similarity index 58% rename from tidb-cloud/ticloud-auditlog-filter-template.md rename to tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md index cf6482a239b69..ce91f014a4357 100644 --- a/tidb-cloud/ticloud-auditlog-filter-template.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md @@ -5,48 +5,40 @@ summary: The reference of `ticloud serverless audit-log filter-rule template`. # ticloud serverless audit-log filter-rule template -Show audit log filter rule templates for a {{{ .starter }}} or {{{ .essential }}} cluster. +Show audit log filter rule templates for a TiDB Cloud Essential cluster. ```shell ticloud serverless audit-log filter-rule template [flags] ``` -Or use the following alias command: - -```shell -ticloud serverless audit-log filter template [flags] -``` - ## Examples Show filter templates in interactive mode: ```shell -ticloud serverless audit-log filter template +ticloud serverless audit-log filter-rule template ``` Show filter templates in non-interactive mode: ```shell -ticloud serverless audit-log filter template --cluster-id +ticloud serverless audit-log filter-rule template --cluster-id ``` ## 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 (optional, for context if templates might become cluster-specific). | No | Only works in non-interactive mode. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | +| -c, --cluster-id string | The ID of the cluster. | No | Only works in non-interactive mode. | +| -h, --help | Shows help information for this command. | No | Works in both interactive and non-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](/tidb-cloud/cli-reference.md#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. | +| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disable color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-auditlog-filter-update.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md similarity index 55% rename from tidb-cloud/ticloud-auditlog-filter-update.md rename to tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md index 376cd4760ea38..21b6fe2e204ca 100644 --- a/tidb-cloud/ticloud-auditlog-filter-update.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md @@ -5,63 +5,56 @@ summary: The reference of `ticloud serverless audit-log filter-rule update`. # ticloud serverless audit-log filter-rule update -Update an audit log filter rule for a {{{ .starter }}} or {{{ .essential }}} cluster. +Update an audit log filter rule for a TiDB Cloud Essential cluster. ```shell ticloud serverless audit-log filter-rule update [flags] ``` -Or use the following alias command: - -```shell -ticloud serverless audit-log filter update [flags] -``` - ## Examples Update an audit log filter rule in interactive mode: ```shell -ticloud serverless audit-log filter update +ticloud serverless audit-log filter-rule update ``` -Enable an audit log filter rule in non-interactive mode: +Enable audit log filter rule in non-interactive mode: ```shell -ticloud serverless audit-log filter update --cluster-id --name --enabled +ticloud serverless audit-log filter-rule update --cluster-id --filter-rule-id --enabled ``` -Disable an audit log filter rule in non-interactive mode: +Disable audit log filter rule in non-interactive mode: ```shell -ticloud serverless audit-log filter update --cluster-id --name --enabled=false +ticloud serverless audit-log filter-rule update --cluster-id --filter-rule-id --enabled=false ``` Update filters of an audit log filter rule in non-interactive mode: ```shell -ticloud serverless audit-log filter update --cluster-id --name --rule '{"users":["%@%"],"filters":[{"classes":["QUERY"],"tables":["test.t"]}]}' +ticloud serverless audit-log filter-rule update --cluster-id --filter-rule-id --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. | +| --display-name string | The display name of the filter rule. | No | Only works in non-interactive mode. | +| --enabled | Enable or disable the filter rule. | No | Only works in non-interactive mode. | +| --filter-rule-id string | The ID of the filter rule. | Yes | Only works in non-interactive mode. | +| --rule string | Complete filter rule expressions. 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 interactive and non-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](/tidb-cloud/cli-reference.md#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. | +| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disable color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback