Module azure.keyvault

ballerinax/azure.keyvault Ballerina library

1.6.1

Overview

The Azure Key Vault API v7.0 connector(https://azure.microsoft.com/en-us/services/key-vault/) OpenAPI specification.

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

Key Features

  • Programmatic access to create and manage resources via REST API
  • Manage user accounts and profiles
  • Secure authentication with API key or OAuth support

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

Other versions

See more...

Metadata

Released date: 8 days ago

Version: 1.6.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.8.0

GraalVM compatible: Yes


Pull count

Total: 212

Current verison: 6


Weekly downloads


Source repository


Keywords

Type/Connector

IT Operations/Security & Identity Tools

Cost/Paid

Vendor/Microsoft

Area/Security & Identity


Contributors