对象存储服务 OBS-设置对象属性:运行示例

时间:2024-09-03 19:46:20

运行示例

  • 以Windows操作系统为例,运行obsutil chattri obs://bucket-test/key -acl=public-read,设置对象的访问策略为公共读。
    obsutil chattri obs://bucket-test/key -acl=public-read
    
    Set the acl of object [key] in the bucket [bucket-test] to [public-read] successfully, request id [04050000016836DDFA73B2B5320E2651]
  • 以Windows操作系统为例,运行obsutil chattri obs://bucket-test -r -f -acl=public-read,批量设置桶内所有对象的访问策略为公共读。
    obsutil chattri obs://bucket-test -r -f -acl=public-read
    
    [------------------------------------------------] 100.00% tps:155.15 5/5 233ms
    Succeed count is:   5         Failed count is:    0
    Metrics [max cost:177 ms, min cost:53 ms, average cost:102.40 ms, average tps:20.41]
    Task id is: 9d7f73ff-f747-4fdd-9b2a-815ba2dc3b07
support.huaweicloud.com/utiltg-obs/obs_11_0041.html