cognito-idp-2016-04-18.examples.json 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  1. {
  2. "version": "1.0",
  3. "examples": {
  4. "AdminCreateUser": [
  5. {
  6. "input": {
  7. "DesiredDeliveryMediums": [
  8. "SMS"
  9. ],
  10. "MessageAction": "SUPPRESS",
  11. "TemporaryPassword": "This-is-my-test-99!",
  12. "UserAttributes": [
  13. {
  14. "Name": "name",
  15. "Value": "John"
  16. },
  17. {
  18. "Name": "phone_number",
  19. "Value": "+12065551212"
  20. },
  21. {
  22. "Name": "email",
  23. "Value": "testuser@example.com"
  24. }
  25. ],
  26. "UserPoolId": "us-east-1_EXAMPLE",
  27. "Username": "testuser"
  28. },
  29. "output": {
  30. "User": {
  31. "Attributes": [
  32. {
  33. "Name": "sub",
  34. "Value": "d16b4aa8-8633-4abd-93b3-5062a8e1b5f8"
  35. },
  36. {
  37. "Name": "name",
  38. "Value": "John"
  39. },
  40. {
  41. "Name": "phone_number",
  42. "Value": "+12065551212"
  43. },
  44. {
  45. "Name": "email",
  46. "Value": "testuser@example.com"
  47. }
  48. ],
  49. "Enabled": true,
  50. "UserCreateDate": 1689980857.949,
  51. "UserLastModifiedDate": 1689980857.949,
  52. "UserStatus": "FORCE_CHANGE_PASSWORD",
  53. "Username": "testuser"
  54. }
  55. },
  56. "comments": {
  57. "input": {
  58. },
  59. "output": {
  60. }
  61. },
  62. "description": "This request submits a value for all possible parameters for AdminCreateUser.",
  63. "id": "an-admincreateuser-request-for-for-a-test-user-named-john-1689980900481",
  64. "title": "An AdminCreateUser request for for a test user named John."
  65. }
  66. ],
  67. "CreateUserPool": [
  68. {
  69. "input": {
  70. "AccountRecoverySetting": {
  71. "RecoveryMechanisms": [
  72. {
  73. "Name": "verified_email",
  74. "Priority": 1
  75. }
  76. ]
  77. },
  78. "AdminCreateUserConfig": {
  79. "AllowAdminCreateUserOnly": false,
  80. "InviteMessageTemplate": {
  81. "EmailMessage": "Your username is {username} and temporary password is {####}.",
  82. "EmailSubject": "Your sign-in information",
  83. "SMSMessage": "Your username is {username} and temporary password is {####}."
  84. }
  85. },
  86. "AliasAttributes": [
  87. "email"
  88. ],
  89. "AutoVerifiedAttributes": [
  90. "email"
  91. ],
  92. "DeletionProtection": "ACTIVE",
  93. "DeviceConfiguration": {
  94. "ChallengeRequiredOnNewDevice": true,
  95. "DeviceOnlyRememberedOnUserPrompt": true
  96. },
  97. "EmailConfiguration": {
  98. "ConfigurationSet": "my-test-ses-configuration-set",
  99. "EmailSendingAccount": "DEVELOPER",
  100. "From": "support@example.com",
  101. "ReplyToEmailAddress": "support@example.com",
  102. "SourceArn": "arn:aws:ses:us-east-1:123456789012:identity/support@example.com"
  103. },
  104. "EmailVerificationMessage": "Your verification code is {####}.",
  105. "EmailVerificationSubject": "Verify your email address",
  106. "LambdaConfig": {
  107. "CustomEmailSender": {
  108. "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  109. "LambdaVersion": "V1_0"
  110. },
  111. "CustomMessage": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  112. "CustomSMSSender": {
  113. "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  114. "LambdaVersion": "V1_0"
  115. },
  116. "DefineAuthChallenge": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  117. "KMSKeyID": "arn:aws:kms:us-east-1:123456789012:key/a6c4f8e2-0c45-47db-925f-87854bc9e357",
  118. "PostAuthentication": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  119. "PostConfirmation": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  120. "PreAuthentication": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  121. "PreSignUp": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  122. "PreTokenGeneration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  123. "UserMigration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  124. "VerifyAuthChallengeResponse": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction"
  125. },
  126. "MfaConfiguration": "OPTIONAL",
  127. "Policies": {
  128. "PasswordPolicy": {
  129. "MinimumLength": 6,
  130. "RequireLowercase": true,
  131. "RequireNumbers": true,
  132. "RequireSymbols": true,
  133. "RequireUppercase": true,
  134. "TemporaryPasswordValidityDays": 7
  135. }
  136. },
  137. "PoolName": "my-test-user-pool",
  138. "Schema": [
  139. {
  140. "AttributeDataType": "Number",
  141. "DeveloperOnlyAttribute": true,
  142. "Mutable": true,
  143. "Name": "mydev",
  144. "NumberAttributeConstraints": {
  145. "MaxValue": "99",
  146. "MinValue": "1"
  147. },
  148. "Required": false,
  149. "StringAttributeConstraints": {
  150. "MaxLength": "99",
  151. "MinLength": "1"
  152. }
  153. }
  154. ],
  155. "SmsAuthenticationMessage": "Your verification code is {####}.",
  156. "SmsConfiguration": {
  157. "ExternalId": "my-role-external-id",
  158. "SnsCallerArn": "arn:aws:iam::123456789012:role/service-role/test-cognito-SMS-Role"
  159. },
  160. "SmsVerificationMessage": "Your verification code is {####}.",
  161. "UserAttributeUpdateSettings": {
  162. "AttributesRequireVerificationBeforeUpdate": [
  163. "email"
  164. ]
  165. },
  166. "UserPoolAddOns": {
  167. "AdvancedSecurityMode": "OFF"
  168. },
  169. "UserPoolTags": {
  170. "my-test-tag-key": "my-test-tag-key"
  171. },
  172. "UsernameConfiguration": {
  173. "CaseSensitive": true
  174. },
  175. "VerificationMessageTemplate": {
  176. "DefaultEmailOption": "CONFIRM_WITH_CODE",
  177. "EmailMessage": "Your confirmation code is {####}",
  178. "EmailMessageByLink": "Choose this link to {##verify your email##}",
  179. "EmailSubject": "Here is your confirmation code",
  180. "EmailSubjectByLink": "Here is your confirmation link",
  181. "SmsMessage": "Your confirmation code is {####}"
  182. }
  183. },
  184. "output": {
  185. "UserPool": {
  186. "AccountRecoverySetting": {
  187. "RecoveryMechanisms": [
  188. {
  189. "Name": "verified_email",
  190. "Priority": 1
  191. }
  192. ]
  193. },
  194. "AdminCreateUserConfig": {
  195. "AllowAdminCreateUserOnly": false,
  196. "InviteMessageTemplate": {
  197. "EmailMessage": "Your username is {username} and temporary password is {####}.",
  198. "EmailSubject": "Your sign-in information",
  199. "SMSMessage": "Your username is {username} and temporary password is {####}."
  200. },
  201. "UnusedAccountValidityDays": 7
  202. },
  203. "AliasAttributes": [
  204. "email"
  205. ],
  206. "Arn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_EXAMPLE",
  207. "AutoVerifiedAttributes": [
  208. "email"
  209. ],
  210. "CreationDate": 1689721665.239,
  211. "DeletionProtection": "ACTIVE",
  212. "DeviceConfiguration": {
  213. "ChallengeRequiredOnNewDevice": true,
  214. "DeviceOnlyRememberedOnUserPrompt": true
  215. },
  216. "EmailConfiguration": {
  217. "ConfigurationSet": "my-test-ses-configuration-set",
  218. "EmailSendingAccount": "DEVELOPER",
  219. "From": "support@example.com",
  220. "ReplyToEmailAddress": "support@example.com",
  221. "SourceArn": "arn:aws:ses:us-east-1:123456789012:identity/support@example.com"
  222. },
  223. "EmailVerificationMessage": "Your verification code is {####}.",
  224. "EmailVerificationSubject": "Verify your email address",
  225. "EstimatedNumberOfUsers": 0,
  226. "Id": "us-east-1_EXAMPLE",
  227. "LambdaConfig": {
  228. "CustomEmailSender": {
  229. "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  230. "LambdaVersion": "V1_0"
  231. },
  232. "CustomMessage": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  233. "CustomSMSSender": {
  234. "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  235. "LambdaVersion": "V1_0"
  236. },
  237. "DefineAuthChallenge": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  238. "KMSKeyID": "arn:aws:kms:us-east-1:767671399759:key/4d43904c-8edf-4bb4-9fca-fb1a80e41cbe",
  239. "PostAuthentication": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  240. "PostConfirmation": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  241. "PreAuthentication": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  242. "PreSignUp": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  243. "PreTokenGeneration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  244. "UserMigration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
  245. "VerifyAuthChallengeResponse": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction"
  246. },
  247. "LastModifiedDate": 1689721665.239,
  248. "MfaConfiguration": "OPTIONAL",
  249. "Name": "my-test-user-pool",
  250. "Policies": {
  251. "PasswordPolicy": {
  252. "MinimumLength": 6,
  253. "RequireLowercase": true,
  254. "RequireNumbers": true,
  255. "RequireSymbols": true,
  256. "RequireUppercase": true,
  257. "TemporaryPasswordValidityDays": 7
  258. }
  259. },
  260. "SchemaAttributes": [
  261. {
  262. "AttributeDataType": "String",
  263. "DeveloperOnlyAttribute": false,
  264. "Mutable": false,
  265. "Name": "sub",
  266. "Required": true,
  267. "StringAttributeConstraints": {
  268. "MaxLength": "2048",
  269. "MinLength": "1"
  270. }
  271. },
  272. {
  273. "AttributeDataType": "String",
  274. "DeveloperOnlyAttribute": false,
  275. "Mutable": true,
  276. "Name": "name",
  277. "Required": false,
  278. "StringAttributeConstraints": {
  279. "MaxLength": "2048",
  280. "MinLength": "0"
  281. }
  282. },
  283. {
  284. "AttributeDataType": "String",
  285. "DeveloperOnlyAttribute": false,
  286. "Mutable": true,
  287. "Name": "given_name",
  288. "Required": false,
  289. "StringAttributeConstraints": {
  290. "MaxLength": "2048",
  291. "MinLength": "0"
  292. }
  293. },
  294. {
  295. "AttributeDataType": "String",
  296. "DeveloperOnlyAttribute": false,
  297. "Mutable": true,
  298. "Name": "family_name",
  299. "Required": false,
  300. "StringAttributeConstraints": {
  301. "MaxLength": "2048",
  302. "MinLength": "0"
  303. }
  304. },
  305. {
  306. "AttributeDataType": "String",
  307. "DeveloperOnlyAttribute": false,
  308. "Mutable": true,
  309. "Name": "middle_name",
  310. "Required": false,
  311. "StringAttributeConstraints": {
  312. "MaxLength": "2048",
  313. "MinLength": "0"
  314. }
  315. },
  316. {
  317. "AttributeDataType": "String",
  318. "DeveloperOnlyAttribute": false,
  319. "Mutable": true,
  320. "Name": "nickname",
  321. "Required": false,
  322. "StringAttributeConstraints": {
  323. "MaxLength": "2048",
  324. "MinLength": "0"
  325. }
  326. },
  327. {
  328. "AttributeDataType": "String",
  329. "DeveloperOnlyAttribute": false,
  330. "Mutable": true,
  331. "Name": "preferred_username",
  332. "Required": false,
  333. "StringAttributeConstraints": {
  334. "MaxLength": "2048",
  335. "MinLength": "0"
  336. }
  337. },
  338. {
  339. "AttributeDataType": "String",
  340. "DeveloperOnlyAttribute": false,
  341. "Mutable": true,
  342. "Name": "profile",
  343. "Required": false,
  344. "StringAttributeConstraints": {
  345. "MaxLength": "2048",
  346. "MinLength": "0"
  347. }
  348. },
  349. {
  350. "AttributeDataType": "String",
  351. "DeveloperOnlyAttribute": false,
  352. "Mutable": true,
  353. "Name": "picture",
  354. "Required": false,
  355. "StringAttributeConstraints": {
  356. "MaxLength": "2048",
  357. "MinLength": "0"
  358. }
  359. },
  360. {
  361. "AttributeDataType": "String",
  362. "DeveloperOnlyAttribute": false,
  363. "Mutable": true,
  364. "Name": "website",
  365. "Required": false,
  366. "StringAttributeConstraints": {
  367. "MaxLength": "2048",
  368. "MinLength": "0"
  369. }
  370. },
  371. {
  372. "AttributeDataType": "String",
  373. "DeveloperOnlyAttribute": false,
  374. "Mutable": true,
  375. "Name": "email",
  376. "Required": false,
  377. "StringAttributeConstraints": {
  378. "MaxLength": "2048",
  379. "MinLength": "0"
  380. }
  381. },
  382. {
  383. "AttributeDataType": "Boolean",
  384. "DeveloperOnlyAttribute": false,
  385. "Mutable": true,
  386. "Name": "email_verified",
  387. "Required": false
  388. },
  389. {
  390. "AttributeDataType": "String",
  391. "DeveloperOnlyAttribute": false,
  392. "Mutable": true,
  393. "Name": "gender",
  394. "Required": false,
  395. "StringAttributeConstraints": {
  396. "MaxLength": "2048",
  397. "MinLength": "0"
  398. }
  399. },
  400. {
  401. "AttributeDataType": "String",
  402. "DeveloperOnlyAttribute": false,
  403. "Mutable": true,
  404. "Name": "birthdate",
  405. "Required": false,
  406. "StringAttributeConstraints": {
  407. "MaxLength": "10",
  408. "MinLength": "10"
  409. }
  410. },
  411. {
  412. "AttributeDataType": "String",
  413. "DeveloperOnlyAttribute": false,
  414. "Mutable": true,
  415. "Name": "zoneinfo",
  416. "Required": false,
  417. "StringAttributeConstraints": {
  418. "MaxLength": "2048",
  419. "MinLength": "0"
  420. }
  421. },
  422. {
  423. "AttributeDataType": "String",
  424. "DeveloperOnlyAttribute": false,
  425. "Mutable": true,
  426. "Name": "locale",
  427. "Required": false,
  428. "StringAttributeConstraints": {
  429. "MaxLength": "2048",
  430. "MinLength": "0"
  431. }
  432. },
  433. {
  434. "AttributeDataType": "String",
  435. "DeveloperOnlyAttribute": false,
  436. "Mutable": true,
  437. "Name": "phone_number",
  438. "Required": false,
  439. "StringAttributeConstraints": {
  440. "MaxLength": "2048",
  441. "MinLength": "0"
  442. }
  443. },
  444. {
  445. "AttributeDataType": "Boolean",
  446. "DeveloperOnlyAttribute": false,
  447. "Mutable": true,
  448. "Name": "phone_number_verifie",
  449. "Required": false
  450. },
  451. {
  452. "AttributeDataType": "String",
  453. "DeveloperOnlyAttribute": false,
  454. "Mutable": true,
  455. "Name": "address",
  456. "Required": false,
  457. "StringAttributeConstraints": {
  458. "MaxLength": "2048",
  459. "MinLength": "0"
  460. }
  461. },
  462. {
  463. "AttributeDataType": "Number",
  464. "DeveloperOnlyAttribute": false,
  465. "Mutable": true,
  466. "Name": "updated_at",
  467. "NumberAttributeConstraints": {
  468. "MinValue": "0"
  469. },
  470. "Required": false
  471. },
  472. {
  473. "AttributeDataType": "Number",
  474. "DeveloperOnlyAttribute": true,
  475. "Mutable": true,
  476. "Name": "dev:custom:mydev",
  477. "NumberAttributeConstraints": {
  478. "MaxValue": "99",
  479. "MinValue": "1"
  480. },
  481. "Required": false
  482. }
  483. ],
  484. "SmsAuthenticationMessage": "Your verification code is {####}.",
  485. "SmsConfiguration": {
  486. "ExternalId": "my-role-external-id",
  487. "SnsCallerArn": "arn:aws:iam::123456789012:role/service-role/test-cognito-SMS-Role",
  488. "SnsRegion": "us-east-1"
  489. },
  490. "SmsVerificationMessage": "Your verification code is {####}.",
  491. "UserAttributeUpdateSettings": {
  492. "AttributesRequireVerificationBeforeUpdate": [
  493. "email"
  494. ]
  495. },
  496. "UserPoolAddOns": {
  497. "AdvancedSecurityMode": "OFF"
  498. },
  499. "UserPoolTags": {
  500. "my-test-tag-key": "my-test-tag-value"
  501. },
  502. "UsernameConfiguration": {
  503. "CaseSensitive": true
  504. },
  505. "VerificationMessageTemplate": {
  506. "DefaultEmailOption": "CONFIRM_WITH_CODE",
  507. "EmailMessage": "Your confirmation code is {####}",
  508. "EmailMessageByLink": "Choose this link to {##verify your email##}",
  509. "EmailSubject": "Here is your confirmation code",
  510. "EmailSubjectByLink": "Here is your confirmation link",
  511. "SmsMessage": "Your confirmation code is {####}"
  512. }
  513. }
  514. },
  515. "comments": {
  516. "input": {
  517. },
  518. "output": {
  519. }
  520. },
  521. "description": "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.",
  522. "id": "example-user-pool-with-email-and-username-sign-in-1689722835145",
  523. "title": "Example user pool with email and username sign-in"
  524. }
  525. ],
  526. "CreateUserPoolClient": [
  527. {
  528. "input": {
  529. "AccessTokenValidity": 6,
  530. "AllowedOAuthFlows": [
  531. "code"
  532. ],
  533. "AllowedOAuthFlowsUserPoolClient": true,
  534. "AllowedOAuthScopes": [
  535. "aws.cognito.signin.user.admin",
  536. "openid"
  537. ],
  538. "AnalyticsConfiguration": {
  539. "ApplicationId": "d70b2ba36a8c4dc5a04a0451a31a1e12",
  540. "ExternalId": "my-external-id",
  541. "RoleArn": "arn:aws:iam::123456789012:role/test-cognitouserpool-role",
  542. "UserDataShared": true
  543. },
  544. "CallbackURLs": [
  545. "https://example.com",
  546. "http://localhost",
  547. "myapp://example"
  548. ],
  549. "ClientName": "my-test-app-client",
  550. "DefaultRedirectURI": "https://example.com",
  551. "ExplicitAuthFlows": [
  552. "ALLOW_ADMIN_USER_PASSWORD_AUTH",
  553. "ALLOW_USER_PASSWORD_AUTH",
  554. "ALLOW_REFRESH_TOKEN_AUTH"
  555. ],
  556. "GenerateSecret": true,
  557. "IdTokenValidity": 6,
  558. "LogoutURLs": [
  559. "https://example.com/logout"
  560. ],
  561. "PreventUserExistenceErrors": "ENABLED",
  562. "ReadAttributes": [
  563. "email",
  564. "address",
  565. "preferred_username"
  566. ],
  567. "RefreshTokenValidity": 6,
  568. "SupportedIdentityProviders": [
  569. "SignInWithApple",
  570. "MySSO"
  571. ],
  572. "TokenValidityUnits": {
  573. "AccessToken": "hours",
  574. "IdToken": "minutes",
  575. "RefreshToken": "days"
  576. },
  577. "UserPoolId": "us-east-1_EXAMPLE",
  578. "WriteAttributes": [
  579. "family_name",
  580. "email"
  581. ]
  582. },
  583. "output": {
  584. "UserPoolClient": {
  585. "AccessTokenValidity": 6,
  586. "AllowedOAuthFlows": [
  587. "code"
  588. ],
  589. "AllowedOAuthFlowsUserPoolClient": true,
  590. "AllowedOAuthScopes": [
  591. "aws.cognito.signin.user.admin",
  592. "openid"
  593. ],
  594. "AnalyticsConfiguration": {
  595. "ApplicationId": "d70b2ba36a8c4dc5a04a0451a31a1e12",
  596. "ExternalId": "my-external-id",
  597. "RoleArn": "arn:aws:iam::123456789012:role/test-cognitouserpool-role",
  598. "UserDataShared": true
  599. },
  600. "AuthSessionValidity": 3,
  601. "CallbackURLs": [
  602. "https://example.com",
  603. "http://localhost",
  604. "myapp://example"
  605. ],
  606. "ClientId": "26cb2c60kq7nbmas7rbme9b6pp",
  607. "ClientName": "my-test-app-client",
  608. "ClientSecret": "13ka4h7u28d9oo44tqpq9djqsfvhvu8rk4d2ighvpu0k8fj1c2r9",
  609. "CreationDate": 1689885426.107,
  610. "DefaultRedirectURI": "https://example.com",
  611. "EnablePropagateAdditionalUserContextData": false,
  612. "EnableTokenRevocation": true,
  613. "ExplicitAuthFlows": [
  614. "ALLOW_USER_PASSWORD_AUTH",
  615. "ALLOW_ADMIN_USER_PASSWORD_AUTH",
  616. "ALLOW_REFRESH_TOKEN_AUTH"
  617. ],
  618. "IdTokenValidity": 6,
  619. "LastModifiedDate": 1689885426.107,
  620. "LogoutURLs": [
  621. "https://example.com/logout"
  622. ],
  623. "PreventUserExistenceErrors": "ENABLED",
  624. "ReadAttributes": [
  625. "address",
  626. "preferred_username",
  627. "email"
  628. ],
  629. "RefreshTokenValidity": 6,
  630. "SupportedIdentityProviders": [
  631. "SignInWithApple",
  632. "MySSO"
  633. ],
  634. "TokenValidityUnits": {
  635. "AccessToken": "hours",
  636. "IdToken": "minutes",
  637. "RefreshToken": "days"
  638. },
  639. "UserPoolId": "us-east-1_EXAMPLE",
  640. "WriteAttributes": [
  641. "family_name",
  642. "email"
  643. ]
  644. }
  645. },
  646. "comments": {
  647. "input": {
  648. },
  649. "output": {
  650. }
  651. },
  652. "description": "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.",
  653. "id": "example-user-pool-app-client-with-email-and-username-sign-in-1689885750745",
  654. "title": "Example user pool app client with email and username sign-in"
  655. }
  656. ],
  657. "InitiateAuth": [
  658. {
  659. "input": {
  660. "AnalyticsMetadata": {
  661. "AnalyticsEndpointId": "d70b2ba36a8c4dc5a04a0451a31a1e12"
  662. },
  663. "AuthFlow": "USER_PASSWORD_AUTH",
  664. "AuthParameters": {
  665. "PASSWORD": "This-is-my-test-99!",
  666. "SECRET_HASH": "oT5ZkS8ctnrhYeeGsGTvOzPhoc/Jd1cO5fueBWFVmp8=",
  667. "USERNAME": "mytestuser"
  668. },
  669. "ClientId": "1example23456789",
  670. "ClientMetadata": {
  671. "MyTestKey": "MyTestValue"
  672. },
  673. "UserContextData": {
  674. "EncodedData": "AmazonCognitoAdvancedSecurityData_object",
  675. "IpAddress": "192.0.2.1"
  676. }
  677. },
  678. "output": {
  679. "ChallengeName": "SOFTWARE_TOKEN_MFA",
  680. "ChallengeParameters": {
  681. "FRIENDLY_DEVICE_NAME": "mytestauthenticator",
  682. "USER_ID_FOR_SRP": "mytestuser"
  683. },
  684. "Session": "AYABeC1-y8qooiuysEv0uM4wAqQAHQABAAdTZXJ2aWNlABBDb2duaXRvVXNlclBvb2xzAAEAB2F3cy1rbXMAS2Fybjphd3M6a21zOnVzLXdlc3QtMjowMTU3MzY3MjcxOTg6a2V5LzI5OTFhNGE5LTM5YTAtNDQ0Mi04MWU4LWRkYjY4NTllMTg2MQC4AQIBAHhjxv5lVLhE2_WNrC1zuomqn08qDUUp3z9v4EGAjazZ-wGP3HuBF5Izvxf-9WkCT5uyAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMeQoT5e6Dpfh52caqAgEQgDvuL8uLMhPt0WmQpZnkNED1gob6xbqt5LaQo_H4L5CuT4Kj499dGCoZ1q1trmlZSRgRm0wwGGG8lFU37QIAAAAADAAAEAAAAAAAAAAAAAAAAADuLe9_UJ4oZAMsQYr0ntiT_____wAAAAEAAAAAAAAAAAAAAAEAAADnLDGmKBQtsCafNokRmPLgl2itBKuKR2dfZBQb5ucCYkzThM5HOfQUSEL-A3dZzfYDC0IODsrcMkrbeeVyMJk-FCzsxS9Og8BEBVnvi9WjZkPJ4mF0YS6FUXnoPSBV5oUqGzRaT-tJ169SUFZAUfFM1fGeJ8T57-QdCxjyISRCWV1VG5_7TiCioyRGfWwzNVWh7exJortF3ccfOyiEyxeqJ2VJvJq3m_w8NP24_PMDpktpRMKftObIMlD5ewRTNCdrUXQ1BW5KIxhJLGjYfRzJDZuKzmEgS-VHsKz0z76w-AlAgdfvdAjflLnsgduU5kUX4YP6jqnetg"
  685. },
  686. "comments": {
  687. "input": {
  688. },
  689. "output": {
  690. }
  691. },
  692. "description": "The following example signs in the user mytestuser with analytics data, client metadata, and user context data for advanced security.",
  693. "id": "example-username-and-password-sign-in-for-a-user-who-has-totp-mfa-1689887395219",
  694. "title": "Example username and password sign-in for a user who has TOTP MFA"
  695. }
  696. ],
  697. "ListUsers": [
  698. {
  699. "input": {
  700. "AttributesToGet": [
  701. "email",
  702. "sub"
  703. ],
  704. "Filter": "\"email\"^=\"testuser\"",
  705. "Limit": 3,
  706. "PaginationToken": "abcd1234EXAMPLE",
  707. "UserPoolId": "us-east-1_EXAMPLE"
  708. },
  709. "output": {
  710. "PaginationToken": "efgh5678EXAMPLE",
  711. "Users": [
  712. {
  713. "Attributes": [
  714. {
  715. "Name": "sub",
  716. "Value": "eaad0219-2117-439f-8d46-4db20e59268f"
  717. },
  718. {
  719. "Name": "email",
  720. "Value": "testuser@example.com"
  721. }
  722. ],
  723. "Enabled": true,
  724. "UserCreateDate": 1682955829.578,
  725. "UserLastModifiedDate": 1689030181.63,
  726. "UserStatus": "CONFIRMED",
  727. "Username": "testuser"
  728. },
  729. {
  730. "Attributes": [
  731. {
  732. "Name": "sub",
  733. "Value": "3b994cfd-0b07-4581-be46-3c82f9a70c90"
  734. },
  735. {
  736. "Name": "email",
  737. "Value": "testuser2@example.com"
  738. }
  739. ],
  740. "Enabled": true,
  741. "UserCreateDate": 1684427979.201,
  742. "UserLastModifiedDate": 1684427979.201,
  743. "UserStatus": "UNCONFIRMED",
  744. "Username": "testuser2"
  745. },
  746. {
  747. "Attributes": [
  748. {
  749. "Name": "sub",
  750. "Value": "5929e0d1-4c34-42d1-9b79-a5ecacfe66f7"
  751. },
  752. {
  753. "Name": "email",
  754. "Value": "testuser3@example.com"
  755. }
  756. ],
  757. "Enabled": true,
  758. "UserCreateDate": 1684427823.641,
  759. "UserLastModifiedDate": 1684427823.641,
  760. "UserStatus": "UNCONFIRMED",
  761. "Username": "testuser3@example.com"
  762. }
  763. ]
  764. },
  765. "comments": {
  766. "input": {
  767. },
  768. "output": {
  769. }
  770. },
  771. "description": "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.",
  772. "id": "a-listusers-request-for-the-next-3-users-whose-email-address-starts-with-testuser-1689977648246",
  773. "title": "A ListUsers request for the next 3 users whose email address starts with \"testuser.\""
  774. }
  775. ]
  776. }
  777. }