zoukankan      html  css  js  c++  java
  • Openstack Swift 批量删除 (bulk delete)

    Bulk Delete

    Requests must be of type DELETE, and have an Content-Type header of text/plain. The data is a new-line separated list of url-encoded objects or containers to be deleted. Containers being deleted must already be empty. Use a query string of ?bulk-delete. As above, the response format defaults to text/plain but the Accept header can be used to specify application/json, application/xml, or text/xml. Also as above, the status-code of the reply will always be 200 OK, and actual results will be included in the body of the response.

    Create a file containing the objects and containers to be deleted.

    alpha/one.txt
    alpha/two.txt
    alpha
    beta/three.txt
    beta/four.txt
    beta
    

    curl -i -H "X-Auth-Token: <token>" -H "Content-Type: text/plain" [-H "Accept: <response-format>"] <storage_url>/?bulk-delete -X DELETE --data-binary @<list-file>

    curl -i -H "X-Auth-Token: AUTH_tkd17e7282441a4bde9e09094f02a36108" 
        -H "Accept: application/json" -H "Content-Type: text/plain" 
        -X DELETE http://swift.example.com/v1/AUTH_bob/?bulk-delete 
        --data-binary @bulk-delete-list.txt
    HTTP/1.1 200 OK
    Content-Type: application/json
    X-Trans-Id: txd7e5e895d61f49d19f22f-0052096a31
    Date: Mon, 12 Aug 2013 23:05:21 GMT
    Transfer-Encoding: chunked
    

    https://www.swiftstack.com/docs/admin/middleware/bulk.html
  • 相关阅读:
    C# 协变 逆变
    go slice 理解
    为什么避免使用Task.Wait或者Task.Result
    IL笔记
    docker随笔
    领域事件
    总结笔记
    基于ASP.NET Core 3.x的端点路由(Endpoint Routing)实现控制器(Controller)和操作(Action)分离的接口服务
    CentOS7 多IP搭建SOCKS5代理服务器
    Springboot 实现数据库备份还原
  • 原文地址:https://www.cnblogs.com/liujx2019/p/13847838.html
Copyright © 2011-2022 走看看