UNPKG

reshuffle-aws-connectors

Version:
51 lines (50 loc) 1.77 kB
import AWS from 'aws-sdk'; import { CoreConnector, Options, Reshuffle } from './CoreConnector'; export { AWS }; export declare function validateAccesKeyId(accessKeyId: string): string; export declare function validateBucket(bucket: string): string; export declare function validateRegion(region: string): string; export declare function validateS3URL(url: string): string; export declare function validateSecretAccessKey(secretAccessKey: string): string; export declare function validateURL(url: string): string; declare class AWSAccount { private options; private clients; constructor(options: Options); getClient(service: string, options?: Options): any; getCredentials(): { accessKeyId: any; secretAccessKey: any; }; } export interface AWSPolicyStatement { effect: string; action: string[]; resource: string; } declare class AWSIdentity { private account; constructor(account: AWSAccount); createPolicy(statements: AWSPolicyStatement | AWSPolicyStatement[]): { Version: string; Statement: { Effect: string; Action: string[]; Resource: string; }[]; }; createSimplePolicy(resource: string, action: string[], effect?: string): { Version: string; Statement: { Effect: string; Action: string[]; Resource: string; }[]; }; getOrCreateServiceRole(roleName: string, service: string, policies?: string | Record<string, any> | Array<string | Record<string, any>>): Promise<any>; } export declare class BaseAWSConnector extends CoreConnector { protected account: AWSAccount; protected identity: AWSIdentity; constructor(app: Reshuffle, options: Options, id?: string); }