UNPKG

4.86 kBTypeScriptView Raw
1import { MetadataBearer as __MetadataBearer } from '@aws-sdk/types';
2/**
3 * @public
4 * <p>Credentials for the provided identity ID.</p>
5 */
6export interface Credentials {
7 /**
8 * <p>The Access Key portion of the credentials.</p>
9 */
10 AccessKeyId?: string;
11 /**
12 * <p>The Secret Access Key portion of the credentials</p>
13 */
14 SecretKey?: string;
15 /**
16 * <p>The Session Token portion of the credentials</p>
17 */
18 SessionToken?: string;
19 /**
20 * <p>The date at which these credentials will expire.</p>
21 */
22 Expiration?: Date;
23}
24/**
25 * @public
26 *
27 * The input for {@link GetCredentialsForIdentityCommand}.
28 */
29export type GetCredentialsForIdentityCommandInput = GetCredentialsForIdentityInput;
30/**
31 * @public
32 *
33 * The output of {@link GetCredentialsForIdentityCommand}.
34 */
35export interface GetCredentialsForIdentityCommandOutput extends GetCredentialsForIdentityResponse, __MetadataBearer {
36}
37/**
38 * @public
39 * <p>Input to the <code>GetCredentialsForIdentity</code> action.</p>
40 */
41export interface GetCredentialsForIdentityInput {
42 /**
43 * <p>A unique identifier in the format REGION:GUID.</p>
44 */
45 IdentityId: string | undefined;
46 /**
47 * <p>A set of optional name-value pairs that map provider names to provider tokens. The
48 * name-value pair will follow the syntax "provider_name":
49 * "provider_user_identifier".</p>
50 * <p>Logins should not be specified when trying to get credentials for an unauthenticated
51 * identity.</p>
52 * <p>The Logins parameter is required when using identities associated with external
53 * identity providers such as Facebook. For examples of <code>Logins</code> maps, see the code
54 * examples in the <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/external-identity-providers.html">External Identity Providers</a> section of the Amazon Cognito Developer
55 * Guide.</p>
56 */
57 Logins?: Record<string, string>;
58 /**
59 * <p>The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were
60 * received in the token from the identity provider. For example, a SAML-based identity
61 * provider. This parameter is optional for identity providers that do not support role
62 * customization.</p>
63 */
64 CustomRoleArn?: string;
65}
66/**
67 * @public
68 * <p>Returned in response to a successful <code>GetCredentialsForIdentity</code>
69 * operation.</p>
70 */
71export interface GetCredentialsForIdentityResponse {
72 /**
73 * <p>A unique identifier in the format REGION:GUID.</p>
74 */
75 IdentityId?: string;
76 /**
77 * <p>Credentials for the provided identity ID.</p>
78 */
79 Credentials?: Credentials;
80}
81/**
82 * @public
83 *
84 * The input for {@link GetIdCommand}.
85 */
86export type GetIdCommandInput = GetIdInput;
87/**
88 * @public
89 *
90 * The output of {@link GetIdCommand}.
91 */
92export interface GetIdCommandOutput extends GetIdResponse, __MetadataBearer {
93}
94/**
95 * @public
96 * <p>Input to the GetId action.</p>
97 */
98export interface GetIdInput {
99 /**
100 * <p>A standard AWS account ID (9+ digits).</p>
101 */
102 AccountId?: string;
103 /**
104 * <p>An identity pool ID in the format REGION:GUID.</p>
105 */
106 IdentityPoolId: string | undefined;
107 /**
108 * <p>A set of optional name-value pairs that map provider names to provider tokens. The
109 * available provider names for <code>Logins</code> are as follows:</p>
110 * <ul>
111 * <li>
112 * <p>Facebook: <code>graph.facebook.com</code>
113 * </p>
114 * </li>
115 * <li>
116 * <p>Amazon Cognito user pool:
117 * <code>cognito-idp.<region>.amazonaws.com/<YOUR_USER_POOL_ID></code>,
118 * for example, <code>cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789</code>.
119 * </p>
120 * </li>
121 * <li>
122 * <p>Google: <code>accounts.google.com</code>
123 * </p>
124 * </li>
125 * <li>
126 * <p>Amazon: <code>www.amazon.com</code>
127 * </p>
128 * </li>
129 * <li>
130 * <p>Twitter: <code>api.twitter.com</code>
131 * </p>
132 * </li>
133 * <li>
134 * <p>Digits: <code>www.digits.com</code>
135 * </p>
136 * </li>
137 * </ul>
138 */
139 Logins?: Record<string, string>;
140}
141/**
142 * @public
143 * <p>Returned in response to a GetId request.</p>
144 */
145export interface GetIdResponse {
146 /**
147 * <p>A unique identifier in the format REGION:GUID.</p>
148 */
149 IdentityId?: string;
150}
151export {};