Skip to content

Commit d7b8b11

Browse files
author
awstools
committed
feat(client-cognito-identity-provider): This release adds support for the new Terms APIs which allow displaying Terms of Use and Privacy Policy on the Managed Login user-registration page.
1 parent a3abef0 commit d7b8b11

22 files changed

+3149
-687
lines changed

clients/client-cognito-identity-provider/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,14 @@ CreateResourceServer
528528

529529
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/CreateResourceServerCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/CreateResourceServerCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/CreateResourceServerCommandOutput/)
530530

531+
</details>
532+
<details>
533+
<summary>
534+
CreateTerms
535+
</summary>
536+
537+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/CreateTermsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/CreateTermsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/CreateTermsCommandOutput/)
538+
531539
</details>
532540
<details>
533541
<summary>
@@ -592,6 +600,14 @@ DeleteResourceServer
592600

593601
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/DeleteResourceServerCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/DeleteResourceServerCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/DeleteResourceServerCommandOutput/)
594602

603+
</details>
604+
<details>
605+
<summary>
606+
DeleteTerms
607+
</summary>
608+
609+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/DeleteTermsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/DeleteTermsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/DeleteTermsCommandOutput/)
610+
595611
</details>
596612
<details>
597613
<summary>
@@ -680,6 +696,14 @@ DescribeRiskConfiguration
680696

681697
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/DescribeRiskConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/DescribeRiskConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/DescribeRiskConfigurationCommandOutput/)
682698

699+
</details>
700+
<details>
701+
<summary>
702+
DescribeTerms
703+
</summary>
704+
705+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/DescribeTermsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/DescribeTermsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/DescribeTermsCommandOutput/)
706+
683707
</details>
684708
<details>
685709
<summary>
@@ -880,6 +904,14 @@ ListTagsForResource
880904

881905
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/ListTagsForResourceCommandOutput/)
882906

907+
</details>
908+
<details>
909+
<summary>
910+
ListTerms
911+
</summary>
912+
913+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/ListTermsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/ListTermsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/ListTermsCommandOutput/)
914+
883915
</details>
884916
<details>
885917
<summary>
@@ -1096,6 +1128,14 @@ UpdateResourceServer
10961128

10971129
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/UpdateResourceServerCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/UpdateResourceServerCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/UpdateResourceServerCommandOutput/)
10981130

1131+
</details>
1132+
<details>
1133+
<summary>
1134+
UpdateTerms
1135+
</summary>
1136+
1137+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/UpdateTermsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/UpdateTermsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Interface/UpdateTermsCommandOutput/)
1138+
10991139
</details>
11001140
<details>
11011141
<summary>

clients/client-cognito-identity-provider/src/CognitoIdentityProvider.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ import {
184184
CreateResourceServerCommandInput,
185185
CreateResourceServerCommandOutput,
186186
} from "./commands/CreateResourceServerCommand";
187+
import { CreateTermsCommand, CreateTermsCommandInput, CreateTermsCommandOutput } from "./commands/CreateTermsCommand";
187188
import {
188189
CreateUserImportJobCommand,
189190
CreateUserImportJobCommandInput,
@@ -220,6 +221,7 @@ import {
220221
DeleteResourceServerCommandInput,
221222
DeleteResourceServerCommandOutput,
222223
} from "./commands/DeleteResourceServerCommand";
224+
import { DeleteTermsCommand, DeleteTermsCommandInput, DeleteTermsCommandOutput } from "./commands/DeleteTermsCommand";
223225
import {
224226
DeleteUserAttributesCommand,
225227
DeleteUserAttributesCommandInput,
@@ -271,6 +273,11 @@ import {
271273
DescribeRiskConfigurationCommandInput,
272274
DescribeRiskConfigurationCommandOutput,
273275
} from "./commands/DescribeRiskConfigurationCommand";
276+
import {
277+
DescribeTermsCommand,
278+
DescribeTermsCommandInput,
279+
DescribeTermsCommandOutput,
280+
} from "./commands/DescribeTermsCommand";
274281
import {
275282
DescribeUserImportJobCommand,
276283
DescribeUserImportJobCommandInput,
@@ -376,6 +383,7 @@ import {
376383
ListTagsForResourceCommandInput,
377384
ListTagsForResourceCommandOutput,
378385
} from "./commands/ListTagsForResourceCommand";
386+
import { ListTermsCommand, ListTermsCommandInput, ListTermsCommandOutput } from "./commands/ListTermsCommand";
379387
import {
380388
ListUserImportJobsCommand,
381389
ListUserImportJobsCommandInput,
@@ -491,6 +499,7 @@ import {
491499
UpdateResourceServerCommandInput,
492500
UpdateResourceServerCommandOutput,
493501
} from "./commands/UpdateResourceServerCommand";
502+
import { UpdateTermsCommand, UpdateTermsCommandInput, UpdateTermsCommandOutput } from "./commands/UpdateTermsCommand";
494503
import {
495504
UpdateUserAttributesCommand,
496505
UpdateUserAttributesCommandInput,
@@ -560,6 +569,7 @@ const commands = {
560569
CreateIdentityProviderCommand,
561570
CreateManagedLoginBrandingCommand,
562571
CreateResourceServerCommand,
572+
CreateTermsCommand,
563573
CreateUserImportJobCommand,
564574
CreateUserPoolCommand,
565575
CreateUserPoolClientCommand,
@@ -568,6 +578,7 @@ const commands = {
568578
DeleteIdentityProviderCommand,
569579
DeleteManagedLoginBrandingCommand,
570580
DeleteResourceServerCommand,
581+
DeleteTermsCommand,
571582
DeleteUserCommand,
572583
DeleteUserAttributesCommand,
573584
DeleteUserPoolCommand,
@@ -579,6 +590,7 @@ const commands = {
579590
DescribeManagedLoginBrandingByClientCommand,
580591
DescribeResourceServerCommand,
581592
DescribeRiskConfigurationCommand,
593+
DescribeTermsCommand,
582594
DescribeUserImportJobCommand,
583595
DescribeUserPoolCommand,
584596
DescribeUserPoolClientCommand,
@@ -604,6 +616,7 @@ const commands = {
604616
ListIdentityProvidersCommand,
605617
ListResourceServersCommand,
606618
ListTagsForResourceCommand,
619+
ListTermsCommand,
607620
ListUserImportJobsCommand,
608621
ListUserPoolClientsCommand,
609622
ListUserPoolsCommand,
@@ -631,6 +644,7 @@ const commands = {
631644
UpdateIdentityProviderCommand,
632645
UpdateManagedLoginBrandingCommand,
633646
UpdateResourceServerCommand,
647+
UpdateTermsCommand,
634648
UpdateUserAttributesCommand,
635649
UpdateUserPoolCommand,
636650
UpdateUserPoolClientCommand,
@@ -1231,6 +1245,17 @@ export interface CognitoIdentityProvider {
12311245
cb: (err: any, data?: CreateResourceServerCommandOutput) => void
12321246
): void;
12331247

1248+
/**
1249+
* @see {@link CreateTermsCommand}
1250+
*/
1251+
createTerms(args: CreateTermsCommandInput, options?: __HttpHandlerOptions): Promise<CreateTermsCommandOutput>;
1252+
createTerms(args: CreateTermsCommandInput, cb: (err: any, data?: CreateTermsCommandOutput) => void): void;
1253+
createTerms(
1254+
args: CreateTermsCommandInput,
1255+
options: __HttpHandlerOptions,
1256+
cb: (err: any, data?: CreateTermsCommandOutput) => void
1257+
): void;
1258+
12341259
/**
12351260
* @see {@link CreateUserImportJobCommand}
12361261
*/
@@ -1358,6 +1383,17 @@ export interface CognitoIdentityProvider {
13581383
cb: (err: any, data?: DeleteResourceServerCommandOutput) => void
13591384
): void;
13601385

1386+
/**
1387+
* @see {@link DeleteTermsCommand}
1388+
*/
1389+
deleteTerms(args: DeleteTermsCommandInput, options?: __HttpHandlerOptions): Promise<DeleteTermsCommandOutput>;
1390+
deleteTerms(args: DeleteTermsCommandInput, cb: (err: any, data?: DeleteTermsCommandOutput) => void): void;
1391+
deleteTerms(
1392+
args: DeleteTermsCommandInput,
1393+
options: __HttpHandlerOptions,
1394+
cb: (err: any, data?: DeleteTermsCommandOutput) => void
1395+
): void;
1396+
13611397
/**
13621398
* @see {@link DeleteUserCommand}
13631399
*/
@@ -1536,6 +1572,17 @@ export interface CognitoIdentityProvider {
15361572
cb: (err: any, data?: DescribeRiskConfigurationCommandOutput) => void
15371573
): void;
15381574

1575+
/**
1576+
* @see {@link DescribeTermsCommand}
1577+
*/
1578+
describeTerms(args: DescribeTermsCommandInput, options?: __HttpHandlerOptions): Promise<DescribeTermsCommandOutput>;
1579+
describeTerms(args: DescribeTermsCommandInput, cb: (err: any, data?: DescribeTermsCommandOutput) => void): void;
1580+
describeTerms(
1581+
args: DescribeTermsCommandInput,
1582+
options: __HttpHandlerOptions,
1583+
cb: (err: any, data?: DescribeTermsCommandOutput) => void
1584+
): void;
1585+
15391586
/**
15401587
* @see {@link DescribeUserImportJobCommand}
15411588
*/
@@ -1904,6 +1951,17 @@ export interface CognitoIdentityProvider {
19041951
cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
19051952
): void;
19061953

1954+
/**
1955+
* @see {@link ListTermsCommand}
1956+
*/
1957+
listTerms(args: ListTermsCommandInput, options?: __HttpHandlerOptions): Promise<ListTermsCommandOutput>;
1958+
listTerms(args: ListTermsCommandInput, cb: (err: any, data?: ListTermsCommandOutput) => void): void;
1959+
listTerms(
1960+
args: ListTermsCommandInput,
1961+
options: __HttpHandlerOptions,
1962+
cb: (err: any, data?: ListTermsCommandOutput) => void
1963+
): void;
1964+
19071965
/**
19081966
* @see {@link ListUserImportJobsCommand}
19091967
*/
@@ -2319,6 +2377,17 @@ export interface CognitoIdentityProvider {
23192377
cb: (err: any, data?: UpdateResourceServerCommandOutput) => void
23202378
): void;
23212379

2380+
/**
2381+
* @see {@link UpdateTermsCommand}
2382+
*/
2383+
updateTerms(args: UpdateTermsCommandInput, options?: __HttpHandlerOptions): Promise<UpdateTermsCommandOutput>;
2384+
updateTerms(args: UpdateTermsCommandInput, cb: (err: any, data?: UpdateTermsCommandOutput) => void): void;
2385+
updateTerms(
2386+
args: UpdateTermsCommandInput,
2387+
options: __HttpHandlerOptions,
2388+
cb: (err: any, data?: UpdateTermsCommandOutput) => void
2389+
): void;
2390+
23222391
/**
23232392
* @see {@link UpdateUserAttributesCommand}
23242393
*/

clients/client-cognito-identity-provider/src/CognitoIdentityProviderClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ import {
159159
CreateResourceServerCommandInput,
160160
CreateResourceServerCommandOutput,
161161
} from "./commands/CreateResourceServerCommand";
162+
import { CreateTermsCommandInput, CreateTermsCommandOutput } from "./commands/CreateTermsCommand";
162163
import {
163164
CreateUserImportJobCommandInput,
164165
CreateUserImportJobCommandOutput,
@@ -185,6 +186,7 @@ import {
185186
DeleteResourceServerCommandInput,
186187
DeleteResourceServerCommandOutput,
187188
} from "./commands/DeleteResourceServerCommand";
189+
import { DeleteTermsCommandInput, DeleteTermsCommandOutput } from "./commands/DeleteTermsCommand";
188190
import {
189191
DeleteUserAttributesCommandInput,
190192
DeleteUserAttributesCommandOutput,
@@ -223,6 +225,7 @@ import {
223225
DescribeRiskConfigurationCommandInput,
224226
DescribeRiskConfigurationCommandOutput,
225227
} from "./commands/DescribeRiskConfigurationCommand";
228+
import { DescribeTermsCommandInput, DescribeTermsCommandOutput } from "./commands/DescribeTermsCommand";
226229
import {
227230
DescribeUserImportJobCommandInput,
228231
DescribeUserImportJobCommandOutput,
@@ -284,6 +287,7 @@ import {
284287
ListTagsForResourceCommandInput,
285288
ListTagsForResourceCommandOutput,
286289
} from "./commands/ListTagsForResourceCommand";
290+
import { ListTermsCommandInput, ListTermsCommandOutput } from "./commands/ListTermsCommand";
287291
import { ListUserImportJobsCommandInput, ListUserImportJobsCommandOutput } from "./commands/ListUserImportJobsCommand";
288292
import {
289293
ListUserPoolClientsCommandInput,
@@ -350,6 +354,7 @@ import {
350354
UpdateResourceServerCommandInput,
351355
UpdateResourceServerCommandOutput,
352356
} from "./commands/UpdateResourceServerCommand";
357+
import { UpdateTermsCommandInput, UpdateTermsCommandOutput } from "./commands/UpdateTermsCommand";
353358
import {
354359
UpdateUserAttributesCommandInput,
355360
UpdateUserAttributesCommandOutput,
@@ -423,6 +428,7 @@ export type ServiceInputTypes =
423428
| CreateIdentityProviderCommandInput
424429
| CreateManagedLoginBrandingCommandInput
425430
| CreateResourceServerCommandInput
431+
| CreateTermsCommandInput
426432
| CreateUserImportJobCommandInput
427433
| CreateUserPoolClientCommandInput
428434
| CreateUserPoolCommandInput
@@ -431,6 +437,7 @@ export type ServiceInputTypes =
431437
| DeleteIdentityProviderCommandInput
432438
| DeleteManagedLoginBrandingCommandInput
433439
| DeleteResourceServerCommandInput
440+
| DeleteTermsCommandInput
434441
| DeleteUserAttributesCommandInput
435442
| DeleteUserCommandInput
436443
| DeleteUserPoolClientCommandInput
@@ -442,6 +449,7 @@ export type ServiceInputTypes =
442449
| DescribeManagedLoginBrandingCommandInput
443450
| DescribeResourceServerCommandInput
444451
| DescribeRiskConfigurationCommandInput
452+
| DescribeTermsCommandInput
445453
| DescribeUserImportJobCommandInput
446454
| DescribeUserPoolClientCommandInput
447455
| DescribeUserPoolCommandInput
@@ -467,6 +475,7 @@ export type ServiceInputTypes =
467475
| ListIdentityProvidersCommandInput
468476
| ListResourceServersCommandInput
469477
| ListTagsForResourceCommandInput
478+
| ListTermsCommandInput
470479
| ListUserImportJobsCommandInput
471480
| ListUserPoolClientsCommandInput
472481
| ListUserPoolsCommandInput
@@ -494,6 +503,7 @@ export type ServiceInputTypes =
494503
| UpdateIdentityProviderCommandInput
495504
| UpdateManagedLoginBrandingCommandInput
496505
| UpdateResourceServerCommandInput
506+
| UpdateTermsCommandInput
497507
| UpdateUserAttributesCommandInput
498508
| UpdateUserPoolClientCommandInput
499509
| UpdateUserPoolCommandInput
@@ -542,6 +552,7 @@ export type ServiceOutputTypes =
542552
| CreateIdentityProviderCommandOutput
543553
| CreateManagedLoginBrandingCommandOutput
544554
| CreateResourceServerCommandOutput
555+
| CreateTermsCommandOutput
545556
| CreateUserImportJobCommandOutput
546557
| CreateUserPoolClientCommandOutput
547558
| CreateUserPoolCommandOutput
@@ -550,6 +561,7 @@ export type ServiceOutputTypes =
550561
| DeleteIdentityProviderCommandOutput
551562
| DeleteManagedLoginBrandingCommandOutput
552563
| DeleteResourceServerCommandOutput
564+
| DeleteTermsCommandOutput
553565
| DeleteUserAttributesCommandOutput
554566
| DeleteUserCommandOutput
555567
| DeleteUserPoolClientCommandOutput
@@ -561,6 +573,7 @@ export type ServiceOutputTypes =
561573
| DescribeManagedLoginBrandingCommandOutput
562574
| DescribeResourceServerCommandOutput
563575
| DescribeRiskConfigurationCommandOutput
576+
| DescribeTermsCommandOutput
564577
| DescribeUserImportJobCommandOutput
565578
| DescribeUserPoolClientCommandOutput
566579
| DescribeUserPoolCommandOutput
@@ -586,6 +599,7 @@ export type ServiceOutputTypes =
586599
| ListIdentityProvidersCommandOutput
587600
| ListResourceServersCommandOutput
588601
| ListTagsForResourceCommandOutput
602+
| ListTermsCommandOutput
589603
| ListUserImportJobsCommandOutput
590604
| ListUserPoolClientsCommandOutput
591605
| ListUserPoolsCommandOutput
@@ -613,6 +627,7 @@ export type ServiceOutputTypes =
613627
| UpdateIdentityProviderCommandOutput
614628
| UpdateManagedLoginBrandingCommandOutput
615629
| UpdateResourceServerCommandOutput
630+
| UpdateTermsCommandOutput
616631
| UpdateUserAttributesCommandOutput
617632
| UpdateUserPoolClientCommandOutput
618633
| UpdateUserPoolCommandOutput

clients/client-cognito-identity-provider/src/commands/AdminResetUserPasswordCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ export interface AdminResetUserPasswordCommandInput extends AdminResetUserPasswo
3636
export interface AdminResetUserPasswordCommandOutput extends AdminResetUserPasswordResponse, __MetadataBearer {}
3737

3838
/**
39-
* <p>Resets the specified user's password in a user pool. This operation doesn't
40-
* change the user's password, but sends a password-reset code.</p>
39+
* <p>Begins the password reset process. Sets the requested user’s account into a
40+
* <code>RESET_REQUIRED</code> status, and sends them a password-reset code. Your user
41+
* pool also sends the user a notification with a reset code and the information that their
42+
* password has been reset. At sign-in, your application or the managed login session
43+
* receives a challenge to complete the reset by confirming the code and setting a new
44+
* password.</p>
4145
* <p>To use this API operation, your user pool must have self-service account recovery
4246
* configured.</p>
4347
* <note>

clients/client-cognito-identity-provider/src/commands/CreateManagedLoginBrandingCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export interface CreateManagedLoginBrandingCommandOutput extends CreateManagedLo
3838
/**
3939
* <p>Creates a new set of branding settings for a user pool style and associates it with an
4040
* app client. This operation is the programmatic option for the creation of a new style in
41-
* the branding designer.</p>
41+
* the branding editor.</p>
4242
* <p>Provides values for UI customization in a <code>Settings</code> JSON object and image
4343
* files in an <code>Assets</code> array. To send the JSON object <code>Document</code>
4444
* type parameter in <code>Settings</code>, you might need to update to the most recent

0 commit comments

Comments
 (0)