3 releases (breaking)

new 0.5.1 Feb 20, 2025
0.5.0 Feb 19, 2025
0.4.0 Jan 31, 2025
0.3.1 Dec 20, 2024
0.3.0 Dec 20, 2024

#1897 in Web programming

Download history 196/week @ 2024-12-17 5/week @ 2024-12-24 4/week @ 2025-01-07 123/week @ 2025-01-28 22/week @ 2025-02-04 9/week @ 2025-02-11

154 downloads per month
Used in dsh

Apache-2.0

195KB
2.5K SLoC

DSH resource management API client

This crate contains functions and definitions that provide support for using the functions of the DSH resource management API.

Example

A small example will demonstrate the use of the library. More details and more elaborate examples can be found in the project's repository on github.

To make the library available to your rust application add it to your dependencies:

[dependencies]
dsh_api = "0.5.1" 

The example will print a list of all the applications that are deployed in a tenant environment. This example requires that the tenant's name, platform and API secret are configured via environment variables as follows:.

> export DSH_API_PLATFORM=np-aws-lz-dsh
> export DSH_API_TENANT=my-tenant
> export DSH_API_PASSWORD_NP_AWS_LZ_DSH_MY_TENANT=...

Then the following program will list all applications for this tenant on the given platform.

use dsh_api::dsh_api_client_factory::DshApiClientFactory;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let client = DshApiClientFactory::default().client().await?;
    for (application_id, application) in client.list_applications().await? {
        println!("{} -> {}", application_id, application);
    }
    Ok(())
}

Features

By enabling/disabling the features described below you have control over what's included in your library and what's not. All features are disabled by default. The following features are defined:

  • appcatalog - Enables the app catalog methods.
  • generic - Enables the generic methods.
  • manage - Enables the manage methods.
  • robot - Enables the robot operation.

Changelog

See CHANGELOG.md for all changes per version.

Contributing

See CONTRIBUTING.md for more information on how to contribute to this project.

License

See LICENSE for more information on the license for this project.

Security

See SECURITY.md for more information on the security policy for this project.


Copyright (c) Koninklijke KPN N.V.

Dependencies

~19–34MB
~631K SLoC