Sunday, June 21, 2015

Ruby script to use Azure Blob Storage

Azure Blob storage is a service for storing large amounts of unstructured data, such as text or binary data, that can be accessed from anywhere in the world via HTTP or HTTPS. You can use Blob storage to expose data publicly to the world, or to store application data privately.

This post will show you how to perform common scenarios using the Azure Blob service. The samples are written using the Ruby API. The scenarios covered include uploading, listing, downloading, and deleting blobs.

You can download final ruby script from here.

This post assumes you have already created a storage account and a container.

  • Type "gem install azure" in the command window to install the gem and dependencies.
  • Import installed package in to the script file.
  • Setup global parameters.
  • Uploading a Blob into a Container
  • List the Blobs in a Container
  • Download Blobs
  • Delete a Blob

No comments:

Post a Comment