From 82b8fc8c750dfc8e5e193b47f2a63dbf3c0d79ff Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 23 Apr 2025 11:08:45 +0800 Subject: [PATCH 1/3] add oss target for export --- tidb-cloud/ticloud-serverless-export-create.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tidb-cloud/ticloud-serverless-export-create.md b/tidb-cloud/ticloud-serverless-export-create.md index 7caf468707bd5..d91646c4c6277 100644 --- a/tidb-cloud/ticloud-serverless-export-create.md +++ b/tidb-cloud/ticloud-serverless-export-create.md @@ -43,6 +43,12 @@ Export data from a TiDB Cloud Serverless cluster to Azure Blob Storage in non-in ticloud serverless export create -c --azblob.uri --azblob.sas-token --filter ``` +Export data from a TiDB Cloud Serverless cluster to Alibaba Cloud OSS in non-interactive mode: + +```shell +ticloud serverless export create -c --oss.uri --oss.access-key-id --oss.access-key-secret --filter +``` + Export data to a Parquet file and compress it with `SNAPPY` in non-interactive mode: ```shell @@ -63,7 +69,7 @@ In non-interactive mode, you need to manually enter the required flags. In inter |----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------| | -c, --cluster-id string | Specifies the ID of the cluster, from which you want to export data. | Yes | Only works in non-interactive mode. | | --file-type string | Specifies the export file type. One of ["SQL" "CSV" "PARQUET"]. (default "CSV") | No | Only works in non-interactive mode. | -| --target-type string | Specifies the export target. One of [`"LOCAL"` `"S3"` `"GCS"` `"AZURE_BLOB"`]. The default value is `"LOCAL"`. | No | Only works in non-interactive mode. | +| --target-type string | Specifies the export target. One of [`"LOCAL"` `"S3"` `"GCS"` `"AZURE_BLOB"` `"OSS"`]. The default value is `"LOCAL"`. | No | Only works in non-interactive mode. | | --s3.uri string | Specifies the S3 URI in `s3:///` format. Required when the target type is S3. | No | Only works in non-interactive mode. | | --s3.access-key-id string | Specifies the access key ID of Amazon 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 | Specifies the secret access key of Amazon 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. | @@ -72,6 +78,9 @@ In non-interactive mode, you need to manually enter the required flags. In inter | --gcs.service-account-key string | Specifies the base64 encoded service account key of GCS. | No | Only works in non-interactive mode. | | --azblob.uri string | Specifies the Azure Blob URI in `azure://.blob.core.windows.net//` format. Required when the target type is AZURE_BLOB. | No | Only works in non-interactive mode. | | --azblob.sas-token string | Specifies the SAS token of Azure Blob. | No | Only works in non-interactive mode. | +| --oss.uri string | Specifies the Alibaba Cloud OSS URI in `oss:///` format. Required when the target type is OSS. | No | Only works in non-interactive mode. | +| --oss.access-key-id string | Specifies the AccessKey ID of the OSS. | No | Only works in non-interactive mode. | +| --oss.access-key-secret string | Specifies the AccessKey secret of the OSS. | No | Only works in non-interactive mode. | | --csv.delimiter string | Specifies the delimiter of string type variables in CSV files. (default "\"") | No | Only works in non-interactive mode. | | --csv.null-value string | Specifies the representation of null values in CSV files. (default "\\N") | No | Only works in non-interactive mode. | | --csv.separator string | Specifies the separator of each value in CSV files. (default ",") | No | Only works in non-interactive mode. | From 5a27b92499eae40b0905a5693ab73c40fe9f82b6 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 23 Apr 2025 11:26:43 +0800 Subject: [PATCH 2/3] add authorized-network --- TOC-tidb-cloud.md | 5 ++ ...ud-serverless-authorized-network-create.md | 50 ++++++++++++++++++ ...ud-serverless-authorized-network-delete.md | 50 ++++++++++++++++++ ...loud-serverless-authorized-network-list.md | 48 +++++++++++++++++ ...ud-serverless-authorized-network-update.md | 52 +++++++++++++++++++ 5 files changed, 205 insertions(+) create mode 100644 tidb-cloud/ticloud-serverless-authorized-network-create.md create mode 100644 tidb-cloud/ticloud-serverless-authorized-network-delete.md create mode 100644 tidb-cloud/ticloud-serverless-authorized-network-list.md create mode 100644 tidb-cloud/ticloud-serverless-authorized-network-update.md diff --git a/TOC-tidb-cloud.md b/TOC-tidb-cloud.md index 41e1d8495fc90..de4eef04ddd1a 100644 --- a/TOC-tidb-cloud.md +++ b/TOC-tidb-cloud.md @@ -732,6 +732,11 @@ - [delete](/tidb-cloud/ticloud-serverless-sql-user-delete.md) - [list](/tidb-cloud/ticloud-serverless-sql-user-list.md) - [update](/tidb-cloud/ticloud-serverless-sql-user-update.md) + - authorized-network + - [create] (/tidb-cloud/ticloud-serverless-authorized-network-create.md) + - [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) - [ai](/tidb-cloud/ticloud-ai.md) - [completion](/tidb-cloud/ticloud-completion.md) - config diff --git a/tidb-cloud/ticloud-serverless-authorized-network-create.md b/tidb-cloud/ticloud-serverless-authorized-network-create.md new file mode 100644 index 0000000000000..9af9dbb7baa2b --- /dev/null +++ b/tidb-cloud/ticloud-serverless-authorized-network-create.md @@ -0,0 +1,50 @@ +--- +title: ticloud serverless authorized-network create +summary: The reference of `ticloud serverless authorized-network create`. +--- + +# ticloud serverless authorized-network create + +Create an authorized network + +```shell +ticloud serverless authorized-network create [flags] +``` + +## Examples + +Create an authorized network in interactive mode: + +```shell +ticloud serverless authorized-network create +``` + +Create an authorized network in non-interactive mode: + +```shell +ticloud serverless authorized-network create -c --display-name --start-ip-address --end-ip-address +``` + +## 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 | Specifies the ID of the cluster. | Yes | Only works in non-interactive mode. | +| --display-name string | Specifies the name of the authorized network. | Yes | Only works in non-interactive mode. | +| --start-ip-address string | Specifies the start IP address of the authorized network. | Yes | Only works in non-interactive mode. | +| --end-ip-address string | Specifies the end IP address of the authorized network. | Yes | 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-serverless-authorized-network-delete.md b/tidb-cloud/ticloud-serverless-authorized-network-delete.md new file mode 100644 index 0000000000000..106d0a4af5162 --- /dev/null +++ b/tidb-cloud/ticloud-serverless-authorized-network-delete.md @@ -0,0 +1,50 @@ +--- +title: ticloud serverless authorized-network delete +summary: The reference of `ticloud serverless authorized-network delete`. +--- + +# ticloud serverless authorized-network delete + +Delete an authorized network + +```shell +ticloud serverless authorized-network delete [flags] +``` + +## Examples + +Delete an authorized network in interactive mode: + +```shell +ticloud serverless authorized-network delete +``` + +Delete an authorized network in non-interactive mode: + +```shell +ticloud serverless authorized-network delete -c --start-ip-address --end-ip-address +``` + +## 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 | Specifies the ID of the cluster. | Yes | Only works in non-interactive mode. | +| --force string | Delete an authorized network without confirmation. | No | Only works in non-interactive mode. | +| --start-ip-address string | Specifies the start IP address of the authorized network. | Yes | Only works in non-interactive mode. | +| --end-ip-address string | Specifies the end IP address of the authorized network. | Yes | 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-serverless-authorized-network-list.md b/tidb-cloud/ticloud-serverless-authorized-network-list.md new file mode 100644 index 0000000000000..867ead0be6cbc --- /dev/null +++ b/tidb-cloud/ticloud-serverless-authorized-network-list.md @@ -0,0 +1,48 @@ +--- +title: ticloud serverless authorized-network list +summary: The reference of `ticloud serverless authorized-network list`. +--- + +# ticloud serverless authorized-network list + +List all authorized networks + +```shell +ticloud serverless authorized-network list [flags] +``` + +## Examples + +List all authorized networks in interactive mode: + +```shell +ticloud serverless authorized-network list +``` + +List all authorized networks in non-interactive mode: + +```shell +ticloud serverless authorized-network list -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 | Specifies the ID of the cluster. | Yes | Only works in non-interactive mode. | +| --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. | + +## 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-serverless-authorized-network-update.md b/tidb-cloud/ticloud-serverless-authorized-network-update.md new file mode 100644 index 0000000000000..9126daa9919ed --- /dev/null +++ b/tidb-cloud/ticloud-serverless-authorized-network-update.md @@ -0,0 +1,52 @@ +--- +title: ticloud serverless authorized-network update +summary: The reference of `ticloud serverless authorized-network update`. +--- + +# ticloud serverless authorized-network update + +Update an authorized network + +```shell +ticloud serverless authorized-network update [flags] +``` + +## Examples + +Update an authorized network in interactive mode: + +```shell +ticloud serverless authorized-network update +``` + +Update an authorized network in non-interactive mode: + +```shell +ticloud serverless authorized-network update -c --start-ip-address --end-ip-address --new-start-ip-address --new-end-ip-address +``` + +## 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 | Specifies the ID of the cluster. | Yes | Only works in non-interactive mode. | +| --start-ip-address string | Specifies the start IP address of the authorized network. | Yes | Only works in non-interactive mode. | +| --end-ip-address string | Specifies the end IP address of the authorized network. | Yes | Only works in non-interactive mode. | +| --new-display-name string | Specifies the new name of the authorized network. | No | Only works in non-interactive mode. | +| --new-start-ip-address string | Specifies the new start IP address of the authorized network. | No | Only works in non-interactive mode. | +| --new-end-ip-address string | Specifies the new end IP address of the authorized network. | 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. From 59f05d392c91f6928e8ec65b10a88036868f7535 Mon Sep 17 00:00:00 2001 From: shi yuhang <52435083+shiyuhang0@users.noreply.github.com> Date: Thu, 24 Apr 2025 16:55:13 +0800 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Grace Cai --- TOC-tidb-cloud.md | 8 ++++---- .../ticloud-serverless-authorized-network-create.md | 2 +- .../ticloud-serverless-authorized-network-delete.md | 2 +- .../ticloud-serverless-authorized-network-list.md | 2 +- .../ticloud-serverless-authorized-network-update.md | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/TOC-tidb-cloud.md b/TOC-tidb-cloud.md index de4eef04ddd1a..3cc71495ef079 100644 --- a/TOC-tidb-cloud.md +++ b/TOC-tidb-cloud.md @@ -733,10 +733,10 @@ - [list](/tidb-cloud/ticloud-serverless-sql-user-list.md) - [update](/tidb-cloud/ticloud-serverless-sql-user-update.md) - authorized-network - - [create] (/tidb-cloud/ticloud-serverless-authorized-network-create.md) - - [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) + - [create](/tidb-cloud/ticloud-serverless-authorized-network-create.md) + - [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) - [ai](/tidb-cloud/ticloud-ai.md) - [completion](/tidb-cloud/ticloud-completion.md) - config diff --git a/tidb-cloud/ticloud-serverless-authorized-network-create.md b/tidb-cloud/ticloud-serverless-authorized-network-create.md index 9af9dbb7baa2b..1bcbc3c9edd88 100644 --- a/tidb-cloud/ticloud-serverless-authorized-network-create.md +++ b/tidb-cloud/ticloud-serverless-authorized-network-create.md @@ -5,7 +5,7 @@ summary: The reference of `ticloud serverless authorized-network create`. # ticloud serverless authorized-network create -Create an authorized network +Create an authorized network: ```shell ticloud serverless authorized-network create [flags] diff --git a/tidb-cloud/ticloud-serverless-authorized-network-delete.md b/tidb-cloud/ticloud-serverless-authorized-network-delete.md index 106d0a4af5162..e5113d5e9f5fd 100644 --- a/tidb-cloud/ticloud-serverless-authorized-network-delete.md +++ b/tidb-cloud/ticloud-serverless-authorized-network-delete.md @@ -5,7 +5,7 @@ summary: The reference of `ticloud serverless authorized-network delete`. # ticloud serverless authorized-network delete -Delete an authorized network +Delete an authorized network: ```shell ticloud serverless authorized-network delete [flags] diff --git a/tidb-cloud/ticloud-serverless-authorized-network-list.md b/tidb-cloud/ticloud-serverless-authorized-network-list.md index 867ead0be6cbc..3ce3c5fe2424a 100644 --- a/tidb-cloud/ticloud-serverless-authorized-network-list.md +++ b/tidb-cloud/ticloud-serverless-authorized-network-list.md @@ -5,7 +5,7 @@ summary: The reference of `ticloud serverless authorized-network list`. # ticloud serverless authorized-network list -List all authorized networks +List all authorized networks: ```shell ticloud serverless authorized-network list [flags] diff --git a/tidb-cloud/ticloud-serverless-authorized-network-update.md b/tidb-cloud/ticloud-serverless-authorized-network-update.md index 9126daa9919ed..4d23d2552e569 100644 --- a/tidb-cloud/ticloud-serverless-authorized-network-update.md +++ b/tidb-cloud/ticloud-serverless-authorized-network-update.md @@ -5,7 +5,7 @@ summary: The reference of `ticloud serverless authorized-network update`. # ticloud serverless authorized-network update -Update an authorized network +Update an authorized network: ```shell ticloud serverless authorized-network update [flags] @@ -32,11 +32,11 @@ In non-interactive mode, you need to manually enter the required flags. In inter | Flag | Description | Required | Note | |-------------------------|------------------------------------------|----------|------------------------------------------------------| | -c, --cluster-id string | Specifies the ID of the cluster. | Yes | Only works in non-interactive mode. | -| --start-ip-address string | Specifies the start IP address of the authorized network. | Yes | Only works in non-interactive mode. | -| --end-ip-address string | Specifies the end IP address of the authorized network. | Yes | Only works in non-interactive mode. | +| --start-ip-address string | Specifies the starting IP address of the authorized network. | Yes | Only works in non-interactive mode. | +| --end-ip-address string | Specifies the ending IP address of the authorized network. | Yes | Only works in non-interactive mode. | | --new-display-name string | Specifies the new name of the authorized network. | No | Only works in non-interactive mode. | -| --new-start-ip-address string | Specifies the new start IP address of the authorized network. | No | Only works in non-interactive mode. | -| --new-end-ip-address string | Specifies the new end IP address of the authorized network. | No | Only works in non-interactive mode. | +| --new-start-ip-address string | Specifies the new starting IP address of the authorized network. | No | Only works in non-interactive mode. | +| --new-end-ip-address string | Specifies the new ending IP address of the authorized network. | 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