cognitoidentity.d.ts (36219B)
1 import {Request} from '../lib/request'; 2 import {Response} from '../lib/response'; 3 import {AWSError} from '../lib/error'; 4 import {Service} from '../lib/service'; 5 import {ServiceConfigurationOptions} from '../lib/service'; 6 import {ConfigBase as Config} from '../lib/config'; 7 interface Blob {} 8 declare 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 a user 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 a user 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 15 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 15 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 a 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 a 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 * Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifiers 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.You must use AWS Developer credentials to call this API. 112 */ 113 lookupDeveloperIdentity(params: CognitoIdentity.Types.LookupDeveloperIdentityInput, callback?: (err: AWSError, data: CognitoIdentity.Types.LookupDeveloperIdentityResponse) => void): Request<CognitoIdentity.Types.LookupDeveloperIdentityResponse, AWSError>; 114 /** 115 * Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifiers 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.You must use AWS Developer credentials to call this API. 116 */ 117 lookupDeveloperIdentity(callback?: (err: AWSError, data: CognitoIdentity.Types.LookupDeveloperIdentityResponse) => void): Request<CognitoIdentity.Types.LookupDeveloperIdentityResponse, AWSError>; 118 /** 119 * 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.You must use AWS Developer credentials to call this API. 120 */ 121 mergeDeveloperIdentities(params: CognitoIdentity.Types.MergeDeveloperIdentitiesInput, callback?: (err: AWSError, data: CognitoIdentity.Types.MergeDeveloperIdentitiesResponse) => void): Request<CognitoIdentity.Types.MergeDeveloperIdentitiesResponse, AWSError>; 122 /** 123 * 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.You must use AWS Developer credentials to call this API. 124 */ 125 mergeDeveloperIdentities(callback?: (err: AWSError, data: CognitoIdentity.Types.MergeDeveloperIdentitiesResponse) => void): Request<CognitoIdentity.Types.MergeDeveloperIdentitiesResponse, AWSError>; 126 /** 127 * 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. 128 */ 129 setIdentityPoolRoles(params: CognitoIdentity.Types.SetIdentityPoolRolesInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 130 /** 131 * 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. 132 */ 133 setIdentityPoolRoles(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 134 /** 135 * 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. 136 */ 137 unlinkDeveloperIdentity(params: CognitoIdentity.Types.UnlinkDeveloperIdentityInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 138 /** 139 * 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. 140 */ 141 unlinkDeveloperIdentity(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 142 /** 143 * 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. 144 */ 145 unlinkIdentity(params: CognitoIdentity.Types.UnlinkIdentityInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 146 /** 147 * 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. 148 */ 149 unlinkIdentity(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 150 /** 151 * Updates a user pool.You must use AWS Developer credentials to call this API. 152 */ 153 updateIdentityPool(params: CognitoIdentity.Types.IdentityPool, callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityPool) => void): Request<CognitoIdentity.Types.IdentityPool, AWSError>; 154 /** 155 * Updates a user pool.You must use AWS Developer credentials to call this API. 156 */ 157 updateIdentityPool(callback?: (err: AWSError, data: CognitoIdentity.Types.IdentityPool) => void): Request<CognitoIdentity.Types.IdentityPool, AWSError>; 158 } 159 declare namespace CognitoIdentity.Types { 160 export type ARNString = string; 161 export type AccessKeyString = string; 162 export type AccountId = string; 163 export interface CognitoIdentityProvider { 164 /** 165 * The provider name for an Amazon Cognito Identity User Pool. For example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789. 166 */ 167 ProviderName?: CognitoIdentityProviderName; 168 /** 169 * The client ID for the Amazon Cognito Identity User Pool. 170 */ 171 ClientId?: CognitoIdentityProviderClientId; 172 } 173 export type CognitoIdentityProviderClientId = string; 174 export type CognitoIdentityProviderList = CognitoIdentityProvider[]; 175 export type CognitoIdentityProviderName = string; 176 export interface CreateIdentityPoolInput { 177 /** 178 * A string that you provide. 179 */ 180 IdentityPoolName: IdentityPoolName; 181 /** 182 * TRUE if the identity pool supports unauthenticated logins. 183 */ 184 AllowUnauthenticatedIdentities: IdentityPoolUnauthenticated; 185 /** 186 * Optional key:value pairs mapping provider names to provider app IDs. 187 */ 188 SupportedLoginProviders?: IdentityProviders; 189 /** 190 * 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. 191 */ 192 DeveloperProviderName?: DeveloperProviderName; 193 /** 194 * A list of OpendID Connect provider ARNs. 195 */ 196 OpenIdConnectProviderARNs?: OIDCProviderList; 197 /** 198 * An array of Amazon Cognito Identity user pools. 199 */ 200 CognitoIdentityProviders?: CognitoIdentityProviderList; 201 /** 202 * An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool. 203 */ 204 SamlProviderARNs?: SAMLProviderList; 205 } 206 export interface Credentials { 207 /** 208 * The Access Key portion of the credentials. 209 */ 210 AccessKeyId?: AccessKeyString; 211 /** 212 * The Secret Access Key portion of the credentials 213 */ 214 SecretKey?: SecretKeyString; 215 /** 216 * The Session Token portion of the credentials 217 */ 218 SessionToken?: SessionTokenString; 219 /** 220 * The date at which these credentials will expire. 221 */ 222 Expiration?: DateType; 223 } 224 export type DateType = Date; 225 export interface DeleteIdentitiesInput { 226 /** 227 * A list of 1-60 identities that you want to delete. 228 */ 229 IdentityIdsToDelete: IdentityIdList; 230 } 231 export interface DeleteIdentitiesResponse { 232 /** 233 * An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId. 234 */ 235 UnprocessedIdentityIds?: UnprocessedIdentityIdList; 236 } 237 export interface DeleteIdentityPoolInput { 238 /** 239 * An identity pool ID in the format REGION:GUID. 240 */ 241 IdentityPoolId: IdentityPoolId; 242 } 243 export interface DescribeIdentityInput { 244 /** 245 * A unique identifier in the format REGION:GUID. 246 */ 247 IdentityId: IdentityId; 248 } 249 export interface DescribeIdentityPoolInput { 250 /** 251 * An identity pool ID in the format REGION:GUID. 252 */ 253 IdentityPoolId: IdentityPoolId; 254 } 255 export type DeveloperProviderName = string; 256 export type DeveloperUserIdentifier = string; 257 export type DeveloperUserIdentifierList = DeveloperUserIdentifier[]; 258 export type ErrorCode = "AccessDenied"|"InternalServerError"|string; 259 export interface GetCredentialsForIdentityInput { 260 /** 261 * A unique identifier in the format REGION:GUID. 262 */ 263 IdentityId: IdentityId; 264 /** 265 * A set of optional name-value pairs that map provider names to provider tokens. 266 */ 267 Logins?: LoginsMap; 268 /** 269 * 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. 270 */ 271 CustomRoleArn?: ARNString; 272 } 273 export interface GetCredentialsForIdentityResponse { 274 /** 275 * A unique identifier in the format REGION:GUID. 276 */ 277 IdentityId?: IdentityId; 278 /** 279 * Credentials for the provided identity ID. 280 */ 281 Credentials?: Credentials; 282 } 283 export interface GetIdInput { 284 /** 285 * A standard AWS account ID (9+ digits). 286 */ 287 AccountId?: AccountId; 288 /** 289 * An identity pool ID in the format REGION:GUID. 290 */ 291 IdentityPoolId: IdentityPoolId; 292 /** 293 * 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 Google: accounts.google.com Amazon: www.amazon.com Twitter: api.twitter.com Digits: www.digits.com 294 */ 295 Logins?: LoginsMap; 296 } 297 export interface GetIdResponse { 298 /** 299 * A unique identifier in the format REGION:GUID. 300 */ 301 IdentityId?: IdentityId; 302 } 303 export interface GetIdentityPoolRolesInput { 304 /** 305 * An identity pool ID in the format REGION:GUID. 306 */ 307 IdentityPoolId: IdentityPoolId; 308 } 309 export interface GetIdentityPoolRolesResponse { 310 /** 311 * An identity pool ID in the format REGION:GUID. 312 */ 313 IdentityPoolId?: IdentityPoolId; 314 /** 315 * The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported. 316 */ 317 Roles?: RolesMap; 318 } 319 export interface GetOpenIdTokenForDeveloperIdentityInput { 320 /** 321 * An identity pool ID in the format REGION:GUID. 322 */ 323 IdentityPoolId: IdentityPoolId; 324 /** 325 * A unique identifier in the format REGION:GUID. 326 */ 327 IdentityId?: IdentityId; 328 /** 329 * 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. 330 */ 331 Logins: LoginsMap; 332 /** 333 * 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. 334 */ 335 TokenDuration?: TokenDuration; 336 } 337 export interface GetOpenIdTokenForDeveloperIdentityResponse { 338 /** 339 * A unique identifier in the format REGION:GUID. 340 */ 341 IdentityId?: IdentityId; 342 /** 343 * An OpenID token. 344 */ 345 Token?: OIDCToken; 346 } 347 export interface GetOpenIdTokenInput { 348 /** 349 * A unique identifier in the format REGION:GUID. 350 */ 351 IdentityId: IdentityId; 352 /** 353 * 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 or any other OpenId Connect provider, always include the id_token. 354 */ 355 Logins?: LoginsMap; 356 } 357 export interface GetOpenIdTokenResponse { 358 /** 359 * A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on input. 360 */ 361 IdentityId?: IdentityId; 362 /** 363 * An OpenID token, valid for 15 minutes. 364 */ 365 Token?: OIDCToken; 366 } 367 export type HideDisabled = boolean; 368 export type IdentitiesList = IdentityDescription[]; 369 export interface IdentityDescription { 370 /** 371 * A unique identifier in the format REGION:GUID. 372 */ 373 IdentityId?: IdentityId; 374 /** 375 * A set of optional name-value pairs that map provider names to provider tokens. 376 */ 377 Logins?: LoginsList; 378 /** 379 * Date on which the identity was created. 380 */ 381 CreationDate?: DateType; 382 /** 383 * Date on which the identity was last modified. 384 */ 385 LastModifiedDate?: DateType; 386 } 387 export type IdentityId = string; 388 export type IdentityIdList = IdentityId[]; 389 export interface IdentityPool { 390 /** 391 * An identity pool ID in the format REGION:GUID. 392 */ 393 IdentityPoolId: IdentityPoolId; 394 /** 395 * A string that you provide. 396 */ 397 IdentityPoolName: IdentityPoolName; 398 /** 399 * TRUE if the identity pool supports unauthenticated logins. 400 */ 401 AllowUnauthenticatedIdentities: IdentityPoolUnauthenticated; 402 /** 403 * Optional key:value pairs mapping provider names to provider app IDs. 404 */ 405 SupportedLoginProviders?: IdentityProviders; 406 /** 407 * The "domain" by which Cognito will refer to your users. 408 */ 409 DeveloperProviderName?: DeveloperProviderName; 410 /** 411 * A list of OpendID Connect provider ARNs. 412 */ 413 OpenIdConnectProviderARNs?: OIDCProviderList; 414 /** 415 * A list representing an Amazon Cognito Identity User Pool and its client ID. 416 */ 417 CognitoIdentityProviders?: CognitoIdentityProviderList; 418 /** 419 * An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool. 420 */ 421 SamlProviderARNs?: SAMLProviderList; 422 } 423 export type IdentityPoolId = string; 424 export type IdentityPoolName = string; 425 export interface IdentityPoolShortDescription { 426 /** 427 * An identity pool ID in the format REGION:GUID. 428 */ 429 IdentityPoolId?: IdentityPoolId; 430 /** 431 * A string that you provide. 432 */ 433 IdentityPoolName?: IdentityPoolName; 434 } 435 export type IdentityPoolUnauthenticated = boolean; 436 export type IdentityPoolsList = IdentityPoolShortDescription[]; 437 export type IdentityProviderId = string; 438 export type IdentityProviderName = string; 439 export type IdentityProviderToken = string; 440 export type IdentityProviders = {[key: string]: IdentityProviderId}; 441 export interface ListIdentitiesInput { 442 /** 443 * An identity pool ID in the format REGION:GUID. 444 */ 445 IdentityPoolId: IdentityPoolId; 446 /** 447 * The maximum number of identities to return. 448 */ 449 MaxResults: QueryLimit; 450 /** 451 * A pagination token. 452 */ 453 NextToken?: PaginationKey; 454 /** 455 * An optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response. 456 */ 457 HideDisabled?: HideDisabled; 458 } 459 export interface ListIdentitiesResponse { 460 /** 461 * An identity pool ID in the format REGION:GUID. 462 */ 463 IdentityPoolId?: IdentityPoolId; 464 /** 465 * An object containing a set of identities and associated mappings. 466 */ 467 Identities?: IdentitiesList; 468 /** 469 * A pagination token. 470 */ 471 NextToken?: PaginationKey; 472 } 473 export interface ListIdentityPoolsInput { 474 /** 475 * The maximum number of identities to return. 476 */ 477 MaxResults: QueryLimit; 478 /** 479 * A pagination token. 480 */ 481 NextToken?: PaginationKey; 482 } 483 export interface ListIdentityPoolsResponse { 484 /** 485 * The identity pools returned by the ListIdentityPools action. 486 */ 487 IdentityPools?: IdentityPoolsList; 488 /** 489 * A pagination token. 490 */ 491 NextToken?: PaginationKey; 492 } 493 export type LoginsList = IdentityProviderName[]; 494 export type LoginsMap = {[key: string]: IdentityProviderToken}; 495 export interface LookupDeveloperIdentityInput { 496 /** 497 * An identity pool ID in the format REGION:GUID. 498 */ 499 IdentityPoolId: IdentityPoolId; 500 /** 501 * A unique identifier in the format REGION:GUID. 502 */ 503 IdentityId?: IdentityId; 504 /** 505 * 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. 506 */ 507 DeveloperUserIdentifier?: DeveloperUserIdentifier; 508 /** 509 * The maximum number of identities to return. 510 */ 511 MaxResults?: QueryLimit; 512 /** 513 * 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. 514 */ 515 NextToken?: PaginationKey; 516 } 517 export interface LookupDeveloperIdentityResponse { 518 /** 519 * A unique identifier in the format REGION:GUID. 520 */ 521 IdentityId?: IdentityId; 522 /** 523 * 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. 524 */ 525 DeveloperUserIdentifierList?: DeveloperUserIdentifierList; 526 /** 527 * 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. 528 */ 529 NextToken?: PaginationKey; 530 } 531 export interface MergeDeveloperIdentitiesInput { 532 /** 533 * User identifier for the source user. The value should be a DeveloperUserIdentifier. 534 */ 535 SourceUserIdentifier: DeveloperUserIdentifier; 536 /** 537 * User identifier for the destination user. The value should be a DeveloperUserIdentifier. 538 */ 539 DestinationUserIdentifier: DeveloperUserIdentifier; 540 /** 541 * 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 (-). 542 */ 543 DeveloperProviderName: DeveloperProviderName; 544 /** 545 * An identity pool ID in the format REGION:GUID. 546 */ 547 IdentityPoolId: IdentityPoolId; 548 } 549 export interface MergeDeveloperIdentitiesResponse { 550 /** 551 * A unique identifier in the format REGION:GUID. 552 */ 553 IdentityId?: IdentityId; 554 } 555 export type OIDCProviderList = ARNString[]; 556 export type OIDCToken = string; 557 export type PaginationKey = string; 558 export type QueryLimit = number; 559 export type RoleType = string; 560 export type RolesMap = {[key: string]: ARNString}; 561 export type SAMLProviderList = ARNString[]; 562 export type SecretKeyString = string; 563 export type SessionTokenString = string; 564 export interface SetIdentityPoolRolesInput { 565 /** 566 * An identity pool ID in the format REGION:GUID. 567 */ 568 IdentityPoolId: IdentityPoolId; 569 /** 570 * 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. 571 */ 572 Roles: RolesMap; 573 } 574 export type String = string; 575 export type TokenDuration = number; 576 export interface UnlinkDeveloperIdentityInput { 577 /** 578 * A unique identifier in the format REGION:GUID. 579 */ 580 IdentityId: IdentityId; 581 /** 582 * An identity pool ID in the format REGION:GUID. 583 */ 584 IdentityPoolId: IdentityPoolId; 585 /** 586 * The "domain" by which Cognito will refer to your users. 587 */ 588 DeveloperProviderName: DeveloperProviderName; 589 /** 590 * A unique ID used by your backend authentication process to identify a user. 591 */ 592 DeveloperUserIdentifier: DeveloperUserIdentifier; 593 } 594 export interface UnlinkIdentityInput { 595 /** 596 * A unique identifier in the format REGION:GUID. 597 */ 598 IdentityId: IdentityId; 599 /** 600 * A set of optional name-value pairs that map provider names to provider tokens. 601 */ 602 Logins: LoginsMap; 603 /** 604 * Provider names to unlink from this identity. 605 */ 606 LoginsToRemove: LoginsList; 607 } 608 export interface UnprocessedIdentityId { 609 /** 610 * A unique identifier in the format REGION:GUID. 611 */ 612 IdentityId?: IdentityId; 613 /** 614 * The error code indicating the type of error that occurred. 615 */ 616 ErrorCode?: ErrorCode; 617 } 618 export type UnprocessedIdentityIdList = UnprocessedIdentityId[]; 619 /** 620 * 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. 621 */ 622 export type apiVersion = "2014-06-30"|"latest"|string; 623 export interface ClientApiVersions { 624 /** 625 * 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. 626 */ 627 apiVersion?: apiVersion; 628 } 629 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions; 630 } 631 export = CognitoIdentity;