全部产品
Search
文档中心

对象存储 OSS:设置Table Bucket维护配置

更新时间:May 08, 2026

put-table-bucket-maintenance-configuration用于设置Table Bucket的维护配置,例如无引用文件清理策略。

注意事项

  • 维护配置用于控制Table Bucket的后台维护行为,目前--type仅支持iceberg类型,用于开启或关闭无引用文件清理(Unreferenced File Cleanup)。

  • --value参数需要传入JSON格式的配置内容,可以通过命令行内联JSON或使用file://指定本地JSON文件。

命令格式

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

参数

类型

说明

--table-bucket-arn

string

Table Bucket的ARN,格式为acs:osstables:{region}:{uid}:bucket/{bucket-name}

--type

string

维护类型,目前支持iceberg

--value

string

维护配置的值,JSON格式。

说明

--value参数的JSON语法如下:

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

使用示例

  • 设置Table Bucket的维护配置,维护类型为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}}}'
  • 通过本地JSON文件设置维护配置。将维护配置保存为本地文件maintenance.json后,通过file://方式指定。

    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