2
0
mirror of https://github.com/cderche/greenlock-storage-s3 synced 2025-05-14 00:26:33 +00:00
gl-store-s3.js/node_modules/aws-sdk/lib/credentials/credential_provider_chain.d.ts
2019-05-08 12:19:12 +01:00

25 lines
1014 B
TypeScript

import {Credentials} from '../credentials';
import {AWSError} from '../error';
export class CredentialProviderChain {
/**
* Creates a new CredentialProviderChain with a default set of providers specified by defaultProviders.
*/
constructor(providers?: provider[])
/**
* Resolves the provider chain by searching for the first set of credentials in providers.
*/
resolve(callback:(err: AWSError, credentials: Credentials) => void): CredentialProviderChain;
/**
* Return a Promise on resolve() function
*/
resolvePromise(): Promise<Credentials>;
/**
* Returns a list of credentials objects or functions that return credentials objects. If the provider is a function, the function will be executed lazily when the provider needs to be checked for valid credentials. By default, this object will be set to the defaultProviders.
*/
providers: Credentials[]|provider[];
static defaultProviders: provider[]
}
type provider = () => Credentials;