Piiano.Vault 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Piiano.Vault --version 1.0.0
NuGet\Install-Package Piiano.Vault -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Piiano.Vault" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Piiano.Vault --version 1.0.0
#r "nuget: Piiano.Vault, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Piiano.Vault as a Cake Addin
#addin nuget:?package=Piiano.Vault&version=1.0.0

// Install Piiano.Vault as a Cake Tool
#tool nuget:?package=Piiano.Vault&version=1.0.0

Piiano.Vault: A .Net SDK for Vault

vault-dotnet is a client SDK for the Vault written in C# for .Net 7.0. The underlying implementation of the SDK is auto-generated from the Vault OpenApi document.

Contents

Documentation

Refer to the API documentation at: https://docs.piiano.com/api/

Repository Organization

The solution has two projects:

  • Vault: A library that provides the SDK.
  • Vault.Tests: A library contains tests of the SDK.

The Vault Project

The Vault project contains the OpenApi specification in its root: openapi.json.

When built, the project generates the file generated/GeneratedClient.cs from the Open API specification. The project defines the clients for each of the endpoint clients. Each one is a wrapper over the generated client and provides access to a group of endpoints.

The Vault.Tests Project

This project contains tests for each of the clients. The tests are organized into folders, one folder for each client.

Installation

  1. Install dot net 7.0 or later: https://docs.microsoft.com/en-us/dotnet/core/install/
  2. Install Vault Lite: https://docs.piiano.com/guides/install/
  3. Run Vault Lite.
  4. Run dotnet build in the root of the repository.
  5. Run dotnet test in the root of the repository.

Using the SDK

  1. Open Vault.sln in your IDE. You can use either Visual Studio or Rider (2023.2.2).
  2. Create your own project in the solution and add a reference to Vault.
  3. In your code add using Vault;
  4. In your code, create a client factory using: var clientFactory = new ClientFactory();
  5. The client factory provides properties that return clients for groups of Vault endpoints. Each client is exposed through an interface and wraps the automatically generated client.
  6. In addition, the client factory provides a property called Generated that returns the underlying generated client. This client provides access to all methods defined by the Open API specification, though in a less convenient form.

Working with clients

The client factory provides properties that return clients for Vault endpoints. Each client is exposed as an interface and provides access to a group of related endpoints. For example, the System property returns a client for the System endpoints with the ISystem interface.

The following table lists the clients that are implemented in this version of the SDK. For each client, it lists the interface that it implements and a reference to the documentation for the endpoints that it provides access to.

Interface Returned by Documentation
ISystem ClientFactory.System https://docs.piiano.com/api/system/
IConfVar ClientFactory.ConfVar https://docs.piiano.com/api/config-vars/
IIAM ClientFactory.IAM https://docs.piiano.com/api/iam/
ICollections ClientFactory.Collections https://docs.piiano.com/api/collections/
ICollectionProperties ClientFactory.CollectionProperties https://docs.piiano.com/api/collection-properties/
IObjects ClientFactory.Objects https://docs.piiano.com/api/objects/

Working with a different server

By default, the SDK is configured to work with the Vault server at http://localhost:8123. To work with a different server, pass the server URL as the first argument to the constructor of the client factory.

Working with a different user

By default, the SDK is configured to work with the default token of the Admin user of Vault (pvaultauth). To work with a different user, pass the user's token as the second argument to the constructor of the client factory. For more information on how to get a user's token, see https://docs.piiano.com/guides/manage-users-and-policies/regenerate-user-api-key

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.15 64 6/3/2024
1.1.14 82 5/20/2024
1.1.13 109 4/15/2024
1.1.12 76 4/2/2024
1.1.11 83 3/11/2024
1.1.10 109 2/22/2024
1.1.9 96 2/7/2024
1.1.8 88 2/5/2024
1.1.7 93 1/29/2024
1.1.6 93 1/23/2024
1.1.5 545 1/1/2024
1.1.4 442 12/20/2023
1.1.3 162 12/11/2023
1.1.2 102 12/10/2023
1.1.1 129 12/8/2023
1.1.0 205 11/26/2023
1.0.6 148 11/16/2023
1.0.5 149 10/16/2023
1.0.4 142 10/11/2023
1.0.3 120 10/11/2023
1.0.2 115 10/11/2023
1.0.1 121 10/7/2023
1.0.0 121 10/7/2023