Module azure.keyvault

ballerinax/azure.keyvault Ballerina library

1.6.0

Overview

This is a generated connector from Azure Key Vault API v7.0 OpenAPI specification.

The Key Vault client performs cryptographic key operations and vault operations against the Key Vault service.

Prerequisites

  • Create an Azure account
  • Create an Azure Key Vault account
  • Obtain tokens
    • Use this guide to obtain the credentials which are needed to create the <ACCESS_TOKEN>

Quickstart

To use the Azure ey Vault connector in your Ballerina application, update the .bal file as follows:

Step 1 - Import connector

First, import the ballerinax/azure.keyvault module into the Ballerina project.

Copy
import ballerinax/azure.keyvault;

Step 2 - Create a new connector instance

You can now make the connection configuration using the access token.

Copy
keyvault:ConnectionConfig connectionConfig = {
    auth : {
        token: token
    }
};

keyvault:Client baseClient = check new Client(connectionConfig, serviceUrl = "{vaultBaseUrl}");

Step 3 - Invoke connector operation

  1. List certificates
Copy
public function main() {
    keyvault:CertificateListResult|error cert = baseClient->getCertificates("7.0");

    if (cert is keyvault:CertificateListResult) {
        log:printInfo(cert.toJsonString());
    } else {
        test:assertFail(msg = cert.message());
    }
}
  1. Use bal run command to compile and run the Ballerina program

Import

import ballerinax/azure.keyvault;Copy

Metadata

Released date: 6 months ago

Version: 1.6.0

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1


Pull count

Total: 

Current verison: 35


Weekly downloads


Source repository


Keywords

IT Operations/Security & Identity Tools
Cost/Paid
Vendor/Microsoft

Contributors

Other versions

See more...