Module aws.ses

ballerinax/aws.ses Ballerina library

2.0.0

Overview

The Ballerina AWS SES connector provides the capability to programatically handle AWS SES related operations.

This module supports Amazon SES REST API v2.

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 SES connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

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

Copy
import ballerinax/aws.ses;

Step 2: Create a new connector instance

Create an ses:ConnectionConfig with the tokens obtained, and initialize the connector with it.

Copy
ses:ConnectionConfig amazonSesConfig = {
    awsCredentials: {
        accessKeyId: "<ACCESS_KEY_ID>",
        secretAccessKey: "<SECRET_ACCESS_KEY>"
    }
};

ses:Client amazonSesClient = check new(amazonSesConfig);

Step 3: Invoke connector operation

  1. Now you can use the operations available within the connector. Note that they are in the form of remote operations.
    Following is an example on how to create an email identity using the connector.

    Copy
    ublic function main() returns error? {
       string emailIdentity = "<Your_Email_Identity>"; // Email address or Domain can be used.
    
       EmailIdentityCreationRequest request = {
           EmailIdentity: emailIdentity
       };
    
       EmailIdentity response =  check amazonSesClient->createEmailIdentity(request);
  2. Use bal run command to compile and run the Ballerina program.

You can find a list of samples here

Import

import ballerinax/aws.ses;Copy

Metadata

Released date: over 1 year ago

Version: 2.0.0

License: Apache-2.0


Compatibility

Platform: java11

Ballerina version: 2201.2.1


Pull count

Total: 2178

Current verison: 184


Weekly downloads


Source repository


Keywords

Communication/Email

Cost/Freemium

Vendor/Amazon


Contributors

Other versions