UNPKG

1.41 kBTypeScriptView Raw
1import type { AwsCredentialIdentity } from "@smithy/types";
2import type { AwsSdkCredentialsFeatures } from "../feature-ids";
3export { AwsCredentialIdentity, AwsCredentialIdentityProvider, IdentityProvider } from "@smithy/types";
4/**
5 * @public
6 */
7export interface AwsIdentityProperties {
8 callerClientConfig?: {
9 region(): Promise<string>;
10 profile?: string;
11 };
12}
13/**
14 * @public
15 *
16 * Variation of {@link IdentityProvider} which accepts a contextual
17 * client configuration that includes an AWS region and potentially other
18 * configurable fields.
19 *
20 * Used to link a credential provider to a client if it is being called
21 * in the context of a client.
22 */
23export type RuntimeConfigIdentityProvider<T> = (awsIdentityProperties?: AwsIdentityProperties) => Promise<T>;
24/**
25 * @public
26 *
27 * Variation of {@link AwsCredentialIdentityProvider} which accepts a contextual
28 * client configuration that includes an AWS region and potentially other
29 * configurable fields.
30 *
31 * Used to link a credential provider to a client if it is being called
32 * in the context of a client.
33 */
34export type RuntimeConfigAwsCredentialIdentityProvider = RuntimeConfigIdentityProvider<AwsCredentialIdentity>;
35/**
36 * @public
37 *
38 * AwsCredentialIdentity with source attribution metadata.
39 */
40export type AttributedAwsCredentialIdentity = AwsCredentialIdentity & {
41 $source?: AwsSdkCredentialsFeatures;
42};