Azure Cosmos DB SDK for Rust
Build Azure Cosmos DB Applications with Rust
Developers need to work with globally distributed databases efficiently. This skill provides comprehensive Azure Cosmos DB Rust SDK guidance for document operations, queries, and container management.
Descargar el ZIP de la skill
Subir en Claude
Ve a Configuración → Capacidades → Skills → Subir skill
Activa y empieza a usar
Pruébalo
Usando "Azure Cosmos DB SDK for Rust". Create a document with id, partition key, and custom fields
Resultado esperado:
Define a struct with Serialize/Deserialize derives, instantiate with required fields, and call container.create_item() with partition key and item. Use into_model() to deserialize responses.
Usando "Azure Cosmos DB SDK for Rust". Update specific fields without replacing entire document
Resultado esperado:
Use PatchDocument to specify add and remove operations on JSON paths. Call container.patch_item() with partition key, item id, and patch document configuration.
Auditoría de seguridad
SeguroThis skill contains only documentation for Azure Cosmos DB Rust SDK usage. Static analysis scanned 0 files with 0 security findings and risk score 0/100. The SKILL.md file provides legitimate instructional content for Microsoft's official azure_data_cosmos crate with no executable code or security concerns.
Puntuación de calidad
Lo que puedes crear
Backend Developer Building Cloud-Native Apps
Learn to integrate Azure Cosmos DB into Rust microservices with proper authentication, partitioning, and efficient query patterns for globally distributed data.
Database Engineer Migrating to Rust
Understand Cosmos DB Rust SDK patterns including item serialization, deserialization, and optimal container configuration for production workloads.
Solutions Architect Designing Multi-Region Systems
Explore Cosmos DB global distribution capabilities with Rust SDK for building low-latency, highly available applications across geographic regions.
Prueba estos prompts
Show me how to create, read, update, and delete items in Azure Cosmos DB using Rust SDK with proper error handling and partition key configuration.
Explain how to authenticate to Azure Cosmos DB using Entra ID credentials in Rust. Include DeveloperToolsCredential setup and configuration for local development.
Provide examples of efficient query patterns for Azure Cosmos DB Rust SDK including FILTER, ORDER BY, and cross-partition queries with best practices.
Create a complete Rust module for Cosmos DB operations including connection pooling, retry policies, custom error types, and structured logging for production use.
Mejores prácticas
- Always specify partition key for point reads and writes to optimize RU consumption
- Reuse CosmosClient and DatabaseClient instances - they are thread-safe and designed for sharing
- Prefer Entra ID authentication over key-based auth for production environments
- Derive Serialize and Deserialize traits for all document structs
- Use into_model() to properly deserialize Cosmos DB responses into your types
Evitar
- Creating new client instances for each operation - causes unnecessary connection overhead
- Omitting partition key in queries - results in cross-partition scans and higher costs
- Using key-based authentication in production - less secure than managed identity or service principals
- Storing large documents without considering 2MB item size limit
Preguntas frecuentes
How do I authenticate to Azure Cosmos DB locally?
What is the difference between replace_item and patch_item?
Do I need to handle retry logic for Cosmos DB operations?
Can I use this skill with Cosmos DB MongoDB API?
How do I handle Cosmos DB errors in Rust?
Is the Cosmos DB Rust SDK suitable for production?
Detalles del desarrollador
Autor
sickn33Licencia
MIT
Repositorio
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-cosmos-rustRef.
main
Estructura de archivos
📄 SKILL.md