UNPKG

@godspeedsystems/plugins-aws-as-datasource

Version:

aws as datasource plugin for Godspeed Framework

71 lines (70 loc) 1.93 kB
import { GSContext, GSDataSource, GSStatus, PlainObject } from "@godspeedsystems/core"; export default class AWSDataSource extends GSDataSource { initClient(): Promise<PlainObject>; /** * Config will allow multiple clients initializations of the each type of service * * For ex. A sample aws services config * * ```yaml * type:aws * default_client_config: # default config. Config will be given. As per AWS sdk API specs * services: * s3_1: * type: s3 * config: #will override default * s3_2: * type: s3 * dynamodb: * type: dynamodb * ``` */ initializeClients(): Promise<PlainObject>; /** * The `fnNameInWorkflow` arg represets the `fn` name which is like * `datasource.<aws_instance_name>.<service_name>.<method_name>` * For ex. `datasource.aws.s3_1.createTable` * @param ctx * @param args * @returns */ execute(ctx: GSContext, args: PlainObject): Promise<GSStatus>; } declare const SourceType = "DS"; declare const Type = "aws"; declare const CONFIG_FILE_NAME = "aws"; declare const DEFAULT_CONFIG: { type: string; default_client_config: { region: string; credentials: { accessKeyId: string; secretAccessKey: string; }; }; services: { s3: { type: string; }; dynamodb: { type: string; }; sqs: { type: string; }; ssm: { type: string; }; lambda: { type: string; }; }; types: { dynamodb: string; s3: string; lambda: string; ssm: string; sqs: string; }; }; export { AWSDataSource as DataSource, SourceType, Type, CONFIG_FILE_NAME, DEFAULT_CONFIG };