UNPKG

@cloud-copilot/iam-collect

Version:

Collect IAM information from AWS Accounts

45 lines 1.75 kB
import { type AwsCredentialProviderWithMetaData } from '../aws/coreAuth.js'; import { type CustomCommand } from './AbstractCommand.js'; export type ClientConstructor<T> = new (args: any) => T; export interface CustomClientMetadata { clientName: string; } export interface CommandWithInput { input: any; } /** * Base class for Custom AWS service clients */ export declare abstract class AbstractClient<CustomClientContext = {}> { protected customContext: CustomClientContext; config: any; middlewareStack: any; protected commandRegistry: Map<string, CustomCommand<any, CustomClientContext>>; protected credentials: AwsCredentialProviderWithMetaData; protected region: string | undefined; protected detailsCache: Record<string, Partial<Record<string, any>>>; protected cache(resourceId: string, type: string, data: any): void; protected getCached(resourceId: string, type: string): any; constructor(options: { credentials: AwsCredentialProviderWithMetaData; region: string | undefined; }, customContext: CustomClientContext); /** * Abstract method that each service client implements to register its commands */ protected abstract registerCommands(): void; protected getCustomClientContext(): CustomClientContext; /** * Register a command implementation */ protected registerCommand(customCommand: CustomCommand<any, CustomClientContext>): void; /** * Send a command using the registered implementation */ send<Input, Output>(command: CommandWithInput): Promise<Partial<Output> | undefined>; /** * Destroy the client and cleanup resources */ destroy(): void; } //# sourceMappingURL=AbstractClient.d.ts.map