You may use the POST request against a CDN-enabled
container to adjust CDN attributes. You may not,
however, set the arbitrary header metadata that is allowed
under the storage service. The only metadata that may be
changed on the CDN is X-Log-Retention,
X-CDN-enabled, and
X-TTL.
The POST operation can be used to set a new TTL cache expiration value or to enable/disable public sharing over the CDN. Keep in mind that if you have content currently cached in the CDN, setting your container back to private will NOT purge the CDN cache; you will have to wait for the TTL to expire.
Example 5.14. Update CDN-Enabled Container Metadata Request
POST /<api version>/<account>/<container> HTTP/1.1
Host: cdn.clouddrive.com
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
X-TTL: 86400
X-CDN-Enabled: True
X-Log-Retention: True
No content is returned. A status code of 204 (No
Content) indicates success; 404 (Not Found) is returned if
the requested container was not found. The CDN URL, the CDN
SSL URL, and the CDN Streaming URL are returned in the HTTP
headers, X-CDN-URI, X-CDN-SSL-URL,
and X-CDN-STREAMING-URL.
Example 5.15. Update CDN-Enabled Container Metadata Response
HTTP/1.1 204 No Content
X-Cdn-Ssl-Uri: https://83c49b9a2f7ad18250b3-346eb45fd42c58ca13011d659bfc1ac1. ssl.cf0.rackcdn.com
X-Ttl: 259200
X-Cdn-Uri: http://081e40d3ee1cec5f77bf-346eb45fd42c58ca13011d659bfc1ac1. r49.cf0.rackcdn.com
X-Cdn-Enabled: True
X-Log-Retention: False
X-Cdn-Streaming-Uri: http://084cc2790632ccee0a12-346eb45fd42c58ca13011d659bfc1ac1. r49.stream.cf0.rackcdn.com
X-Trans-Id: tx82a6752e00424edb9c46fa2573132e2c
Content-Length: 0

