azure-sdk-keyvault 0.1.0

Rust wrapper around Microsoft Azure REST APIs for Azure Key Vault
Documentation

azure-sdk-keyvault

Crates.io Crates.io

Rust bindings for Azure Key Vault REST API.

🚧 Work in progress, not encouraged for use in production. 🚧

Example Usage

use azure_sdk_keyvault::KeyVaultClient;
use std::env;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut client = KeyVaultClient::new(&"c1a6d79b-082b-4798-b362-a77e96de50db", &"SUPER_SECRET_KEY", &"bc598e67-03d8-44d5-aa46-8289b9a39a14", &"test-keyvault");

    // Set a secret.
    client.set_secret("test-secret", "42").await?;

    // Get a secret.
    let secret = client.get_secret(&secret_name).await?;
    assert_eq!("42", secret.value());

    Ok(())
}

Contributions

...are welcome! Currently the repo exposes a very small number of operations.

Related Projects

This project was started from the fantastic AzureSDKForRust repo.