agentsclimarketplace

Azure storage blob rust

Skill ComeOnOliver/skillshub/skills/microsoft/skills/azure-storage-blob-rust

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill azure-storage-blob-rust

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

2.9 KB, 680 tokens by cl100k_base, as published. Nobody here has run it

Azure Blob Storage SDK for Rust

Client library for Azure Blob Storage β€” Microsoft's object storage solution for the cloud.

Installation

cargo add azure_storage_blob azure_identity

Environment Variables

AZURE_STORAGE_ACCOUNT_NAME=<storage-account-name>
# Endpoint: https://<account>.blob.core.windows.net/

Authentication

use azure_identity::DeveloperToolsCredential;
use azure_storage_blob::{BlobClient, BlobClientOptions};

let credential = DeveloperToolsCredential::new(None)?;
let blob_client = BlobClient::new(
    "https://<account>.blob.core.windows.net/",
    "container-name",
    "blob-name",
    Some(credential),
    Some(BlobClientOptions::default()),
)?;

Client Types

ClientPurpose
BlobServiceClientAccount-level operations, list containers
BlobContainerClientContainer operations, list blobs
BlobClientIndividual blob operations

Core Operations

Upload Blob

use azure_core::http::RequestContent;

let data = b"hello world";
blob_client
    .upload(
        RequestContent::from(data.to_vec()),
        false,  // overwrite
        u64::try_from(data.len())?,
        None,
    )
    .await?;

Download Blob

let response = blob_client.download(None).await?;
let content = response.into_body().collect_bytes().await?;
println!("Content: {:?}", content);

Get Blob Properties

let properties = blob_client.get_properties(None).await?;
println!("Content-Length: {:?}", properties.content_length);

Delete Blob

blob_client.delete(None).await?;

Container Operations

use azure_storage_blob::BlobContainerClient;

let container_client = BlobContainerClient::new(
    "https://<account>.blob.core.windows.net/",
    "container-name",
    Some(credential),
    None,
)?;

// Create container
container_client.create(None).await?;

// List blobs
let mut pager = container_client.list_blobs(None)?;
while let Some(blob) = pager.try_next().await? {
    println!("Blob: {}", blob.name);
}

Best Practices

  1. Use Entra ID auth β€” DeveloperToolsCredential for dev, ManagedIdentityCredential for production
  2. Specify content length β€” required for uploads
  3. Use RequestContent::from() β€” to wrap upload data
  4. Handle async operations β€” use tokio runtime
  5. Check RBAC permissions β€” ensure "Storage Blob Data Contributor" role

RBAC Permissions

For Entra ID auth, assign one of these roles:

  • Storage Blob Data Reader β€” read-only
  • Storage Blob Data Contributor β€” read/write
  • Storage Blob Data Owner β€” full access including RBAC

Reference Links

ResourceLink
API Referencehttps://docs.rs/azure_storage_blob
Source Codehttps://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/storage/azure_storage_blob
crates.iohttps://crates.io/crates/azure_storage_blob

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.