ballerinax/aws.simpledb Ballerina library

1.0.0

Overview

The Ballerina AWS SimpleDB provides the capability to manage domains in AWS SimpleDB.

This module supports Amazon SimpleDB REST API 2009-04-15 version.

Prerequisites

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

  1. Create an AWS account
  2. Obtain tokens

Quickstart

To use the AWS SimpleDB connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

Import the ballerinax/aws.simpledb module into the Ballerina project.

Copy
import ballerinax/aws.simpledb;

Step 2: Create a new connector instance

You can now enter the credentials in the SimpleDB client configuration and create the SimpleDB client by passing the configuration as follows.

Copy
simpledb:AwsCredentials awsCredentials = {
    accessKey: "<ACCESS_KEY_ID>",
    secretKey: "<SECRET_ACCESS_KEY>"
};

simpledb:ConnectionConfig config = {
    credentials:awsCredentials,
    region: <REGION>
};

simpledb:Client amazonSimpleDBClient = check new (config);

Step 3: Invoke connector operation

  1. You can create a domain in Amazon SimpleDB as follows with createDomain method for a preferred domain name.

    Copy
    simpledb:CreateDomainResponse|error response = amazonSimpleDBClient->createDomain("NewTDomain");
    if (response is simpledb:CreateDomainResponse) {
        log:printInfo("Created Domain: " + response.toString());
    }
  2. Use bal run command to compile and run the Ballerina program.

You can find more samples here

Import

import ballerinax/aws.simpledb;Copy

Metadata

Released date: about 2 years ago

Version: 1.0.0

License: Apache-2.0


Compatibility

Platform: java11

Ballerina version: slbeta6


Pull count

Total: 1

Current verison: 0


Weekly downloads


Source repository


Keywords

IT Operations/Databases

Cost/Freemium

Vendor/Amazon


Contributors

Other versions

See more...