@aws-sdk/client-cognito-identity-provider 3.402.0 → 3.403.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-types/commands/AdminCreateUserCommand.d.ts +60 -0
- package/dist-types/commands/CreateUserPoolClientCommand.d.ts +128 -0
- package/dist-types/commands/CreateUserPoolCommand.d.ts +456 -0
- package/dist-types/commands/InitiateAuthCommand.d.ts +37 -0
- package/dist-types/commands/ListUsersCommand.d.ts +76 -0
- package/package.json +1 -1
|
@@ -195,6 +195,66 @@ export interface AdminCreateUserCommandOutput extends AdminCreateUserResponse, _
|
|
|
195
195
|
* @throws {@link CognitoIdentityProviderServiceException}
|
|
196
196
|
* <p>Base exception class for all service exceptions from CognitoIdentityProvider service.</p>
|
|
197
197
|
*
|
|
198
|
+
* @example An AdminCreateUser request for for a test user named John.
|
|
199
|
+
* ```javascript
|
|
200
|
+
* // This request submits a value for all possible parameters for AdminCreateUser.
|
|
201
|
+
* const input = {
|
|
202
|
+
* "DesiredDeliveryMediums": [
|
|
203
|
+
* "SMS"
|
|
204
|
+
* ],
|
|
205
|
+
* "MessageAction": "SUPPRESS",
|
|
206
|
+
* "TemporaryPassword": "This-is-my-test-99!",
|
|
207
|
+
* "UserAttributes": [
|
|
208
|
+
* {
|
|
209
|
+
* "Name": "name",
|
|
210
|
+
* "Value": "John"
|
|
211
|
+
* },
|
|
212
|
+
* {
|
|
213
|
+
* "Name": "phone_number",
|
|
214
|
+
* "Value": "+12065551212"
|
|
215
|
+
* },
|
|
216
|
+
* {
|
|
217
|
+
* "Name": "email",
|
|
218
|
+
* "Value": "testuser@example.com"
|
|
219
|
+
* }
|
|
220
|
+
* ],
|
|
221
|
+
* "UserPoolId": "us-east-1_EXAMPLE",
|
|
222
|
+
* "Username": "testuser"
|
|
223
|
+
* };
|
|
224
|
+
* const command = new AdminCreateUserCommand(input);
|
|
225
|
+
* const response = await client.send(command);
|
|
226
|
+
* /* response ==
|
|
227
|
+
* {
|
|
228
|
+
* "User": {
|
|
229
|
+
* "Attributes": [
|
|
230
|
+
* {
|
|
231
|
+
* "Name": "sub",
|
|
232
|
+
* "Value": "d16b4aa8-8633-4abd-93b3-5062a8e1b5f8"
|
|
233
|
+
* },
|
|
234
|
+
* {
|
|
235
|
+
* "Name": "name",
|
|
236
|
+
* "Value": "John"
|
|
237
|
+
* },
|
|
238
|
+
* {
|
|
239
|
+
* "Name": "phone_number",
|
|
240
|
+
* "Value": "+12065551212"
|
|
241
|
+
* },
|
|
242
|
+
* {
|
|
243
|
+
* "Name": "email",
|
|
244
|
+
* "Value": "testuser@example.com"
|
|
245
|
+
* }
|
|
246
|
+
* ],
|
|
247
|
+
* "Enabled": true,
|
|
248
|
+
* "UserCreateDate": 1689980857.949,
|
|
249
|
+
* "UserLastModifiedDate": 1689980857.949,
|
|
250
|
+
* "UserStatus": "FORCE_CHANGE_PASSWORD",
|
|
251
|
+
* "Username": "testuser"
|
|
252
|
+
* }
|
|
253
|
+
* }
|
|
254
|
+
* *\/
|
|
255
|
+
* // example id: an-admincreateuser-request-for-for-a-test-user-named-john-1689980900481
|
|
256
|
+
* ```
|
|
257
|
+
*
|
|
198
258
|
*/
|
|
199
259
|
export declare class AdminCreateUserCommand extends $Command<AdminCreateUserCommandInput, AdminCreateUserCommandOutput, CognitoIdentityProviderClientResolvedConfig> {
|
|
200
260
|
readonly input: AdminCreateUserCommandInput;
|
|
@@ -202,6 +202,134 @@ export interface CreateUserPoolClientCommandOutput extends CreateUserPoolClientR
|
|
|
202
202
|
* @throws {@link CognitoIdentityProviderServiceException}
|
|
203
203
|
* <p>Base exception class for all service exceptions from CognitoIdentityProvider service.</p>
|
|
204
204
|
*
|
|
205
|
+
* @example Example user pool app client with email and username sign-in
|
|
206
|
+
* ```javascript
|
|
207
|
+
* // The following example creates an app client with all configurable properties set to an example value. The resulting user pool client connects to an analytics client, allows sign-in with username and password, and has two external identity providers associated with it.
|
|
208
|
+
* const input = {
|
|
209
|
+
* "AccessTokenValidity": 6,
|
|
210
|
+
* "AllowedOAuthFlows": [
|
|
211
|
+
* "code"
|
|
212
|
+
* ],
|
|
213
|
+
* "AllowedOAuthFlowsUserPoolClient": true,
|
|
214
|
+
* "AllowedOAuthScopes": [
|
|
215
|
+
* "aws.cognito.signin.user.admin",
|
|
216
|
+
* "openid"
|
|
217
|
+
* ],
|
|
218
|
+
* "AnalyticsConfiguration": {
|
|
219
|
+
* "ApplicationId": "d70b2ba36a8c4dc5a04a0451a31a1e12",
|
|
220
|
+
* "ExternalId": "my-external-id",
|
|
221
|
+
* "RoleArn": "arn:aws:iam::123456789012:role/test-cognitouserpool-role",
|
|
222
|
+
* "UserDataShared": true
|
|
223
|
+
* },
|
|
224
|
+
* "CallbackURLs": [
|
|
225
|
+
* "https://example.com",
|
|
226
|
+
* "http://localhost",
|
|
227
|
+
* "myapp://example"
|
|
228
|
+
* ],
|
|
229
|
+
* "ClientName": "my-test-app-client",
|
|
230
|
+
* "DefaultRedirectURI": "https://example.com",
|
|
231
|
+
* "ExplicitAuthFlows": [
|
|
232
|
+
* "ALLOW_ADMIN_USER_PASSWORD_AUTH",
|
|
233
|
+
* "ALLOW_USER_PASSWORD_AUTH",
|
|
234
|
+
* "ALLOW_REFRESH_TOKEN_AUTH"
|
|
235
|
+
* ],
|
|
236
|
+
* "GenerateSecret": true,
|
|
237
|
+
* "IdTokenValidity": 6,
|
|
238
|
+
* "LogoutURLs": [
|
|
239
|
+
* "https://example.com/logout"
|
|
240
|
+
* ],
|
|
241
|
+
* "PreventUserExistenceErrors": "ENABLED",
|
|
242
|
+
* "ReadAttributes": [
|
|
243
|
+
* "email",
|
|
244
|
+
* "address",
|
|
245
|
+
* "preferred_username"
|
|
246
|
+
* ],
|
|
247
|
+
* "RefreshTokenValidity": 6,
|
|
248
|
+
* "SupportedIdentityProviders": [
|
|
249
|
+
* "SignInWithApple",
|
|
250
|
+
* "MySSO"
|
|
251
|
+
* ],
|
|
252
|
+
* "TokenValidityUnits": {
|
|
253
|
+
* "AccessToken": "hours",
|
|
254
|
+
* "IdToken": "minutes",
|
|
255
|
+
* "RefreshToken": "days"
|
|
256
|
+
* },
|
|
257
|
+
* "UserPoolId": "us-east-1_EXAMPLE",
|
|
258
|
+
* "WriteAttributes": [
|
|
259
|
+
* "family_name",
|
|
260
|
+
* "email"
|
|
261
|
+
* ]
|
|
262
|
+
* };
|
|
263
|
+
* const command = new CreateUserPoolClientCommand(input);
|
|
264
|
+
* const response = await client.send(command);
|
|
265
|
+
* /* response ==
|
|
266
|
+
* {
|
|
267
|
+
* "UserPoolClient": {
|
|
268
|
+
* "AccessTokenValidity": 6,
|
|
269
|
+
* "AllowedOAuthFlows": [
|
|
270
|
+
* "code"
|
|
271
|
+
* ],
|
|
272
|
+
* "AllowedOAuthFlowsUserPoolClient": true,
|
|
273
|
+
* "AllowedOAuthScopes": [
|
|
274
|
+
* "aws.cognito.signin.user.admin",
|
|
275
|
+
* "openid"
|
|
276
|
+
* ],
|
|
277
|
+
* "AnalyticsConfiguration": {
|
|
278
|
+
* "ApplicationId": "d70b2ba36a8c4dc5a04a0451a31a1e12",
|
|
279
|
+
* "ExternalId": "my-external-id",
|
|
280
|
+
* "RoleArn": "arn:aws:iam::123456789012:role/test-cognitouserpool-role",
|
|
281
|
+
* "UserDataShared": true
|
|
282
|
+
* },
|
|
283
|
+
* "AuthSessionValidity": 3,
|
|
284
|
+
* "CallbackURLs": [
|
|
285
|
+
* "https://example.com",
|
|
286
|
+
* "http://localhost",
|
|
287
|
+
* "myapp://example"
|
|
288
|
+
* ],
|
|
289
|
+
* "ClientId": "26cb2c60kq7nbmas7rbme9b6pp",
|
|
290
|
+
* "ClientName": "my-test-app-client",
|
|
291
|
+
* "ClientSecret": "13ka4h7u28d9oo44tqpq9djqsfvhvu8rk4d2ighvpu0k8fj1c2r9",
|
|
292
|
+
* "CreationDate": 1689885426.107,
|
|
293
|
+
* "DefaultRedirectURI": "https://example.com",
|
|
294
|
+
* "EnablePropagateAdditionalUserContextData": false,
|
|
295
|
+
* "EnableTokenRevocation": true,
|
|
296
|
+
* "ExplicitAuthFlows": [
|
|
297
|
+
* "ALLOW_USER_PASSWORD_AUTH",
|
|
298
|
+
* "ALLOW_ADMIN_USER_PASSWORD_AUTH",
|
|
299
|
+
* "ALLOW_REFRESH_TOKEN_AUTH"
|
|
300
|
+
* ],
|
|
301
|
+
* "IdTokenValidity": 6,
|
|
302
|
+
* "LastModifiedDate": 1689885426.107,
|
|
303
|
+
* "LogoutURLs": [
|
|
304
|
+
* "https://example.com/logout"
|
|
305
|
+
* ],
|
|
306
|
+
* "PreventUserExistenceErrors": "ENABLED",
|
|
307
|
+
* "ReadAttributes": [
|
|
308
|
+
* "address",
|
|
309
|
+
* "preferred_username",
|
|
310
|
+
* "email"
|
|
311
|
+
* ],
|
|
312
|
+
* "RefreshTokenValidity": 6,
|
|
313
|
+
* "SupportedIdentityProviders": [
|
|
314
|
+
* "SignInWithApple",
|
|
315
|
+
* "MySSO"
|
|
316
|
+
* ],
|
|
317
|
+
* "TokenValidityUnits": {
|
|
318
|
+
* "AccessToken": "hours",
|
|
319
|
+
* "IdToken": "minutes",
|
|
320
|
+
* "RefreshToken": "days"
|
|
321
|
+
* },
|
|
322
|
+
* "UserPoolId": "us-east-1_EXAMPLE",
|
|
323
|
+
* "WriteAttributes": [
|
|
324
|
+
* "family_name",
|
|
325
|
+
* "email"
|
|
326
|
+
* ]
|
|
327
|
+
* }
|
|
328
|
+
* }
|
|
329
|
+
* *\/
|
|
330
|
+
* // example id: example-user-pool-app-client-with-email-and-username-sign-in-1689885750745
|
|
331
|
+
* ```
|
|
332
|
+
*
|
|
205
333
|
*/
|
|
206
334
|
export declare class CreateUserPoolClientCommand extends $Command<CreateUserPoolClientCommandInput, CreateUserPoolClientCommandOutput, CognitoIdentityProviderClientResolvedConfig> {
|
|
207
335
|
readonly input: CreateUserPoolClientCommandInput;
|
|
@@ -374,6 +374,462 @@ export interface CreateUserPoolCommandOutput extends CreateUserPoolResponse, __M
|
|
|
374
374
|
* @throws {@link CognitoIdentityProviderServiceException}
|
|
375
375
|
* <p>Base exception class for all service exceptions from CognitoIdentityProvider service.</p>
|
|
376
376
|
*
|
|
377
|
+
* @example Example user pool with email and username sign-in
|
|
378
|
+
* ```javascript
|
|
379
|
+
* // The following example creates a user pool with all configurable properties set to an example value. The resulting user pool allows sign-in with username or email address, has optional MFA, and has a Lambda function assigned to each possible trigger.
|
|
380
|
+
* const input = {
|
|
381
|
+
* "AccountRecoverySetting": {
|
|
382
|
+
* "RecoveryMechanisms": [
|
|
383
|
+
* {
|
|
384
|
+
* "Name": "verified_email",
|
|
385
|
+
* "Priority": 1
|
|
386
|
+
* }
|
|
387
|
+
* ]
|
|
388
|
+
* },
|
|
389
|
+
* "AdminCreateUserConfig": {
|
|
390
|
+
* "AllowAdminCreateUserOnly": false,
|
|
391
|
+
* "InviteMessageTemplate": {
|
|
392
|
+
* "EmailMessage": "Your username is {username} and temporary password is {####}.",
|
|
393
|
+
* "EmailSubject": "Your sign-in information",
|
|
394
|
+
* "SMSMessage": "Your username is {username} and temporary password is {####}."
|
|
395
|
+
* }
|
|
396
|
+
* },
|
|
397
|
+
* "AliasAttributes": [
|
|
398
|
+
* "email"
|
|
399
|
+
* ],
|
|
400
|
+
* "AutoVerifiedAttributes": [
|
|
401
|
+
* "email"
|
|
402
|
+
* ],
|
|
403
|
+
* "DeletionProtection": "ACTIVE",
|
|
404
|
+
* "DeviceConfiguration": {
|
|
405
|
+
* "ChallengeRequiredOnNewDevice": true,
|
|
406
|
+
* "DeviceOnlyRememberedOnUserPrompt": true
|
|
407
|
+
* },
|
|
408
|
+
* "EmailConfiguration": {
|
|
409
|
+
* "ConfigurationSet": "my-test-ses-configuration-set",
|
|
410
|
+
* "EmailSendingAccount": "DEVELOPER",
|
|
411
|
+
* "From": "support@example.com",
|
|
412
|
+
* "ReplyToEmailAddress": "support@example.com",
|
|
413
|
+
* "SourceArn": "arn:aws:ses:us-east-1:123456789012:identity/support@example.com"
|
|
414
|
+
* },
|
|
415
|
+
* "EmailVerificationMessage": "Your verification code is {####}.",
|
|
416
|
+
* "EmailVerificationSubject": "Verify your email address",
|
|
417
|
+
* "LambdaConfig": {
|
|
418
|
+
* "CustomEmailSender": {
|
|
419
|
+
* "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
420
|
+
* "LambdaVersion": "V1_0"
|
|
421
|
+
* },
|
|
422
|
+
* "CustomMessage": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
423
|
+
* "CustomSMSSender": {
|
|
424
|
+
* "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
425
|
+
* "LambdaVersion": "V1_0"
|
|
426
|
+
* },
|
|
427
|
+
* "DefineAuthChallenge": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
428
|
+
* "KMSKeyID": "arn:aws:kms:us-east-1:123456789012:key/a6c4f8e2-0c45-47db-925f-87854bc9e357",
|
|
429
|
+
* "PostAuthentication": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
430
|
+
* "PostConfirmation": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
431
|
+
* "PreAuthentication": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
432
|
+
* "PreSignUp": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
433
|
+
* "PreTokenGeneration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
434
|
+
* "UserMigration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
435
|
+
* "VerifyAuthChallengeResponse": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction"
|
|
436
|
+
* },
|
|
437
|
+
* "MfaConfiguration": "OPTIONAL",
|
|
438
|
+
* "Policies": {
|
|
439
|
+
* "PasswordPolicy": {
|
|
440
|
+
* "MinimumLength": 6,
|
|
441
|
+
* "RequireLowercase": true,
|
|
442
|
+
* "RequireNumbers": true,
|
|
443
|
+
* "RequireSymbols": true,
|
|
444
|
+
* "RequireUppercase": true,
|
|
445
|
+
* "TemporaryPasswordValidityDays": 7
|
|
446
|
+
* }
|
|
447
|
+
* },
|
|
448
|
+
* "PoolName": "my-test-user-pool",
|
|
449
|
+
* "Schema": [
|
|
450
|
+
* {
|
|
451
|
+
* "AttributeDataType": "Number",
|
|
452
|
+
* "DeveloperOnlyAttribute": true,
|
|
453
|
+
* "Mutable": true,
|
|
454
|
+
* "Name": "mydev",
|
|
455
|
+
* "NumberAttributeConstraints": {
|
|
456
|
+
* "MaxValue": "99",
|
|
457
|
+
* "MinValue": "1"
|
|
458
|
+
* },
|
|
459
|
+
* "Required": false,
|
|
460
|
+
* "StringAttributeConstraints": {
|
|
461
|
+
* "MaxLength": "99",
|
|
462
|
+
* "MinLength": "1"
|
|
463
|
+
* }
|
|
464
|
+
* }
|
|
465
|
+
* ],
|
|
466
|
+
* "SmsAuthenticationMessage": "Your verification code is {####}.",
|
|
467
|
+
* "SmsConfiguration": {
|
|
468
|
+
* "ExternalId": "my-role-external-id",
|
|
469
|
+
* "SnsCallerArn": "arn:aws:iam::123456789012:role/service-role/test-cognito-SMS-Role"
|
|
470
|
+
* },
|
|
471
|
+
* "SmsVerificationMessage": "Your verification code is {####}.",
|
|
472
|
+
* "UserAttributeUpdateSettings": {
|
|
473
|
+
* "AttributesRequireVerificationBeforeUpdate": [
|
|
474
|
+
* "email"
|
|
475
|
+
* ]
|
|
476
|
+
* },
|
|
477
|
+
* "UserPoolAddOns": {
|
|
478
|
+
* "AdvancedSecurityMode": "OFF"
|
|
479
|
+
* },
|
|
480
|
+
* "UserPoolTags": {
|
|
481
|
+
* "my-test-tag-key": "my-test-tag-key"
|
|
482
|
+
* },
|
|
483
|
+
* "UsernameConfiguration": {
|
|
484
|
+
* "CaseSensitive": true
|
|
485
|
+
* },
|
|
486
|
+
* "VerificationMessageTemplate": {
|
|
487
|
+
* "DefaultEmailOption": "CONFIRM_WITH_CODE",
|
|
488
|
+
* "EmailMessage": "Your confirmation code is {####}",
|
|
489
|
+
* "EmailMessageByLink": "Choose this link to {##verify your email##}",
|
|
490
|
+
* "EmailSubject": "Here is your confirmation code",
|
|
491
|
+
* "EmailSubjectByLink": "Here is your confirmation link",
|
|
492
|
+
* "SmsMessage": "Your confirmation code is {####}"
|
|
493
|
+
* }
|
|
494
|
+
* };
|
|
495
|
+
* const command = new CreateUserPoolCommand(input);
|
|
496
|
+
* const response = await client.send(command);
|
|
497
|
+
* /* response ==
|
|
498
|
+
* {
|
|
499
|
+
* "UserPool": {
|
|
500
|
+
* "AccountRecoverySetting": {
|
|
501
|
+
* "RecoveryMechanisms": [
|
|
502
|
+
* {
|
|
503
|
+
* "Name": "verified_email",
|
|
504
|
+
* "Priority": 1
|
|
505
|
+
* }
|
|
506
|
+
* ]
|
|
507
|
+
* },
|
|
508
|
+
* "AdminCreateUserConfig": {
|
|
509
|
+
* "AllowAdminCreateUserOnly": false,
|
|
510
|
+
* "InviteMessageTemplate": {
|
|
511
|
+
* "EmailMessage": "Your username is {username} and temporary password is {####}.",
|
|
512
|
+
* "EmailSubject": "Your sign-in information",
|
|
513
|
+
* "SMSMessage": "Your username is {username} and temporary password is {####}."
|
|
514
|
+
* },
|
|
515
|
+
* "UnusedAccountValidityDays": 7
|
|
516
|
+
* },
|
|
517
|
+
* "AliasAttributes": [
|
|
518
|
+
* "email"
|
|
519
|
+
* ],
|
|
520
|
+
* "Arn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_EXAMPLE",
|
|
521
|
+
* "AutoVerifiedAttributes": [
|
|
522
|
+
* "email"
|
|
523
|
+
* ],
|
|
524
|
+
* "CreationDate": 1689721665.239,
|
|
525
|
+
* "DeletionProtection": "ACTIVE",
|
|
526
|
+
* "DeviceConfiguration": {
|
|
527
|
+
* "ChallengeRequiredOnNewDevice": true,
|
|
528
|
+
* "DeviceOnlyRememberedOnUserPrompt": true
|
|
529
|
+
* },
|
|
530
|
+
* "EmailConfiguration": {
|
|
531
|
+
* "ConfigurationSet": "my-test-ses-configuration-set",
|
|
532
|
+
* "EmailSendingAccount": "DEVELOPER",
|
|
533
|
+
* "From": "support@example.com",
|
|
534
|
+
* "ReplyToEmailAddress": "support@example.com",
|
|
535
|
+
* "SourceArn": "arn:aws:ses:us-east-1:123456789012:identity/support@example.com"
|
|
536
|
+
* },
|
|
537
|
+
* "EmailVerificationMessage": "Your verification code is {####}.",
|
|
538
|
+
* "EmailVerificationSubject": "Verify your email address",
|
|
539
|
+
* "EstimatedNumberOfUsers": 0,
|
|
540
|
+
* "Id": "us-east-1_EXAMPLE",
|
|
541
|
+
* "LambdaConfig": {
|
|
542
|
+
* "CustomEmailSender": {
|
|
543
|
+
* "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
544
|
+
* "LambdaVersion": "V1_0"
|
|
545
|
+
* },
|
|
546
|
+
* "CustomMessage": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
547
|
+
* "CustomSMSSender": {
|
|
548
|
+
* "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
549
|
+
* "LambdaVersion": "V1_0"
|
|
550
|
+
* },
|
|
551
|
+
* "DefineAuthChallenge": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
552
|
+
* "KMSKeyID": "arn:aws:kms:us-east-1:767671399759:key/4d43904c-8edf-4bb4-9fca-fb1a80e41cbe",
|
|
553
|
+
* "PostAuthentication": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
554
|
+
* "PostConfirmation": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
555
|
+
* "PreAuthentication": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
556
|
+
* "PreSignUp": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
557
|
+
* "PreTokenGeneration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
558
|
+
* "UserMigration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
|
|
559
|
+
* "VerifyAuthChallengeResponse": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction"
|
|
560
|
+
* },
|
|
561
|
+
* "LastModifiedDate": 1689721665.239,
|
|
562
|
+
* "MfaConfiguration": "OPTIONAL",
|
|
563
|
+
* "Name": "my-test-user-pool",
|
|
564
|
+
* "Policies": {
|
|
565
|
+
* "PasswordPolicy": {
|
|
566
|
+
* "MinimumLength": 6,
|
|
567
|
+
* "RequireLowercase": true,
|
|
568
|
+
* "RequireNumbers": true,
|
|
569
|
+
* "RequireSymbols": true,
|
|
570
|
+
* "RequireUppercase": true,
|
|
571
|
+
* "TemporaryPasswordValidityDays": 7
|
|
572
|
+
* }
|
|
573
|
+
* },
|
|
574
|
+
* "SchemaAttributes": [
|
|
575
|
+
* {
|
|
576
|
+
* "AttributeDataType": "String",
|
|
577
|
+
* "DeveloperOnlyAttribute": false,
|
|
578
|
+
* "Mutable": false,
|
|
579
|
+
* "Name": "sub",
|
|
580
|
+
* "Required": true,
|
|
581
|
+
* "StringAttributeConstraints": {
|
|
582
|
+
* "MaxLength": "2048",
|
|
583
|
+
* "MinLength": "1"
|
|
584
|
+
* }
|
|
585
|
+
* },
|
|
586
|
+
* {
|
|
587
|
+
* "AttributeDataType": "String",
|
|
588
|
+
* "DeveloperOnlyAttribute": false,
|
|
589
|
+
* "Mutable": true,
|
|
590
|
+
* "Name": "name",
|
|
591
|
+
* "Required": false,
|
|
592
|
+
* "StringAttributeConstraints": {
|
|
593
|
+
* "MaxLength": "2048",
|
|
594
|
+
* "MinLength": "0"
|
|
595
|
+
* }
|
|
596
|
+
* },
|
|
597
|
+
* {
|
|
598
|
+
* "AttributeDataType": "String",
|
|
599
|
+
* "DeveloperOnlyAttribute": false,
|
|
600
|
+
* "Mutable": true,
|
|
601
|
+
* "Name": "given_name",
|
|
602
|
+
* "Required": false,
|
|
603
|
+
* "StringAttributeConstraints": {
|
|
604
|
+
* "MaxLength": "2048",
|
|
605
|
+
* "MinLength": "0"
|
|
606
|
+
* }
|
|
607
|
+
* },
|
|
608
|
+
* {
|
|
609
|
+
* "AttributeDataType": "String",
|
|
610
|
+
* "DeveloperOnlyAttribute": false,
|
|
611
|
+
* "Mutable": true,
|
|
612
|
+
* "Name": "family_name",
|
|
613
|
+
* "Required": false,
|
|
614
|
+
* "StringAttributeConstraints": {
|
|
615
|
+
* "MaxLength": "2048",
|
|
616
|
+
* "MinLength": "0"
|
|
617
|
+
* }
|
|
618
|
+
* },
|
|
619
|
+
* {
|
|
620
|
+
* "AttributeDataType": "String",
|
|
621
|
+
* "DeveloperOnlyAttribute": false,
|
|
622
|
+
* "Mutable": true,
|
|
623
|
+
* "Name": "middle_name",
|
|
624
|
+
* "Required": false,
|
|
625
|
+
* "StringAttributeConstraints": {
|
|
626
|
+
* "MaxLength": "2048",
|
|
627
|
+
* "MinLength": "0"
|
|
628
|
+
* }
|
|
629
|
+
* },
|
|
630
|
+
* {
|
|
631
|
+
* "AttributeDataType": "String",
|
|
632
|
+
* "DeveloperOnlyAttribute": false,
|
|
633
|
+
* "Mutable": true,
|
|
634
|
+
* "Name": "nickname",
|
|
635
|
+
* "Required": false,
|
|
636
|
+
* "StringAttributeConstraints": {
|
|
637
|
+
* "MaxLength": "2048",
|
|
638
|
+
* "MinLength": "0"
|
|
639
|
+
* }
|
|
640
|
+
* },
|
|
641
|
+
* {
|
|
642
|
+
* "AttributeDataType": "String",
|
|
643
|
+
* "DeveloperOnlyAttribute": false,
|
|
644
|
+
* "Mutable": true,
|
|
645
|
+
* "Name": "preferred_username",
|
|
646
|
+
* "Required": false,
|
|
647
|
+
* "StringAttributeConstraints": {
|
|
648
|
+
* "MaxLength": "2048",
|
|
649
|
+
* "MinLength": "0"
|
|
650
|
+
* }
|
|
651
|
+
* },
|
|
652
|
+
* {
|
|
653
|
+
* "AttributeDataType": "String",
|
|
654
|
+
* "DeveloperOnlyAttribute": false,
|
|
655
|
+
* "Mutable": true,
|
|
656
|
+
* "Name": "profile",
|
|
657
|
+
* "Required": false,
|
|
658
|
+
* "StringAttributeConstraints": {
|
|
659
|
+
* "MaxLength": "2048",
|
|
660
|
+
* "MinLength": "0"
|
|
661
|
+
* }
|
|
662
|
+
* },
|
|
663
|
+
* {
|
|
664
|
+
* "AttributeDataType": "String",
|
|
665
|
+
* "DeveloperOnlyAttribute": false,
|
|
666
|
+
* "Mutable": true,
|
|
667
|
+
* "Name": "picture",
|
|
668
|
+
* "Required": false,
|
|
669
|
+
* "StringAttributeConstraints": {
|
|
670
|
+
* "MaxLength": "2048",
|
|
671
|
+
* "MinLength": "0"
|
|
672
|
+
* }
|
|
673
|
+
* },
|
|
674
|
+
* {
|
|
675
|
+
* "AttributeDataType": "String",
|
|
676
|
+
* "DeveloperOnlyAttribute": false,
|
|
677
|
+
* "Mutable": true,
|
|
678
|
+
* "Name": "website",
|
|
679
|
+
* "Required": false,
|
|
680
|
+
* "StringAttributeConstraints": {
|
|
681
|
+
* "MaxLength": "2048",
|
|
682
|
+
* "MinLength": "0"
|
|
683
|
+
* }
|
|
684
|
+
* },
|
|
685
|
+
* {
|
|
686
|
+
* "AttributeDataType": "String",
|
|
687
|
+
* "DeveloperOnlyAttribute": false,
|
|
688
|
+
* "Mutable": true,
|
|
689
|
+
* "Name": "email",
|
|
690
|
+
* "Required": false,
|
|
691
|
+
* "StringAttributeConstraints": {
|
|
692
|
+
* "MaxLength": "2048",
|
|
693
|
+
* "MinLength": "0"
|
|
694
|
+
* }
|
|
695
|
+
* },
|
|
696
|
+
* {
|
|
697
|
+
* "AttributeDataType": "Boolean",
|
|
698
|
+
* "DeveloperOnlyAttribute": false,
|
|
699
|
+
* "Mutable": true,
|
|
700
|
+
* "Name": "email_verified",
|
|
701
|
+
* "Required": false
|
|
702
|
+
* },
|
|
703
|
+
* {
|
|
704
|
+
* "AttributeDataType": "String",
|
|
705
|
+
* "DeveloperOnlyAttribute": false,
|
|
706
|
+
* "Mutable": true,
|
|
707
|
+
* "Name": "gender",
|
|
708
|
+
* "Required": false,
|
|
709
|
+
* "StringAttributeConstraints": {
|
|
710
|
+
* "MaxLength": "2048",
|
|
711
|
+
* "MinLength": "0"
|
|
712
|
+
* }
|
|
713
|
+
* },
|
|
714
|
+
* {
|
|
715
|
+
* "AttributeDataType": "String",
|
|
716
|
+
* "DeveloperOnlyAttribute": false,
|
|
717
|
+
* "Mutable": true,
|
|
718
|
+
* "Name": "birthdate",
|
|
719
|
+
* "Required": false,
|
|
720
|
+
* "StringAttributeConstraints": {
|
|
721
|
+
* "MaxLength": "10",
|
|
722
|
+
* "MinLength": "10"
|
|
723
|
+
* }
|
|
724
|
+
* },
|
|
725
|
+
* {
|
|
726
|
+
* "AttributeDataType": "String",
|
|
727
|
+
* "DeveloperOnlyAttribute": false,
|
|
728
|
+
* "Mutable": true,
|
|
729
|
+
* "Name": "zoneinfo",
|
|
730
|
+
* "Required": false,
|
|
731
|
+
* "StringAttributeConstraints": {
|
|
732
|
+
* "MaxLength": "2048",
|
|
733
|
+
* "MinLength": "0"
|
|
734
|
+
* }
|
|
735
|
+
* },
|
|
736
|
+
* {
|
|
737
|
+
* "AttributeDataType": "String",
|
|
738
|
+
* "DeveloperOnlyAttribute": false,
|
|
739
|
+
* "Mutable": true,
|
|
740
|
+
* "Name": "locale",
|
|
741
|
+
* "Required": false,
|
|
742
|
+
* "StringAttributeConstraints": {
|
|
743
|
+
* "MaxLength": "2048",
|
|
744
|
+
* "MinLength": "0"
|
|
745
|
+
* }
|
|
746
|
+
* },
|
|
747
|
+
* {
|
|
748
|
+
* "AttributeDataType": "String",
|
|
749
|
+
* "DeveloperOnlyAttribute": false,
|
|
750
|
+
* "Mutable": true,
|
|
751
|
+
* "Name": "phone_number",
|
|
752
|
+
* "Required": false,
|
|
753
|
+
* "StringAttributeConstraints": {
|
|
754
|
+
* "MaxLength": "2048",
|
|
755
|
+
* "MinLength": "0"
|
|
756
|
+
* }
|
|
757
|
+
* },
|
|
758
|
+
* {
|
|
759
|
+
* "AttributeDataType": "Boolean",
|
|
760
|
+
* "DeveloperOnlyAttribute": false,
|
|
761
|
+
* "Mutable": true,
|
|
762
|
+
* "Name": "phone_number_verifie",
|
|
763
|
+
* "Required": false
|
|
764
|
+
* },
|
|
765
|
+
* {
|
|
766
|
+
* "AttributeDataType": "String",
|
|
767
|
+
* "DeveloperOnlyAttribute": false,
|
|
768
|
+
* "Mutable": true,
|
|
769
|
+
* "Name": "address",
|
|
770
|
+
* "Required": false,
|
|
771
|
+
* "StringAttributeConstraints": {
|
|
772
|
+
* "MaxLength": "2048",
|
|
773
|
+
* "MinLength": "0"
|
|
774
|
+
* }
|
|
775
|
+
* },
|
|
776
|
+
* {
|
|
777
|
+
* "AttributeDataType": "Number",
|
|
778
|
+
* "DeveloperOnlyAttribute": false,
|
|
779
|
+
* "Mutable": true,
|
|
780
|
+
* "Name": "updated_at",
|
|
781
|
+
* "NumberAttributeConstraints": {
|
|
782
|
+
* "MinValue": "0"
|
|
783
|
+
* },
|
|
784
|
+
* "Required": false
|
|
785
|
+
* },
|
|
786
|
+
* {
|
|
787
|
+
* "AttributeDataType": "Number",
|
|
788
|
+
* "DeveloperOnlyAttribute": true,
|
|
789
|
+
* "Mutable": true,
|
|
790
|
+
* "Name": "dev:custom:mydev",
|
|
791
|
+
* "NumberAttributeConstraints": {
|
|
792
|
+
* "MaxValue": "99",
|
|
793
|
+
* "MinValue": "1"
|
|
794
|
+
* },
|
|
795
|
+
* "Required": false
|
|
796
|
+
* }
|
|
797
|
+
* ],
|
|
798
|
+
* "SmsAuthenticationMessage": "Your verification code is {####}.",
|
|
799
|
+
* "SmsConfiguration": {
|
|
800
|
+
* "ExternalId": "my-role-external-id",
|
|
801
|
+
* "SnsCallerArn": "arn:aws:iam::123456789012:role/service-role/test-cognito-SMS-Role",
|
|
802
|
+
* "SnsRegion": "us-east-1"
|
|
803
|
+
* },
|
|
804
|
+
* "SmsVerificationMessage": "Your verification code is {####}.",
|
|
805
|
+
* "UserAttributeUpdateSettings": {
|
|
806
|
+
* "AttributesRequireVerificationBeforeUpdate": [
|
|
807
|
+
* "email"
|
|
808
|
+
* ]
|
|
809
|
+
* },
|
|
810
|
+
* "UserPoolAddOns": {
|
|
811
|
+
* "AdvancedSecurityMode": "OFF"
|
|
812
|
+
* },
|
|
813
|
+
* "UserPoolTags": {
|
|
814
|
+
* "my-test-tag-key": "my-test-tag-value"
|
|
815
|
+
* },
|
|
816
|
+
* "UsernameConfiguration": {
|
|
817
|
+
* "CaseSensitive": true
|
|
818
|
+
* },
|
|
819
|
+
* "VerificationMessageTemplate": {
|
|
820
|
+
* "DefaultEmailOption": "CONFIRM_WITH_CODE",
|
|
821
|
+
* "EmailMessage": "Your confirmation code is {####}",
|
|
822
|
+
* "EmailMessageByLink": "Choose this link to {##verify your email##}",
|
|
823
|
+
* "EmailSubject": "Here is your confirmation code",
|
|
824
|
+
* "EmailSubjectByLink": "Here is your confirmation link",
|
|
825
|
+
* "SmsMessage": "Your confirmation code is {####}"
|
|
826
|
+
* }
|
|
827
|
+
* }
|
|
828
|
+
* }
|
|
829
|
+
* *\/
|
|
830
|
+
* // example id: example-user-pool-with-email-and-username-sign-in-1689722835145
|
|
831
|
+
* ```
|
|
832
|
+
*
|
|
377
833
|
*/
|
|
378
834
|
export declare class CreateUserPoolCommand extends $Command<CreateUserPoolCommandInput, CreateUserPoolCommandOutput, CognitoIdentityProviderClientResolvedConfig> {
|
|
379
835
|
readonly input: CreateUserPoolCommandInput;
|
|
@@ -158,6 +158,43 @@ export interface InitiateAuthCommandOutput extends InitiateAuthResponse, __Metad
|
|
|
158
158
|
* @throws {@link CognitoIdentityProviderServiceException}
|
|
159
159
|
* <p>Base exception class for all service exceptions from CognitoIdentityProvider service.</p>
|
|
160
160
|
*
|
|
161
|
+
* @example Example username and password sign-in for a user who has TOTP MFA
|
|
162
|
+
* ```javascript
|
|
163
|
+
* // The following example signs in the user mytestuser with analytics data, client metadata, and user context data for advanced security.
|
|
164
|
+
* const input = {
|
|
165
|
+
* "AnalyticsMetadata": {
|
|
166
|
+
* "AnalyticsEndpointId": "d70b2ba36a8c4dc5a04a0451a31a1e12"
|
|
167
|
+
* },
|
|
168
|
+
* "AuthFlow": "USER_PASSWORD_AUTH",
|
|
169
|
+
* "AuthParameters": {
|
|
170
|
+
* "PASSWORD": "This-is-my-test-99!",
|
|
171
|
+
* "SECRET_HASH": "oT5ZkS8ctnrhYeeGsGTvOzPhoc/Jd1cO5fueBWFVmp8=",
|
|
172
|
+
* "USERNAME": "mytestuser"
|
|
173
|
+
* },
|
|
174
|
+
* "ClientId": "1example23456789",
|
|
175
|
+
* "ClientMetadata": {
|
|
176
|
+
* "MyTestKey": "MyTestValue"
|
|
177
|
+
* },
|
|
178
|
+
* "UserContextData": {
|
|
179
|
+
* "EncodedData": "AmazonCognitoAdvancedSecurityData_object",
|
|
180
|
+
* "IpAddress": "192.0.2.1"
|
|
181
|
+
* }
|
|
182
|
+
* };
|
|
183
|
+
* const command = new InitiateAuthCommand(input);
|
|
184
|
+
* const response = await client.send(command);
|
|
185
|
+
* /* response ==
|
|
186
|
+
* {
|
|
187
|
+
* "ChallengeName": "SOFTWARE_TOKEN_MFA",
|
|
188
|
+
* "ChallengeParameters": {
|
|
189
|
+
* "FRIENDLY_DEVICE_NAME": "mytestauthenticator",
|
|
190
|
+
* "USER_ID_FOR_SRP": "mytestuser"
|
|
191
|
+
* },
|
|
192
|
+
* "Session": "AYABeC1-y8qooiuysEv0uM4wAqQAHQABAAdTZXJ2aWNlABBDb2duaXRvVXNlclBvb2xzAAEAB2F3cy1rbXMAS2Fybjphd3M6a21zOnVzLXdlc3QtMjowMTU3MzY3MjcxOTg6a2V5LzI5OTFhNGE5LTM5YTAtNDQ0Mi04MWU4LWRkYjY4NTllMTg2MQC4AQIBAHhjxv5lVLhE2_WNrC1zuomqn08qDUUp3z9v4EGAjazZ-wGP3HuBF5Izvxf-9WkCT5uyAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMeQoT5e6Dpfh52caqAgEQgDvuL8uLMhPt0WmQpZnkNED1gob6xbqt5LaQo_H4L5CuT4Kj499dGCoZ1q1trmlZSRgRm0wwGGG8lFU37QIAAAAADAAAEAAAAAAAAAAAAAAAAADuLe9_UJ4oZAMsQYr0ntiT_____wAAAAEAAAAAAAAAAAAAAAEAAADnLDGmKBQtsCafNokRmPLgl2itBKuKR2dfZBQb5ucCYkzThM5HOfQUSEL-A3dZzfYDC0IODsrcMkrbeeVyMJk-FCzsxS9Og8BEBVnvi9WjZkPJ4mF0YS6FUXnoPSBV5oUqGzRaT-tJ169SUFZAUfFM1fGeJ8T57-QdCxjyISRCWV1VG5_7TiCioyRGfWwzNVWh7exJortF3ccfOyiEyxeqJ2VJvJq3m_w8NP24_PMDpktpRMKftObIMlD5ewRTNCdrUXQ1BW5KIxhJLGjYfRzJDZuKzmEgS-VHsKz0z76w-AlAgdfvdAjflLnsgduU5kUX4YP6jqnetg"
|
|
193
|
+
* }
|
|
194
|
+
* *\/
|
|
195
|
+
* // example id: example-username-and-password-sign-in-for-a-user-who-has-totp-mfa-1689887395219
|
|
196
|
+
* ```
|
|
197
|
+
*
|
|
161
198
|
*/
|
|
162
199
|
export declare class InitiateAuthCommand extends $Command<InitiateAuthCommandInput, InitiateAuthCommandOutput, CognitoIdentityProviderClientResolvedConfig> {
|
|
163
200
|
readonly input: InitiateAuthCommandInput;
|
|
@@ -115,6 +115,82 @@ export interface ListUsersCommandOutput extends ListUsersResponse, __MetadataBea
|
|
|
115
115
|
* @throws {@link CognitoIdentityProviderServiceException}
|
|
116
116
|
* <p>Base exception class for all service exceptions from CognitoIdentityProvider service.</p>
|
|
117
117
|
*
|
|
118
|
+
* @example A ListUsers request for the next 3 users whose email address starts with "testuser."
|
|
119
|
+
* ```javascript
|
|
120
|
+
* // This request submits a value for all possible parameters for ListUsers. By iterating the PaginationToken, you can page through and collect all users in a user pool.
|
|
121
|
+
* const input = {
|
|
122
|
+
* "AttributesToGet": [
|
|
123
|
+
* "email",
|
|
124
|
+
* "sub"
|
|
125
|
+
* ],
|
|
126
|
+
* "Filter": "\"email\"^=\"testuser\"",
|
|
127
|
+
* "Limit": 3,
|
|
128
|
+
* "PaginationToken": "abcd1234EXAMPLE",
|
|
129
|
+
* "UserPoolId": "us-east-1_EXAMPLE"
|
|
130
|
+
* };
|
|
131
|
+
* const command = new ListUsersCommand(input);
|
|
132
|
+
* const response = await client.send(command);
|
|
133
|
+
* /* response ==
|
|
134
|
+
* {
|
|
135
|
+
* "PaginationToken": "efgh5678EXAMPLE",
|
|
136
|
+
* "Users": [
|
|
137
|
+
* {
|
|
138
|
+
* "Attributes": [
|
|
139
|
+
* {
|
|
140
|
+
* "Name": "sub",
|
|
141
|
+
* "Value": "eaad0219-2117-439f-8d46-4db20e59268f"
|
|
142
|
+
* },
|
|
143
|
+
* {
|
|
144
|
+
* "Name": "email",
|
|
145
|
+
* "Value": "testuser@example.com"
|
|
146
|
+
* }
|
|
147
|
+
* ],
|
|
148
|
+
* "Enabled": true,
|
|
149
|
+
* "UserCreateDate": 1682955829.578,
|
|
150
|
+
* "UserLastModifiedDate": 1689030181.63,
|
|
151
|
+
* "UserStatus": "CONFIRMED",
|
|
152
|
+
* "Username": "testuser"
|
|
153
|
+
* },
|
|
154
|
+
* {
|
|
155
|
+
* "Attributes": [
|
|
156
|
+
* {
|
|
157
|
+
* "Name": "sub",
|
|
158
|
+
* "Value": "3b994cfd-0b07-4581-be46-3c82f9a70c90"
|
|
159
|
+
* },
|
|
160
|
+
* {
|
|
161
|
+
* "Name": "email",
|
|
162
|
+
* "Value": "testuser2@example.com"
|
|
163
|
+
* }
|
|
164
|
+
* ],
|
|
165
|
+
* "Enabled": true,
|
|
166
|
+
* "UserCreateDate": 1684427979.201,
|
|
167
|
+
* "UserLastModifiedDate": 1684427979.201,
|
|
168
|
+
* "UserStatus": "UNCONFIRMED",
|
|
169
|
+
* "Username": "testuser2"
|
|
170
|
+
* },
|
|
171
|
+
* {
|
|
172
|
+
* "Attributes": [
|
|
173
|
+
* {
|
|
174
|
+
* "Name": "sub",
|
|
175
|
+
* "Value": "5929e0d1-4c34-42d1-9b79-a5ecacfe66f7"
|
|
176
|
+
* },
|
|
177
|
+
* {
|
|
178
|
+
* "Name": "email",
|
|
179
|
+
* "Value": "testuser3@example.com"
|
|
180
|
+
* }
|
|
181
|
+
* ],
|
|
182
|
+
* "Enabled": true,
|
|
183
|
+
* "UserCreateDate": 1684427823.641,
|
|
184
|
+
* "UserLastModifiedDate": 1684427823.641,
|
|
185
|
+
* "UserStatus": "UNCONFIRMED",
|
|
186
|
+
* "Username": "testuser3@example.com"
|
|
187
|
+
* }
|
|
188
|
+
* ]
|
|
189
|
+
* }
|
|
190
|
+
* *\/
|
|
191
|
+
* // example id: a-listusers-request-for-the-next-3-users-whose-email-address-starts-with-testuser-1689977648246
|
|
192
|
+
* ```
|
|
193
|
+
*
|
|
118
194
|
*/
|
|
119
195
|
export declare class ListUsersCommand extends $Command<ListUsersCommandInput, ListUsersCommandOutput, CognitoIdentityProviderClientResolvedConfig> {
|
|
120
196
|
readonly input: ListUsersCommandInput;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cognito-identity-provider",
|
|
3
3
|
"description": "AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.403.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|