Use the following steps to associate a container with a
unified file and object access storage policy.
- Associate a container with a unified file and object access
storage policy using the following command.
swift post container1 --os-auth-url http://specscaleswift.example.com:35357/v3
--os-project-name admin --os-project-domain-name Default --os-username admin
--os-user-domain-name Default --os-password Passw0rd --auth-version 3
--header "X-Storage-Policy: sof-policy1"
In this swift
post example, the storage policy is specified with the customized
header X-Storage-Policy using the --header option.
- Upload an object in the container associated with the unified
file and object access storage policy using the following command.
swift upload container1 imageA.JPG --os-auth-url http://specscaleswift.example.com:35357/v3
--os-project-name admin --os-project-domain-name Default --os-username admin
--os-user-domain-name Default --os-password Passw0rd --auth-version 3
object1