ballerinax/aws.secretmanager Ballerina library

0.2.0

Overview

AWS Secrets Manager is a service that helps you protect sensitive information, such as database credentials, API keys, and other secrets, by securely storing and managing access to them.

The ballerinax/aws.secretmanager package provides APIs to interact with AWS Secrets Manager, enabling developers to programmatically manage secrets, including creating, retrieving, updating, and deleting secrets in their applications.

Setup guide

Before using this connector in your Ballerina application, complete the following:

  1. Create an AWS account
  2. Obtain tokens

Quickstart

To use the aws.secretmanager connector in your Ballerina project, modify the .bal file as follows:

Step 1: Import the module

Import the ballerinax/aws.secretmanager module into your Ballerina project.

Copy
import ballerinax/aws.secretmanager;

Step 2: Instantiate a new connector

Create a new secretmanager:Client by providing the access key ID, secret access key, and the region.

Copy
configurable string accessKeyId = ?;
configurable string secretAccessKey = ?;

secretmanager:Client secretmanager = check new(region = secretmanager:US_EAST_1, auth = {
    accessKeyId,
    secretAccessKey
});

Step 3: Invoke the connector operation

Now, utilize the available connector operations.

Copy
secretmanager:DescribeSecretResponse response = check secretManager->describeSecret("<secret-id>");

Step 4: Run the Ballerina application

Use the following command to compile and run the Ballerina program.

Copy
bal run

Import

import ballerinax/aws.secretmanager;Copy

Metadata

Released date: 6 days ago

Version: 0.2.0

License: Apache-2.0


Compatibility

Platform: java17

Ballerina version: 2201.10.0

GraalVM compatible: Yes


Pull count

Total: 2

Current verison: 0


Weekly downloads


Source repository


Keywords

AWS

Secret Manager

Cloud/Subscriptions


Contributors

Other versions

0.2.0

0.1.0