[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-fd463e39-fed3-460b-8fea-cd66c30549a5":3,"$fVb7OWFkQGBh3Z6WTA2umNpKKx90keK_ParD2f3V0f0A":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"fd463e39-fed3-460b-8fea-cd66c30549a5","azure-storage-blob-rust","Azure Blob Storage SDK for Rust。用于上传、下载和管理Blob和容器。","cat_coding_devops","mod_coding","sickn33,coding","---\nname: azure-storage-blob-rust\ndescription: Azure Blob Storage SDK for Rust. Use for uploading, downloading, and managing blobs and containers.\nrisk: unknown\nsource: community\ndate_added: '2026-02-27'\n---\n\n# Azure Blob Storage SDK for Rust\n\nClient library for Azure Blob Storage — Microsoft's object storage solution for the cloud.\n\n## Installation\n\n```sh\ncargo add azure_storage_blob azure_identity\n```\n\n## Environment Variables\n\n```bash\nAZURE_STORAGE_ACCOUNT_NAME=\u003Cstorage-account-name>\n# Endpoint: https:\u002F\u002F\u003Caccount>.blob.core.windows.net\u002F\n```\n\n## Authentication\n\n```rust\nuse azure_identity::DeveloperToolsCredential;\nuse azure_storage_blob::{BlobClient, BlobClientOptions};\n\nlet credential = DeveloperToolsCredential::new(None)?;\nlet blob_client = BlobClient::new(\n    \"https:\u002F\u002F\u003Caccount>.blob.core.windows.net\u002F\",\n    \"container-name\",\n    \"blob-name\",\n    Some(credential),\n    Some(BlobClientOptions::default()),\n)?;\n```\n\n## Client Types\n\n| Client | Purpose |\n|--------|---------|\n| `BlobServiceClient` | Account-level operations, list containers |\n| `BlobContainerClient` | Container operations, list blobs |\n| `BlobClient` | Individual blob operations |\n\n## Core Operations\n\n### Upload Blob\n\n```rust\nuse azure_core::http::RequestContent;\n\nlet data = b\"hello world\";\nblob_client\n    .upload(\n        RequestContent::from(data.to_vec()),\n        false,  \u002F\u002F overwrite\n        u64::try_from(data.len())?,\n        None,\n    )\n    .await?;\n```\n\n### Download Blob\n\n```rust\nlet response = blob_client.download(None).await?;\nlet content = response.into_body().collect_bytes().await?;\nprintln!(\"Content: {:?}\", content);\n```\n\n### Get Blob Properties\n\n```rust\nlet properties = blob_client.get_properties(None).await?;\nprintln!(\"Content-Length: {:?}\", properties.content_length);\n```\n\n### Delete Blob\n\n```rust\nblob_client.delete(None).await?;\n```\n\n## Container Operations\n\n```rust\nuse azure_storage_blob::BlobContainerClient;\n\nlet container_client = BlobContainerClient::new(\n    \"https:\u002F\u002F\u003Caccount>.blob.core.windows.net\u002F\",\n    \"container-name\",\n    Some(credential),\n    None,\n)?;\n\n\u002F\u002F Create container\ncontainer_client.create(None).await?;\n\n\u002F\u002F List blobs\nlet mut pager = container_client.list_blobs(None)?;\nwhile let Some(blob) = pager.try_next().await? {\n    println!(\"Blob: {}\", blob.name);\n}\n```\n\n## Best Practices\n\n1. **Use Entra ID auth** — `DeveloperToolsCredential` for dev, `ManagedIdentityCredential` for production\n2. **Specify content length** — required for uploads\n3. **Use `RequestContent::from()`** — to wrap upload data\n4. **Handle async operations** — use `tokio` runtime\n5. **Check RBAC permissions** — ensure \"Storage Blob Data Contributor\" role\n\n## RBAC Permissions\n\nFor Entra ID auth, assign one of these roles:\n- `Storage Blob Data Reader` — read-only\n- `Storage Blob Data Contributor` — read\u002Fwrite\n- `Storage Blob Data Owner` — full access including RBAC\n\n## Reference Links\n\n| Resource | Link |\n|----------|------|\n| API Reference | https:\u002F\u002Fdocs.rs\u002Fazure_storage_blob |\n| Source Code | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-rust\u002Ftree\u002Fmain\u002Fsdk\u002Fstorage\u002Fazure_storage_blob |\n| crates.io | https:\u002F\u002Fcrates.io\u002Fcrates\u002Fazure_storage_blob |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,112,871,"2026-05-16 13:07:49",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"DevOps","devops","mdi-cog-outline","CI\u002FCD、容器化、部署运维",3,162,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"7338a370-650c-4757-be9f-45f4c0adf183","1.0.0","azure-storage-blob-rust.zip",1648,"uploads\u002Fskills\u002Ffd463e39-fed3-460b-8fea-cd66c30549a5\u002Fazure-storage-blob-rust.zip","3a2264f67fe73ae7d3d3d16e962af731f32fbef946ceaf39c08c5bc15ea43d0f","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":3595}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]