From 7cd8134ad7799eef8d0ec5a7106e28426ec3dcf5 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Mon, 15 Sep 2025 20:19:31 +0800 Subject: [PATCH 1/7] add toc and cli --- TOC-tidb-cloud-essential.md | 12 +++ tidb-cloud/ticloud-auditlog-config.md | 61 -------------- tidb-cloud/ticloud-auditlog-download.md | 52 ------------ ...d-serverless-audit-log-config-describe.md} | 31 +++----- ...loud-serverless-audit-log-config-update.md | 79 +++++++++++++++++++ .../ticloud-serverless-audit-log-download.md | 50 ++++++++++++ ...erverless-audit-log-filter-rule-create.md} | 32 +++----- ...erverless-audit-log-filter-rule-delete.md} | 26 +++--- ...verless-audit-log-filter-rule-describe.md} | 24 ++---- ...-serverless-audit-log-filter-rule-list.md} | 30 +++---- ...verless-audit-log-filter-rule-template.md} | 24 ++---- ...erverless-audit-log-filter-rule-update.md} | 37 ++++----- 12 files changed, 217 insertions(+), 241 deletions(-) delete mode 100644 tidb-cloud/ticloud-auditlog-config.md delete mode 100644 tidb-cloud/ticloud-auditlog-download.md rename tidb-cloud/{ticloud-auditlog-describe.md => ticloud-serverless-audit-log-config-describe.md} (59%) create mode 100644 tidb-cloud/ticloud-serverless-audit-log-config-update.md create mode 100644 tidb-cloud/ticloud-serverless-audit-log-download.md rename tidb-cloud/{ticloud-auditlog-filter-create.md => ticloud-serverless-audit-log-filter-rule-create.md} (58%) rename tidb-cloud/{ticloud-auditlog-filter-delete.md => ticloud-serverless-audit-log-filter-rule-delete.md} (61%) rename tidb-cloud/{ticloud-auditlog-filter-describe.md => ticloud-serverless-audit-log-filter-rule-describe.md} (63%) rename tidb-cloud/{ticloud-auditlog-filter-list.md => ticloud-serverless-audit-log-filter-rule-list.md} (57%) rename tidb-cloud/{ticloud-auditlog-filter-template.md => ticloud-serverless-audit-log-filter-rule-template.md} (58%) rename tidb-cloud/{ticloud-auditlog-filter-update.md => ticloud-serverless-audit-log-filter-rule-update.md} (55%) 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..e1d3061e9509d --- /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 the 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 the 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 the 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 \ 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..18d5360d40621 --- /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 | 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', e.g. '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', e.g. '2025-01-01'. | Yes | Only works in non-interactive mode. | +| --output-path string | The path where you want to download to. If not specified, download 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 58% rename from tidb-cloud/ticloud-auditlog-filter-create.md rename to tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md index f52e858b1a8c0..72ab87c159a7b 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 which filters 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 which filters QUERY and EXECUTE for `test.t` and filters QUERY 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 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..194647e5f0124 100644 --- a/tidb-cloud/ticloud-auditlog-filter-list.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md @@ -5,55 +5,49 @@ 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 cluster ID of the audit log filter rules to be listed. | No | Only works in non-interactive mode. | +| -o, --output string | Output format, one of ["human", "json"]. For the complete result, please use json format. (default "human") | 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. | + +## SEE ALSO ## 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 From 1797d267b80ce97ae09d23d31c3f86bdb135d58e Mon Sep 17 00:00:00 2001 From: shi yuhang <52435083+shiyuhang0@users.noreply.github.com> Date: Tue, 16 Sep 2025 14:33:55 +0800 Subject: [PATCH 2/7] Apply suggestions from code review Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .../ticloud-serverless-audit-log-config-update.md | 10 +++++----- tidb-cloud/ticloud-serverless-audit-log-download.md | 8 ++++---- .../ticloud-serverless-audit-log-filter-rule-create.md | 6 +++--- .../ticloud-serverless-audit-log-filter-rule-list.md | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tidb-cloud/ticloud-serverless-audit-log-config-update.md b/tidb-cloud/ticloud-serverless-audit-log-config-update.md index e1d3061e9509d..054640cb6c071 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-config-update.md +++ b/tidb-cloud/ticloud-serverless-audit-log-config-update.md @@ -49,7 +49,7 @@ ticloud serverless audit-log config update -c --enabled=false |------|-------------|----------|------| | --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. | +| --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. | @@ -59,9 +59,9 @@ ticloud serverless audit-log config update -c --enabled=false | --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 the 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 the 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 the 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.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. | @@ -76,4 +76,4 @@ ticloud serverless audit-log config update -c --enabled=false ## 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 \ 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. \ 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 index 18d5360d40621..e72bcf373cbc0 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-download.md +++ b/tidb-cloud/ticloud-serverless-audit-log-download.md @@ -29,10 +29,10 @@ ticloud serverless audit-log download -c --start-date | 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', e.g. '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', e.g. '2025-01-01'. | Yes | Only works in non-interactive mode. | -| --output-path string | The path where you want to download to. If not specified, download to the current directory. | No | Only works in non-interactive mode. | +| -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. | diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md index 72ab87c159a7b..6e2964f33fd64 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md @@ -19,13 +19,13 @@ Create a filter rule in interactive mode: ticloud serverless audit-log filter-rule create ``` -Create a filter rule which filters 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-rule create --cluster-id --display-name --rule '{"users":["%@%"],"filters":[{}]}' ``` -Create a filter rule which filters QUERY and EXECUTE for `test.t` and filters QUERY 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-rule create --cluster-id --display-name --rule '{"users":["%@%"],"filters":[{"classes":["QUERY","EXECUTE"],"tables":["test.t"]},{"classes":["QUERY"]}]}' @@ -37,7 +37,7 @@ ticloud serverless audit-log filter-rule create --cluster-id --disp |-------------------------|-------------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------| | -c, --cluster-id string | The ID of the cluster. | Yes | Only works in non-interactive mode. | | --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 template" to see filter templates. | 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 diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md index 194647e5f0124..217db5ae86ed5 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md @@ -35,8 +35,8 @@ ticloud serverless audit-log filter-rule list -c -o json | Flag | Description | Required | Note | |-------------------------|---------------------------------------------------------------------------------------------------|----------|------------------------------------------------------| -| -c, --cluster-id string | The cluster ID of the audit log filter rules to be listed. | No | Only works in non-interactive mode. | -| -o, --output string | Output format, one of ["human", "json"]. For the complete result, please use json format. (default "human") | No | Works in both interactive and non-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 From b5e8eb8ffae82cd91bfc15a6f8165fadde5c05b7 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Tue, 16 Sep 2025 14:34:51 +0800 Subject: [PATCH 3/7] fix --- tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md index 217db5ae86ed5..7649899b63f0c 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md @@ -47,8 +47,6 @@ ticloud serverless audit-log filter-rule list -c -o json | --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. | -## SEE ALSO - ## 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. From 8f7cb273fe03150a30ac5c4905b5b762a351d277 Mon Sep 17 00:00:00 2001 From: shi yuhang <52435083+shiyuhang0@users.noreply.github.com> Date: Fri, 10 Oct 2025 12:45:12 +0800 Subject: [PATCH 4/7] Apply suggestions from code review Co-authored-by: xixirangrang --- tidb-cloud/ticloud-serverless-audit-log-config-update.md | 6 +++--- tidb-cloud/ticloud-serverless-audit-log-download.md | 4 ++-- .../ticloud-serverless-audit-log-filter-rule-create.md | 2 +- .../ticloud-serverless-audit-log-filter-rule-delete.md | 8 ++++---- .../ticloud-serverless-audit-log-filter-rule-describe.md | 6 +++--- .../ticloud-serverless-audit-log-filter-rule-list.md | 6 +++--- .../ticloud-serverless-audit-log-filter-rule-template.md | 6 +++--- .../ticloud-serverless-audit-log-filter-rule-update.md | 8 ++++---- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tidb-cloud/ticloud-serverless-audit-log-config-update.md b/tidb-cloud/ticloud-serverless-audit-log-config-update.md index 054640cb6c071..09ff98140107e 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-config-update.md +++ b/tidb-cloud/ticloud-serverless-audit-log-config-update.md @@ -5,7 +5,7 @@ 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. +Update the database audit logging configuration for a {{{ .essential }}} cluster. ```shell ticloud serverless audit-log config update [flags] @@ -57,8 +57,8 @@ ticloud serverless audit-log config update -c --enabled=false | --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. | +| --rotation-interval-minutes int32 | The rotation interval in minutes. Valid range: [10, 1440]. | No | Only works in non-interactive mode. | +| --rotation-size-mib int32 | The rotation size in MiB. Valid 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. | diff --git a/tidb-cloud/ticloud-serverless-audit-log-download.md b/tidb-cloud/ticloud-serverless-audit-log-download.md index e72bcf373cbc0..d02b77536708a 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-download.md +++ b/tidb-cloud/ticloud-serverless-audit-log-download.md @@ -5,7 +5,7 @@ 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. +Download the database audit log files from a {{{ .essential }}} cluster. ```shell ticloud serverless audit-log download [flags] @@ -33,7 +33,7 @@ ticloud serverless audit-log download -c --start-date | --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. | +| --concurrency int | Download concurrency. By default, the value is `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. | diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md index 6e2964f33fd64..c6326a8e671cf 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md @@ -5,7 +5,7 @@ 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 TiDB Cloud Essential cluster. +Create an audit log filter rule for a {{{ .essential }}} cluster. ```shell ticloud serverless audit-log filter-rule create [flags] diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md index 2d47dc0f9d17d..d2b8cf75c9e4f 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md @@ -5,7 +5,7 @@ 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 TiDB Cloud Essential cluster. +Delete an audit log filter rule for a {{{ .essential }}} cluster. ```shell ticloud serverless audit-log filter-rule delete [flags] @@ -31,15 +31,15 @@ ticloud serverless audit-log filter-rule delete --cluster-id --filt |-------------------------|-----------------------------------------------------|----------|------------------------------------------------------| | -c, --cluster-id string | The ID of the cluster. | Yes | Only works in non-interactive mode. | | --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. | +| --force | Deletes 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. | +| -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disables 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-serverless-audit-log-filter-rule-describe.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md index da05cc59cf357..b2cbf7892845a 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md @@ -5,7 +5,7 @@ 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 TiDB Cloud Essential cluster. +Describe an audit log filter rule for a {{{ .essential }}} cluster. ```shell ticloud serverless audit-log filter-rule describe [flags] @@ -37,8 +37,8 @@ ticloud serverless audit-log filter-rule describe --cluster-id --fi | 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. | +| -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disables 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-serverless-audit-log-filter-rule-list.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md index 7649899b63f0c..ec8c52932b133 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md @@ -5,7 +5,7 @@ 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 TiDB Cloud Essential cluster. +List audit log filter rules for a{{{ .essential }}} cluster. ```shell ticloud serverless audit-log filter-rule list [flags] @@ -43,8 +43,8 @@ ticloud serverless audit-log filter-rule list -c -o json | 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. | +| -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disables 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-serverless-audit-log-filter-rule-template.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md index ce91f014a4357..03f8c7472ed44 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md @@ -5,7 +5,7 @@ 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 TiDB Cloud Essential cluster. +Show audit log filter rule templates for a {{{ .essential }}} cluster. ```shell ticloud serverless audit-log filter-rule template [flags] @@ -36,8 +36,8 @@ ticloud serverless audit-log filter-rule template --cluster-id | 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. | +| -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disables 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-serverless-audit-log-filter-rule-update.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md index 21b6fe2e204ca..cc51d302a9b15 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md @@ -5,7 +5,7 @@ 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 TiDB Cloud Essential cluster. +Update an audit log filter rule for a {{{ .essential }}} cluster. ```shell ticloud serverless audit-log filter-rule update [flags] @@ -43,7 +43,7 @@ ticloud serverless audit-log filter-rule update --cluster-id --filt |-------------------------|-------------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------| | -c, --cluster-id string | The ID of the cluster. | Yes | Only works in non-interactive mode. | | --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. | +| --enabled | Enables or disables 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. | @@ -52,8 +52,8 @@ ticloud serverless audit-log filter-rule update --cluster-id --filt | 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. | +| -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disables 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 From a4e549a106c7b15229cdf857020babd009f8a9f6 Mon Sep 17 00:00:00 2001 From: houfaxin Date: Fri, 10 Oct 2025 16:20:10 +0800 Subject: [PATCH 5/7] refine wording --- ...loud-serverless-audit-log-config-update.md | 22 +++++++++---------- .../ticloud-serverless-audit-log-download.md | 6 ++--- ...serverless-audit-log-filter-rule-create.md | 4 ++-- ...serverless-audit-log-filter-rule-update.md | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tidb-cloud/ticloud-serverless-audit-log-config-update.md b/tidb-cloud/ticloud-serverless-audit-log-config-update.md index 09ff98140107e..357ed9ab8558f 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-config-update.md +++ b/tidb-cloud/ticloud-serverless-audit-log-config-update.md @@ -49,31 +49,31 @@ ticloud serverless audit-log config update -c --enabled=false |------|-------------|----------|------| | --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. | +| --cloud-storage string | The cloud storage. Valid options: [`"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. | +| --enabled | Enables or disables 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. | +| --gcs.uri string | The GCS URI in the `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. Valid range: [10, 1440]. | No | Only works in non-interactive mode. | -| --rotation-size-mib int32 | The rotation size in MiB. Valid range: [1, 1024]. | No | Only works in non-interactive mode. | +| --oss.uri string | The OSS URI in the `oss:///` format. | No | Only works in non-interactive mode. | +| --rotation-interval-minutes int32 | The rotation interval in minutes. Valid range: `[10, 1440]`. | No | Only works in non-interactive mode. | +| --rotation-size-mib int32 | The rotation size in MiB. Valid 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. | +| --s3.uri string | The S3 URI in the `s3:///` format. | No | Only works in non-interactive mode. | +| --unredacted | Unredacts or redacts 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. | +| -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disables 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-download.md b/tidb-cloud/ticloud-serverless-audit-log-download.md index d02b77536708a..2860a7b6c16ea 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-download.md +++ b/tidb-cloud/ticloud-serverless-audit-log-download.md @@ -34,15 +34,15 @@ ticloud serverless audit-log download -c --start-date | --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. By default, the value is `3`. | No | Works in both interactive and non-interactive modes. | -| --force | Download without confirmation. | No | Works in both interactive and non-interactive modes. | +| --force | Downloads 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. | +| -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disables 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-serverless-audit-log-filter-rule-create.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md index c6326a8e671cf..d39508d2f6498 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md @@ -44,8 +44,8 @@ ticloud serverless audit-log filter-rule create --cluster-id --disp | 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. | +| -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disables 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-serverless-audit-log-filter-rule-update.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md index cc51d302a9b15..bf48bd8799925 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md @@ -45,7 +45,7 @@ ticloud serverless audit-log filter-rule update --cluster-id --filt | --display-name string | The display name of the filter rule. | No | Only works in non-interactive mode. | | --enabled | Enables or disables 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. | +| --rule string | Complete filter rule expressions. Use [`ticloud serverless audit-log filter template`](/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md) 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 From 04892ac5998ecc7b51a82002610e5b215677a39f Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Sat, 11 Oct 2025 16:50:35 +0800 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Aolin --- ...ud-serverless-audit-log-config-describe.md | 8 +++--- ...loud-serverless-audit-log-config-update.md | 28 +++++++++---------- .../ticloud-serverless-audit-log-download.md | 6 ++-- ...serverless-audit-log-filter-rule-create.md | 2 +- ...serverless-audit-log-filter-rule-delete.md | 2 +- ...rverless-audit-log-filter-rule-describe.md | 2 +- ...d-serverless-audit-log-filter-rule-list.md | 2 +- ...rverless-audit-log-filter-rule-template.md | 2 +- ...serverless-audit-log-filter-rule-update.md | 2 +- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tidb-cloud/ticloud-serverless-audit-log-config-describe.md b/tidb-cloud/ticloud-serverless-audit-log-config-describe.md index 98aabe3ed0636..5855a29bc45fb 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-config-describe.md +++ b/tidb-cloud/ticloud-serverless-audit-log-config-describe.md @@ -5,7 +5,7 @@ summary: The reference of `ticloud serverless audit-log config describe`. # ticloud serverless audit-log config describe -Describe the database audit logging configuration for a TiDB Cloud Essential cluster. +Describe the database audit logging configuration for a {{{ .essential }}} cluster. ```shell ticloud serverless audit-log config describe [flags] @@ -36,9 +36,9 @@ ticloud serverless audit-log config describe -c | 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. | +| -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | +| --no-color | Disables color output. | No | Only works in non-interactive mode. | +| -P, --profile string | Specifies the profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-serverless-audit-log-config-update.md b/tidb-cloud/ticloud-serverless-audit-log-config-update.md index 357ed9ab8558f..9725f78d29b1c 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-config-update.md +++ b/tidb-cloud/ticloud-serverless-audit-log-config-update.md @@ -25,7 +25,7 @@ Unredact the database audit log in non-interactive mode: ticloud serverless audit-log config update -c --unredacted ``` -Enable database audit logging with S3 Cloud Storage in non-interactive mode: +Enable database audit logging with Amazon S3 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 @@ -47,22 +47,22 @@ ticloud serverless audit-log config update -c --enabled=false | 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. Valid options: [`"TIDB_CLOUD"`, `"S3"`, `"GCS"`, `"AZURE_BLOB"`, `"OSS"`]. | No | Only works in non-interactive mode. | +| --azblob.sas-token string | The SAS token of Azure Blob Storage. | No | Only works in non-interactive mode. | +| --azblob.uri string | The Azure Blob Storage URI in `azure://.blob.core.windows.net//` format. | No | Only works in non-interactive mode. | +| --cloud-storage string | The cloud storage provider. Valid options: `"TIDB_CLOUD"`, `"S3"`, `"GCS"`, `"AZURE_BLOB"`, and `"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 | Enables or disables 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 the `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 the `oss:///` format. | No | Only works in non-interactive mode. | +| --gcs.service-account-key string | The Base64-encoded service account key of Google Cloud Storage. | No | Only works in non-interactive mode. | +| --gcs.uri string | The Google Cloud Storage URI in `gs:///` format. | No | Only works in non-interactive mode. | +| --oss.access-key-id string | The access key ID of Alibaba Cloud Object Storage Service (OSS). | No | Only works in non-interactive mode. | +| --oss.access-key-secret string | The access key secret of Alibaba Cloud OSS. | No | Only works in non-interactive mode. | +| --oss.uri string | The Alibaba Cloud OSS URI in `oss:///` format. | No | Only works in non-interactive mode. | | --rotation-interval-minutes int32 | The rotation interval in minutes. Valid range: `[10, 1440]`. | No | Only works in non-interactive mode. | | --rotation-size-mib int32 | The rotation size in MiB. Valid 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 the `s3:///` format. | No | Only works in non-interactive mode. | +| --s3.access-key-id string | The access key ID of Amazon S3. You only need to set either `--s3.role-arn` or both `--s3.access-key-id` and `--s3.secret-access-key`. | No | Only works in non-interactive mode. | +| --s3.role-arn string | The role ARN of Amazon S3. You only need to set either `--s3.role-arn` or both `--s3.access-key-id` and `--s3.secret-access-key`. | No | Only works in non-interactive mode. | +| --s3.secret-access-key string | The secret access key of Amazon S3. You only need to set either `--s3.role-arn` or both `--s3.access-key-id` and `--s3.secret-access-key`. | No | Only works in non-interactive mode. | +| --s3.uri string | The Amazon S3 URI in `s3:///` format. | No | Only works in non-interactive mode. | | --unredacted | Unredacts or redacts 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. | @@ -72,7 +72,7 @@ ticloud serverless audit-log config update -c --enabled=false |------|-------------|----------|------| | -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | | --no-color | Disables 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. | +| -P, --profile string | Specifies the profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-serverless-audit-log-download.md b/tidb-cloud/ticloud-serverless-audit-log-download.md index 2860a7b6c16ea..b278065120691 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-download.md +++ b/tidb-cloud/ticloud-serverless-audit-log-download.md @@ -33,8 +33,8 @@ ticloud serverless audit-log download -c --start-date | --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. By default, the value is `3`. | No | Works in both interactive and non-interactive modes. | -| --force | Downloads without confirmation. | No | Works in both interactive and non-interactive modes. | +| --concurrency int | The number of concurrent downloads. The default value is `3`. | No | Works in both interactive and non-interactive modes. | +| --force | Downloads audit logs 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 @@ -43,7 +43,7 @@ ticloud serverless audit-log download -c --start-date |----------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------------| | -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | | --no-color | Disables 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. | +| -P, --profile string | Specifies the profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md index d39508d2f6498..4a02ad5fc22da 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-create.md @@ -46,7 +46,7 @@ ticloud serverless audit-log filter-rule create --cluster-id --disp |----------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------------| | -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | | --no-color | Disables 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. | +| -P, --profile string | Specifies the profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md index d2b8cf75c9e4f..7f05bd9e70ddd 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-delete.md @@ -40,7 +40,7 @@ ticloud serverless audit-log filter-rule delete --cluster-id --filt |----------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------------| | -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | | --no-color | Disables 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. | +| -P, --profile string | Specifies the profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md index b2cbf7892845a..e2936f22f1799 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-describe.md @@ -39,7 +39,7 @@ ticloud serverless audit-log filter-rule describe --cluster-id --fi |----------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------------| | -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | | --no-color | Disables 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. | +| -P, --profile string | Specifies the profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md index ec8c52932b133..ee5f99df487a2 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md @@ -45,7 +45,7 @@ ticloud serverless audit-log filter-rule list -c -o json |----------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------------| | -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | | --no-color | Disables 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. | +| -P, --profile string | Specifies the profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md index 03f8c7472ed44..ade5954bc4c40 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-template.md @@ -38,7 +38,7 @@ ticloud serverless audit-log filter-rule template --cluster-id |----------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------------| | -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | | --no-color | Disables 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. | +| -P, --profile string | Specifies the profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md index bf48bd8799925..9b90de008a1e3 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-update.md @@ -54,7 +54,7 @@ ticloud serverless audit-log filter-rule update --cluster-id --filt |----------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------------| | -D, --debug | Enables debug mode. | No | Works in both interactive and non-interactive modes. | | --no-color | Disables 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. | +| -P, --profile string | Specifies the profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | ## Feedback From cc11866677907209c691ce75255122ea09ffb932 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Mon, 13 Oct 2025 08:42:26 +0800 Subject: [PATCH 7/7] Apply suggestions from code review Co-authored-by: Aolin --- tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md index ee5f99df487a2..f9e2403255aea 100644 --- a/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md +++ b/tidb-cloud/ticloud-serverless-audit-log-filter-rule-list.md @@ -5,7 +5,7 @@ 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{{{ .essential }}} cluster. +List audit log filter rules for a {{{ .essential }}} cluster. ```shell ticloud serverless audit-log filter-rule list [flags]