Safe Haskell | None |
---|
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
- createContainer :: ByteString -> ByteString -> ByteString -> AccessControl -> IO (Maybe (Int, ByteString))
- deleteContainer :: ByteString -> ByteString -> ByteString -> IO (Maybe (Int, ByteString))
- listContainerRaw :: ByteString -> ByteString -> ByteString -> IO (Either (Int, ByteString) ByteString)
- listContainer :: ByteString -> ByteString -> ByteString -> IO (Either (Int, ByteString) [Blob])
- changeContainerACL :: ByteString -> ByteString -> ByteString -> AccessControl -> IO (Maybe (Int, ByteString))
- createBlob :: ByteString -> ByteString -> ByteString -> BlobSettings -> IO (Maybe (Int, ByteString))
- deleteBlob :: ByteString -> ByteString -> ByteString -> ByteString -> IO (Maybe (Int, ByteString))
- getBlob :: ByteString -> ByteString -> ByteString -> ByteString -> IO (Either (Int, ByteString) ByteString)
- breakLease :: ByteString -> ByteString -> ByteString -> ByteString -> IO (Maybe (Int, ByteString))
- data AccessControl
- = ContainerPublic
- | BlobPublic
- | Private
- data CommonBlobSettings = BlobSettings {}
- data BlobSettings
- = BlockBlobSettings { }
- | FileBlobSettings { }
- | PageBlobSettings { }
- data BlobType
- data Blob = Blob {}
Documentation
:: 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
:: 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
:: ByteString | The account name |
-> ByteString | Authorisation key |
-> ByteString | Container name |
-> IO (Either (Int, ByteString) ByteString) | Either the HTTP error code and content OR a list of Blobs |
List all blobs in a given container
:: 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
:: 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
:: 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
:: 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
:: 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
:: 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
data AccessControl Source
ContainerPublic | the container can be enumerated and all blobs can be read by anonymous users |
BlobPublic | blobs can be read by anonymous users, but the container cannot be enumerated |
Private | blobs can't be read by anonymous users and the container cannot be enumerated |