Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Configure and optimize Azure Storage accounts, Blob, Queue, Table, and File services
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/sdk/azure-storage-blob-rust.md
1# Blob Storage — Rust SDK Quick Reference23> Condensed from **azure-storage-blob-rust**. Full patterns (container ops,4> blob properties, RBAC permissions)5> in the **azure-storage-blob-rust** plugin skill if installed.67## Install8cargo add azure_storage_blob azure_identity910## Quick Start11```rust12use azure_identity::DeveloperToolsCredential;13use azure_storage_blob::BlobClient;14let credential = DeveloperToolsCredential::new(None)?;15let blob_client = BlobClient::new("https://<account>.blob.core.windows.net/", "container", "blob", Some(credential), None)?;16```1718## Best Practices19- Use Entra ID auth — `DeveloperToolsCredential` for dev, `ManagedIdentityCredential` for production20- Specify content length — required for uploads21- Use `RequestContent::from()` to wrap upload data22- Handle async operations — use `tokio` runtime23- Check RBAC permissions — ensure "Storage Blob Data Contributor" role2425## Non-Obvious Patterns26```rust27use azure_core::http::RequestContent;28blob_client.upload(RequestContent::from(data.to_vec()), false, u64::try_from(data.len())?, None).await?;29```30