UNPKG

@cloud-copilot/iam-collect

Version:

Collect IAM information from AWS Accounts

27 lines 1.24 kB
import type { Client } from '@smithy/smithy-client'; import { AwsCredentialIdentityWithMetaData } from './coreAuth.js'; type ClientConstructor<T> = new (args: any) => T; type AnyClient = Client<any, any, any, any>; export declare class AwsClientPool { static defaultInstance: AwsClientPool; private clientCache; /** * Returns a client of the specified type with the specified credentials and region. * Will create a new client if one does not already exist in the cache. * * @param ClientType The client constructor to create an instance of. * @param credentials The credentials to use for the client. * @param region The region to use for the client. * @returns A client of the specified type with the specified credentials and region. */ client<T extends AnyClient>(ClientType: ClientConstructor<T>, credentials: AwsCredentialIdentityWithMetaData, region: string | undefined, endpoint: string | undefined): T; private getCacheKey; /** * Destroys all clients in the pool and empties the cache. * * NOT THREAD SAFE, this should only be called when all other operations are complete. */ clear(): void; } export {}; //# sourceMappingURL=ClientPool.d.ts.map