/ cloudformation-templates / node_modules / aws-cdk / lib / api / aws-auth / credential-plugins.d.ts
credential-plugins.d.ts
1 import { Mode } from './credentials'; 2 /** 3 * Cache for credential providers. 4 * 5 * Given an account and an operating mode (read or write) will return an 6 * appropriate credential provider for credentials for the given account. The 7 * credential provider will be cached so that multiple AWS clients for the same 8 * environment will not make multiple network calls to obtain credentials. 9 * 10 * Will use default credentials if they are for the right account; otherwise, 11 * all loaded credential provider plugins will be tried to obtain credentials 12 * for the given account. 13 */ 14 export declare class CredentialPlugins { 15 private readonly cache; 16 fetchCredentialsFor(awsAccountId: string, mode: Mode): Promise<PluginCredentials | undefined>; 17 get availablePluginNames(): string[]; 18 private lookupCredentials; 19 } 20 export interface PluginCredentials { 21 readonly credentials: AWS.Credentials; 22 readonly pluginName: string; 23 }