PostContainer
    • PDF

    PostContainer

    • PDF

    Article Summary

    概要

    コンテナ(バケット)にメタデータを設定及び変更します。

    構文

    POST /v1/AUTH_{project_id}/{container}
    

    リクエスト

    NameInTypeDescription
    project_idpathstringプロジェクトIDを入力します。
    containerpathstringコンテナ(バケット)名を入力します。
    X-Auth-Token (Optional)headerstring発行したToken値を入力します。
    X-Container-Read (Optional)headerstring該当コンテナのREAD ACLです。
    X-Container-Write (Optional)headerstring該当コンテナのWRITE ACLです。
    X-Container-Sync-Key (Optional)headerstringnot supported
    X-Container-Sync-To (Optional)headerstringnot supported
    X-Versions-Location (Optional)headerstringnot supported
    X-History-Location (Optional)headerstringnot supported
    X-Remove-Versions-Location (Optional)headerstringnot supported
    X-Remove-History-Location (Optional)headerstringnot supported
    X-Container-Meta-name (Optional)headerstring該当コンテナ(バケット)のメタデータを設定します。ヘッダ名のname 部分がメタデータのキーの役割をします。
    X-Remove-Container-name (Optional)headerstring該当コンテナ(バケット)のメタデータを削除します。ヘッダ名のname部分がメタデータのキーの役割をします。X-Remove-Container-ReadまたはX-Remove-Container-Meta-name
    X-Container-Meta-Access-Control-Allow-Origin (Optional)headerstringCORS
    X-Container-Meta-Access-Control-Max-Age (Optional)headerstringCORS
    X-Container-Meta-Access-Control-Expose-Headers (Optional)headerstringCORS
    X-Container-Meta-Quota-Bytes (Optional)headerstring該当コンテナ(バケット)の容量制限値を入力します。 (bytes)容量制限を超えてから制限します。
    X-Container-Meta-Quota-Count (Optional)headerstring該当コンテナ(バケット)のオブジェクト数の制限値を入力します。
    X-Container-Meta-Temp-URL-Key (Optional)headerstringtemporary URLのためのSecret Key値を入力します。
    X-Container-Meta-Temp-URL-Key-2 (Optional)headerstringtemporary URLのための2番目のSecret Key値を入力します。

    レスポンス

    NameInTypeDescription
    Dateheaderstring該当リクエストのレスポンス時間です。 (UTC)
    Content-Lengthheaderstringレスポンス結果の長さです。 (Bytes)
    Content-Type (Optional)headerstringレスポンス結果のMIMEタイプです。
    X-Trans-Idheaderstring該当リクエストのトランザクションIDです。
    X-Openstack-Request-Idheaderstring該当リクエストのトランザクションIDです。(X-Trans-Idと同じです。)

    例示

    リクエスト 例示(コンテナメタデータ作成)

    curl -i -X POST -H "X-Container-Meta-Book: ncloud-book" -H "X-Container-Meta-Subject: ncloud-test-subject" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}
    

    レスポンス 例示

    HTTP/1.1 204 No Content
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: txefe14b178c56469b8576f-005b987d66
    X-Openstack-Request-Id: txefe14b178c56469b8576f-005b987d66
    Date: Wed, 12 Sep 2018 02:43:50 GMT
    

    リクエスト 例示(コンテナメタデータアップデート)

    curl -i -X POST -H "X-Container-Meta-Book: ncloud-book2" -H "X-Container-Meta-Subject: ncloud-test-subject2" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}
    

    レスポンス 例示

    HTTP/1.1 204 No Content
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx66932a917b854a458544a-005b987d78
    X-Openstack-Request-Id: tx66932a917b854a458544a-005b987d78
    Date: Wed, 12 Sep 2018 02:44:08 GMT
    

    リクエスト 例示(コンテナメタデータ削除)

    curl -i -X POST -H "X-Remove-Container-Meta-Book: x" -H "X-Remove-Container-Meta-Subject: x" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}
    

    レスポンス 例示

    HTTP/1.1 204 No Content
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx590d9493661147e780d99-005b987df5
    X-Openstack-Request-Id: tx590d9493661147e780d99-005b987df5
    Date: Wed, 12 Sep 2018 02:46:13 GMT
    

    リクエストが成功するとNo Content (204)ステータスコードをレスポンスします。


    この記事は役に立ちましたか?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.