Set Table Bucket maintenance configuration

更新时间:
复制 MD 格式

Sets the maintenance configuration for a Table Bucket, such as the Unreferenced File Cleanup policy.

Usage notes

  • Maintenance configurations control background maintenance behavior for a Table Bucket. Currently, --type supports only the iceberg type, which enables or disables Unreferenced File Cleanup.

  • The --value parameter accepts a JSON-formatted configuration either inline on the command line or from a local JSON file by using the file:// prefix.

Syntax

ossutil tables-api put-table-bucket-maintenance-configuration --table-bucket-arn value --type value --value value [flags]

Parameter

Type

Description

--table-bucket-arn

string

The ARN of the Table Bucket, in the format acs:osstables:{region}:{uid}:bucket/{bucket-name}.

--type

string

The maintenance type. Currently, only iceberg is supported.

--value

string

The maintenance configuration value, in JSON format.

Note

The JSON syntax for the --value parameter is as follows:

{
  "settings": {
    "unreferenced_file_cleanup": {
      "enabled": true
    }
  }
}

Examples

  • Enable Unreferenced File Cleanup for a Table Bucket by setting the maintenance type to iceberg.

    ossutil tables-api put-table-bucket-maintenance-configuration --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --type iceberg --value '{"settings":{"unreferenced_file_cleanup":{"enabled":true}}}'
  • Set the maintenance configuration from a local file named maintenance.json. Use the file:// prefix to specify the file path.

    ossutil tables-api put-table-bucket-maintenance-configuration --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --type iceberg --value file://maintenance.json