Skip to content

Object storage CLI reference

See https://docs.openstack.org/ocata/cli-reference/swift.html.

These commands allow you to manage containers and objects in the Object Storage service. The <container_name> and <object_name> in the commands are placeholders that should be replaced with the actual names of the containers and objects.

List containers

Bash
openstack container list

Create a container

Bash
openstack container create <container_name>

Delete a container

Bash
openstack container delete <container_name>

Show container details

Bash
openstack container show <container_name>

List objects in a container

Bash
openstack object list <container_name>

Upload an object to a container

Bash
openstack object create <container_name> <local_file_path>
  • This command uploads a local file to the specified container.

Download an object from a container

Bash
openstack object save <container_name> <object_name>
  • This command downloads an object from the container to the local file system.

Delete an object from a container

Bash
openstack object delete <container_name> <object_name>

Show object details

Bash
openstack object show <container_name> <object_name>