diff --git a/TOC-tidb-cloud.md b/TOC-tidb-cloud.md index 5c221bf17a299..d346ee3230748 100644 --- a/TOC-tidb-cloud.md +++ b/TOC-tidb-cloud.md @@ -675,6 +675,7 @@ - auth - [login](/tidb-cloud/ticloud-auth-login.md) - [logout](/tidb-cloud/ticloud-auth-logout.md) + - [whoami](/tidb-cloud/ticloud-auth-whoami.md) - serverless - [create](/tidb-cloud/ticloud-cluster-create.md) - [delete](/tidb-cloud/ticloud-cluster-delete.md) @@ -701,6 +702,11 @@ - [list](/tidb-cloud/ticloud-serverless-export-list.md) - [cancel](/tidb-cloud/ticloud-serverless-export-cancel.md) - [download](/tidb-cloud/ticloud-serverless-export-download.md) + - sql-user + - [create](/tidb-cloud/ticloud-serverless-sql-user-create.md) + - [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) - [ai](/tidb-cloud/ticloud-ai.md) - [completion](/tidb-cloud/ticloud-completion.md) - config @@ -713,7 +719,7 @@ - [use](/tidb-cloud/ticloud-config-use.md) - project - [list](/tidb-cloud/ticloud-project-list.md) - - [update](/tidb-cloud/ticloud-update.md) + - [upgrade](/tidb-cloud/ticloud-upgrade.md) - [help](/tidb-cloud/ticloud-help.md) - [Table Filter](/table-filter.md) - [Resource Control](/tidb-resource-control.md) diff --git a/media/tidb-cloud/serverless-external-storage/azure-sas-create.png b/media/tidb-cloud/serverless-external-storage/azure-sas-create.png new file mode 100644 index 0000000000000..01fbb2edaf7b0 Binary files /dev/null and b/media/tidb-cloud/serverless-external-storage/azure-sas-create.png differ diff --git a/media/tidb-cloud/serverless-external-storage/azure-sas-position.png b/media/tidb-cloud/serverless-external-storage/azure-sas-position.png new file mode 100644 index 0000000000000..f8c50e42359d9 Binary files /dev/null and b/media/tidb-cloud/serverless-external-storage/azure-sas-position.png differ diff --git a/media/tidb-cloud/serverless-external-storage/gcs-service-account-key.png b/media/tidb-cloud/serverless-external-storage/gcs-service-account-key.png new file mode 100644 index 0000000000000..655c502fbab4b Binary files /dev/null and b/media/tidb-cloud/serverless-external-storage/gcs-service-account-key.png differ diff --git a/media/tidb-cloud/serverless-external-storage/gcs-service-account.png b/media/tidb-cloud/serverless-external-storage/gcs-service-account.png new file mode 100644 index 0000000000000..7ab07dc7c8885 Binary files /dev/null and b/media/tidb-cloud/serverless-external-storage/gcs-service-account.png differ diff --git a/tidb-cloud/cli-reference.md b/tidb-cloud/cli-reference.md index cee02746cd2be..674e1871715e3 100644 --- a/tidb-cloud/cli-reference.md +++ b/tidb-cloud/cli-reference.md @@ -21,19 +21,20 @@ The following table lists the commands available for the TiDB Cloud CLI. To use the `ticloud` CLI in your terminal, run `ticloud [command] [subcommand]`. If you are using [TiUP](https://docs.pingcap.com/tidb/stable/tiup-overview), use `tiup cloud [command] [subcommand]` instead. -| Command | Subcommand | Description | -|-------------------|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------| -| auth | login, logout | Login and logout | -| serverless (alias: s) | create, delete, describe, list, update, spending-limit, region, shell | Manage TiDB Cloud Serverless clusters | -| serverless branch | create, delete, describe, list, shell | Manage TiDB Cloud Serverless branches | -| serverless import | cancel, describe, list, start | Manage TiDB Cloud Serverless import tasks | -| serverless export | create, describe, list, cancel, download | Manage TiDB Cloud Serverless export tasks | -| ai | - | Chat with TiDB Bot | -| completion | bash, fish, powershell, zsh | Generate completion script for specified shell | -| config | create, delete, describe, edit, list, set, use | Configure user profiles | -| project | list | Manage projects | -| update | - | Update the CLI to the latest version | -| help | cluster, completion, config, help, import, project, update | View help for any command | +| Command | Subcommand | Description | +|-----------------------|-----------------------------------------------------------------------|------------------------------------------------| +| auth | login, logout, whoami | Login and logout | +| serverless (alias: s) | create, delete, describe, list, update, spending-limit, region, shell | Manage TiDB Cloud Serverless clusters | +| serverless branch | create, delete, describe, list, shell | Manage TiDB Cloud Serverless branches | +| serverless import | cancel, describe, list, start | Manage TiDB Cloud Serverless import tasks | +| serverless export | create, describe, list, cancel, download | Manage TiDB Cloud Serverless export tasks | +| serverless sql-user | create, list, delete, update | Manage TiDB Cloud Serverless SQL users | +| ai | - | Chat with TiDB Bot | +| completion | bash, fish, powershell, zsh | Generate completion script for specified shell | +| config | create, delete, describe, edit, list, set, use | Configure user profiles | +| project | list | Manage projects | +| upgrade | - | Update the CLI to the latest version | +| help | auth, config, serverless, ai, project, upgrade, help, completion | View help for any command | ## Command modes diff --git a/tidb-cloud/release-notes-2023.md b/tidb-cloud/release-notes-2023.md index f22f8821c3a15..1b284955e0163 100644 --- a/tidb-cloud/release-notes-2023.md +++ b/tidb-cloud/release-notes-2023.md @@ -863,7 +863,7 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c - Add a new command `ticloud cluster connect-info` for [TiDB Cloud CLI](/tidb-cloud/cli-reference.md). - `ticloud cluster connect-info` is a command that allows you to get the connection string of a cluster. To use this command, [update `ticloud`](/tidb-cloud/ticloud-update.md) to v0.3.2 or a later version. + `ticloud cluster connect-info` is a command that allows you to get the connection string of a cluster. To use this command, [update `ticloud`](/tidb-cloud/ticloud-upgrade.md) to v0.3.2 or a later version. ## February 21, 2023 diff --git a/tidb-cloud/serverless-export.md b/tidb-cloud/serverless-export.md index cc89b376bae5e..16f728f490b3c 100644 --- a/tidb-cloud/serverless-export.md +++ b/tidb-cloud/serverless-export.md @@ -15,7 +15,14 @@ While you can also export data using tools such as [mysqldump](https://dev.mysql ## Export locations -You can export data to a local file or [Amazon S3](https://aws.amazon.com/s3/). +You can export data to the following locations: + +- A local file +- An external storage, including: + + - [Amazon S3](https://aws.amazon.com/s3/) + - [Google Cloud Storage](https://cloud.google.com/storage) + - [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) > **Note:** > @@ -42,11 +49,38 @@ To export data to Amazon S3, you need to provide the following information: For more information, see [Configure External Storage Access for TiDB Cloud Serverless](/tidb-cloud/serverless-external-storage.md#configure-amazon-s3-access). +### Google Cloud Storage + +To export data to Google Cloud Storage, you need to provide the following information: + +- URI: `gs:///` +- Access credential: a **base64 encoded** [service account key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) for your bucket. Make sure the service account key has the `storage.objects.create` permission. + +For more information, see [Configure External Storage Access for TiDB Serverless](/tidb-cloud/serverless-external-storage.md#configure-gcs-access). + +> **Note:** +> +> Currently, you can only export to Google Cloud Storage using [TiDB Cloud CLI](/tidb-cloud/cli-reference.md). + +### Azure Blob Storage + +To export data to Azure Blob Storage, you need to provide the following information: + +- URI: `azure://.blob.core.windows.net//` +- Access credential: a [shared access signature (SAS) token](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview) for your Azure Blob Storage container. Make sure the SAS token has the `Read` and `Write` permissions on the `Container` and `Object` resources. + +For more information, see [Configure External Storage Access for TiDB Serverless](/tidb-cloud/serverless-external-storage.md#configure-azure-blob-storage-access). + +> **Note:** +> +> Currently, you can only export to Azure Blob Storage using [TiDB Cloud CLI](/tidb-cloud/cli-reference.md). + ## Export options ### Data filtering - TiDB Cloud console supports exporting data with the selected databases and tables. +- TiDB Cloud CLI supports exporting data with SQL statements and [table filters](/table-filter.md). ### Data formats @@ -58,14 +92,15 @@ You can export data in the following formats: - `separator`: specify the character used to separate fields in the exported data. The default separator is `,`. - `header`: specify whether to include a header row in the exported data. The default value is `true`. - `null-value`: specify the string that represents a NULL value in the exported data. The default value is `\N`. +- `Parquet`: export data in Parquet format. Currently, it is only supported in TiDB Cloud CLI. The schema and data are exported according to the following naming conventions: -| Item | Not compressed | Compressed | -|-----------------|------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------| -| Database schema | {database}-schema-create.sql | {database}-schema-create.sql.{compression-type} | -| Table schema | {database}.{table}-schema.sql | {database}.{table}-schema.sql.{compression-type} | -| Data | {database}.{table}.{0001}.{csv|sql} | {database}.{table}.{0001}.{csv|sql}.{compression-type} | +| Item | Not compressed | Compressed | +|-----------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------| +| Database schema | {database}-schema-create.sql | {database}-schema-create.sql.{compression-type} | +| Table schema | {database}.{table}-schema.sql | {database}.{table}-schema.sql.{compression-type} | +| Data | {database}.{table}.{0001}.{csv|parquet|sql} | {database}.{table}.{0001}.{csv|sql}.{compression-type}
{database}.{table}.{0001}.{compression-type}.parquet | ### Data compression @@ -76,7 +111,58 @@ You can compress the exported CSV and SQL data using the following algorithms: - `zstd`: compress the exported data with `zstd`. - `none`: do not compress the exported `data`. -## Steps +You can compress the exported Parquet data using the following algorithms: + +- `zstd` (default): compress the Parquet file with `zstd`. +- `gzip`: compress the Parquet file with `gzip`. +- `snappy`: compress the Parquet file with `snappy`. +- `none`: do not compress the Parquet file. + +### Data conversion + +When exporting data to the Parquet format, the data conversion between TiDB Cloud Serverless and Parquet is as follows: + +| TiDB Cloud Serverless Type | Parquest primitive type | Parquet logical type | +|----------------------------|-------------------------|----------------------------------------------| +| VARCHAR | BYTE_ARRAY | String(UTF8) | +| TIME | BYTE_ARRAY | String(UTF8) | +| TINYTEXT | BYTE_ARRAY | String(UTF8) | +| MEDIUMTEXT | BYTE_ARRAY | String(UTF8) | +| TEXT | BYTE_ARRAY | String(UTF8) | +| LONGTEXT | BYTE_ARRAY | String(UTF8) | +| SET | BYTE_ARRAY | String(UTF8) | +| JSON | BYTE_ARRAY | String(UTF8) | +| DATE | BYTE_ARRAY | String(UTF8) | +| CHAR | BYTE_ARRAY | String(UTF8) | +| VECTOR | BYTE_ARRAY | String(UTF8) | +| DECIMAL(1<=p<=9) | INT32 | DECIMAL(p,s) | +| DECIMAL(10<=p<=18) | INT64 | DECIMAL(p,s) | +| DECIMAL(p>=19) | BYTE_ARRAY | String(UTF8) | +| ENUM | BYTE_ARRAY | String(UTF8) | +| TIMESTAMP | INT64 | TIMESTAMP(unit=MICROS,isAdjustedToUTC=false) | +| DATETIME | INT64 | TIMESTAMP(unit=MICROS,isAdjustedToUTC=false) | +| YEAR | INT32 | / | +| TINYINT | INT32 | / | +| UNSIGNED TINYINT | INT32 | / | +| SMALLINT | INT32 | / | +| UNSIGNED SMALLINT | INT32 | / | +| MEDIUMINT | INT32 | / | +| UNSIGNED MEDIUMINT | INT32 | / | +| INT | INT32 | / | +| UNSIGNED INT | FIXED_LEN_BYTE_ARRAY(9) | DECIMAL(20,0) | +| BIGINT | FIXED_LEN_BYTE_ARRAY(9) | DECIMAL(20,0) | +| UNSIGNED BIGINT | BYTE_ARRAY | String(UTF8) | +| FLOAT | FLOAT | / | +| DOUBLE | DOUBLE | / | +| BLOB | BYTE_ARRAY | / | +| TINYBLOB | BYTE_ARRAY | / | +| MEDIUMBLOB | BYTE_ARRAY | / | +| LONGBLOB | BYTE_ARRAY | / | +| BINARY | BYTE_ARRAY | / | +| VARBINARY | BYTE_ARRAY | / | +| BIT | BYTE_ARRAY | / | + +## Examples ### Export data to a local file @@ -160,16 +246,38 @@ You can compress the exported CSV and SQL data using the following algorithms:
```shell -ticloud serverless export create -c --s3.bucket-uri --s3.access-key-id --s3.secret-access-key +ticloud serverless export create -c --s3.uri --s3.access-key-id --s3.secret-access-key --filter "database.table" ``` -- `s3.bucket-uri`: the Amazon S3 URI with the `s3:///` format. +- `s3.uri`: the Amazon S3 URI with the `s3:///` format. - `s3.access-key-id`: the access key ID of the user who has the permission to access the bucket. - `s3.secret-access-key`: the access key secret of the user who has the permission to access the bucket.
+### Export data to Google Cloud Storage + +Currently, you can only export data to Google Cloud Storage using [TiDB Cloud CLI](/tidb-cloud/cli-reference.md). + +```shell +ticloud serverless export create -c --gcs.uri --gcs.service-account-key --filter "database.table" +``` + +- `gcs.uri`: the URI of the Google Cloud Storage bucket in the `gs:///` format. +- `gcs.service-account-key`: the base64 encoded service account key. + +### Export data to Azure Blob Storage + +Currently, you can only export data to Azure Blob Storage using [TiDB Cloud CLI](/tidb-cloud/cli-reference.md). + +```shell +ticloud serverless export create -c --azblob.uri --azblob.sas-token --filter "database.table" +``` + +- `azblob.uri`: the URI of the Azure Blob Storage in the `azure://.blob.core.windows.net//` format. +- `azblob.sas-token`: the account SAS token of the Azure Blob Storage. + ### Cancel an export task To cancel an ongoing export task, take the following steps: diff --git a/tidb-cloud/serverless-external-storage.md b/tidb-cloud/serverless-external-storage.md index a17a130528016..aafdf53005dbe 100644 --- a/tidb-cloud/serverless-external-storage.md +++ b/tidb-cloud/serverless-external-storage.md @@ -176,3 +176,49 @@ Take the following steps to configure an access key: + +## Configure GCS access + +To allow a TiDB Serverless cluster to access your GCS bucket, you need to configure the GCS access for the bucket. You can use a service account key to configure the bucket access: + +Take the following steps to configure a service account key: + +1. On the Google Cloud [service account page](https://console.cloud.google.com/iam-admin/serviceaccounts), click **CREATE SERVICE ACCOUNT** to create a service account. For more information, see [Creating a service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts). + + 1. Enter a service account name. + 2. Optional: Enter a description of the service account. + 3. Click **CREATE AND CONTINUE** to create the service account. + 4. In the `Grant this service account access to project`, choose the [IAM roles](https://cloud.google.com/iam/docs/understanding-roles) with the needed permission. For example, exporting data to a TiDB Cloud Serverless cluster needs a role with `storage.objects.create` permission. + 5. Click **Continue** to go to the next step. + 6. Optional: In the `Grant users access to this service account`, choose members that need to [attach the service account to other resources](https://cloud.google.com/iam/docs/attach-service-accounts). + 7. Click **Done** to finish creating the service account. + + ![service-account](/media/tidb-cloud/serverless-external-storage/gcs-service-account.png) + +2. Click the service account, and then click **ADD KEY** on the `KEYS` page to create a service account key. + + ![service-account-key](/media/tidb-cloud/serverless-external-storage/gcs-service-account-key.png) + +3. Choose the default `JSON` key type, and then click the **CREATE** button to download the service account key. + +## Configure Azure Blob Storage access + +To allow TiDB Serverless to access your Azure Blob container, you need to configure the Azure Blob access for the container. You can use a service SAS token to configure the container access: + +1. On the [Azure Storage account](https://portal.azure.com/#browse/Microsoft.Storage%2FStorageAccounts) page, click your storage account to which the container belongs. + +2. On your **Storage account** page, click the **Security+network**, and then click **Shared access signature**. + + ![sas-position](/media/tidb-cloud/serverless-external-storage/azure-sas-position.png) + +3. On the **Shared access signature** page, create a service SAS token with needed permissions as follows. For more information, see [Create a service SAS token](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). + + 1. In the **Allowed services** section, choose the **Blob** service. + 2. In the **Allowed Resource types** section, choose **Container** and **Object**. + 3. In the **Allowed permissions** section, choose the permission as needed. For example, exporting data to a TiDB Cloud Serverless cluster needs the **Read** and **Write** permissions. + 4. Adjust **Start and expiry date/time** as needed. + 5. You can keep the default values for other settings. + + ![sas-create](/media/tidb-cloud/serverless-external-storage/azure-sas-create.png) + +4. Click **Generate SAS and connection string** to generate the SAS token. diff --git a/tidb-cloud/ticloud-auth-whoami.md b/tidb-cloud/ticloud-auth-whoami.md new file mode 100644 index 0000000000000..9d89791916283 --- /dev/null +++ b/tidb-cloud/ticloud-auth-whoami.md @@ -0,0 +1,40 @@ +--- +title: ticloud auth whoami +summary: The reference of `ticloud auth whoami`. +--- + +# ticloud auth whoami + +Display information about the current user: + +```shell +ticloud auth whoami [flags] +``` + +## Examples + +To display information about the current user: + +```shell +ticloud auth whoami +``` + +## 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 | +|------------|------------------------------------------|----------|------------------------------------------------------| +| -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-branch-create.md b/tidb-cloud/ticloud-branch-create.md index 3f12be9c3afe9..5caca96a9f52d 100644 --- a/tidb-cloud/ticloud-branch-create.md +++ b/tidb-cloud/ticloud-branch-create.md @@ -25,15 +25,23 @@ Create a branch for a TiDB Cloud Serverless cluster in non-interactive mode: ticloud serverless branch create --cluster-id --display-name ``` +Create a branch from another branch with a specified timestamp in non-interactive mode: + +```shell +ticloud serverless branch create --cluster-id --display-name --parent-id --parent-timestamp +``` + ## 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, in which the branch will be created. | Yes | Only works in non-interactive mode. | -| -n, --display-name string | Specifies the name of the branch to be created. | Yes | Only works in non-interactive mode. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes | +| Flag | Description | Required | Note | +|---------------------------|-----------------------------------------------------------------------------------------------------------|----------|-----------------------------------------------------| +| -c, --cluster-id string | Specifies the ID of the cluster, in which the branch will be created. | Yes | Only works in non-interactive mode. | +| -n, --display-name string | Specifies the name of the branch to be created. | Yes | Only works in non-interactive mode. | +| --parent-id string | Specifies the ID of the branch parent. The default value is the cluster ID. | No | Only works in non-interactive mode. | +| --parent-timestamp string | Specifies the timestamp of the parent branch in RFC3339 format, such as `2024-01-01T00:00:00Z`. The default value is the current time. | 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 diff --git a/tidb-cloud/ticloud-cluster-create.md b/tidb-cloud/ticloud-cluster-create.md index 53f92de5b716c..d295836efe330 100644 --- a/tidb-cloud/ticloud-cluster-create.md +++ b/tidb-cloud/ticloud-cluster-create.md @@ -22,20 +22,28 @@ ticloud serverless create Create a TiDB Cloud Serverless cluster in non-interactive mode: ```shell -ticloud serverless create --project-id --display-name --region +ticloud serverless create --display-name --region ``` +Create a TiDB Cloud Serverless cluster with a spending limit in non-interactive mode: + +```shell +ticloud serverless create --display-name --region --spending-limit-monthly +``` + ## 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 | -|------------------------------|--------------------------------------------------------------------------------------------|-----------|-----------------------------------------------------| -| -n --display-name string | Specifies the name of the cluster to be created. | Yes | Only works in non-interactive mode. | -| --spending-limit-monthly int | Specifies the maximum monthly spending limit in USD cents. | No | Only works in non-interactive mode. | -| -p, --project-id string | Specifies the ID of the project, in which the cluster will be created. The default value is `default project`. | No | Only works in non-interactive mode. | -| -r, --region string | Specifies the Cloud region. | Yes | Only works in non-interactive mode. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes | +| Flag | Description | Required | Note | +|------------------------------|----------------------------------------------------------------------------------------------------------------|----------|-----------------------------------------------------| +| -n --display-name string | Specifies the name of the cluster to be created. | Yes | Only works in non-interactive mode. | +| --spending-limit-monthly int | Specifies the maximum monthly spending limit in USD cents. | No | Only works in non-interactive mode. | +| -p, --project-id string | Specifies the ID of the project, in which the cluster will be created. The default value is `default project`. | No | Only works in non-interactive mode. | +| -r, --region string | Specifies the name of cloud region. You can use "ticloud serverless region" to see all regions. | Yes | Only works in non-interactive mode. | +| --disable-public-endpoint | Disables the public endpoint. | No | Only works in non-interactive mode. | +| --encryption | Enables enhanced encryption at rest. | 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 diff --git a/tidb-cloud/ticloud-import-start.md b/tidb-cloud/ticloud-import-start.md index c610a76d5e8ad..778baf3283b01 100644 --- a/tidb-cloud/ticloud-import-start.md +++ b/tidb-cloud/ticloud-import-start.md @@ -20,7 +20,7 @@ ticloud serverless import create [flags] > **Note:** > -> Currently, you can only import one CSV file for one import task. +> Currently, you can only import one CSV file for one local import task. ## Examples @@ -48,24 +48,53 @@ Start a local import task with custom CSV format: ticloud serverless import start --local.file-path --cluster-id --file-type CSV --local.target-database --local.target-table --csv.separator \" --csv.delimiter \' --csv.backslash-escape=false --csv.trim-last-separator=true ``` +Start an S3 import task in non-interactive mode: + +```shell +ticloud serverless import start --source-type S3 --s3.uri --cluster-id --file-type --s3.role-arn +``` + +Start a GCS import task in non-interactive mode: + +```shell +ticloud serverless import start --source-type GCS --gcs.uri --cluster-id --file-type --gcs.service-account-key +``` + +Start an Azure Blob import task in non-interactive mode: + +```shell +ticloud serverless import start --source-type AZURE_BLOB --azblob.uri --cluster-id --file-type --azblob.sas-token +``` + ## 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 cluster ID. | Yes | Only works in non-interactive mode. | -| --source-type string | Specifies the import source type. The default value is `LOCAL`. | No | Only works in non-interactive mode. | -| --local.concurrency int | Specifies the concurrency for uploading files. The default value is `5`. | No | Only works in non-interactive mode. | -| --local.file-path string | Specifies the path of the local file to be imported. | No | Only works in non-interactive mode. | -| --local.target-database string | Specifies the target database to which the data is imported. | No | Only works in non-interactive mode. | -| --local.target-table string | Specifies the target table to which the data is imported. | No | Only works in non-interactive mode. | -| --file-type string | Specifies the import file type. Currently, only `CSV` is supported. | Yes | Only works in non-interactive mode. | -| --csv.backslash-escape | Specifies whether to parse backslash inside fields as escape characters in a CSV file. The default value is `true`. | No | Only works in non-interactive mode. | -| --csv.delimiter string | Specifies the delimiter used for quoting a CSV file. The default value is `\`. | No | Only works in non-interactive mode. | -| --csv.separator string | Specifies the field separator in a CSV file. The default value is `,`. | No | Only works in non-interactive mode. | -| --csv.trim-last-separator | Specifies whether to treat the separator as the line terminator and trim all trailing separators in a CSV file. | No | Only works in non-interactive mode. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | +| Flag | Description | Required | Note | +|----------------------------------|----------------------------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------| +| --azblob.sas-token string | Specifies the SAS token of Azure Blob. | No | Only works in non-interactive mode. | +| --azblob.uri string | Specifies the Azure Blob URI in `azure://.blob.core.windows.net//` format. | No | Only works in non-interactive mode. | +| --gcs.service-account-key string | Specifies the base64 encoded service account key of GCS. | No | Only works in non-interactive mode. | +| --gcs.uri string | Specifies the GCS URI in `gcs:///` format. Required when source type is GCS. | Yes | 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.role-arn string | Specifies the role ARN 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. | +| --s3.uri string | Specifies the S3 URI in `s3:///` format. Required when source type is S3. | Yes | Only works in non-interactive mode. | +| --source-type string | Specifies the import source type, one of [`"LOCAL"` `"S3"` `"GCS"` `"AZURE_BLOB"`]. The default value is `"LOCAL"`. | No | Only works in non-interactive mode. | +| -c, --cluster-id string | Specifies the cluster ID. | Yes | Only works in non-interactive mode. | +| --local.concurrency int | Specifies the concurrency for uploading files. The default value is `5`. | No | Only works in non-interactive mode. | +| --local.file-path string | Specifies the path of the local file to be imported. | No | Only works in non-interactive mode. | +| --local.target-database string | Specifies the target database to which the data is imported. | No | Only works in non-interactive mode. | +| --local.target-table string | Specifies the target table to which the data is imported. | No | Only works in non-interactive mode. | +| --file-type string | Specifies the import file type, one of ["CSV" "SQL" "AURORA_SNAPSHOT" "PARQUET"]. | Yes | Only works in non-interactive mode. | +| --csv.backslash-escape | Specifies whether to parse backslash inside fields as escape characters in a CSV file. The default value is `true`. | No | Only works in non-interactive mode. | +| --csv.delimiter string | Specifies the delimiter used for quoting a CSV file. The default value is `\`. | No | Only works in non-interactive mode. | +| --csv.separator string | Specifies the field separator in a CSV file. The default value is `,`. | No | Only works in non-interactive mode. | +| --csv.skip-header | Specifies whether the CSV file contains a header line. | No | Only works in non-interactive mode. | +| --csv.trim-last-separator | Specifies whether to treat the separator as the line terminator and trim all trailing separators in a CSV file. | No | Only works in non-interactive mode. | +| --csv.not-null | Specifies whether a CSV file can contain any NULL values. | No | Only works in non-interactive mode. | +| --csv.null-value string | Specifies the representation of NULL values in the CSV file. (default "\\N") | No | Only works in non-interactive mode. | +| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | | No | Works in both non-interactive and interactive modes. | ## Inherited flags diff --git a/tidb-cloud/ticloud-serverless-export-create.md b/tidb-cloud/ticloud-serverless-export-create.md index 4ea6ef3fb6728..7caf468707bd5 100644 --- a/tidb-cloud/ticloud-serverless-export-create.md +++ b/tidb-cloud/ticloud-serverless-export-create.md @@ -19,34 +19,70 @@ Export data from a TiDB Cloud Serverless cluster in interactive mode: ticloud serverless export create ``` -Export data from a TiDB Cloud Serverless cluster to local storage in non-interactive mode: +Export data from a TiDB Cloud Serverless cluster to a local file in non-interactive mode: ```shell -ticloud serverless export create -c --database +ticloud serverless export create -c --filter ``` Export data from a TiDB Cloud Serverless cluster to Amazon S3 in non-interactive mode: ```shell -ticloud serverless export create -c --s3.bucket-uri --s3.access-key-id --s3.secret-access-key +ticloud serverless export create -c --s3.uri --s3.access-key-id --s3.secret-access-key --filter +``` + +Export data from a TiDB Cloud Serverless cluster to Google Cloud Storage in non-interactive mode: + +```shell +ticloud serverless export create -c --gcs.uri --gcs.service-account-key --filter +``` + +Export data from a TiDB Cloud Serverless cluster to Azure Blob Storage in non-interactive mode: + +```shell +ticloud serverless export create -c --azblob.uri --azblob.sas-token --filter +``` + +Export data to a Parquet file and compress it with `SNAPPY` in non-interactive mode: + +```shell +ticloud serverless export create -c --file-type parquet --parquet.compression SNAPPY --filter +``` + +Export data with SQL statements in non-interactive mode: + +```shell +ticloud serverless export create -c --sql 'select * from database.table' ``` ## 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, from which you want to export data. | Yes | Only works in non-interactive mode. | -| --file-type string | Specifies the format of the exported file. The supported formats include `CSV` and `SQL`. The default value is `SQL`. | No | Only works in non-interactive mode. | -| --database string | Specifies the database from which you want to export data. The default value is `*`. This flag is required when you export data to local storage. | No | Only works in non-interactive mode. | -| --table string | Specifies the table from which you want to export data. The default value is `*`. | No | Only works in non-interactive mode. | -| --target-type string | Specifies the exported location. The supported location includes `LOCAL` and `S3`. The default value is `LOCAL`. | No | Only works in non-interactive mode. | -| --s3.bucket-uri string | Specifies the bucket URI of the S3. This flag is required when you export data to Amazon S3. | No | Only works in non-interactive mode. | -| --s3.access-key-id string | Specifies the access key ID of the S3 bucket. This flag is required when you export data to Amazon S3. | NO | Only works in non-interactive mode. | -| --s3.secret-access-key string | Specifies the secret access key of the S3 bucket. This flag is required when you export data to Amazon S3. | No | Only works in non-interactive mode. | -| --compression string | Specifies the compression algorithm of the export file. The supported algorithms include `GZIP`, `SNAPPY`, `ZSTD`, and `NONE`. The default value is `GZIP`. | No | Only works in non-interactive mode. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | +| Flag | Description | Required | Note | +|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------| +| -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. | +| --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. | +| --s3.role-arn string | Specifies the role ARN 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. | +| --gcs.uri string | Specifies the GCS URI in `gcs:///` format. Required when the target type is GCS. | No | Only works in non-interactive mode. | +| --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. | +| --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. | +| --csv.skip-header | Exports CSV files of the tables without header. | No | Only works in non-interactive mode. | +| --parquet.compression string | Specifies the Parquet compression algorithm. One of [`"GZIP"` `"SNAPPY"` `"ZSTD"` `"NONE"`]. The default value is `"ZSTD"`. | No | Only works in non-interactive mode. | +| --filter strings | Specifies the exported tables with table filter patterns. Do not use it with --sql. For more information, see [Table Filter](/table-filter.md). | No | Only works in non-interactive mode. | +| --sql string | Filters the exported data with the `SQL SELECT` statement. | No | Only works in non-interactive mode. | +| --where string | Filters the exported tables with the `WHERE` condition. Do not use it with --sql. | No | Only works in non-interactive mode. | +| --compression string | Specifies the compression algorithm of the export file. The supported algorithms include `GZIP`, `SNAPPY`, `ZSTD`, and `NONE`. The default value is `GZIP`. | No | Only works in non-interactive mode. | +| --force | Creates the export task without confirmation. You need to confirm when you want to export the whole cluster in non-interactive mode. | 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 diff --git a/tidb-cloud/ticloud-serverless-export-download.md b/tidb-cloud/ticloud-serverless-export-download.md index d795201f9ca81..bb1ee9b9dc5de 100644 --- a/tidb-cloud/ticloud-serverless-export-download.md +++ b/tidb-cloud/ticloud-serverless-export-download.md @@ -29,13 +29,14 @@ ticloud serverless export download -c -e 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. | -| -e, --export-id string | Specifies the ID of the export task. | Yes | Only works in non-interactive mode. | +| Flag | Description | Required | Note | +|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------| +| -c, --cluster-id string | Specifies the ID of the cluster. | Yes | Only works in non-interactive mode. | +| -e, --export-id string | Specifies the ID of the export task. | Yes | Only works in non-interactive mode. | | --output-path string | Specifies the destination path for saving the downloaded data. If not specified, the data is downloaded to the current directory. | No | Only works in non-interactive mode. | -| --force | Downloads the exported data 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. | +| --concurrency int | Specifies the download concurrency. The default value is `3`. | No | Works in both non-interactive and interactive modes. | +| --force | Downloads the exported data 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 diff --git a/tidb-cloud/ticloud-serverless-sql-user-create.md b/tidb-cloud/ticloud-serverless-sql-user-create.md new file mode 100644 index 0000000000000..894360c4ffdda --- /dev/null +++ b/tidb-cloud/ticloud-serverless-sql-user-create.md @@ -0,0 +1,50 @@ +--- +title: ticloud serverless sql-user create +summary: The reference of `ticloud serverless sql-user create`. +--- + +# ticloud serverless sql-user create + +Create a TiDB Cloud Serverless SQL user: + +```shell +ticloud serverless sql-user create [flags] +``` + +## Examples + +Create a TiDB Cloud Serverless SQL user in interactive mode: + +```shell +ticloud serverless sql-user create +``` + +Create a TiDB Cloud Serverless SQL user in non-interactive mode: + +```shell +ticloud serverless sql-user create --user --password --role --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. | +| --password string | Specifies the password of the SQL user. | No | Only works in non-interactive mode. | +| --role strings | Specifies the roles of the SQL user. | No | Only works in non-interactive mode. | +| -u, --user string | Specifies the name of the SQL user. | 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-serverless-sql-user-delete.md b/tidb-cloud/ticloud-serverless-sql-user-delete.md new file mode 100644 index 0000000000000..9f7cd35ea52d9 --- /dev/null +++ b/tidb-cloud/ticloud-serverless-sql-user-delete.md @@ -0,0 +1,48 @@ +--- +title: ticloud serverless sql-user delete +summary: The reference of `ticloud serverless sql-user delete`. +--- + +# ticloud serverless sql-user delete + +Delete a TiDB Cloud Serverless SQL user: + +```shell +ticloud serverless sql-user delete [flags] +``` + +## Examples + +Delete a TiDB Cloud Serverless SQL user in interactive mode: + +```shell +ticloud serverless sql-user delete +``` + +Delete a TiDB Cloud Serverless SQL user in non-interactive mode: + +```shell +ticloud serverless sql-user delete -c --user +``` + +## 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 | Deletes a SQL user without confirmation. | 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-serverless-sql-user-list.md b/tidb-cloud/ticloud-serverless-sql-user-list.md new file mode 100644 index 0000000000000..152b0362e0701 --- /dev/null +++ b/tidb-cloud/ticloud-serverless-sql-user-list.md @@ -0,0 +1,48 @@ +--- +title: ticloud serverless sql-user list +summary: The reference of `ticloud serverless sql-user list`. +--- + +# ticloud serverless sql-user list + +List TiDB Cloud Serverless SQL users: + +```shell +ticloud serverless sql-user list [flags] +``` + +## Examples + +List TiDB Cloud Serverless SQL users in interactive mode: + +```shell +ticloud serverless sql-user list +``` + +List TiDB Cloud Serverless SQL users in non-interactive mode: + +```shell +ticloud serverless sql-user 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. | +| -o, --output string | Specifies the output format, one of ["human" "json"]. To get a complete result, use "json" format. (default "human"). | 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-serverless-sql-user-update.md b/tidb-cloud/ticloud-serverless-sql-user-update.md new file mode 100644 index 0000000000000..1925b3280fc57 --- /dev/null +++ b/tidb-cloud/ticloud-serverless-sql-user-update.md @@ -0,0 +1,52 @@ +--- +title: ticloud serverless sql-user update +summary: The reference of `ticloud serverless sql-user update`. +--- + +# ticloud serverless sql-user update + +Update a TiDB Cloud Serverless SQL user: + +```shell +ticloud serverless sql-user update [flags] +``` + +## Examples + +Update a TiDB Cloud Serverless SQL user in interactive mode: + +```shell +ticloud serverless sql-user update +``` + +Update a TiDB Cloud Serverless SQL user in non-interactive mode: + +```shell +ticloud serverless sql-user update -c --user --password --role +``` + +## 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. | +| --password string | Specifies the new password of the SQL user. | No | Only works in non-interactive mode. | +| --role strings | Specifies the new roles of the SQL user. Passing this flag replaces existing roles. | No | Only works in non-interactive mode. | +| --add-role strings | Specifies the roles to be added to the SQL user. | No | Only works in non-interactive mode. | +| --delete-role strings | Specifies the roles to be deleted from the SQL user. | No | Only works in non-interactive mode. | +| -u, --user string | Specifies the name of the SQL user to be updated. | 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-serverless-update.md b/tidb-cloud/ticloud-serverless-update.md index 235301da4eaaa..a8c00ce24feb1 100644 --- a/tidb-cloud/ticloud-serverless-update.md +++ b/tidb-cloud/ticloud-serverless-update.md @@ -35,13 +35,13 @@ ticloud serverless update -c --labels "{\"label1\":\"value1\"}" 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. | -| -n --display-name string | Specifies a new name for the cluster. | No | Only works in non-interactive mode. |. -| --annotations string | Specifies new annotations for the cluster | No | Only works in non-interactive mode. | -| --labels string | Specifies new labels for the cluster. | No | Only works in non-interactive mode. | -| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | +| Flag | Description | Required | Note | +|---------------------------|---------------------------------------------|----------|------------------------------------------------------| +| -c, --cluster-id string | Specifies the ID of the cluster. | Yes | Only works in non-interactive mode. | +| -n --display-name string | Specifies a new name for the cluster. | No | Only works in non-interactive mode. |. +| --labels string | Specifies new labels for the cluster. | No | Only works in non-interactive mode. | +| --disable-public-endpoint | Disables the public endpoint of the cluster. | 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 diff --git a/tidb-cloud/ticloud-update.md b/tidb-cloud/ticloud-upgrade.md similarity index 86% rename from tidb-cloud/ticloud-update.md rename to tidb-cloud/ticloud-upgrade.md index cd00acbf63a69..ad033b6063338 100644 --- a/tidb-cloud/ticloud-update.md +++ b/tidb-cloud/ticloud-upgrade.md @@ -1,22 +1,23 @@ --- -title: ticloud update -summary: The reference of `ticloud update`. +title: ticloud upgrade +summary: The reference of `ticloud upgrade`. +aliases: ['/tidbcloud/ticloud-update'] --- -# ticloud update +# ticloud upgrade -Update the TiDB Cloud CLI to the latest version: +Upgrade the TiDB Cloud CLI to the latest version: ```shell -ticloud update [flags] +ticloud upgrade [flags] ``` ## Examples -Update the TiDB Cloud CLI to the latest version: +Upgrade the TiDB Cloud CLI to the latest version: ```shell -ticloud update +ticloud upgrade ``` ## Flags