azurify-0.1.0.0: A simple library for accessing Azure blob storage

Safe HaskellNone

Azure

Description

Azurify is an incomplete yet sort-of-functional library and command line client to access the Azure Blob Storage API

The following features are implemented:

  • Creating and deleting containers
  • Listing the contents of a container
  • Downloading blobs
  • Uploading a new block blob if it's no larger than 64MB
  • Deleting a blob
  • Breaking a blob lease

Synopsis

Documentation

createContainerSource

Arguments

:: ByteString

The account name

-> ByteString

Authorisation key

-> ByteString

Container name

-> AccessControl

Access control of the container

-> IO (Maybe (Int, ByteString))

Nothing when creating was successful, otherwise HTTP status and content

Create a new container

deleteContainerSource

Arguments

:: ByteString

The account name

-> ByteString

Authorisation key

-> ByteString

Container name

-> IO (Maybe (Int, ByteString))

Nothing when creating was successful, otherwise HTTP status and content

Delete a container

listContainerSource

Arguments

:: ByteString

The account name

-> ByteString

Authorisation key

-> ByteString

Container name

-> IO (Either (Int, ByteString) [Blob])

Either the HTTP error code and content OR a list of Blobs

List all blobs in a given container

changeContainerACLSource

Arguments

:: ByteString

The account name

-> ByteString

The authorisation key

-> ByteString

Container name

-> AccessControl

Access control specifier

-> IO (Maybe (Int, ByteString))

Nothing when successful, HTTP error code and content otherwise

Set the access control on a container

createBlobSource

Arguments

:: ByteString

The account name

-> ByteString

The authorisation key

-> ByteString

Container name

-> BlobSettings

The blob itself, note that Page blobs are *not supported*

-> IO (Maybe (Int, ByteString))

Nothing when successful, HTTP error code and content otherwise

Upload a new blob to a container

deleteBlobSource

Arguments

:: ByteString

The account name

-> ByteString

The authorsation key

-> ByteString

The container name

-> ByteString

The blob name

-> IO (Maybe (Int, ByteString))

Nothing when successful, HTTP error code and content otherwise

Delete a blob from a container

getBlobSource

Arguments

:: ByteString

The account name

-> ByteString

The authorisation key

-> ByteString

The container name

-> ByteString

The blob name

-> IO (Either (Int, ByteString) ByteString)

Nothing when successful, HTTP error code and content otherwise

Download a blob

breakLeaseSource

Arguments

:: ByteString

The account name

-> ByteString

The authorisation key

-> ByteString

The container name

-> ByteString

The blob name

-> IO (Maybe (Int, ByteString))

Nothing when successful, HTTP error code and content otherwise

Break a lease of a blob