Skip to content
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

Support SQL User Management #174

Merged
merged 21 commits into from
May 6, 2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ticloud is a CLI library for communicating with TiDB Cloud's API.
* [ticloud serverless](ticloud_serverless.md) - Manage TiDB Serverless clusters
* [ticloud upgrade](ticloud_upgrade.md) - Upgrade the CLI to the latest version

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ ticloud ai [flags]

* [ticloud](ticloud.md) - CLI tool to manage TiDB Cloud

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Login and logout via TiDB Cloud API
* [ticloud auth login](ticloud_auth_login.md) - Authenticate with TiDB Cloud
* [ticloud auth logout](ticloud_auth_logout.md) - Log out of TiDB Cloud

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_auth_login.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ ticloud auth login [flags]

* [ticloud auth](ticloud_auth.md) - Login and logout via TiDB Cloud API

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_auth_logout.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ ticloud auth logout [flags]

* [ticloud auth](ticloud_auth.md) - Login and logout via TiDB Cloud API

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Configure and manage your user profiles
* [ticloud config set](ticloud_config_set.md) - Configure specific properties of the active profile
* [ticloud config use](ticloud_config_use.md) - Use the specified profile as the active profile

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_config_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ ticloud config create [flags]

* [ticloud config](ticloud_config.md) - Configure and manage your user profiles

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_config_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ ticloud config delete <profile-name> [flags]

* [ticloud config](ticloud_config.md) - Configure and manage your user profiles

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_config_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ ticloud config describe <profile-name> [flags]

* [ticloud config](ticloud_config.md) - Configure and manage your user profiles

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_config_edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ ticloud config edit [flags]

* [ticloud config](ticloud_config.md) - Configure and manage your user profiles

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_config_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ ticloud config list [flags]

* [ticloud config](ticloud_config.md) - Configure and manage your user profiles

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_config_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ ticloud config set <property-name> <value> [flags]

* [ticloud config](ticloud_config.md) - Configure and manage your user profiles

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_config_use.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ ticloud config use <profile-name> [flags]

* [ticloud config](ticloud_config.md) - Configure and manage your user profiles

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Manage projects
* [ticloud](ticloud.md) - CLI tool to manage TiDB Cloud
* [ticloud project list](ticloud_project_list.md) - List all accessible projects

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_project_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ ticloud project list [flags]

* [ticloud project](ticloud_project.md) - Manage projects

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
3 changes: 2 additions & 1 deletion docs/generate_doc/ticloud_serverless.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Manage TiDB Serverless clusters
* [ticloud serverless region](ticloud_serverless_region.md) - List all available regions for TiDB Serverless
* [ticloud serverless shell](ticloud_serverless_shell.md) - Connect to a TiDB Serverless cluster
* [ticloud serverless spending-limit](ticloud_serverless_spending-limit.md) - Set spending limit for a TiDB Serverless cluster
* [ticloud serverless sql-user](ticloud_serverless_sql-user.md) - Manage cluster SQL users
* [ticloud serverless update](ticloud_serverless_update.md) - Update a TiDB Serverless cluster

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Manage TiDB Serverless branches
* [ticloud serverless branch list](ticloud_serverless_branch_list.md) - List branches
* [ticloud serverless branch shell](ticloud_serverless_branch_shell.md) - Connect to a branch

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_branch_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ ticloud serverless branch create [flags]

* [ticloud serverless branch](ticloud_serverless_branch.md) - Manage TiDB Serverless branches

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_branch_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ ticloud serverless branch delete [flags]

* [ticloud serverless branch](ticloud_serverless_branch.md) - Manage TiDB Serverless branches

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_branch_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ ticloud serverless branch describe [flags]

* [ticloud serverless branch](ticloud_serverless_branch.md) - Manage TiDB Serverless branches

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_branch_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ ticloud serverless branch list [flags]

* [ticloud serverless branch](ticloud_serverless_branch.md) - Manage TiDB Serverless branches

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_branch_shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ ticloud serverless branch shell [flags]

* [ticloud serverless branch](ticloud_serverless_branch.md) - Manage TiDB Serverless branches

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ ticloud serverless create [flags]

* [ticloud serverless](ticloud_serverless.md) - Manage TiDB Serverless clusters

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ ticloud serverless delete [flags]

* [ticloud serverless](ticloud_serverless.md) - Manage TiDB Serverless clusters

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ ticloud serverless describe [flags]

* [ticloud serverless](ticloud_serverless.md) - Manage TiDB Serverless clusters

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_export.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Manage TiDB Serverless exports
* [ticloud serverless export download](ticloud_serverless_export_download.md) - Download the exported data
* [ticloud serverless export list](ticloud_serverless_export_list.md) - List export tasks

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_export_cancel.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ ticloud serverless export cancel [flags]

* [ticloud serverless export](ticloud_serverless_export.md) - Manage TiDB Serverless exports

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_export_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ ticloud serverless export create [flags]

* [ticloud serverless export](ticloud_serverless_export.md) - Manage TiDB Serverless exports

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_export_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ ticloud serverless export describe [flags]

* [ticloud serverless export](ticloud_serverless_export.md) - Manage TiDB Serverless exports

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_export_download.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ ticloud serverless export download [flags]

* [ticloud serverless export](ticloud_serverless_export.md) - Manage TiDB Serverless exports

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_export_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ ticloud serverless export list [flags]

* [ticloud serverless export](ticloud_serverless_export.md) - Manage TiDB Serverless exports

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_import.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Manage TiDB Serverless data imports
* [ticloud serverless import list](ticloud_serverless_import_list.md) - List data import tasks
* [ticloud serverless import start](ticloud_serverless_import_start.md) - Start a data import task

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_import_cancel.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ ticloud serverless import cancel [flags]

* [ticloud serverless import](ticloud_serverless_import.md) - Manage TiDB Serverless data imports

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_import_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ ticloud serverless import describe [flags]

* [ticloud serverless import](ticloud_serverless_import.md) - Manage TiDB Serverless data imports

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_import_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ ticloud serverless import list [flags]

* [ticloud serverless import](ticloud_serverless_import.md) - Manage TiDB Serverless data imports

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_import_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ ticloud serverless import start [flags]

* [ticloud serverless import](ticloud_serverless_import.md) - Manage TiDB Serverless data imports

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ ticloud serverless list [flags]

* [ticloud serverless](ticloud_serverless.md) - Manage TiDB Serverless clusters

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_region.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ ticloud serverless region [flags]

* [ticloud serverless](ticloud_serverless.md) - Manage TiDB Serverless clusters

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ ticloud serverless shell [flags]

* [ticloud serverless](ticloud_serverless.md) - Manage TiDB Serverless clusters

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
2 changes: 1 addition & 1 deletion docs/generate_doc/ticloud_serverless_spending-limit.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ ticloud serverless spending-limit [flags]

* [ticloud serverless](ticloud_serverless.md) - Manage TiDB Serverless clusters

###### Auto generated by spf13/cobra on 24-Apr-2024
###### Auto generated by spf13/cobra on 6-May-2024
26 changes: 26 additions & 0 deletions docs/generate_doc/ticloud_serverless_sql-user.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## ticloud serverless sql-user

Manage cluster SQL users

### Options

```
-h, --help help for sql-user
```

### Options inherited from parent commands

```
-D, --debug Enable debug mode
--no-color Disable color output
-P, --profile string Profile to use from your configuration file
```

### SEE ALSO

* [ticloud serverless](ticloud_serverless.md) - Manage TiDB Serverless clusters
* [ticloud serverless sql-user create](ticloud_serverless_sql-user_create.md) - Create a SQL user
* [ticloud serverless sql-user delete](ticloud_serverless_sql-user_delete.md) - Delete a SQL user
* [ticloud serverless sql-user list](ticloud_serverless_sql-user_list.md) - List all accessible SQL users

###### Auto generated by spf13/cobra on 6-May-2024
41 changes: 41 additions & 0 deletions docs/generate_doc/ticloud_serverless_sql-user_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## ticloud serverless sql-user create

Create a SQL user

```
ticloud serverless sql-user create [flags]
```

### Examples

```
Create a SQL user in interactive mode:
$ ticloud serverless sql-user create

Create a SQL user in non-interactive mode:
$ ticloud serverless sql-user create --user <user-name> --password <password> --role <role> --cluster-id <cluster-id>
```

### Options

```
-c, --cluster-id string The ID of the cluster.
-h, --help help for create
--password string The password of the SQL user.
--role string The role of the SQL user.
-u, --user string The name of the SQL user.
```

### Options inherited from parent commands

```
-D, --debug Enable debug mode
--no-color Disable color output
-P, --profile string Profile to use from your configuration file
```

### SEE ALSO

* [ticloud serverless sql-user](ticloud_serverless_sql-user.md) - Manage cluster SQL users

###### Auto generated by spf13/cobra on 6-May-2024
40 changes: 40 additions & 0 deletions docs/generate_doc/ticloud_serverless_sql-user_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## ticloud serverless sql-user delete

Delete a SQL user

```
ticloud serverless sql-user delete [flags]
```

### Examples

```
Delete a SQL user in interactive mode:
$ ticloud serverless sql-user delete

Delete a SQL user in non-interactive mode:
$ ticloud serverless sql-user delete -c <cluster-id> --user <user-name>
```

### Options

```
-c, --cluster-id string The cluster ID of the SQL user to be deleted.
--force Delete a SQL user without confirmation.
-h, --help help for delete
-u, --user string The name of the SQL user to be deleted.
```

### Options inherited from parent commands

```
-D, --debug Enable debug mode
--no-color Disable color output
-P, --profile string Profile to use from your configuration file
```

### SEE ALSO

* [ticloud serverless sql-user](ticloud_serverless_sql-user.md) - Manage cluster SQL users

###### Auto generated by spf13/cobra on 6-May-2024
42 changes: 42 additions & 0 deletions docs/generate_doc/ticloud_serverless_sql-user_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## ticloud serverless sql-user list

List all accessible SQL users

```
ticloud serverless sql-user list [flags]
```

### Examples

```
List all SQL users in interactive mode:
$ ticloud user list

List all SQL users in non-interactive mode:
$ ticloud serverless sql-user list -c <cluster-id>

List all SQL users with json format:
$ ticloud serverless sql-user list -o json
```

### Options

```
-c, --cluster-id string The ID of the cluster.
-h, --help help for list
-o, --output string Output format, one of ["human" "json"]. For the complete result, please use json format. (default "human")
```

### Options inherited from parent commands

```
-D, --debug Enable debug mode
--no-color Disable color output
-P, --profile string Profile to use from your configuration file
```

### SEE ALSO

* [ticloud serverless sql-user](ticloud_serverless_sql-user.md) - Manage cluster SQL users

###### Auto generated by spf13/cobra on 6-May-2024
Loading
Loading