UNPKG

1.44 kBTypeScriptView Raw
1import { BaseExternalAccountClient } from './baseexternalclient';
2import { IdentityPoolClientOptions } from './identitypoolclient';
3import { AwsClientOptions } from './awsclient';
4import { PluggableAuthClientOptions } from './pluggable-auth-client';
5import { AuthClientOptions } from './authclient';
6export type ExternalAccountClientOptions = IdentityPoolClientOptions | AwsClientOptions | PluggableAuthClientOptions;
7/**
8 * Dummy class with no constructor. Developers are expected to use fromJSON.
9 */
10export declare class ExternalAccountClient {
11 constructor();
12 /**
13 * This static method will instantiate the
14 * corresponding type of external account credential depending on the
15 * underlying credential source.
16 * @param options The external account options object typically loaded
17 * from the external account JSON credential file.
18 * @param additionalOptions **DEPRECATED, all options are available in the
19 * `options` parameter.** Optional additional behavior customization options.
20 * These currently customize expiration threshold time and whether to retry
21 * on 401/403 API request errors.
22 * @return A BaseExternalAccountClient instance or null if the options
23 * provided do not correspond to an external account credential.
24 */
25 static fromJSON(options: ExternalAccountClientOptions, additionalOptions?: AuthClientOptions): BaseExternalAccountClient | null;
26}