UNPKG

47.5 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class CognitoIdentity extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: CognitoIdentity.Types.ClientConfiguration)
13 config: Config & CognitoIdentity.Types.ClientConfiguration;
14 /**
15 * Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. The keys for SupportedLoginProviders are as follows: Facebook: graph.facebook.com Google: accounts.google.com Amazon: www.amazon.com Twitter: api.twitter.com Digits: www.digits.com You must use AWS Developer credentials to call this API.
16 */
17 createIdentityPool(params: CognitoIdentity.Types.CreateIdentityPoolInput, callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityPool) => void): Request<CognitoIdentity.Types.IdentityPool, AWSError>;
18 /**
19 * Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. The keys for SupportedLoginProviders are as follows: Facebook: graph.facebook.com Google: accounts.google.com Amazon: www.amazon.com Twitter: api.twitter.com Digits: www.digits.com You must use AWS Developer credentials to call this API.
20 */
21 createIdentityPool(callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityPool) => void): Request<CognitoIdentity.Types.IdentityPool, AWSError>;
22 /**
23 * Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete. You must use AWS Developer credentials to call this API.
24 */
25 deleteIdentities(params: CognitoIdentity.Types.DeleteIdentitiesInput, callback?: (err: AWSError, data: CognitoIdentity.Types.DeleteIdentitiesResponse) => void): Request<CognitoIdentity.Types.DeleteIdentitiesResponse, AWSError>;
26 /**
27 * Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete. You must use AWS Developer credentials to call this API.
28 */
29 deleteIdentities(callback?: (err: AWSError, data: CognitoIdentity.Types.DeleteIdentitiesResponse) => void): Request<CognitoIdentity.Types.DeleteIdentitiesResponse, AWSError>;
30 /**
31 * Deletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool. You must use AWS Developer credentials to call this API.
32 */
33 deleteIdentityPool(params: CognitoIdentity.Types.DeleteIdentityPoolInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
34 /**
35 * Deletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool. You must use AWS Developer credentials to call this API.
36 */
37 deleteIdentityPool(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
38 /**
39 * Returns metadata related to the given identity, including when the identity was created and any associated linked logins. You must use AWS Developer credentials to call this API.
40 */
41 describeIdentity(params: CognitoIdentity.Types.DescribeIdentityInput, callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityDescription) => void): Request<CognitoIdentity.Types.IdentityDescription, AWSError>;
42 /**
43 * Returns metadata related to the given identity, including when the identity was created and any associated linked logins. You must use AWS Developer credentials to call this API.
44 */
45 describeIdentity(callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityDescription) => void): Request<CognitoIdentity.Types.IdentityDescription, AWSError>;
46 /**
47 * Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users. You must use AWS Developer credentials to call this API.
48 */
49 describeIdentityPool(params: CognitoIdentity.Types.DescribeIdentityPoolInput, callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityPool) => void): Request<CognitoIdentity.Types.IdentityPool, AWSError>;
50 /**
51 * Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users. You must use AWS Developer credentials to call this API.
52 */
53 describeIdentityPool(callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityPool) => void): Request<CognitoIdentity.Types.IdentityPool, AWSError>;
54 /**
55 * Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token. This is a public API. You do not need any credentials to call this API.
56 */
57 getCredentialsForIdentity(params: CognitoIdentity.Types.GetCredentialsForIdentityInput, callback?: (err: AWSError, data: CognitoIdentity.Types.GetCredentialsForIdentityResponse) => void): Request<CognitoIdentity.Types.GetCredentialsForIdentityResponse, AWSError>;
58 /**
59 * Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token. This is a public API. You do not need any credentials to call this API.
60 */
61 getCredentialsForIdentity(callback?: (err: AWSError, data: CognitoIdentity.Types.GetCredentialsForIdentityResponse) => void): Request<CognitoIdentity.Types.GetCredentialsForIdentityResponse, AWSError>;
62 /**
63 * Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account. This is a public API. You do not need any credentials to call this API.
64 */
65 getId(params: CognitoIdentity.Types.GetIdInput, callback?: (err: AWSError, data: CognitoIdentity.Types.GetIdResponse) => void): Request<CognitoIdentity.Types.GetIdResponse, AWSError>;
66 /**
67 * Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account. This is a public API. You do not need any credentials to call this API.
68 */
69 getId(callback?: (err: AWSError, data: CognitoIdentity.Types.GetIdResponse) => void): Request<CognitoIdentity.Types.GetIdResponse, AWSError>;
70 /**
71 * Gets the roles for an identity pool. You must use AWS Developer credentials to call this API.
72 */
73 getIdentityPoolRoles(params: CognitoIdentity.Types.GetIdentityPoolRolesInput, callback?: (err: AWSError, data: CognitoIdentity.Types.GetIdentityPoolRolesResponse) => void): Request<CognitoIdentity.Types.GetIdentityPoolRolesResponse, AWSError>;
74 /**
75 * Gets the roles for an identity pool. You must use AWS Developer credentials to call this API.
76 */
77 getIdentityPoolRoles(callback?: (err: AWSError, data: CognitoIdentity.Types.GetIdentityPoolRolesResponse) => void): Request<CognitoIdentity.Types.GetIdentityPoolRolesResponse, AWSError>;
78 /**
79 * Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by GetId. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link. The OpenId token is valid for 10 minutes. This is a public API. You do not need any credentials to call this API.
80 */
81 getOpenIdToken(params: CognitoIdentity.Types.GetOpenIdTokenInput, callback?: (err: AWSError, data: CognitoIdentity.Types.GetOpenIdTokenResponse) => void): Request<CognitoIdentity.Types.GetOpenIdTokenResponse, AWSError>;
82 /**
83 * Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by GetId. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link. The OpenId token is valid for 10 minutes. This is a public API. You do not need any credentials to call this API.
84 */
85 getOpenIdToken(callback?: (err: AWSError, data: CognitoIdentity.Types.GetOpenIdTokenResponse) => void): Request<CognitoIdentity.Types.GetOpenIdTokenResponse, AWSError>;
86 /**
87 * Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the Logins map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users. You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the IdentityId should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing IdentityId. This API will create the identity in the specified IdentityPoolId. You must use AWS Developer credentials to call this API.
88 */
89 getOpenIdTokenForDeveloperIdentity(params: CognitoIdentity.Types.GetOpenIdTokenForDeveloperIdentityInput, callback?: (err: AWSError, data: CognitoIdentity.Types.GetOpenIdTokenForDeveloperIdentityResponse) => void): Request<CognitoIdentity.Types.GetOpenIdTokenForDeveloperIdentityResponse, AWSError>;
90 /**
91 * Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the Logins map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users. You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the IdentityId should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing IdentityId. This API will create the identity in the specified IdentityPoolId. You must use AWS Developer credentials to call this API.
92 */
93 getOpenIdTokenForDeveloperIdentity(callback?: (err: AWSError, data: CognitoIdentity.Types.GetOpenIdTokenForDeveloperIdentityResponse) => void): Request<CognitoIdentity.Types.GetOpenIdTokenForDeveloperIdentityResponse, AWSError>;
94 /**
95 * Lists the identities in an identity pool. You must use AWS Developer credentials to call this API.
96 */
97 listIdentities(params: CognitoIdentity.Types.ListIdentitiesInput, callback?: (err: AWSError, data: CognitoIdentity.Types.ListIdentitiesResponse) => void): Request<CognitoIdentity.Types.ListIdentitiesResponse, AWSError>;
98 /**
99 * Lists the identities in an identity pool. You must use AWS Developer credentials to call this API.
100 */
101 listIdentities(callback?: (err: AWSError, data: CognitoIdentity.Types.ListIdentitiesResponse) => void): Request<CognitoIdentity.Types.ListIdentitiesResponse, AWSError>;
102 /**
103 * Lists all of the Cognito identity pools registered for your account. You must use AWS Developer credentials to call this API.
104 */
105 listIdentityPools(params: CognitoIdentity.Types.ListIdentityPoolsInput, callback?: (err: AWSError, data: CognitoIdentity.Types.ListIdentityPoolsResponse) => void): Request<CognitoIdentity.Types.ListIdentityPoolsResponse, AWSError>;
106 /**
107 * Lists all of the Cognito identity pools registered for your account. You must use AWS Developer credentials to call this API.
108 */
109 listIdentityPools(callback?: (err: AWSError, data: CognitoIdentity.Types.ListIdentityPoolsResponse) => void): Request<CognitoIdentity.Types.ListIdentityPoolsResponse, AWSError>;
110 /**
111 * Lists the tags that are assigned to an Amazon Cognito identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria. You can use this action up to 10 times per second, per account.
112 */
113 listTagsForResource(params: CognitoIdentity.Types.ListTagsForResourceInput, callback?: (err: AWSError, data: CognitoIdentity.Types.ListTagsForResourceResponse) => void): Request<CognitoIdentity.Types.ListTagsForResourceResponse, AWSError>;
114 /**
115 * Lists the tags that are assigned to an Amazon Cognito identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria. You can use this action up to 10 times per second, per account.
116 */
117 listTagsForResource(callback?: (err: AWSError, data: CognitoIdentity.Types.ListTagsForResourceResponse) => void): Request<CognitoIdentity.Types.ListTagsForResourceResponse, AWSError>;
118 /**
119 * Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifier values associated with an IdentityId for an existing identity. Either IdentityID or DeveloperUserIdentifier must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, DeveloperUserIdentifier will be matched against IdentityID. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a ResourceConflictException is thrown. LookupDeveloperIdentity is intended for low-throughput control plane operations: for example, to enable customer service to locate an identity ID by username. If you are using it for higher-volume operations such as user authentication, your requests are likely to be throttled. GetOpenIdTokenForDeveloperIdentity is a better option for higher-volume operations for user authentication. You must use AWS Developer credentials to call this API.
120 */
121 lookupDeveloperIdentity(params: CognitoIdentity.Types.LookupDeveloperIdentityInput, callback?: (err: AWSError, data: CognitoIdentity.Types.LookupDeveloperIdentityResponse) => void): Request<CognitoIdentity.Types.LookupDeveloperIdentityResponse, AWSError>;
122 /**
123 * Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifier values associated with an IdentityId for an existing identity. Either IdentityID or DeveloperUserIdentifier must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, DeveloperUserIdentifier will be matched against IdentityID. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a ResourceConflictException is thrown. LookupDeveloperIdentity is intended for low-throughput control plane operations: for example, to enable customer service to locate an identity ID by username. If you are using it for higher-volume operations such as user authentication, your requests are likely to be throttled. GetOpenIdTokenForDeveloperIdentity is a better option for higher-volume operations for user authentication. You must use AWS Developer credentials to call this API.
124 */
125 lookupDeveloperIdentity(callback?: (err: AWSError, data: CognitoIdentity.Types.LookupDeveloperIdentityResponse) => void): Request<CognitoIdentity.Types.LookupDeveloperIdentityResponse, AWSError>;
126 /**
127 * Merges two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier) with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown. The number of linked logins is limited to 20. So, the number of linked logins for the source user, SourceUserIdentifier, and the destination user, DestinationUserIdentifier, together should not be larger than 20. Otherwise, an exception will be thrown. You must use AWS Developer credentials to call this API.
128 */
129 mergeDeveloperIdentities(params: CognitoIdentity.Types.MergeDeveloperIdentitiesInput, callback?: (err: AWSError, data: CognitoIdentity.Types.MergeDeveloperIdentitiesResponse) => void): Request<CognitoIdentity.Types.MergeDeveloperIdentitiesResponse, AWSError>;
130 /**
131 * Merges two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier) with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown. The number of linked logins is limited to 20. So, the number of linked logins for the source user, SourceUserIdentifier, and the destination user, DestinationUserIdentifier, together should not be larger than 20. Otherwise, an exception will be thrown. You must use AWS Developer credentials to call this API.
132 */
133 mergeDeveloperIdentities(callback?: (err: AWSError, data: CognitoIdentity.Types.MergeDeveloperIdentitiesResponse) => void): Request<CognitoIdentity.Types.MergeDeveloperIdentitiesResponse, AWSError>;
134 /**
135 * Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action. You must use AWS Developer credentials to call this API.
136 */
137 setIdentityPoolRoles(params: CognitoIdentity.Types.SetIdentityPoolRolesInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
138 /**
139 * Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action. You must use AWS Developer credentials to call this API.
140 */
141 setIdentityPoolRoles(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
142 /**
143 * Assigns a set of tags to an Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria. Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of an identity pool, one for testing and another for production, you might assign an Environment tag key to both identity pools. The value of this key might be Test for one identity pool and Production for the other. Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your identity pools. In an IAM policy, you can constrain permissions for identity pools based on specific tags or tag values. You can use this action up to 5 times per second, per account. An identity pool can have as many as 50 tags.
144 */
145 tagResource(params: CognitoIdentity.Types.TagResourceInput, callback?: (err: AWSError, data: CognitoIdentity.Types.TagResourceResponse) => void): Request<CognitoIdentity.Types.TagResourceResponse, AWSError>;
146 /**
147 * Assigns a set of tags to an Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria. Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of an identity pool, one for testing and another for production, you might assign an Environment tag key to both identity pools. The value of this key might be Test for one identity pool and Production for the other. Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your identity pools. In an IAM policy, you can constrain permissions for identity pools based on specific tags or tag values. You can use this action up to 5 times per second, per account. An identity pool can have as many as 50 tags.
148 */
149 tagResource(callback?: (err: AWSError, data: CognitoIdentity.Types.TagResourceResponse) => void): Request<CognitoIdentity.Types.TagResourceResponse, AWSError>;
150 /**
151 * Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible. You must use AWS Developer credentials to call this API.
152 */
153 unlinkDeveloperIdentity(params: CognitoIdentity.Types.UnlinkDeveloperIdentityInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
154 /**
155 * Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible. You must use AWS Developer credentials to call this API.
156 */
157 unlinkDeveloperIdentity(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
158 /**
159 * Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible. This is a public API. You do not need any credentials to call this API.
160 */
161 unlinkIdentity(params: CognitoIdentity.Types.UnlinkIdentityInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
162 /**
163 * Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible. This is a public API. You do not need any credentials to call this API.
164 */
165 unlinkIdentity(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
166 /**
167 * Removes the specified tags from an Amazon Cognito identity pool. You can use this action up to 5 times per second, per account
168 */
169 untagResource(params: CognitoIdentity.Types.UntagResourceInput, callback?: (err: AWSError, data: CognitoIdentity.Types.UntagResourceResponse) => void): Request<CognitoIdentity.Types.UntagResourceResponse, AWSError>;
170 /**
171 * Removes the specified tags from an Amazon Cognito identity pool. You can use this action up to 5 times per second, per account
172 */
173 untagResource(callback?: (err: AWSError, data: CognitoIdentity.Types.UntagResourceResponse) => void): Request<CognitoIdentity.Types.UntagResourceResponse, AWSError>;
174 /**
175 * Updates an identity pool. You must use AWS Developer credentials to call this API.
176 */
177 updateIdentityPool(params: CognitoIdentity.Types.IdentityPool, callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityPool) => void): Request<CognitoIdentity.Types.IdentityPool, AWSError>;
178 /**
179 * Updates an identity pool. You must use AWS Developer credentials to call this API.
180 */
181 updateIdentityPool(callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityPool) => void): Request<CognitoIdentity.Types.IdentityPool, AWSError>;
182}
183declare namespace CognitoIdentity {
184 export type ARNString = string;
185 export type AccessKeyString = string;
186 export type AccountId = string;
187 export type AmbiguousRoleResolutionType = "AuthenticatedRole"|"Deny"|string;
188 export type ClaimName = string;
189 export type ClaimValue = string;
190 export interface CognitoIdentityProvider {
191 /**
192 * The provider name for an Amazon Cognito user pool. For example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789.
193 */
194 ProviderName?: CognitoIdentityProviderName;
195 /**
196 * The client ID for the Amazon Cognito user pool.
197 */
198 ClientId?: CognitoIdentityProviderClientId;
199 /**
200 * TRUE if server-side token validation is enabled for the identity provider’s token. Once you set ServerSideTokenCheck to TRUE for an identity pool, that identity pool will check with the integrated user pools to make sure that the user has not been globally signed out or deleted before the identity pool provides an OIDC token or AWS credentials for the user. If the user is signed out or deleted, the identity pool will return a 400 Not Authorized error.
201 */
202 ServerSideTokenCheck?: CognitoIdentityProviderTokenCheck;
203 }
204 export type CognitoIdentityProviderClientId = string;
205 export type CognitoIdentityProviderList = CognitoIdentityProvider[];
206 export type CognitoIdentityProviderName = string;
207 export type CognitoIdentityProviderTokenCheck = boolean;
208 export interface CreateIdentityPoolInput {
209 /**
210 * A string that you provide.
211 */
212 IdentityPoolName: IdentityPoolName;
213 /**
214 * TRUE if the identity pool supports unauthenticated logins.
215 */
216 AllowUnauthenticatedIdentities: IdentityPoolUnauthenticated;
217 /**
218 * Optional key:value pairs mapping provider names to provider app IDs.
219 */
220 SupportedLoginProviders?: IdentityProviders;
221 /**
222 * The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-). Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.
223 */
224 DeveloperProviderName?: DeveloperProviderName;
225 /**
226 * A list of OpendID Connect provider ARNs.
227 */
228 OpenIdConnectProviderARNs?: OIDCProviderList;
229 /**
230 * An array of Amazon Cognito user pools and their client IDs.
231 */
232 CognitoIdentityProviders?: CognitoIdentityProviderList;
233 /**
234 * An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
235 */
236 SamlProviderARNs?: SAMLProviderList;
237 /**
238 * Tags to assign to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.
239 */
240 IdentityPoolTags?: IdentityPoolTagsType;
241 }
242 export interface Credentials {
243 /**
244 * The Access Key portion of the credentials.
245 */
246 AccessKeyId?: AccessKeyString;
247 /**
248 * The Secret Access Key portion of the credentials
249 */
250 SecretKey?: SecretKeyString;
251 /**
252 * The Session Token portion of the credentials
253 */
254 SessionToken?: SessionTokenString;
255 /**
256 * The date at which these credentials will expire.
257 */
258 Expiration?: DateType;
259 }
260 export type DateType = Date;
261 export interface DeleteIdentitiesInput {
262 /**
263 * A list of 1-60 identities that you want to delete.
264 */
265 IdentityIdsToDelete: IdentityIdList;
266 }
267 export interface DeleteIdentitiesResponse {
268 /**
269 * An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.
270 */
271 UnprocessedIdentityIds?: UnprocessedIdentityIdList;
272 }
273 export interface DeleteIdentityPoolInput {
274 /**
275 * An identity pool ID in the format REGION:GUID.
276 */
277 IdentityPoolId: IdentityPoolId;
278 }
279 export interface DescribeIdentityInput {
280 /**
281 * A unique identifier in the format REGION:GUID.
282 */
283 IdentityId: IdentityId;
284 }
285 export interface DescribeIdentityPoolInput {
286 /**
287 * An identity pool ID in the format REGION:GUID.
288 */
289 IdentityPoolId: IdentityPoolId;
290 }
291 export type DeveloperProviderName = string;
292 export type DeveloperUserIdentifier = string;
293 export type DeveloperUserIdentifierList = DeveloperUserIdentifier[];
294 export type ErrorCode = "AccessDenied"|"InternalServerError"|string;
295 export interface GetCredentialsForIdentityInput {
296 /**
297 * A unique identifier in the format REGION:GUID.
298 */
299 IdentityId: IdentityId;
300 /**
301 * A set of optional name-value pairs that map provider names to provider tokens. The name-value pair will follow the syntax "provider_name": "provider_user_identifier". Logins should not be specified when trying to get credentials for an unauthenticated identity. The Logins parameter is required when using identities associated with external identity providers such as FaceBook. For examples of Logins maps, see the code examples in the External Identity Providers section of the Amazon Cognito Developer Guide.
302 */
303 Logins?: LoginsMap;
304 /**
305 * The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.
306 */
307 CustomRoleArn?: ARNString;
308 }
309 export interface GetCredentialsForIdentityResponse {
310 /**
311 * A unique identifier in the format REGION:GUID.
312 */
313 IdentityId?: IdentityId;
314 /**
315 * Credentials for the provided identity ID.
316 */
317 Credentials?: Credentials;
318 }
319 export interface GetIdInput {
320 /**
321 * A standard AWS account ID (9+ digits).
322 */
323 AccountId?: AccountId;
324 /**
325 * An identity pool ID in the format REGION:GUID.
326 */
327 IdentityPoolId: IdentityPoolId;
328 /**
329 * A set of optional name-value pairs that map provider names to provider tokens. The available provider names for Logins are as follows: Facebook: graph.facebook.com Amazon Cognito user pool: cognito-idp.&lt;region&gt;.amazonaws.com/&lt;YOUR_USER_POOL_ID&gt;, for example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789. Google: accounts.google.com Amazon: www.amazon.com Twitter: api.twitter.com Digits: www.digits.com
330 */
331 Logins?: LoginsMap;
332 }
333 export interface GetIdResponse {
334 /**
335 * A unique identifier in the format REGION:GUID.
336 */
337 IdentityId?: IdentityId;
338 }
339 export interface GetIdentityPoolRolesInput {
340 /**
341 * An identity pool ID in the format REGION:GUID.
342 */
343 IdentityPoolId: IdentityPoolId;
344 }
345 export interface GetIdentityPoolRolesResponse {
346 /**
347 * An identity pool ID in the format REGION:GUID.
348 */
349 IdentityPoolId?: IdentityPoolId;
350 /**
351 * The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.
352 */
353 Roles?: RolesMap;
354 /**
355 * How users for a specific identity provider are to mapped to roles. This is a String-to-RoleMapping object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id".
356 */
357 RoleMappings?: RoleMappingMap;
358 }
359 export interface GetOpenIdTokenForDeveloperIdentityInput {
360 /**
361 * An identity pool ID in the format REGION:GUID.
362 */
363 IdentityPoolId: IdentityPoolId;
364 /**
365 * A unique identifier in the format REGION:GUID.
366 */
367 IdentityId?: IdentityId;
368 /**
369 * A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.
370 */
371 Logins: LoginsMap;
372 /**
373 * The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.
374 */
375 TokenDuration?: TokenDuration;
376 }
377 export interface GetOpenIdTokenForDeveloperIdentityResponse {
378 /**
379 * A unique identifier in the format REGION:GUID.
380 */
381 IdentityId?: IdentityId;
382 /**
383 * An OpenID token.
384 */
385 Token?: OIDCToken;
386 }
387 export interface GetOpenIdTokenInput {
388 /**
389 * A unique identifier in the format REGION:GUID.
390 */
391 IdentityId: IdentityId;
392 /**
393 * A set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider's authflow. For accounts.google.com, an Amazon Cognito user pool provider, or any other OpenId Connect provider, always include the id_token.
394 */
395 Logins?: LoginsMap;
396 }
397 export interface GetOpenIdTokenResponse {
398 /**
399 * A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on input.
400 */
401 IdentityId?: IdentityId;
402 /**
403 * An OpenID token, valid for 10 minutes.
404 */
405 Token?: OIDCToken;
406 }
407 export type HideDisabled = boolean;
408 export type IdentitiesList = IdentityDescription[];
409 export interface IdentityDescription {
410 /**
411 * A unique identifier in the format REGION:GUID.
412 */
413 IdentityId?: IdentityId;
414 /**
415 * The provider names.
416 */
417 Logins?: LoginsList;
418 /**
419 * Date on which the identity was created.
420 */
421 CreationDate?: DateType;
422 /**
423 * Date on which the identity was last modified.
424 */
425 LastModifiedDate?: DateType;
426 }
427 export type IdentityId = string;
428 export type IdentityIdList = IdentityId[];
429 export interface IdentityPool {
430 /**
431 * An identity pool ID in the format REGION:GUID.
432 */
433 IdentityPoolId: IdentityPoolId;
434 /**
435 * A string that you provide.
436 */
437 IdentityPoolName: IdentityPoolName;
438 /**
439 * TRUE if the identity pool supports unauthenticated logins.
440 */
441 AllowUnauthenticatedIdentities: IdentityPoolUnauthenticated;
442 /**
443 * Optional key:value pairs mapping provider names to provider app IDs.
444 */
445 SupportedLoginProviders?: IdentityProviders;
446 /**
447 * The "domain" by which Cognito will refer to your users.
448 */
449 DeveloperProviderName?: DeveloperProviderName;
450 /**
451 * A list of OpendID Connect provider ARNs.
452 */
453 OpenIdConnectProviderARNs?: OIDCProviderList;
454 /**
455 * A list representing an Amazon Cognito user pool and its client ID.
456 */
457 CognitoIdentityProviders?: CognitoIdentityProviderList;
458 /**
459 * An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
460 */
461 SamlProviderARNs?: SAMLProviderList;
462 /**
463 * The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.
464 */
465 IdentityPoolTags?: IdentityPoolTagsType;
466 }
467 export type IdentityPoolId = string;
468 export type IdentityPoolName = string;
469 export interface IdentityPoolShortDescription {
470 /**
471 * An identity pool ID in the format REGION:GUID.
472 */
473 IdentityPoolId?: IdentityPoolId;
474 /**
475 * A string that you provide.
476 */
477 IdentityPoolName?: IdentityPoolName;
478 }
479 export type IdentityPoolTagsListType = TagKeysType[];
480 export type IdentityPoolTagsType = {[key: string]: TagValueType};
481 export type IdentityPoolUnauthenticated = boolean;
482 export type IdentityPoolsList = IdentityPoolShortDescription[];
483 export type IdentityProviderId = string;
484 export type IdentityProviderName = string;
485 export type IdentityProviderToken = string;
486 export type IdentityProviders = {[key: string]: IdentityProviderId};
487 export interface ListIdentitiesInput {
488 /**
489 * An identity pool ID in the format REGION:GUID.
490 */
491 IdentityPoolId: IdentityPoolId;
492 /**
493 * The maximum number of identities to return.
494 */
495 MaxResults: QueryLimit;
496 /**
497 * A pagination token.
498 */
499 NextToken?: PaginationKey;
500 /**
501 * An optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response.
502 */
503 HideDisabled?: HideDisabled;
504 }
505 export interface ListIdentitiesResponse {
506 /**
507 * An identity pool ID in the format REGION:GUID.
508 */
509 IdentityPoolId?: IdentityPoolId;
510 /**
511 * An object containing a set of identities and associated mappings.
512 */
513 Identities?: IdentitiesList;
514 /**
515 * A pagination token.
516 */
517 NextToken?: PaginationKey;
518 }
519 export interface ListIdentityPoolsInput {
520 /**
521 * The maximum number of identities to return.
522 */
523 MaxResults: QueryLimit;
524 /**
525 * A pagination token.
526 */
527 NextToken?: PaginationKey;
528 }
529 export interface ListIdentityPoolsResponse {
530 /**
531 * The identity pools returned by the ListIdentityPools action.
532 */
533 IdentityPools?: IdentityPoolsList;
534 /**
535 * A pagination token.
536 */
537 NextToken?: PaginationKey;
538 }
539 export interface ListTagsForResourceInput {
540 /**
541 * The Amazon Resource Name (ARN) of the identity pool that the tags are assigned to.
542 */
543 ResourceArn: ARNString;
544 }
545 export interface ListTagsForResourceResponse {
546 /**
547 * The tags that are assigned to the identity pool.
548 */
549 Tags?: IdentityPoolTagsType;
550 }
551 export type LoginsList = IdentityProviderName[];
552 export type LoginsMap = {[key: string]: IdentityProviderToken};
553 export interface LookupDeveloperIdentityInput {
554 /**
555 * An identity pool ID in the format REGION:GUID.
556 */
557 IdentityPoolId: IdentityPoolId;
558 /**
559 * A unique identifier in the format REGION:GUID.
560 */
561 IdentityId?: IdentityId;
562 /**
563 * A unique ID used by your backend authentication process to identify a user. Typically, a developer identity provider would issue many developer user identifiers, in keeping with the number of users.
564 */
565 DeveloperUserIdentifier?: DeveloperUserIdentifier;
566 /**
567 * The maximum number of identities to return.
568 */
569 MaxResults?: QueryLimit;
570 /**
571 * A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.
572 */
573 NextToken?: PaginationKey;
574 }
575 export interface LookupDeveloperIdentityResponse {
576 /**
577 * A unique identifier in the format REGION:GUID.
578 */
579 IdentityId?: IdentityId;
580 /**
581 * This is the list of developer user identifiers associated with an identity ID. Cognito supports the association of multiple developer user identifiers with an identity ID.
582 */
583 DeveloperUserIdentifierList?: DeveloperUserIdentifierList;
584 /**
585 * A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.
586 */
587 NextToken?: PaginationKey;
588 }
589 export interface MappingRule {
590 /**
591 * The claim name that must be present in the token, for example, "isAdmin" or "paid".
592 */
593 Claim: ClaimName;
594 /**
595 * The match condition that specifies how closely the claim value in the IdP token must match Value.
596 */
597 MatchType: MappingRuleMatchType;
598 /**
599 * A brief string that the claim must match, for example, "paid" or "yes".
600 */
601 Value: ClaimValue;
602 /**
603 * The role ARN.
604 */
605 RoleARN: ARNString;
606 }
607 export type MappingRuleMatchType = "Equals"|"Contains"|"StartsWith"|"NotEqual"|string;
608 export type MappingRulesList = MappingRule[];
609 export interface MergeDeveloperIdentitiesInput {
610 /**
611 * User identifier for the source user. The value should be a DeveloperUserIdentifier.
612 */
613 SourceUserIdentifier: DeveloperUserIdentifier;
614 /**
615 * User identifier for the destination user. The value should be a DeveloperUserIdentifier.
616 */
617 DestinationUserIdentifier: DeveloperUserIdentifier;
618 /**
619 * The "domain" by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).
620 */
621 DeveloperProviderName: DeveloperProviderName;
622 /**
623 * An identity pool ID in the format REGION:GUID.
624 */
625 IdentityPoolId: IdentityPoolId;
626 }
627 export interface MergeDeveloperIdentitiesResponse {
628 /**
629 * A unique identifier in the format REGION:GUID.
630 */
631 IdentityId?: IdentityId;
632 }
633 export type OIDCProviderList = ARNString[];
634 export type OIDCToken = string;
635 export type PaginationKey = string;
636 export type QueryLimit = number;
637 export interface RoleMapping {
638 /**
639 * The role mapping type. Token will use cognito:roles and cognito:preferred_role claims from the Cognito identity provider token to map groups to roles. Rules will attempt to match claims from the token to map to a role.
640 */
641 Type: RoleMappingType;
642 /**
643 * If you specify Token or Rules as the Type, AmbiguousRoleResolution is required. Specifies the action to be taken if either no rules match the claim value for the Rules type, or there is no cognito:preferred_role claim and there are multiple cognito:roles matches for the Token type.
644 */
645 AmbiguousRoleResolution?: AmbiguousRoleResolutionType;
646 /**
647 * The rules to be used for mapping users to roles. If you specify Rules as the role mapping type, RulesConfiguration is required.
648 */
649 RulesConfiguration?: RulesConfigurationType;
650 }
651 export type RoleMappingMap = {[key: string]: RoleMapping};
652 export type RoleMappingType = "Token"|"Rules"|string;
653 export type RoleType = string;
654 export type RolesMap = {[key: string]: ARNString};
655 export interface RulesConfigurationType {
656 /**
657 * An array of rules. You can specify up to 25 rules per identity provider. Rules are evaluated in order. The first one to match specifies the role.
658 */
659 Rules: MappingRulesList;
660 }
661 export type SAMLProviderList = ARNString[];
662 export type SecretKeyString = string;
663 export type SessionTokenString = string;
664 export interface SetIdentityPoolRolesInput {
665 /**
666 * An identity pool ID in the format REGION:GUID.
667 */
668 IdentityPoolId: IdentityPoolId;
669 /**
670 * The map of roles associated with this pool. For a given role, the key will be either "authenticated" or "unauthenticated" and the value will be the Role ARN.
671 */
672 Roles: RolesMap;
673 /**
674 * How users for a specific identity provider are to mapped to roles. This is a string to RoleMapping object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id". Up to 25 rules can be specified per identity provider.
675 */
676 RoleMappings?: RoleMappingMap;
677 }
678 export type TagKeysType = string;
679 export interface TagResourceInput {
680 /**
681 * The Amazon Resource Name (ARN) of the identity pool to assign the tags to.
682 */
683 ResourceArn: ARNString;
684 /**
685 * The tags to assign to the identity pool.
686 */
687 Tags?: IdentityPoolTagsType;
688 }
689 export interface TagResourceResponse {
690 }
691 export type TagValueType = string;
692 export type TokenDuration = number;
693 export interface UnlinkDeveloperIdentityInput {
694 /**
695 * A unique identifier in the format REGION:GUID.
696 */
697 IdentityId: IdentityId;
698 /**
699 * An identity pool ID in the format REGION:GUID.
700 */
701 IdentityPoolId: IdentityPoolId;
702 /**
703 * The "domain" by which Cognito will refer to your users.
704 */
705 DeveloperProviderName: DeveloperProviderName;
706 /**
707 * A unique ID used by your backend authentication process to identify a user.
708 */
709 DeveloperUserIdentifier: DeveloperUserIdentifier;
710 }
711 export interface UnlinkIdentityInput {
712 /**
713 * A unique identifier in the format REGION:GUID.
714 */
715 IdentityId: IdentityId;
716 /**
717 * A set of optional name-value pairs that map provider names to provider tokens.
718 */
719 Logins: LoginsMap;
720 /**
721 * Provider names to unlink from this identity.
722 */
723 LoginsToRemove: LoginsList;
724 }
725 export interface UnprocessedIdentityId {
726 /**
727 * A unique identifier in the format REGION:GUID.
728 */
729 IdentityId?: IdentityId;
730 /**
731 * The error code indicating the type of error that occurred.
732 */
733 ErrorCode?: ErrorCode;
734 }
735 export type UnprocessedIdentityIdList = UnprocessedIdentityId[];
736 export interface UntagResourceInput {
737 /**
738 * The Amazon Resource Name (ARN) of the identity pool that the tags are assigned to.
739 */
740 ResourceArn: ARNString;
741 /**
742 * The keys of the tags to remove from the user pool.
743 */
744 TagKeys?: IdentityPoolTagsListType;
745 }
746 export interface UntagResourceResponse {
747 }
748 /**
749 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
750 */
751 export type apiVersion = "2014-06-30"|"latest"|string;
752 export interface ClientApiVersions {
753 /**
754 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
755 */
756 apiVersion?: apiVersion;
757 }
758 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
759 /**
760 * Contains interfaces for use with the CognitoIdentity client.
761 */
762 export import Types = CognitoIdentity;
763}
764export = CognitoIdentity;