Appendix A. Swift CLI Commands

This appendix provides details on the set of commands that can be run from a Swift CLI session. These commands can be used to perform CRUD operations.

Commands

The commands that can be run from the Swift CLI are list, stat, post, upload, download, and delete. Each command has a detailed help menu, which can be displayed by running the swift <command> –h command, for example, swift list -h.

list

The list command is used to list the containers for an account or the objects for a container. The following code shows the usage of the list command along with arguments:

# swift list   <container>  
  -A Auth_URL 
  –U User –K Key 
  --os-username=<auth-user-name> 
  --os-password=<auth-password>  
 --os-tenant-id=<auth-tenant-id>  ...

Get OpenStack Object Storage (Swift) Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.