UNPKG

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