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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.