Microsoft Azure SDK for Rust
Introduction
Microsoft Azure expose its technologies via REST API. These APIs are easily consumable from any language (good) but are weakly typed. With this library and its related crate you can exploit the power of Microsoft Azure from Rust in a idiomatic way.
NOTE: This repository is under heavy development and is likely to break over time. The current releases will probabily contain bugs. As usual open issues if you find any.
Disclaimer
Although I am a Microsoft employee, this is not a Microsoft endorsed project. It's simply a pet project of mine: I love Rust (who doesn't? :smirk:) and Microsoft Azure technologies so I thought to close the gap between them. It's also a good project for learning Rust. This library relies heavily on Hyper. As the time of writing master Hyper does not support Tokio yet: this SDK will than be blocking. I plan to switch to futures as soon as possible.
Run E2E test
AZURE_STORAGE_ACCOUNT=<account>
AZURE_STORAGE_KEY=<key>
cargo test --features=test_e2e
Example
You can find examples in the test section and in the main.rs file. Here is a sample however:
main.rs
extern crate azure_sdk_for_rust;
extern crate chrono;
extern crate mime;
use ;
use Client;
use ;
use ;
use UTC;
use Mime;
State of the art
Right now the key framework is in place (authentication, enumerations, parsing and so on). If you want to contribute please do! Methods are added daily so please check the CHANGELOG.md for updates on the progress. Also note that the project is in early stages so the APIs are bound to change at any moment. I will strive to keep things steady but since I'm new to Rust I'm sure I'll have to correct some serious mistake before too long :smile:. I generally build for the latest nightly and leave to Travis to check the retrocompatibility.
Contributing
If you want to contribute please do! No formality required! :wink:. Please note that asking for a pull request you accept to yield your code as per Apache license, version 2.0.
Implemented methods
Storage Container
Method | URL |
---|---|
Create container | https://msdn.microsoft.com/en-us/library/azure/dd179468.aspx |
List containers | https://msdn.microsoft.com/en-us/library/azure/dd179352.aspx |
Delete container | https://msdn.microsoft.com/en-us/library/azure/dd179408.aspx |
Storage blobs
Event Hubs
Method | URL |
---|---|
Send Event | https://msdn.microsoft.com/en-us/library/azure/dn790664.aspx |
Azure tables
Azure tables entities can be manipulated in batches. The entities are serialized in JSON
.
Cosmos database
Database
Method | URL |
---|---|
Create database | https://docs.microsoft.com/en-us/rest/api/documentdb/create-a-database |
List database | https://docs.microsoft.com/en-us/rest/api/documentdb/list-databases |
Get database | https://docs.microsoft.com/en-us/rest/api/documentdb/get-a-database |
Delete database | https://docs.microsoft.com/en-us/rest/api/documentdb/delete-a-database1 |
Collection
Method | URL |
---|---|
Create collection | https://docs.microsoft.com/en-us/rest/api/documentdb/create-a-collection |
List collections | https://docs.microsoft.com/en-us/rest/api/documentdb/list-collections |
Get collection | https://docs.microsoft.com/en-us/rest/api/documentdb/get-a-collection |
Delete collection | https://docs.microsoft.com/en-us/rest/api/documentdb/delete-a-collection |
Replace collection | https://docs.microsoft.com/en-us/rest/api/documentdb/replace-a-collection |
License
This project is published under Apache license, version 2.0.