Skip to content

TiDB Cloud Cli v1.0.0-beta.4 #20838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: release-8.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions TOC-tidb-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 50 additions & 0 deletions tidb-cloud/ticloud-serverless-authorized-network-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: ticloud serverless authorized-network create
summary: The reference of `ticloud serverless authorized-network create`.
---

# ticloud serverless authorized-network create

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add an intro paragraph here to tell users what authorized network is?

Copy link
Member Author

@shiyuhang0 shiyuhang0 Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need not. It is just a reference of CLI, other cli doc also does not contains feature intro
The introduction of the feature located here: https://docs.pingcap.com/tidbcloud/configure-serverless-firewall-rules-for-public-endpoints/#allow-aws-access

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name is diffierent, we will unify the name to authorized network in the future

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 <cluster-id> --display-name <display-name> --start-ip-address <start-ip-address> --end-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.
50 changes: 50 additions & 0 deletions tidb-cloud/ticloud-serverless-authorized-network-delete.md
Original file line number Diff line number Diff line change
@@ -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 <cluster-id> --start-ip-address <start-ip-address> --end-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.
48 changes: 48 additions & 0 deletions tidb-cloud/ticloud-serverless-authorized-network-list.md
Original file line number Diff line number Diff line change
@@ -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 <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 | 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.
52 changes: 52 additions & 0 deletions tidb-cloud/ticloud-serverless-authorized-network-update.md
Original file line number Diff line number Diff line change
@@ -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 <cluster-id> --start-ip-address <start-ip-address> --end-ip-address <end-ip-address> --new-start-ip-address <new-start-ip-address> --new-end-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 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 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

| 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.
11 changes: 10 additions & 1 deletion tidb-cloud/ticloud-serverless-export-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ Export data from a TiDB Cloud Serverless cluster to Azure Blob Storage in non-in
ticloud serverless export create -c <cluster-id> --azblob.uri <uri> --azblob.sas-token <sas-token> --filter <database.table>
```

Export data from a TiDB Cloud Serverless cluster to Alibaba Cloud OSS in non-interactive mode:

```shell
ticloud serverless export create -c <cluster-id> --oss.uri <uri> --oss.access-key-id <access-key-id> --oss.access-key-secret <access-key-secret> --filter <database.table>
```

Export data to a Parquet file and compress it with `SNAPPY` in non-interactive mode:

```shell
Expand All @@ -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://<bucket>/<file-path>` 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. |
Expand All @@ -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://<account>.blob.core.windows.net/<container>/<file-path>` 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://<bucket>/<file-path>` 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. |
Expand Down