Azure Storage Docs

Blob Reference

This document provides a comprehensive reference for Azure Storage Blobs, covering their types, operations, properties, and access tiers. Understanding these concepts is crucial for effectively managing and utilizing blob storage.

Blob Types

Azure Blob Storage offers three distinct types of blobs, each optimized for different use cases:

Block Blobs

Block blobs are optimized for storing large amounts of unstructured data such as text or binary data. They are composed of blocks, and each block can be a different size. Block blobs are ideal for:

A single block blob can be up to 190 TiB in size, with a maximum of 50,000,000 blocks. Individual blocks can range from 4 MiB to 100 MiB.

Append Blobs

Append blobs are optimized for append operations, such as writing to a log file. Like block blobs, they are made up of blocks, but blocks can only be appended to the end of the blob. This makes them suitable for scenarios where data is continuously added without needing to modify existing data.

An append blob can be up to 190 TiB in size, with a maximum of 50,000,000 blocks. Individual blocks can range from 4 MiB to 100 MiB.

Page Blobs

Page blobs are optimized for random read and write operations. They store unstructured data as a collection of pages. Page blobs are ideal for:

Page blobs are mutable and can be up to 8 TiB in size. Pages are fixed at 512 bytes in size.

Blob Operations

The following are common operations you can perform on blobs using the Azure Storage REST API, SDKs, or Azure CLI:

Create Blob

This operation creates a new blob. The method and parameters depend on the blob type. For block blobs, you can use Put Blob or Put Block List. For append blobs, Append Block is used. Page blobs use Put Page.

// Example: Creating a block blob using Azure SDK (conceptual)
// const blobClient = containerClient.getBlockBlobClient("my-new-blob.txt");
// await blobClient.upload("Hello, Azure Blob Storage!", "text/plain");
            

Read Blob

Retrieves the content of a blob. The Get Blob operation is used for this purpose.

// Example: Reading a block blob using Azure SDK (conceptual)
// const blobClient = containerClient.getBlockBlobClient("my-file.txt");
// const downloadResponse = await blobClient.download();
// const blobContent = await downloadResponse.text();
// console.log(blobContent);
            

Update Blob

For block blobs, updates are typically achieved by uploading new blocks or replacing the entire blob. Append blobs only support adding blocks. Page blobs support updating individual pages using the Put Page operation.

Delete Blob

Removes a blob from storage. The Delete Blob operation is used.

// Example: Deleting a blob using Azure SDK (conceptual)
// const blobClient = containerClient.getBlobClient("blob-to-delete.txt");
// await blobClient.delete();
            

List Blobs

Retrieves a list of blobs within a container. The List Blobs operation is used, which can be filtered by prefix and other parameters.

Blob Properties

Each blob has several associated properties, including:

Access Tiers

Azure Blob Storage offers different access tiers to help manage costs and access frequency:

You can configure the default access tier for a storage account and change the access tier of individual blobs.

Examples

For detailed code examples demonstrating these operations across various languages and platforms, please refer to the official Azure Blob Storage documentation and SDKs.

You can find further information and quickstarts on the Azure Blob Storage Introduction page.