UNPKG

811 BTypeScriptView Raw
1import { SourceProfileInit } from "@aws-sdk/shared-ini-file-loader";
2import { Profile, Provider } from "@aws-sdk/types";
3export interface SharedConfigInit extends SourceProfileInit {
4 /**
5 * The preferred shared ini file to load the config. "config" option refers to
6 * the shared config file(defaults to `~/.aws/config`). "credentials" option
7 * refers to the shared credentials file(defaults to `~/.aws/credentials`)
8 */
9 preferredFile?: "config" | "credentials";
10}
11export declare type GetterFromConfig<T> = (profile: Profile) => T | undefined;
12/**
13 * Get config value from the shared config files with inferred profile name.
14 */
15export declare const fromSharedConfigFiles: <T = string>(configSelector: GetterFromConfig<T>, { preferredFile, ...init }?: SharedConfigInit) => Provider<T>;