📣
TiDB Cloud Essential is now in public preview. Try it out →

ticloud serverless audit-log config update

Update the database audit logging configuration for a TiDB Cloud Essential cluster.

ticloud serverless audit-log config update [flags]

Examples

Configure database audit logging in interactive mode:

ticloud serverless audit-log config update

Unredact the database audit log in non-interactive mode:

ticloud serverless audit-log config update -c <cluster-id> --unredacted

Enable database audit logging with Amazon S3 storage in non-interactive mode:

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:

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:

ticloud serverless audit-log config update -c <cluster-id> --enabled=false

Flags

FlagDescriptionRequiredNote
--azblob.sas-token stringThe SAS token of Azure Blob Storage.NoOnly works in non-interactive mode.
--azblob.uri stringThe Azure Blob Storage URI in azure://<account>.blob.core.windows.net/<container>/<path> format.NoOnly works in non-interactive mode.
--cloud-storage stringThe cloud storage provider. Valid options: "TIDB_CLOUD", "S3", "GCS", "AZURE_BLOB", and "OSS".NoOnly works in non-interactive mode.
-c, --cluster-id stringThe ID of the cluster to be updated.YesOnly works in non-interactive mode.
--enabledEnables or disables database audit logging.NoOnly works in non-interactive mode.
--gcs.service-account-key stringThe Base64-encoded service account key of Google Cloud Storage.NoOnly works in non-interactive mode.
--gcs.uri stringThe Google Cloud Storage URI in gs://<bucket>/<path> format.NoOnly works in non-interactive mode.
--oss.access-key-id stringThe access key ID of Alibaba Cloud Object Storage Service (OSS).NoOnly works in non-interactive mode.
--oss.access-key-secret stringThe access key secret of Alibaba Cloud OSS.NoOnly works in non-interactive mode.
--oss.uri stringThe Alibaba Cloud OSS URI in oss://<bucket>/<path> format.NoOnly works in non-interactive mode.
--rotation-interval-minutes int32The rotation interval in minutes. Valid range: [10, 1440].NoOnly works in non-interactive mode.
--rotation-size-mib int32The rotation size in MiB. Valid range: [1, 1024].NoOnly works in non-interactive mode.
--s3.access-key-id stringThe access key ID of Amazon S3. You only need to set either --s3.role-arn or both --s3.access-key-id and --s3.secret-access-key.NoOnly works in non-interactive mode.
--s3.role-arn stringThe role ARN of Amazon S3. You only need to set either --s3.role-arn or both --s3.access-key-id and --s3.secret-access-key.NoOnly works in non-interactive mode.
--s3.secret-access-key stringThe secret access key of Amazon S3. You only need to set either --s3.role-arn or both --s3.access-key-id and --s3.secret-access-key.NoOnly works in non-interactive mode.
--s3.uri stringThe Amazon S3 URI in s3://<bucket>/<path> format.NoOnly works in non-interactive mode.
--unredactedUnredacts or redacts the database audit log.NoOnly works in non-interactive mode.
-h, --helpShows help information for this command.NoWorks in both interactive and non-interactive modes.

Inherited flags

FlagDescriptionRequiredNote
-D, --debugEnables debug mode.NoWorks in both interactive and non-interactive modes.
--no-colorDisables color output.NoOnly works in non-interactive mode.
-P, --profile stringSpecifies the profile to use from your configuration file.NoWorks 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. Also, we welcome any contributions.

Was this page helpful?