-
Notifications
You must be signed in to change notification settings - Fork 703
Audit log CLI #21786
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
shiyuhang0
wants to merge
3
commits into
pingcap:release-8.5
Choose a base branch
from
shiyuhang0:auditlog_cli_new
base: release-8.5
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Audit log CLI #21786
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
31 changes: 12 additions & 19 deletions
31
tidb-cloud/ticloud-auditlog-describe.md → ...d-serverless-audit-log-config-describe.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,45 @@ | ||
--- | ||
title: ticloud serverless audit-log describe | ||
summary: The reference of `ticloud serverless audit-log describe`. | ||
title: ticloud serverless audit-log config describe | ||
summary: The reference of `ticloud serverless audit-log config describe`. | ||
--- | ||
|
||
# ticloud serverless audit-log describe | ||
# ticloud serverless audit-log config describe | ||
|
||
Describe the database audit logging configuration for a {{{ .starter }}} or {{{ .essential }}} cluster. | ||
Describe the database audit logging configuration for a TiDB Cloud Essential cluster. | ||
|
||
```shell | ||
ticloud serverless audit-log describe [flags] | ||
``` | ||
|
||
Or use the following alias command: | ||
|
||
```shell | ||
ticloud serverless audit-log get [flags] | ||
ticloud serverless audit-log config describe [flags] | ||
``` | ||
|
||
## Examples | ||
|
||
Get the database audit logging configuration in interactive mode: | ||
|
||
```shell | ||
ticloud serverless audit-log describe | ||
ticloud serverless audit-log config describe | ||
``` | ||
|
||
Get the database audit logging configuration in non-interactive mode: | ||
|
||
```shell | ||
ticloud serverless audit-log describe -c <cluster-id> | ||
ticloud serverless audit-log config describe -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 | The cluster ID. | Yes | Only works in non-interactive mode. | | ||
| -h, --help | Shows help information for this command. | No | Works in both non-interactive and interactive modes. | | ||
| -h, --help | Shows help information for this command. | No | Works in both interactive and non-interactive modes. | | ||
|
||
## Inherited flags | ||
|
||
| Flag | Description | Required | Note | | ||
|----------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------------------------------------| | ||
| --no-color | Disables color in output. | No | Only works in non-interactive mode. In interactive mode, disabling color might not work with some UI components. | | ||
| -D, --debug | Enables debug mode. | No | Works in both non-interactive and interactive modes. | | ||
| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | | ||
| --no-color | Disable color output. | No | Only works in non-interactive mode. | | ||
| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | | ||
|
||
## Feedback | ||
|
||
If you have any questions or suggestions on the TiDB Cloud CLI, feel free to create an [issue](https://github.com/tidbcloud/tidbcloud-cli/issues/new/choose). Also, we welcome any contributions. | ||
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
title: ticloud serverless audit-log config update | ||
summary: The reference of `ticloud serverless audit-log config update`. | ||
--- | ||
|
||
# ticloud serverless audit-log config update | ||
|
||
Update the database audit logging configuration for a TiDB Cloud Essential cluster. | ||
|
||
```shell | ||
ticloud serverless audit-log config update [flags] | ||
``` | ||
|
||
## Examples | ||
|
||
Configure database audit logging in interactive mode: | ||
|
||
```shell | ||
ticloud serverless audit-log config update | ||
``` | ||
|
||
Unredact the database audit log in non-interactive mode: | ||
|
||
```shell | ||
ticloud serverless audit-log config update -c <cluster-id> --unredacted | ||
``` | ||
|
||
Enable database audit logging with S3 Cloud Storage in non-interactive mode: | ||
|
||
```shell | ||
ticloud serverless audit-log config update -c <cluster-id> --enabled --cloud-storage S3 --s3.uri <s3-uri> --s3.access-key-id <s3-access-key-id> --s3.secret-access-key <s3-secret-access-key> | ||
``` | ||
|
||
Configure database audit logging rotation strategy in non-interactive mode: | ||
|
||
```shell | ||
ticloud serverless audit-log config update -c <cluster-id> --rotation-interval-minutes <rotation-interval-minutes> --rotation-size-mib <rotation-size-mib> | ||
``` | ||
|
||
Disable database audit logging in non-interactive mode: | ||
|
||
```shell | ||
ticloud serverless audit-log config update -c <cluster-id> --enabled=false | ||
``` | ||
|
||
## Flags | ||
|
||
| Flag | Description | Required | Note | | ||
|------|-------------|----------|------| | ||
| --azblob.sas-token string | The SAS token of Azure Blob. | No | Only works in non-interactive mode. | | ||
| --azblob.uri string | The Azure Blob URI in `azure://<account>.blob.core.windows.net/<container>/<path>` format. | No | Only works in non-interactive mode. | | ||
| --cloud-storage string | The cloud storage. One of [`"TIDB_CLOUD"`, `"S3"`, `"GCS"`, `"AZURE_BLOB"`, `"OSS"`]. | No | Only works in non-interactive mode. | | ||
| -c, --cluster-id string | The ID of the cluster to be updated. | Yes | Only works in non-interactive mode. | | ||
| --enabled | Enable or disable database audit logging. | No | Only works in non-interactive mode. | | ||
| --gcs.service-account-key string | The base64 encoded service account key of GCS. | No | Only works in non-interactive mode. | | ||
| --gcs.uri string | The GCS URI in `gs://<bucket>/<path>` format. | No | Only works in non-interactive mode. | | ||
| --oss.access-key-id string | The access key ID of the OSS. | No | Only works in non-interactive mode. | | ||
| --oss.access-key-secret string | The access key secret of the OSS. | No | Only works in non-interactive mode. | | ||
| --oss.uri string | The OSS URI in `oss://<bucket>/<path>` format. | No | Only works in non-interactive mode. | | ||
| --rotation-interval-minutes int32 | The rotation interval in minutes, range [10, 1440]. | No | Only works in non-interactive mode. | | ||
| --rotation-size-mib int32 | The rotation size in MiB, range [1, 1024]. | No | Only works in non-interactive mode. | | ||
| --s3.access-key-id string | The access key ID of S3. You only need to set one of the `s3.role-arn` and [`s3.access-key-id`, `s3.secret-access-key`]. | No | Only works in non-interactive mode. | | ||
| --s3.role-arn string | The role ARN of S3. You only need to set one of the `s3.role-arn` and [`s3.access-key-id`, `s3.secret-access-key`]. | No | Only works in non-interactive mode. | | ||
| --s3.secret-access-key string | The secret access key of S3. You only need to set one of the `s3.role-arn` and [`s3.access-key-id`, `s3.secret-access-key`]. | No | Only works in non-interactive mode. | | ||
| --s3.uri string | The S3 URI in `s3://<bucket>/<path>` format. | No | Only works in non-interactive mode. | | ||
| --unredacted | Unredact or redact the database audit log. | No | Only works in non-interactive mode. | | ||
| -h, --help | Shows help information for this command. | No | Works in both interactive and non-interactive modes. | | ||
|
||
## Inherited flags | ||
|
||
| Flag | Description | Required | Note | | ||
|------|-------------|----------|------| | ||
| -D, --debug | Enable debug mode. | No | Works in both interactive and non-interactive modes. | | ||
| --no-color | Disable color output. | No | Only works in non-interactive mode. | | ||
| -P, --profile string | Profile to use from your configuration file. | No | Works in both interactive and non-interactive modes. | | ||
|
||
## Feedback | ||
|
||
If you have any questions or suggestions on the TiDB Cloud CLI, feel free to create an [issue](https://github.com/tidbcloud/tidbcloud-cli/issues/new/choose). Also, we welcome any contributions. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.