Setting Account Metadata

Custom metadata are arbitrary key-value pairs associated with an account. You may create any custom or arbitrary metadata you need.

Any user with the Service Administrator role can perform this task.

For information about setting account metadata by using the REST API, see Create or Update Account Metadata in OpenStack Object Storage Service API Reference. The Java library does not support this.

cURL Command Syntax

curl -v -X POST \
     -H "X-Auth-Token: token" \
     -H "X-Account-Meta-Name: value" \
     accountURL

cURL Command Example

curl -v -X POST \
     -H "X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b" \
     -H "X-Account-Meta-Owner: IT" \
     https://storage.us2.oraclecloud.com/v1/Storage-myIdentityDomain

The output for setting account metadata is as follows:

* About to connect() to storage.us2.oraclecloud.com port 443 (#0)
*   Trying 160.34.0.51... connected
* Connected to storage.us2.oraclecloud.com (160.34.0.51) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*       subject: CN=*.us2.oraclecloud.com,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US
*       start date: Oct 22 00:00:00 2014 GMT
*       expire date: Dec 21 23:59:59 2015 GMT
*       common name: *.us2.oraclecloud.com
*       issuer: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US
> POST /v1/Storage-myIdentityDomain HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: storage.us2.oraclecloud.com
> Accept: */*
> X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b
> X-Account-Meta-Owner: IT
>
< HTTP/1.1 204 No Content
< Date: Fri, 06 Mar 2015 11:44:29 GMT
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx0742dd38e3a445529860a-0054f9931d
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Language: en
<
* Connection #0 to host storage.us2.oraclecloud.com left intact
* Closing connection #0

HTTP Response Codes