From 775a51a8550acfe2190b1ff9b1a8ead59c51c948 Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 13 Jun 2023 18:16:01 +0000 Subject: [PATCH] feat(client-wellarchitected): AWS Well-Architected now supports Profiles that help customers prioritize which questions to focus on first by providing a list of prioritized questions that are better aligned with their business goals and outcomes. --- clients/client-wellarchitected/README.md | 104 + .../src/WellArchitected.ts | 265 +++ .../src/WellArchitectedClient.ts | 52 +- .../src/commands/AssociateProfilesCommand.ts | 161 ++ .../src/commands/CreateProfileCommand.ts | 172 ++ .../src/commands/CreateProfileShareCommand.ts | 166 ++ .../src/commands/CreateWorkloadCommand.ts | 3 + .../src/commands/DeleteProfileCommand.ts | 168 ++ .../src/commands/DeleteProfileShareCommand.ts | 160 ++ .../commands/DisassociateProfilesCommand.ts | 161 ++ .../src/commands/GetLensReviewCommand.ts | 12 + .../src/commands/GetMilestoneCommand.ts | 9 + .../src/commands/GetProfileCommand.ts | 187 ++ .../src/commands/GetProfileTemplateCommand.ts | 175 ++ .../src/commands/GetWorkloadCommand.ts | 9 + .../src/commands/ListAnswersCommand.ts | 2 + .../ListLensReviewImprovementsCommand.ts | 1 + .../src/commands/ListLensReviewsCommand.ts | 9 + .../src/commands/ListMilestonesCommand.ts | 9 + .../ListProfileNotificationsCommand.ts | 167 ++ .../src/commands/ListProfileSharesCommand.ts | 169 ++ .../src/commands/ListProfilesCommand.ts | 166 ++ .../commands/ListShareInvitationsCommand.ts | 7 +- .../commands/ListTagsForResourceCommand.ts | 2 +- .../src/commands/ListWorkloadsCommand.ts | 9 + .../src/commands/TagResourceCommand.ts | 2 +- .../src/commands/UntagResourceCommand.ts | 2 +- .../src/commands/UpdateLensReviewCommand.ts | 12 + .../src/commands/UpdateProfileCommand.ts | 198 ++ .../commands/UpdateShareInvitationCommand.ts | 3 +- .../src/commands/UpdateWorkloadCommand.ts | 9 + .../commands/UpgradeProfileVersionCommand.ts | 161 ++ .../src/commands/index.ts | 13 + .../src/models/models_0.ts | 1001 ++++++++- .../ListProfileNotificationsPaginator.ts | 50 + .../pagination/ListProfileSharesPaginator.ts | 50 + .../src/pagination/ListProfilesPaginator.ts | 50 + .../src/pagination/index.ts | 3 + .../src/protocols/Aws_restJson1.ts | 1847 ++++++++++++++--- 39 files changed, 5408 insertions(+), 338 deletions(-) create mode 100644 clients/client-wellarchitected/src/commands/AssociateProfilesCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/CreateProfileCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/CreateProfileShareCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/DeleteProfileCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/DeleteProfileShareCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/DisassociateProfilesCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/GetProfileCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/GetProfileTemplateCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/ListProfileNotificationsCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/ListProfileSharesCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/ListProfilesCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/UpdateProfileCommand.ts create mode 100644 clients/client-wellarchitected/src/commands/UpgradeProfileVersionCommand.ts create mode 100644 clients/client-wellarchitected/src/pagination/ListProfileNotificationsPaginator.ts create mode 100644 clients/client-wellarchitected/src/pagination/ListProfileSharesPaginator.ts create mode 100644 clients/client-wellarchitected/src/pagination/ListProfilesPaginator.ts diff --git a/clients/client-wellarchitected/README.md b/clients/client-wellarchitected/README.md index b901302c160e1..d5db20c20742e 100644 --- a/clients/client-wellarchitected/README.md +++ b/clients/client-wellarchitected/README.md @@ -216,6 +216,14 @@ AssociateLenses [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/associatelensescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/associatelensescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/associatelensescommandoutput.html) + +
+ +AssociateProfiles + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/associateprofilescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/associateprofilescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/associateprofilescommandoutput.html) +
@@ -240,6 +248,22 @@ CreateMilestone [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/createmilestonecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/createmilestonecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/createmilestonecommandoutput.html) +
+
+ +CreateProfile + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/createprofilecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/createprofilecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/createprofilecommandoutput.html) + +
+
+ +CreateProfileShare + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/createprofilesharecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/createprofilesharecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/createprofilesharecommandoutput.html) +
@@ -272,6 +296,22 @@ DeleteLensShare [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/deletelenssharecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/deletelenssharecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/deletelenssharecommandoutput.html) +
+
+ +DeleteProfile + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/deleteprofilecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/deleteprofilecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/deleteprofilecommandoutput.html) + +
+
+ +DeleteProfileShare + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/deleteprofilesharecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/deleteprofilesharecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/deleteprofilesharecommandoutput.html) +
@@ -296,6 +336,14 @@ DisassociateLenses [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/disassociatelensescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/disassociatelensescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/disassociatelensescommandoutput.html) +
+
+ +DisassociateProfiles + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/disassociateprofilescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/disassociateprofilescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/disassociateprofilescommandoutput.html) +
@@ -360,6 +408,22 @@ GetMilestone [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/getmilestonecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/getmilestonecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/getmilestonecommandoutput.html) +
+
+ +GetProfile + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/getprofilecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/getprofilecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/getprofilecommandoutput.html) + +
+
+ +GetProfileTemplate + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/getprofiletemplatecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/getprofiletemplatecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/getprofiletemplatecommandoutput.html) +
@@ -448,6 +512,30 @@ ListNotifications [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/listnotificationscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/listnotificationscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/listnotificationscommandoutput.html) +
+
+ +ListProfileNotifications + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/listprofilenotificationscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/listprofilenotificationscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/listprofilenotificationscommandoutput.html) + +
+
+ +ListProfiles + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/listprofilescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/listprofilescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/listprofilescommandoutput.html) + +
+
+ +ListProfileShares + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/listprofilesharescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/listprofilesharescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/listprofilesharescommandoutput.html) +
@@ -520,6 +608,14 @@ UpdateLensReview [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/updatelensreviewcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/updatelensreviewcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/updatelensreviewcommandoutput.html) +
+
+ +UpdateProfile + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/updateprofilecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/updateprofilecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/updateprofilecommandoutput.html) +
@@ -553,3 +649,11 @@ UpgradeLensReview [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/upgradelensreviewcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/upgradelensreviewcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/upgradelensreviewcommandoutput.html)
+
+ +UpgradeProfileVersion + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/classes/upgradeprofileversioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/upgradeprofileversioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-wellarchitected/interfaces/upgradeprofileversioncommandoutput.html) + +
diff --git a/clients/client-wellarchitected/src/WellArchitected.ts b/clients/client-wellarchitected/src/WellArchitected.ts index cfde59c38b002..82b388af9ddd3 100644 --- a/clients/client-wellarchitected/src/WellArchitected.ts +++ b/clients/client-wellarchitected/src/WellArchitected.ts @@ -7,6 +7,11 @@ import { AssociateLensesCommandInput, AssociateLensesCommandOutput, } from "./commands/AssociateLensesCommand"; +import { + AssociateProfilesCommand, + AssociateProfilesCommandInput, + AssociateProfilesCommandOutput, +} from "./commands/AssociateProfilesCommand"; import { CreateLensShareCommand, CreateLensShareCommandInput, @@ -22,6 +27,16 @@ import { CreateMilestoneCommandInput, CreateMilestoneCommandOutput, } from "./commands/CreateMilestoneCommand"; +import { + CreateProfileCommand, + CreateProfileCommandInput, + CreateProfileCommandOutput, +} from "./commands/CreateProfileCommand"; +import { + CreateProfileShareCommand, + CreateProfileShareCommandInput, + CreateProfileShareCommandOutput, +} from "./commands/CreateProfileShareCommand"; import { CreateWorkloadCommand, CreateWorkloadCommandInput, @@ -38,6 +53,16 @@ import { DeleteLensShareCommandInput, DeleteLensShareCommandOutput, } from "./commands/DeleteLensShareCommand"; +import { + DeleteProfileCommand, + DeleteProfileCommandInput, + DeleteProfileCommandOutput, +} from "./commands/DeleteProfileCommand"; +import { + DeleteProfileShareCommand, + DeleteProfileShareCommandInput, + DeleteProfileShareCommandOutput, +} from "./commands/DeleteProfileShareCommand"; import { DeleteWorkloadCommand, DeleteWorkloadCommandInput, @@ -53,6 +78,11 @@ import { DisassociateLensesCommandInput, DisassociateLensesCommandOutput, } from "./commands/DisassociateLensesCommand"; +import { + DisassociateProfilesCommand, + DisassociateProfilesCommandInput, + DisassociateProfilesCommandOutput, +} from "./commands/DisassociateProfilesCommand"; import { ExportLensCommand, ExportLensCommandInput, ExportLensCommandOutput } from "./commands/ExportLensCommand"; import { GetAnswerCommand, GetAnswerCommandInput, GetAnswerCommandOutput } from "./commands/GetAnswerCommand"; import { @@ -81,6 +111,12 @@ import { GetMilestoneCommandInput, GetMilestoneCommandOutput, } from "./commands/GetMilestoneCommand"; +import { GetProfileCommand, GetProfileCommandInput, GetProfileCommandOutput } from "./commands/GetProfileCommand"; +import { + GetProfileTemplateCommand, + GetProfileTemplateCommandInput, + GetProfileTemplateCommandOutput, +} from "./commands/GetProfileTemplateCommand"; import { GetWorkloadCommand, GetWorkloadCommandInput, GetWorkloadCommandOutput } from "./commands/GetWorkloadCommand"; import { ImportLensCommand, ImportLensCommandInput, ImportLensCommandOutput } from "./commands/ImportLensCommand"; import { ListAnswersCommand, ListAnswersCommandInput, ListAnswersCommandOutput } from "./commands/ListAnswersCommand"; @@ -120,6 +156,21 @@ import { ListNotificationsCommandInput, ListNotificationsCommandOutput, } from "./commands/ListNotificationsCommand"; +import { + ListProfileNotificationsCommand, + ListProfileNotificationsCommandInput, + ListProfileNotificationsCommandOutput, +} from "./commands/ListProfileNotificationsCommand"; +import { + ListProfilesCommand, + ListProfilesCommandInput, + ListProfilesCommandOutput, +} from "./commands/ListProfilesCommand"; +import { + ListProfileSharesCommand, + ListProfileSharesCommandInput, + ListProfileSharesCommandOutput, +} from "./commands/ListProfileSharesCommand"; import { ListShareInvitationsCommand, ListShareInvitationsCommandInput, @@ -161,6 +212,11 @@ import { UpdateLensReviewCommandInput, UpdateLensReviewCommandOutput, } from "./commands/UpdateLensReviewCommand"; +import { + UpdateProfileCommand, + UpdateProfileCommandInput, + UpdateProfileCommandOutput, +} from "./commands/UpdateProfileCommand"; import { UpdateShareInvitationCommand, UpdateShareInvitationCommandInput, @@ -181,20 +237,31 @@ import { UpgradeLensReviewCommandInput, UpgradeLensReviewCommandOutput, } from "./commands/UpgradeLensReviewCommand"; +import { + UpgradeProfileVersionCommand, + UpgradeProfileVersionCommandInput, + UpgradeProfileVersionCommandOutput, +} from "./commands/UpgradeProfileVersionCommand"; import { WellArchitectedClient, WellArchitectedClientConfig } from "./WellArchitectedClient"; const commands = { AssociateLensesCommand, + AssociateProfilesCommand, CreateLensShareCommand, CreateLensVersionCommand, CreateMilestoneCommand, + CreateProfileCommand, + CreateProfileShareCommand, CreateWorkloadCommand, CreateWorkloadShareCommand, DeleteLensCommand, DeleteLensShareCommand, + DeleteProfileCommand, + DeleteProfileShareCommand, DeleteWorkloadCommand, DeleteWorkloadShareCommand, DisassociateLensesCommand, + DisassociateProfilesCommand, ExportLensCommand, GetAnswerCommand, GetConsolidatedReportCommand, @@ -203,6 +270,8 @@ const commands = { GetLensReviewReportCommand, GetLensVersionDifferenceCommand, GetMilestoneCommand, + GetProfileCommand, + GetProfileTemplateCommand, GetWorkloadCommand, ImportLensCommand, ListAnswersCommand, @@ -214,6 +283,9 @@ const commands = { ListLensSharesCommand, ListMilestonesCommand, ListNotificationsCommand, + ListProfileNotificationsCommand, + ListProfilesCommand, + ListProfileSharesCommand, ListShareInvitationsCommand, ListTagsForResourceCommand, ListWorkloadsCommand, @@ -223,10 +295,12 @@ const commands = { UpdateAnswerCommand, UpdateGlobalSettingsCommand, UpdateLensReviewCommand, + UpdateProfileCommand, UpdateShareInvitationCommand, UpdateWorkloadCommand, UpdateWorkloadShareCommand, UpgradeLensReviewCommand, + UpgradeProfileVersionCommand, }; export interface WellArchitected { @@ -244,6 +318,23 @@ export interface WellArchitected { cb: (err: any, data?: AssociateLensesCommandOutput) => void ): void; + /** + * @see {@link AssociateProfilesCommand} + */ + associateProfiles( + args: AssociateProfilesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + associateProfiles( + args: AssociateProfilesCommandInput, + cb: (err: any, data?: AssociateProfilesCommandOutput) => void + ): void; + associateProfiles( + args: AssociateProfilesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssociateProfilesCommandOutput) => void + ): void; + /** * @see {@link CreateLensShareCommand} */ @@ -289,6 +380,34 @@ export interface WellArchitected { cb: (err: any, data?: CreateMilestoneCommandOutput) => void ): void; + /** + * @see {@link CreateProfileCommand} + */ + createProfile(args: CreateProfileCommandInput, options?: __HttpHandlerOptions): Promise; + createProfile(args: CreateProfileCommandInput, cb: (err: any, data?: CreateProfileCommandOutput) => void): void; + createProfile( + args: CreateProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateProfileCommandOutput) => void + ): void; + + /** + * @see {@link CreateProfileShareCommand} + */ + createProfileShare( + args: CreateProfileShareCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createProfileShare( + args: CreateProfileShareCommandInput, + cb: (err: any, data?: CreateProfileShareCommandOutput) => void + ): void; + createProfileShare( + args: CreateProfileShareCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateProfileShareCommandOutput) => void + ): void; + /** * @see {@link CreateWorkloadCommand} */ @@ -345,6 +464,34 @@ export interface WellArchitected { cb: (err: any, data?: DeleteLensShareCommandOutput) => void ): void; + /** + * @see {@link DeleteProfileCommand} + */ + deleteProfile(args: DeleteProfileCommandInput, options?: __HttpHandlerOptions): Promise; + deleteProfile(args: DeleteProfileCommandInput, cb: (err: any, data?: DeleteProfileCommandOutput) => void): void; + deleteProfile( + args: DeleteProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteProfileCommandOutput) => void + ): void; + + /** + * @see {@link DeleteProfileShareCommand} + */ + deleteProfileShare( + args: DeleteProfileShareCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteProfileShare( + args: DeleteProfileShareCommandInput, + cb: (err: any, data?: DeleteProfileShareCommandOutput) => void + ): void; + deleteProfileShare( + args: DeleteProfileShareCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteProfileShareCommandOutput) => void + ): void; + /** * @see {@link DeleteWorkloadCommand} */ @@ -393,6 +540,23 @@ export interface WellArchitected { cb: (err: any, data?: DisassociateLensesCommandOutput) => void ): void; + /** + * @see {@link DisassociateProfilesCommand} + */ + disassociateProfiles( + args: DisassociateProfilesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + disassociateProfiles( + args: DisassociateProfilesCommandInput, + cb: (err: any, data?: DisassociateProfilesCommandOutput) => void + ): void; + disassociateProfiles( + args: DisassociateProfilesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisassociateProfilesCommandOutput) => void + ): void; + /** * @see {@link ExportLensCommand} */ @@ -499,6 +663,34 @@ export interface WellArchitected { cb: (err: any, data?: GetMilestoneCommandOutput) => void ): void; + /** + * @see {@link GetProfileCommand} + */ + getProfile(args: GetProfileCommandInput, options?: __HttpHandlerOptions): Promise; + getProfile(args: GetProfileCommandInput, cb: (err: any, data?: GetProfileCommandOutput) => void): void; + getProfile( + args: GetProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetProfileCommandOutput) => void + ): void; + + /** + * @see {@link GetProfileTemplateCommand} + */ + getProfileTemplate( + args: GetProfileTemplateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getProfileTemplate( + args: GetProfileTemplateCommandInput, + cb: (err: any, data?: GetProfileTemplateCommandOutput) => void + ): void; + getProfileTemplate( + args: GetProfileTemplateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetProfileTemplateCommandOutput) => void + ): void; + /** * @see {@link GetWorkloadCommand} */ @@ -653,6 +845,51 @@ export interface WellArchitected { cb: (err: any, data?: ListNotificationsCommandOutput) => void ): void; + /** + * @see {@link ListProfileNotificationsCommand} + */ + listProfileNotifications( + args: ListProfileNotificationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listProfileNotifications( + args: ListProfileNotificationsCommandInput, + cb: (err: any, data?: ListProfileNotificationsCommandOutput) => void + ): void; + listProfileNotifications( + args: ListProfileNotificationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListProfileNotificationsCommandOutput) => void + ): void; + + /** + * @see {@link ListProfilesCommand} + */ + listProfiles(args: ListProfilesCommandInput, options?: __HttpHandlerOptions): Promise; + listProfiles(args: ListProfilesCommandInput, cb: (err: any, data?: ListProfilesCommandOutput) => void): void; + listProfiles( + args: ListProfilesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListProfilesCommandOutput) => void + ): void; + + /** + * @see {@link ListProfileSharesCommand} + */ + listProfileShares( + args: ListProfileSharesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listProfileShares( + args: ListProfileSharesCommandInput, + cb: (err: any, data?: ListProfileSharesCommandOutput) => void + ): void; + listProfileShares( + args: ListProfileSharesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListProfileSharesCommandOutput) => void + ): void; + /** * @see {@link ListShareInvitationsCommand} */ @@ -782,6 +1019,17 @@ export interface WellArchitected { cb: (err: any, data?: UpdateLensReviewCommandOutput) => void ): void; + /** + * @see {@link UpdateProfileCommand} + */ + updateProfile(args: UpdateProfileCommandInput, options?: __HttpHandlerOptions): Promise; + updateProfile(args: UpdateProfileCommandInput, cb: (err: any, data?: UpdateProfileCommandOutput) => void): void; + updateProfile( + args: UpdateProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateProfileCommandOutput) => void + ): void; + /** * @see {@link UpdateShareInvitationCommand} */ @@ -846,6 +1094,23 @@ export interface WellArchitected { options: __HttpHandlerOptions, cb: (err: any, data?: UpgradeLensReviewCommandOutput) => void ): void; + + /** + * @see {@link UpgradeProfileVersionCommand} + */ + upgradeProfileVersion( + args: UpgradeProfileVersionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + upgradeProfileVersion( + args: UpgradeProfileVersionCommandInput, + cb: (err: any, data?: UpgradeProfileVersionCommandOutput) => void + ): void; + upgradeProfileVersion( + args: UpgradeProfileVersionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpgradeProfileVersionCommandOutput) => void + ): void; } /** diff --git a/clients/client-wellarchitected/src/WellArchitectedClient.ts b/clients/client-wellarchitected/src/WellArchitectedClient.ts index 46da4ffe01ee6..66b264ce1ad0e 100644 --- a/clients/client-wellarchitected/src/WellArchitectedClient.ts +++ b/clients/client-wellarchitected/src/WellArchitectedClient.ts @@ -52,9 +52,12 @@ import { } from "@smithy/types"; import { AssociateLensesCommandInput, AssociateLensesCommandOutput } from "./commands/AssociateLensesCommand"; +import { AssociateProfilesCommandInput, AssociateProfilesCommandOutput } from "./commands/AssociateProfilesCommand"; import { CreateLensShareCommandInput, CreateLensShareCommandOutput } from "./commands/CreateLensShareCommand"; import { CreateLensVersionCommandInput, CreateLensVersionCommandOutput } from "./commands/CreateLensVersionCommand"; import { CreateMilestoneCommandInput, CreateMilestoneCommandOutput } from "./commands/CreateMilestoneCommand"; +import { CreateProfileCommandInput, CreateProfileCommandOutput } from "./commands/CreateProfileCommand"; +import { CreateProfileShareCommandInput, CreateProfileShareCommandOutput } from "./commands/CreateProfileShareCommand"; import { CreateWorkloadCommandInput, CreateWorkloadCommandOutput } from "./commands/CreateWorkloadCommand"; import { CreateWorkloadShareCommandInput, @@ -62,12 +65,18 @@ import { } from "./commands/CreateWorkloadShareCommand"; import { DeleteLensCommandInput, DeleteLensCommandOutput } from "./commands/DeleteLensCommand"; import { DeleteLensShareCommandInput, DeleteLensShareCommandOutput } from "./commands/DeleteLensShareCommand"; +import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "./commands/DeleteProfileCommand"; +import { DeleteProfileShareCommandInput, DeleteProfileShareCommandOutput } from "./commands/DeleteProfileShareCommand"; import { DeleteWorkloadCommandInput, DeleteWorkloadCommandOutput } from "./commands/DeleteWorkloadCommand"; import { DeleteWorkloadShareCommandInput, DeleteWorkloadShareCommandOutput, } from "./commands/DeleteWorkloadShareCommand"; import { DisassociateLensesCommandInput, DisassociateLensesCommandOutput } from "./commands/DisassociateLensesCommand"; +import { + DisassociateProfilesCommandInput, + DisassociateProfilesCommandOutput, +} from "./commands/DisassociateProfilesCommand"; import { ExportLensCommandInput, ExportLensCommandOutput } from "./commands/ExportLensCommand"; import { GetAnswerCommandInput, GetAnswerCommandOutput } from "./commands/GetAnswerCommand"; import { @@ -85,6 +94,8 @@ import { GetLensVersionDifferenceCommandOutput, } from "./commands/GetLensVersionDifferenceCommand"; import { GetMilestoneCommandInput, GetMilestoneCommandOutput } from "./commands/GetMilestoneCommand"; +import { GetProfileCommandInput, GetProfileCommandOutput } from "./commands/GetProfileCommand"; +import { GetProfileTemplateCommandInput, GetProfileTemplateCommandOutput } from "./commands/GetProfileTemplateCommand"; import { GetWorkloadCommandInput, GetWorkloadCommandOutput } from "./commands/GetWorkloadCommand"; import { ImportLensCommandInput, ImportLensCommandOutput } from "./commands/ImportLensCommand"; import { ListAnswersCommandInput, ListAnswersCommandOutput } from "./commands/ListAnswersCommand"; @@ -99,6 +110,12 @@ import { ListLensReviewsCommandInput, ListLensReviewsCommandOutput } from "./com import { ListLensSharesCommandInput, ListLensSharesCommandOutput } from "./commands/ListLensSharesCommand"; import { ListMilestonesCommandInput, ListMilestonesCommandOutput } from "./commands/ListMilestonesCommand"; import { ListNotificationsCommandInput, ListNotificationsCommandOutput } from "./commands/ListNotificationsCommand"; +import { + ListProfileNotificationsCommandInput, + ListProfileNotificationsCommandOutput, +} from "./commands/ListProfileNotificationsCommand"; +import { ListProfilesCommandInput, ListProfilesCommandOutput } from "./commands/ListProfilesCommand"; +import { ListProfileSharesCommandInput, ListProfileSharesCommandOutput } from "./commands/ListProfileSharesCommand"; import { ListShareInvitationsCommandInput, ListShareInvitationsCommandOutput, @@ -117,6 +134,7 @@ import { UpdateGlobalSettingsCommandOutput, } from "./commands/UpdateGlobalSettingsCommand"; import { UpdateLensReviewCommandInput, UpdateLensReviewCommandOutput } from "./commands/UpdateLensReviewCommand"; +import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "./commands/UpdateProfileCommand"; import { UpdateShareInvitationCommandInput, UpdateShareInvitationCommandOutput, @@ -127,6 +145,10 @@ import { UpdateWorkloadShareCommandOutput, } from "./commands/UpdateWorkloadShareCommand"; import { UpgradeLensReviewCommandInput, UpgradeLensReviewCommandOutput } from "./commands/UpgradeLensReviewCommand"; +import { + UpgradeProfileVersionCommandInput, + UpgradeProfileVersionCommandOutput, +} from "./commands/UpgradeProfileVersionCommand"; import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, @@ -142,16 +164,22 @@ export { __Client }; */ export type ServiceInputTypes = | AssociateLensesCommandInput + | AssociateProfilesCommandInput | CreateLensShareCommandInput | CreateLensVersionCommandInput | CreateMilestoneCommandInput + | CreateProfileCommandInput + | CreateProfileShareCommandInput | CreateWorkloadCommandInput | CreateWorkloadShareCommandInput | DeleteLensCommandInput | DeleteLensShareCommandInput + | DeleteProfileCommandInput + | DeleteProfileShareCommandInput | DeleteWorkloadCommandInput | DeleteWorkloadShareCommandInput | DisassociateLensesCommandInput + | DisassociateProfilesCommandInput | ExportLensCommandInput | GetAnswerCommandInput | GetConsolidatedReportCommandInput @@ -160,6 +188,8 @@ export type ServiceInputTypes = | GetLensReviewReportCommandInput | GetLensVersionDifferenceCommandInput | GetMilestoneCommandInput + | GetProfileCommandInput + | GetProfileTemplateCommandInput | GetWorkloadCommandInput | ImportLensCommandInput | ListAnswersCommandInput @@ -171,6 +201,9 @@ export type ServiceInputTypes = | ListLensesCommandInput | ListMilestonesCommandInput | ListNotificationsCommandInput + | ListProfileNotificationsCommandInput + | ListProfileSharesCommandInput + | ListProfilesCommandInput | ListShareInvitationsCommandInput | ListTagsForResourceCommandInput | ListWorkloadSharesCommandInput @@ -180,26 +213,34 @@ export type ServiceInputTypes = | UpdateAnswerCommandInput | UpdateGlobalSettingsCommandInput | UpdateLensReviewCommandInput + | UpdateProfileCommandInput | UpdateShareInvitationCommandInput | UpdateWorkloadCommandInput | UpdateWorkloadShareCommandInput - | UpgradeLensReviewCommandInput; + | UpgradeLensReviewCommandInput + | UpgradeProfileVersionCommandInput; /** * @public */ export type ServiceOutputTypes = | AssociateLensesCommandOutput + | AssociateProfilesCommandOutput | CreateLensShareCommandOutput | CreateLensVersionCommandOutput | CreateMilestoneCommandOutput + | CreateProfileCommandOutput + | CreateProfileShareCommandOutput | CreateWorkloadCommandOutput | CreateWorkloadShareCommandOutput | DeleteLensCommandOutput | DeleteLensShareCommandOutput + | DeleteProfileCommandOutput + | DeleteProfileShareCommandOutput | DeleteWorkloadCommandOutput | DeleteWorkloadShareCommandOutput | DisassociateLensesCommandOutput + | DisassociateProfilesCommandOutput | ExportLensCommandOutput | GetAnswerCommandOutput | GetConsolidatedReportCommandOutput @@ -208,6 +249,8 @@ export type ServiceOutputTypes = | GetLensReviewReportCommandOutput | GetLensVersionDifferenceCommandOutput | GetMilestoneCommandOutput + | GetProfileCommandOutput + | GetProfileTemplateCommandOutput | GetWorkloadCommandOutput | ImportLensCommandOutput | ListAnswersCommandOutput @@ -219,6 +262,9 @@ export type ServiceOutputTypes = | ListLensesCommandOutput | ListMilestonesCommandOutput | ListNotificationsCommandOutput + | ListProfileNotificationsCommandOutput + | ListProfileSharesCommandOutput + | ListProfilesCommandOutput | ListShareInvitationsCommandOutput | ListTagsForResourceCommandOutput | ListWorkloadSharesCommandOutput @@ -228,10 +274,12 @@ export type ServiceOutputTypes = | UpdateAnswerCommandOutput | UpdateGlobalSettingsCommandOutput | UpdateLensReviewCommandOutput + | UpdateProfileCommandOutput | UpdateShareInvitationCommandOutput | UpdateWorkloadCommandOutput | UpdateWorkloadShareCommandOutput - | UpgradeLensReviewCommandOutput; + | UpgradeLensReviewCommandOutput + | UpgradeProfileVersionCommandOutput; /** * @public diff --git a/clients/client-wellarchitected/src/commands/AssociateProfilesCommand.ts b/clients/client-wellarchitected/src/commands/AssociateProfilesCommand.ts new file mode 100644 index 0000000000000..b6e124602e1f9 --- /dev/null +++ b/clients/client-wellarchitected/src/commands/AssociateProfilesCommand.ts @@ -0,0 +1,161 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AssociateProfilesInput } from "../models/models_0"; +import { de_AssociateProfilesCommand, se_AssociateProfilesCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link AssociateProfilesCommand}. + */ +export interface AssociateProfilesCommandInput extends AssociateProfilesInput {} +/** + * @public + * + * The output of {@link AssociateProfilesCommand}. + */ +export interface AssociateProfilesCommandOutput extends __MetadataBearer {} + +/** + * @public + *

Associate a profile with a workload.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, AssociateProfilesCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, AssociateProfilesCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // AssociateProfilesInput + * WorkloadId: "STRING_VALUE", // required + * ProfileArns: [ // ProfileArns // required + * "STRING_VALUE", + * ], + * }; + * const command = new AssociateProfilesCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param AssociateProfilesCommandInput - {@link AssociateProfilesCommandInput} + * @returns {@link AssociateProfilesCommandOutput} + * @see {@link AssociateProfilesCommandInput} for command's `input` shape. + * @see {@link AssociateProfilesCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The resource has already been processed, was deleted, or is too large.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class AssociateProfilesCommand extends $Command< + AssociateProfilesCommandInput, + AssociateProfilesCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: AssociateProfilesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, AssociateProfilesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "AssociateProfilesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: AssociateProfilesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_AssociateProfilesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_AssociateProfilesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/CreateProfileCommand.ts b/clients/client-wellarchitected/src/commands/CreateProfileCommand.ts new file mode 100644 index 0000000000000..d45fb0ff815c4 --- /dev/null +++ b/clients/client-wellarchitected/src/commands/CreateProfileCommand.ts @@ -0,0 +1,172 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { CreateProfileInput, CreateProfileOutput } from "../models/models_0"; +import { de_CreateProfileCommand, se_CreateProfileCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateProfileCommand}. + */ +export interface CreateProfileCommandInput extends CreateProfileInput {} +/** + * @public + * + * The output of {@link CreateProfileCommand}. + */ +export interface CreateProfileCommandOutput extends CreateProfileOutput, __MetadataBearer {} + +/** + * @public + *

Create a profile.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, CreateProfileCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, CreateProfileCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // CreateProfileInput + * ProfileName: "STRING_VALUE", // required + * ProfileDescription: "STRING_VALUE", // required + * ProfileQuestions: [ // ProfileQuestionUpdates // required + * { // ProfileQuestionUpdate + * QuestionId: "STRING_VALUE", + * SelectedChoiceIds: [ // SelectedProfileChoiceIds + * "STRING_VALUE", + * ], + * }, + * ], + * ClientRequestToken: "STRING_VALUE", // required + * Tags: { // TagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateProfileCommand(input); + * const response = await client.send(command); + * // { // CreateProfileOutput + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreateProfileCommandInput - {@link CreateProfileCommandInput} + * @returns {@link CreateProfileCommandOutput} + * @see {@link CreateProfileCommandInput} for command's `input` shape. + * @see {@link CreateProfileCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The resource has already been processed, was deleted, or is too large.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

The user has reached their resource quota.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class CreateProfileCommand extends $Command< + CreateProfileCommandInput, + CreateProfileCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateProfileCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, CreateProfileCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "CreateProfileCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateProfileCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateProfileCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateProfileCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/CreateProfileShareCommand.ts b/clients/client-wellarchitected/src/commands/CreateProfileShareCommand.ts new file mode 100644 index 0000000000000..c13f2f985328b --- /dev/null +++ b/clients/client-wellarchitected/src/commands/CreateProfileShareCommand.ts @@ -0,0 +1,166 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { CreateProfileShareInput, CreateProfileShareOutput } from "../models/models_0"; +import { de_CreateProfileShareCommand, se_CreateProfileShareCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateProfileShareCommand}. + */ +export interface CreateProfileShareCommandInput extends CreateProfileShareInput {} +/** + * @public + * + * The output of {@link CreateProfileShareCommand}. + */ +export interface CreateProfileShareCommandOutput extends CreateProfileShareOutput, __MetadataBearer {} + +/** + * @public + *

Create a profile share.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, CreateProfileShareCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, CreateProfileShareCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // CreateProfileShareInput + * ProfileArn: "STRING_VALUE", // required + * SharedWith: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", // required + * }; + * const command = new CreateProfileShareCommand(input); + * const response = await client.send(command); + * // { // CreateProfileShareOutput + * // ShareId: "STRING_VALUE", + * // ProfileArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreateProfileShareCommandInput - {@link CreateProfileShareCommandInput} + * @returns {@link CreateProfileShareCommandOutput} + * @see {@link CreateProfileShareCommandInput} for command's `input` shape. + * @see {@link CreateProfileShareCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The resource has already been processed, was deleted, or is too large.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

The user has reached their resource quota.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class CreateProfileShareCommand extends $Command< + CreateProfileShareCommandInput, + CreateProfileShareCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateProfileShareCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateProfileShareCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "CreateProfileShareCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateProfileShareCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateProfileShareCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateProfileShareCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/CreateWorkloadCommand.ts b/clients/client-wellarchitected/src/commands/CreateWorkloadCommand.ts index 77ce56e2985d6..4ef15b80a869b 100644 --- a/clients/client-wellarchitected/src/commands/CreateWorkloadCommand.ts +++ b/clients/client-wellarchitected/src/commands/CreateWorkloadCommand.ts @@ -92,6 +92,9 @@ export interface CreateWorkloadCommandOutput extends CreateWorkloadOutput, __Met * Applications: [ // WorkloadApplications * "STRING_VALUE", * ], + * ProfileArns: [ // WorkloadProfileArns + * "STRING_VALUE", + * ], * }; * const command = new CreateWorkloadCommand(input); * const response = await client.send(command); diff --git a/clients/client-wellarchitected/src/commands/DeleteProfileCommand.ts b/clients/client-wellarchitected/src/commands/DeleteProfileCommand.ts new file mode 100644 index 0000000000000..f7ef6c92ab79c --- /dev/null +++ b/clients/client-wellarchitected/src/commands/DeleteProfileCommand.ts @@ -0,0 +1,168 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { DeleteProfileInput } from "../models/models_0"; +import { de_DeleteProfileCommand, se_DeleteProfileCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteProfileCommand}. + */ +export interface DeleteProfileCommandInput extends DeleteProfileInput {} +/** + * @public + * + * The output of {@link DeleteProfileCommand}. + */ +export interface DeleteProfileCommandOutput extends __MetadataBearer {} + +/** + * @public + *

Delete a profile.

+ * + *

+ * Disclaimer + *

+ *

By sharing your profile with other Amazon Web Services accounts, + * you acknowledge that Amazon Web Services will make your profile available to those + * other accounts. Those other accounts may continue to access and use your + * shared profile even if you delete the profile + * from your own Amazon Web Services account or terminate + * your Amazon Web Services account.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, DeleteProfileCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, DeleteProfileCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // DeleteProfileInput + * ProfileArn: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", // required + * }; + * const command = new DeleteProfileCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteProfileCommandInput - {@link DeleteProfileCommandInput} + * @returns {@link DeleteProfileCommandOutput} + * @see {@link DeleteProfileCommandInput} for command's `input` shape. + * @see {@link DeleteProfileCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The resource has already been processed, was deleted, or is too large.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class DeleteProfileCommand extends $Command< + DeleteProfileCommandInput, + DeleteProfileCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteProfileCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, DeleteProfileCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "DeleteProfileCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteProfileCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteProfileCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteProfileCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/DeleteProfileShareCommand.ts b/clients/client-wellarchitected/src/commands/DeleteProfileShareCommand.ts new file mode 100644 index 0000000000000..5526e2730ae25 --- /dev/null +++ b/clients/client-wellarchitected/src/commands/DeleteProfileShareCommand.ts @@ -0,0 +1,160 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { DeleteProfileShareInput } from "../models/models_0"; +import { de_DeleteProfileShareCommand, se_DeleteProfileShareCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteProfileShareCommand}. + */ +export interface DeleteProfileShareCommandInput extends DeleteProfileShareInput {} +/** + * @public + * + * The output of {@link DeleteProfileShareCommand}. + */ +export interface DeleteProfileShareCommandOutput extends __MetadataBearer {} + +/** + * @public + *

Delete a profile share.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, DeleteProfileShareCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, DeleteProfileShareCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // DeleteProfileShareInput + * ShareId: "STRING_VALUE", // required + * ProfileArn: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", // required + * }; + * const command = new DeleteProfileShareCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteProfileShareCommandInput - {@link DeleteProfileShareCommandInput} + * @returns {@link DeleteProfileShareCommandOutput} + * @see {@link DeleteProfileShareCommandInput} for command's `input` shape. + * @see {@link DeleteProfileShareCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The resource has already been processed, was deleted, or is too large.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class DeleteProfileShareCommand extends $Command< + DeleteProfileShareCommandInput, + DeleteProfileShareCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteProfileShareCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteProfileShareCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "DeleteProfileShareCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteProfileShareCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteProfileShareCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteProfileShareCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/DisassociateProfilesCommand.ts b/clients/client-wellarchitected/src/commands/DisassociateProfilesCommand.ts new file mode 100644 index 0000000000000..5e22f75f9b959 --- /dev/null +++ b/clients/client-wellarchitected/src/commands/DisassociateProfilesCommand.ts @@ -0,0 +1,161 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { DisassociateProfilesInput } from "../models/models_0"; +import { de_DisassociateProfilesCommand, se_DisassociateProfilesCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DisassociateProfilesCommand}. + */ +export interface DisassociateProfilesCommandInput extends DisassociateProfilesInput {} +/** + * @public + * + * The output of {@link DisassociateProfilesCommand}. + */ +export interface DisassociateProfilesCommandOutput extends __MetadataBearer {} + +/** + * @public + *

Disassociate a profile from a workload.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, DisassociateProfilesCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, DisassociateProfilesCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // DisassociateProfilesInput + * WorkloadId: "STRING_VALUE", // required + * ProfileArns: [ // ProfileArns // required + * "STRING_VALUE", + * ], + * }; + * const command = new DisassociateProfilesCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DisassociateProfilesCommandInput - {@link DisassociateProfilesCommandInput} + * @returns {@link DisassociateProfilesCommandOutput} + * @see {@link DisassociateProfilesCommandInput} for command's `input` shape. + * @see {@link DisassociateProfilesCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The resource has already been processed, was deleted, or is too large.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class DisassociateProfilesCommand extends $Command< + DisassociateProfilesCommandInput, + DisassociateProfilesCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DisassociateProfilesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DisassociateProfilesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "DisassociateProfilesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DisassociateProfilesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DisassociateProfilesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DisassociateProfilesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/GetLensReviewCommand.ts b/clients/client-wellarchitected/src/commands/GetLensReviewCommand.ts index d8b05172928a2..076b12505f1d0 100644 --- a/clients/client-wellarchitected/src/commands/GetLensReviewCommand.ts +++ b/clients/client-wellarchitected/src/commands/GetLensReviewCommand.ts @@ -67,6 +67,9 @@ export interface GetLensReviewCommandOutput extends GetLensReviewOutput, __Metad * // RiskCounts: { // RiskCounts * // "": Number("int"), * // }, + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // ], * // UpdatedAt: new Date("TIMESTAMP"), @@ -75,6 +78,15 @@ export interface GetLensReviewCommandOutput extends GetLensReviewOutput, __Metad * // "": Number("int"), * // }, * // NextToken: "STRING_VALUE", + * // Profiles: [ // WorkloadProfiles + * // { // WorkloadProfile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // }, + * // ], + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // }; * diff --git a/clients/client-wellarchitected/src/commands/GetMilestoneCommand.ts b/clients/client-wellarchitected/src/commands/GetMilestoneCommand.ts index 10cf3a0e6228b..9604721f945fe 100644 --- a/clients/client-wellarchitected/src/commands/GetMilestoneCommand.ts +++ b/clients/client-wellarchitected/src/commands/GetMilestoneCommand.ts @@ -102,6 +102,15 @@ export interface GetMilestoneCommandOutput extends GetMilestoneOutput, __Metadat * // Applications: [ // WorkloadApplications * // "STRING_VALUE", * // ], + * // Profiles: [ // WorkloadProfiles + * // { // WorkloadProfile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // }, + * // ], + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // }, * // }; diff --git a/clients/client-wellarchitected/src/commands/GetProfileCommand.ts b/clients/client-wellarchitected/src/commands/GetProfileCommand.ts new file mode 100644 index 0000000000000..3cbbdc2b3789c --- /dev/null +++ b/clients/client-wellarchitected/src/commands/GetProfileCommand.ts @@ -0,0 +1,187 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { GetProfileInput, GetProfileOutput } from "../models/models_0"; +import { de_GetProfileCommand, se_GetProfileCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetProfileCommand}. + */ +export interface GetProfileCommandInput extends GetProfileInput {} +/** + * @public + * + * The output of {@link GetProfileCommand}. + */ +export interface GetProfileCommandOutput extends GetProfileOutput, __MetadataBearer {} + +/** + * @public + *

Get profile information.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, GetProfileCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, GetProfileCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // GetProfileInput + * ProfileArn: "STRING_VALUE", // required + * ProfileVersion: "STRING_VALUE", + * }; + * const command = new GetProfileCommand(input); + * const response = await client.send(command); + * // { // GetProfileOutput + * // Profile: { // Profile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // ProfileName: "STRING_VALUE", + * // ProfileDescription: "STRING_VALUE", + * // ProfileQuestions: [ // ProfileQuestions + * // { // ProfileQuestion + * // QuestionId: "STRING_VALUE", + * // QuestionTitle: "STRING_VALUE", + * // QuestionDescription: "STRING_VALUE", + * // QuestionChoices: [ // ProfileQuestionChoices + * // { // ProfileChoice + * // ChoiceId: "STRING_VALUE", + * // ChoiceTitle: "STRING_VALUE", + * // ChoiceDescription: "STRING_VALUE", + * // }, + * // ], + * // SelectedChoiceIds: [ // SelectedChoiceIds + * // "STRING_VALUE", + * // ], + * // MinSelectedChoices: Number("int"), + * // MaxSelectedChoices: Number("int"), + * // }, + * // ], + * // Owner: "STRING_VALUE", + * // CreatedAt: new Date("TIMESTAMP"), + * // UpdatedAt: new Date("TIMESTAMP"), + * // ShareInvitationId: "STRING_VALUE", + * // Tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetProfileCommandInput - {@link GetProfileCommandInput} + * @returns {@link GetProfileCommandOutput} + * @see {@link GetProfileCommandInput} for command's `input` shape. + * @see {@link GetProfileCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class GetProfileCommand extends $Command< + GetProfileCommandInput, + GetProfileCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetProfileCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetProfileCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "GetProfileCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetProfileCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetProfileCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetProfileCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/GetProfileTemplateCommand.ts b/clients/client-wellarchitected/src/commands/GetProfileTemplateCommand.ts new file mode 100644 index 0000000000000..ae6ff710591f2 --- /dev/null +++ b/clients/client-wellarchitected/src/commands/GetProfileTemplateCommand.ts @@ -0,0 +1,175 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { GetProfileTemplateInput, GetProfileTemplateOutput } from "../models/models_0"; +import { de_GetProfileTemplateCommand, se_GetProfileTemplateCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetProfileTemplateCommand}. + */ +export interface GetProfileTemplateCommandInput extends GetProfileTemplateInput {} +/** + * @public + * + * The output of {@link GetProfileTemplateCommand}. + */ +export interface GetProfileTemplateCommandOutput extends GetProfileTemplateOutput, __MetadataBearer {} + +/** + * @public + *

Get profile template.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, GetProfileTemplateCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, GetProfileTemplateCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = {}; + * const command = new GetProfileTemplateCommand(input); + * const response = await client.send(command); + * // { // GetProfileTemplateOutput + * // ProfileTemplate: { // ProfileTemplate + * // TemplateName: "STRING_VALUE", + * // TemplateQuestions: [ // TemplateQuestions + * // { // ProfileTemplateQuestion + * // QuestionId: "STRING_VALUE", + * // QuestionTitle: "STRING_VALUE", + * // QuestionDescription: "STRING_VALUE", + * // QuestionChoices: [ // ProfileTemplateQuestionChoices + * // { // ProfileTemplateChoice + * // ChoiceId: "STRING_VALUE", + * // ChoiceTitle: "STRING_VALUE", + * // ChoiceDescription: "STRING_VALUE", + * // }, + * // ], + * // MinSelectedChoices: Number("int"), + * // MaxSelectedChoices: Number("int"), + * // }, + * // ], + * // CreatedAt: new Date("TIMESTAMP"), + * // UpdatedAt: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param GetProfileTemplateCommandInput - {@link GetProfileTemplateCommandInput} + * @returns {@link GetProfileTemplateCommandOutput} + * @see {@link GetProfileTemplateCommandInput} for command's `input` shape. + * @see {@link GetProfileTemplateCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class GetProfileTemplateCommand extends $Command< + GetProfileTemplateCommandInput, + GetProfileTemplateCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetProfileTemplateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetProfileTemplateCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "GetProfileTemplateCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetProfileTemplateCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetProfileTemplateCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetProfileTemplateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/GetWorkloadCommand.ts b/clients/client-wellarchitected/src/commands/GetWorkloadCommand.ts index ebacb2c31b445..e84e3622304c0 100644 --- a/clients/client-wellarchitected/src/commands/GetWorkloadCommand.ts +++ b/clients/client-wellarchitected/src/commands/GetWorkloadCommand.ts @@ -96,6 +96,15 @@ export interface GetWorkloadCommandOutput extends GetWorkloadOutput, __MetadataB * // Applications: [ // WorkloadApplications * // "STRING_VALUE", * // ], + * // Profiles: [ // WorkloadProfiles + * // { // WorkloadProfile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // }, + * // ], + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // }; * diff --git a/clients/client-wellarchitected/src/commands/ListAnswersCommand.ts b/clients/client-wellarchitected/src/commands/ListAnswersCommand.ts index ed085ffb51e60..0a6ca1c0bb9cd 100644 --- a/clients/client-wellarchitected/src/commands/ListAnswersCommand.ts +++ b/clients/client-wellarchitected/src/commands/ListAnswersCommand.ts @@ -50,6 +50,7 @@ export interface ListAnswersCommandOutput extends ListAnswersOutput, __MetadataB * MilestoneNumber: Number("int"), * NextToken: "STRING_VALUE", * MaxResults: Number("int"), + * QuestionPriority: "PRIORITIZED" || "NONE", * }; * const command = new ListAnswersCommand(input); * const response = await client.send(command); @@ -102,6 +103,7 @@ export interface ListAnswersCommandOutput extends ListAnswersOutput, __MetadataB * // IsApplicable: true || false, * // Risk: "UNANSWERED" || "HIGH" || "MEDIUM" || "NONE" || "NOT_APPLICABLE", * // Reason: "OUT_OF_SCOPE" || "BUSINESS_PRIORITIES" || "ARCHITECTURE_CONSTRAINTS" || "OTHER" || "NONE", + * // QuestionType: "PRIORITIZED" || "NON_PRIORITIZED", * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-wellarchitected/src/commands/ListLensReviewImprovementsCommand.ts b/clients/client-wellarchitected/src/commands/ListLensReviewImprovementsCommand.ts index 4f4cd2db0c315..25d0bbb809f9d 100644 --- a/clients/client-wellarchitected/src/commands/ListLensReviewImprovementsCommand.ts +++ b/clients/client-wellarchitected/src/commands/ListLensReviewImprovementsCommand.ts @@ -50,6 +50,7 @@ export interface ListLensReviewImprovementsCommandOutput extends ListLensReviewI * MilestoneNumber: Number("int"), * NextToken: "STRING_VALUE", * MaxResults: Number("int"), + * QuestionPriority: "PRIORITIZED" || "NONE", * }; * const command = new ListLensReviewImprovementsCommand(input); * const response = await client.send(command); diff --git a/clients/client-wellarchitected/src/commands/ListLensReviewsCommand.ts b/clients/client-wellarchitected/src/commands/ListLensReviewsCommand.ts index cf5522a485ef8..b92ed95cff54d 100644 --- a/clients/client-wellarchitected/src/commands/ListLensReviewsCommand.ts +++ b/clients/client-wellarchitected/src/commands/ListLensReviewsCommand.ts @@ -65,6 +65,15 @@ export interface ListLensReviewsCommandOutput extends ListLensReviewsOutput, __M * // RiskCounts: { // RiskCounts * // "": Number("int"), * // }, + * // Profiles: [ // WorkloadProfiles + * // { // WorkloadProfile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // }, + * // ], + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-wellarchitected/src/commands/ListMilestonesCommand.ts b/clients/client-wellarchitected/src/commands/ListMilestonesCommand.ts index b81b046923c6d..4a40f372da614 100644 --- a/clients/client-wellarchitected/src/commands/ListMilestonesCommand.ts +++ b/clients/client-wellarchitected/src/commands/ListMilestonesCommand.ts @@ -70,6 +70,15 @@ export interface ListMilestonesCommandOutput extends ListMilestonesOutput, __Met * // "": Number("int"), * // }, * // ImprovementStatus: "NOT_APPLICABLE" || "NOT_STARTED" || "IN_PROGRESS" || "COMPLETE" || "RISK_ACKNOWLEDGED", + * // Profiles: [ // WorkloadProfiles + * // { // WorkloadProfile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // }, + * // ], + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // }, * // ], diff --git a/clients/client-wellarchitected/src/commands/ListProfileNotificationsCommand.ts b/clients/client-wellarchitected/src/commands/ListProfileNotificationsCommand.ts new file mode 100644 index 0000000000000..eb178d807c6d0 --- /dev/null +++ b/clients/client-wellarchitected/src/commands/ListProfileNotificationsCommand.ts @@ -0,0 +1,167 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { ListProfileNotificationsInput, ListProfileNotificationsOutput } from "../models/models_0"; +import { de_ListProfileNotificationsCommand, se_ListProfileNotificationsCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListProfileNotificationsCommand}. + */ +export interface ListProfileNotificationsCommandInput extends ListProfileNotificationsInput {} +/** + * @public + * + * The output of {@link ListProfileNotificationsCommand}. + */ +export interface ListProfileNotificationsCommandOutput extends ListProfileNotificationsOutput, __MetadataBearer {} + +/** + * @public + *

List profile notifications.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, ListProfileNotificationsCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, ListProfileNotificationsCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // ListProfileNotificationsInput + * WorkloadId: "STRING_VALUE", + * NextToken: "STRING_VALUE", + * MaxResults: Number("int"), + * }; + * const command = new ListProfileNotificationsCommand(input); + * const response = await client.send(command); + * // { // ListProfileNotificationsOutput + * // NotificationSummaries: [ // ProfileNotificationSummaries + * // { // ProfileNotificationSummary + * // CurrentProfileVersion: "STRING_VALUE", + * // LatestProfileVersion: "STRING_VALUE", + * // Type: "PROFILE_ANSWERS_UPDATED" || "PROFILE_DELETED", + * // ProfileArn: "STRING_VALUE", + * // ProfileName: "STRING_VALUE", + * // WorkloadId: "STRING_VALUE", + * // WorkloadName: "STRING_VALUE", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListProfileNotificationsCommandInput - {@link ListProfileNotificationsCommandInput} + * @returns {@link ListProfileNotificationsCommandOutput} + * @see {@link ListProfileNotificationsCommandInput} for command's `input` shape. + * @see {@link ListProfileNotificationsCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class ListProfileNotificationsCommand extends $Command< + ListProfileNotificationsCommandInput, + ListProfileNotificationsCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListProfileNotificationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListProfileNotificationsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "ListProfileNotificationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListProfileNotificationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListProfileNotificationsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListProfileNotificationsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/ListProfileSharesCommand.ts b/clients/client-wellarchitected/src/commands/ListProfileSharesCommand.ts new file mode 100644 index 0000000000000..89257058538c6 --- /dev/null +++ b/clients/client-wellarchitected/src/commands/ListProfileSharesCommand.ts @@ -0,0 +1,169 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { ListProfileSharesInput, ListProfileSharesOutput } from "../models/models_0"; +import { de_ListProfileSharesCommand, se_ListProfileSharesCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListProfileSharesCommand}. + */ +export interface ListProfileSharesCommandInput extends ListProfileSharesInput {} +/** + * @public + * + * The output of {@link ListProfileSharesCommand}. + */ +export interface ListProfileSharesCommandOutput extends ListProfileSharesOutput, __MetadataBearer {} + +/** + * @public + *

List profile shares.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, ListProfileSharesCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, ListProfileSharesCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // ListProfileSharesInput + * ProfileArn: "STRING_VALUE", // required + * SharedWithPrefix: "STRING_VALUE", + * NextToken: "STRING_VALUE", + * MaxResults: Number("int"), + * Status: "ACCEPTED" || "REJECTED" || "PENDING" || "REVOKED" || "EXPIRED" || "ASSOCIATING" || "ASSOCIATED" || "FAILED", + * }; + * const command = new ListProfileSharesCommand(input); + * const response = await client.send(command); + * // { // ListProfileSharesOutput + * // ProfileShareSummaries: [ // ProfileShareSummaries + * // { // ProfileShareSummary + * // ShareId: "STRING_VALUE", + * // SharedWith: "STRING_VALUE", + * // Status: "ACCEPTED" || "REJECTED" || "PENDING" || "REVOKED" || "EXPIRED" || "ASSOCIATING" || "ASSOCIATED" || "FAILED", + * // StatusMessage: "STRING_VALUE", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListProfileSharesCommandInput - {@link ListProfileSharesCommandInput} + * @returns {@link ListProfileSharesCommandOutput} + * @see {@link ListProfileSharesCommandInput} for command's `input` shape. + * @see {@link ListProfileSharesCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class ListProfileSharesCommand extends $Command< + ListProfileSharesCommandInput, + ListProfileSharesCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListProfileSharesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListProfileSharesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "ListProfileSharesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListProfileSharesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListProfileSharesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListProfileSharesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/ListProfilesCommand.ts b/clients/client-wellarchitected/src/commands/ListProfilesCommand.ts new file mode 100644 index 0000000000000..bed19d9062668 --- /dev/null +++ b/clients/client-wellarchitected/src/commands/ListProfilesCommand.ts @@ -0,0 +1,166 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { ListProfilesInput, ListProfilesOutput } from "../models/models_0"; +import { de_ListProfilesCommand, se_ListProfilesCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListProfilesCommand}. + */ +export interface ListProfilesCommandInput extends ListProfilesInput {} +/** + * @public + * + * The output of {@link ListProfilesCommand}. + */ +export interface ListProfilesCommandOutput extends ListProfilesOutput, __MetadataBearer {} + +/** + * @public + *

List profiles.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, ListProfilesCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, ListProfilesCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // ListProfilesInput + * ProfileNamePrefix: "STRING_VALUE", + * ProfileOwnerType: "SELF" || "SHARED", + * NextToken: "STRING_VALUE", + * MaxResults: Number("int"), + * }; + * const command = new ListProfilesCommand(input); + * const response = await client.send(command); + * // { // ListProfilesOutput + * // ProfileSummaries: [ // ProfileSummaries + * // { // ProfileSummary + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // ProfileName: "STRING_VALUE", + * // ProfileDescription: "STRING_VALUE", + * // Owner: "STRING_VALUE", + * // CreatedAt: new Date("TIMESTAMP"), + * // UpdatedAt: new Date("TIMESTAMP"), + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListProfilesCommandInput - {@link ListProfilesCommandInput} + * @returns {@link ListProfilesCommandOutput} + * @see {@link ListProfilesCommandInput} for command's `input` shape. + * @see {@link ListProfilesCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class ListProfilesCommand extends $Command< + ListProfilesCommandInput, + ListProfilesCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListProfilesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListProfilesCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "ListProfilesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListProfilesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListProfilesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListProfilesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/ListShareInvitationsCommand.ts b/clients/client-wellarchitected/src/commands/ListShareInvitationsCommand.ts index 22911fd60a792..0c9107b9baf79 100644 --- a/clients/client-wellarchitected/src/commands/ListShareInvitationsCommand.ts +++ b/clients/client-wellarchitected/src/commands/ListShareInvitationsCommand.ts @@ -46,9 +46,10 @@ export interface ListShareInvitationsCommandOutput extends ListShareInvitationsO * const input = { // ListShareInvitationsInput * WorkloadNamePrefix: "STRING_VALUE", * LensNamePrefix: "STRING_VALUE", - * ShareResourceType: "WORKLOAD" || "LENS", + * ShareResourceType: "WORKLOAD" || "LENS" || "PROFILE", * NextToken: "STRING_VALUE", * MaxResults: Number("int"), + * ProfileNamePrefix: "STRING_VALUE", * }; * const command = new ListShareInvitationsCommand(input); * const response = await client.send(command); @@ -59,11 +60,13 @@ export interface ListShareInvitationsCommandOutput extends ListShareInvitationsO * // SharedBy: "STRING_VALUE", * // SharedWith: "STRING_VALUE", * // PermissionType: "READONLY" || "CONTRIBUTOR", - * // ShareResourceType: "WORKLOAD" || "LENS", + * // ShareResourceType: "WORKLOAD" || "LENS" || "PROFILE", * // WorkloadName: "STRING_VALUE", * // WorkloadId: "STRING_VALUE", * // LensName: "STRING_VALUE", * // LensArn: "STRING_VALUE", + * // ProfileName: "STRING_VALUE", + * // ProfileArn: "STRING_VALUE", * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-wellarchitected/src/commands/ListTagsForResourceCommand.ts b/clients/client-wellarchitected/src/commands/ListTagsForResourceCommand.ts index f90f82e844318..1014289e58a36 100644 --- a/clients/client-wellarchitected/src/commands/ListTagsForResourceCommand.ts +++ b/clients/client-wellarchitected/src/commands/ListTagsForResourceCommand.ts @@ -38,7 +38,7 @@ export interface ListTagsForResourceCommandOutput extends ListTagsForResourceOut * @public *

List the tags for a resource.

* - *

The WorkloadArn parameter can be either a workload ARN or a custom lens ARN.

+ *

The WorkloadArn parameter can be a workload ARN, a custom lens ARN, or a profile ARN.

*
* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-wellarchitected/src/commands/ListWorkloadsCommand.ts b/clients/client-wellarchitected/src/commands/ListWorkloadsCommand.ts index 430b55d97c8cf..43473cacc8c2e 100644 --- a/clients/client-wellarchitected/src/commands/ListWorkloadsCommand.ts +++ b/clients/client-wellarchitected/src/commands/ListWorkloadsCommand.ts @@ -65,6 +65,15 @@ export interface ListWorkloadsCommandOutput extends ListWorkloadsOutput, __Metad * // "": Number("int"), * // }, * // ImprovementStatus: "NOT_APPLICABLE" || "NOT_STARTED" || "IN_PROGRESS" || "COMPLETE" || "RISK_ACKNOWLEDGED", + * // Profiles: [ // WorkloadProfiles + * // { // WorkloadProfile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // }, + * // ], + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-wellarchitected/src/commands/TagResourceCommand.ts b/clients/client-wellarchitected/src/commands/TagResourceCommand.ts index 6b93ed7af3ab2..dd124a03fab9f 100644 --- a/clients/client-wellarchitected/src/commands/TagResourceCommand.ts +++ b/clients/client-wellarchitected/src/commands/TagResourceCommand.ts @@ -38,7 +38,7 @@ export interface TagResourceCommandOutput extends TagResourceOutput, __MetadataB * @public *

Adds one or more tags to the specified resource.

* - *

The WorkloadArn parameter can be either a workload ARN or a custom lens ARN.

+ *

The WorkloadArn parameter can be a workload ARN, a custom lens ARN, or a profile ARN.

*
* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-wellarchitected/src/commands/UntagResourceCommand.ts b/clients/client-wellarchitected/src/commands/UntagResourceCommand.ts index 10aab63d8c9a3..56ce2e1ae281c 100644 --- a/clients/client-wellarchitected/src/commands/UntagResourceCommand.ts +++ b/clients/client-wellarchitected/src/commands/UntagResourceCommand.ts @@ -38,7 +38,7 @@ export interface UntagResourceCommandOutput extends UntagResourceOutput, __Metad * @public *

Deletes specified tags from a resource.

* - *

The WorkloadArn parameter can be either a workload ARN or a custom lens ARN.

+ *

The WorkloadArn parameter can be a workload ARN, a custom lens ARN, or a profile ARN.

*
*

To specify multiple tags, use separate tagKeys parameters, for example:

*

diff --git a/clients/client-wellarchitected/src/commands/UpdateLensReviewCommand.ts b/clients/client-wellarchitected/src/commands/UpdateLensReviewCommand.ts index 84fb37bb504a3..1d1b09e1d76f9 100644 --- a/clients/client-wellarchitected/src/commands/UpdateLensReviewCommand.ts +++ b/clients/client-wellarchitected/src/commands/UpdateLensReviewCommand.ts @@ -69,6 +69,9 @@ export interface UpdateLensReviewCommandOutput extends UpdateLensReviewOutput, _ * // RiskCounts: { // RiskCounts * // "": Number("int"), * // }, + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // ], * // UpdatedAt: new Date("TIMESTAMP"), @@ -77,6 +80,15 @@ export interface UpdateLensReviewCommandOutput extends UpdateLensReviewOutput, _ * // "": Number("int"), * // }, * // NextToken: "STRING_VALUE", + * // Profiles: [ // WorkloadProfiles + * // { // WorkloadProfile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // }, + * // ], + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // }; * diff --git a/clients/client-wellarchitected/src/commands/UpdateProfileCommand.ts b/clients/client-wellarchitected/src/commands/UpdateProfileCommand.ts new file mode 100644 index 0000000000000..e5ddb2c0b077c --- /dev/null +++ b/clients/client-wellarchitected/src/commands/UpdateProfileCommand.ts @@ -0,0 +1,198 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { UpdateProfileInput, UpdateProfileOutput } from "../models/models_0"; +import { de_UpdateProfileCommand, se_UpdateProfileCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateProfileCommand}. + */ +export interface UpdateProfileCommandInput extends UpdateProfileInput {} +/** + * @public + * + * The output of {@link UpdateProfileCommand}. + */ +export interface UpdateProfileCommandOutput extends UpdateProfileOutput, __MetadataBearer {} + +/** + * @public + *

Update a profile.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, UpdateProfileCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, UpdateProfileCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // UpdateProfileInput + * ProfileArn: "STRING_VALUE", // required + * ProfileDescription: "STRING_VALUE", + * ProfileQuestions: [ // ProfileQuestionUpdates + * { // ProfileQuestionUpdate + * QuestionId: "STRING_VALUE", + * SelectedChoiceIds: [ // SelectedProfileChoiceIds + * "STRING_VALUE", + * ], + * }, + * ], + * }; + * const command = new UpdateProfileCommand(input); + * const response = await client.send(command); + * // { // UpdateProfileOutput + * // Profile: { // Profile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // ProfileName: "STRING_VALUE", + * // ProfileDescription: "STRING_VALUE", + * // ProfileQuestions: [ // ProfileQuestions + * // { // ProfileQuestion + * // QuestionId: "STRING_VALUE", + * // QuestionTitle: "STRING_VALUE", + * // QuestionDescription: "STRING_VALUE", + * // QuestionChoices: [ // ProfileQuestionChoices + * // { // ProfileChoice + * // ChoiceId: "STRING_VALUE", + * // ChoiceTitle: "STRING_VALUE", + * // ChoiceDescription: "STRING_VALUE", + * // }, + * // ], + * // SelectedChoiceIds: [ // SelectedChoiceIds + * // "STRING_VALUE", + * // ], + * // MinSelectedChoices: Number("int"), + * // MaxSelectedChoices: Number("int"), + * // }, + * // ], + * // Owner: "STRING_VALUE", + * // CreatedAt: new Date("TIMESTAMP"), + * // UpdatedAt: new Date("TIMESTAMP"), + * // ShareInvitationId: "STRING_VALUE", + * // Tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param UpdateProfileCommandInput - {@link UpdateProfileCommandInput} + * @returns {@link UpdateProfileCommandOutput} + * @see {@link UpdateProfileCommandInput} for command's `input` shape. + * @see {@link UpdateProfileCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The resource has already been processed, was deleted, or is too large.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class UpdateProfileCommand extends $Command< + UpdateProfileCommandInput, + UpdateProfileCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateProfileCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UpdateProfileCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "UpdateProfileCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateProfileCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateProfileCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateProfileCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/UpdateShareInvitationCommand.ts b/clients/client-wellarchitected/src/commands/UpdateShareInvitationCommand.ts index 74c920eb1407b..b3211ac7059f9 100644 --- a/clients/client-wellarchitected/src/commands/UpdateShareInvitationCommand.ts +++ b/clients/client-wellarchitected/src/commands/UpdateShareInvitationCommand.ts @@ -55,10 +55,11 @@ export interface UpdateShareInvitationCommandOutput extends UpdateShareInvitatio * // { // UpdateShareInvitationOutput * // ShareInvitation: { // ShareInvitation * // ShareInvitationId: "STRING_VALUE", - * // ShareResourceType: "WORKLOAD" || "LENS", + * // ShareResourceType: "WORKLOAD" || "LENS" || "PROFILE", * // WorkloadId: "STRING_VALUE", * // LensAlias: "STRING_VALUE", * // LensArn: "STRING_VALUE", + * // ProfileArn: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-wellarchitected/src/commands/UpdateWorkloadCommand.ts b/clients/client-wellarchitected/src/commands/UpdateWorkloadCommand.ts index 0c11ec499db42..62140dfe75c93 100644 --- a/clients/client-wellarchitected/src/commands/UpdateWorkloadCommand.ts +++ b/clients/client-wellarchitected/src/commands/UpdateWorkloadCommand.ts @@ -127,6 +127,15 @@ export interface UpdateWorkloadCommandOutput extends UpdateWorkloadOutput, __Met * // Applications: [ // WorkloadApplications * // "STRING_VALUE", * // ], + * // Profiles: [ // WorkloadProfiles + * // { // WorkloadProfile + * // ProfileArn: "STRING_VALUE", + * // ProfileVersion: "STRING_VALUE", + * // }, + * // ], + * // PrioritizedRiskCounts: { + * // "": Number("int"), + * // }, * // }, * // }; * diff --git a/clients/client-wellarchitected/src/commands/UpgradeProfileVersionCommand.ts b/clients/client-wellarchitected/src/commands/UpgradeProfileVersionCommand.ts new file mode 100644 index 0000000000000..fb0fef2063448 --- /dev/null +++ b/clients/client-wellarchitected/src/commands/UpgradeProfileVersionCommand.ts @@ -0,0 +1,161 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { UpgradeProfileVersionInput } from "../models/models_0"; +import { de_UpgradeProfileVersionCommand, se_UpgradeProfileVersionCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WellArchitectedClientResolvedConfig } from "../WellArchitectedClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpgradeProfileVersionCommand}. + */ +export interface UpgradeProfileVersionCommandInput extends UpgradeProfileVersionInput {} +/** + * @public + * + * The output of {@link UpgradeProfileVersionCommand}. + */ +export interface UpgradeProfileVersionCommandOutput extends __MetadataBearer {} + +/** + * @public + *

Upgrade a profile.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WellArchitectedClient, UpgradeProfileVersionCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import + * // const { WellArchitectedClient, UpgradeProfileVersionCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import + * const client = new WellArchitectedClient(config); + * const input = { // UpgradeProfileVersionInput + * WorkloadId: "STRING_VALUE", // required + * ProfileArn: "STRING_VALUE", // required + * MilestoneName: "STRING_VALUE", + * ClientRequestToken: "STRING_VALUE", + * }; + * const command = new UpgradeProfileVersionCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpgradeProfileVersionCommandInput - {@link UpgradeProfileVersionCommandInput} + * @returns {@link UpgradeProfileVersionCommandOutput} + * @see {@link UpgradeProfileVersionCommandInput} for command's `input` shape. + * @see {@link UpgradeProfileVersionCommandOutput} for command's `response` shape. + * @see {@link WellArchitectedClientResolvedConfig | config} for WellArchitectedClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

User does not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The resource has already been processed, was deleted, or is too large.

+ * + * @throws {@link InternalServerException} (server fault) + *

There is a problem with the Well-Architected Tool API service.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource was not found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The user input is not valid.

+ * + * @throws {@link WellArchitectedServiceException} + *

Base exception class for all service exceptions from WellArchitected service.

+ * + */ +export class UpgradeProfileVersionCommand extends $Command< + UpgradeProfileVersionCommandInput, + UpgradeProfileVersionCommandOutput, + WellArchitectedClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpgradeProfileVersionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WellArchitectedClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpgradeProfileVersionCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "WellArchitectedClient"; + const commandName = "UpgradeProfileVersionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpgradeProfileVersionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpgradeProfileVersionCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpgradeProfileVersionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-wellarchitected/src/commands/index.ts b/clients/client-wellarchitected/src/commands/index.ts index 2025dbdd1eb9e..0168f0c8781d2 100644 --- a/clients/client-wellarchitected/src/commands/index.ts +++ b/clients/client-wellarchitected/src/commands/index.ts @@ -1,15 +1,21 @@ // smithy-typescript generated code export * from "./AssociateLensesCommand"; +export * from "./AssociateProfilesCommand"; export * from "./CreateLensShareCommand"; export * from "./CreateLensVersionCommand"; export * from "./CreateMilestoneCommand"; +export * from "./CreateProfileCommand"; +export * from "./CreateProfileShareCommand"; export * from "./CreateWorkloadCommand"; export * from "./CreateWorkloadShareCommand"; export * from "./DeleteLensCommand"; export * from "./DeleteLensShareCommand"; +export * from "./DeleteProfileCommand"; +export * from "./DeleteProfileShareCommand"; export * from "./DeleteWorkloadCommand"; export * from "./DeleteWorkloadShareCommand"; export * from "./DisassociateLensesCommand"; +export * from "./DisassociateProfilesCommand"; export * from "./ExportLensCommand"; export * from "./GetAnswerCommand"; export * from "./GetConsolidatedReportCommand"; @@ -18,6 +24,8 @@ export * from "./GetLensReviewCommand"; export * from "./GetLensReviewReportCommand"; export * from "./GetLensVersionDifferenceCommand"; export * from "./GetMilestoneCommand"; +export * from "./GetProfileCommand"; +export * from "./GetProfileTemplateCommand"; export * from "./GetWorkloadCommand"; export * from "./ImportLensCommand"; export * from "./ListAnswersCommand"; @@ -29,6 +37,9 @@ export * from "./ListLensSharesCommand"; export * from "./ListLensesCommand"; export * from "./ListMilestonesCommand"; export * from "./ListNotificationsCommand"; +export * from "./ListProfileNotificationsCommand"; +export * from "./ListProfileSharesCommand"; +export * from "./ListProfilesCommand"; export * from "./ListShareInvitationsCommand"; export * from "./ListTagsForResourceCommand"; export * from "./ListWorkloadSharesCommand"; @@ -38,7 +49,9 @@ export * from "./UntagResourceCommand"; export * from "./UpdateAnswerCommand"; export * from "./UpdateGlobalSettingsCommand"; export * from "./UpdateLensReviewCommand"; +export * from "./UpdateProfileCommand"; export * from "./UpdateShareInvitationCommand"; export * from "./UpdateWorkloadCommand"; export * from "./UpdateWorkloadShareCommand"; export * from "./UpgradeLensReviewCommand"; +export * from "./UpgradeProfileVersionCommand"; diff --git a/clients/client-wellarchitected/src/models/models_0.ts b/clients/client-wellarchitected/src/models/models_0.ts index e17d8dfb5c0cd..20e6b4f0c6cfe 100644 --- a/clients/client-wellarchitected/src/models/models_0.ts +++ b/clients/client-wellarchitected/src/models/models_0.ts @@ -329,6 +329,20 @@ export interface ChoiceAnswerSummary { Reason?: ChoiceReason | string; } +/** + * @public + * @enum + */ +export const QuestionType = { + NON_PRIORITIZED: "NON_PRIORITIZED", + PRIORITIZED: "PRIORITIZED", +} as const; + +/** + * @public + */ +export type QuestionType = (typeof QuestionType)[keyof typeof QuestionType]; + /** * @public *

An answer summary of a lens review in a workload.

@@ -380,6 +394,11 @@ export interface AnswerSummary { *

The reason why a choice is non-applicable to a question in your workload.

*/ Reason?: AnswerReason | string; + + /** + *

The type of the question.

+ */ + QuestionType?: QuestionType | string; } /** @@ -604,6 +623,21 @@ export class ValidationException extends __BaseException { } } +/** + * @public + */ +export interface AssociateProfilesInput { + /** + *

The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.

+ */ + WorkloadId: string | undefined; + + /** + *

The list of profile ARNs to associate with the workload.

+ */ + ProfileArns: string[] | undefined; +} + /** * @public *

A best practice, or question choice, that has been identified as a risk in this question.

@@ -969,7 +1003,7 @@ export interface CreateLensShareInput { LensAlias: string | undefined; /** - *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload is shared.

+ *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.

*/ SharedWith: string | undefined; @@ -993,7 +1027,7 @@ export interface CreateLensShareInput { */ export interface CreateLensShareOutput { /** - *

The ID associated with the workload share.

+ *

The ID associated with the share.

*/ ShareId?: string; } @@ -1151,6 +1185,120 @@ export interface CreateMilestoneOutput { MilestoneNumber?: number; } +/** + * @public + *

An update to a profile question.

+ */ +export interface ProfileQuestionUpdate { + /** + *

The ID of the question.

+ */ + QuestionId?: string; + + /** + *

The selected choices.

+ */ + SelectedChoiceIds?: string[]; +} + +/** + * @public + */ +export interface CreateProfileInput { + /** + *

Name of the profile.

+ */ + ProfileName: string | undefined; + + /** + *

The profile description.

+ */ + ProfileDescription: string | undefined; + + /** + *

The profile questions.

+ */ + ProfileQuestions: ProfileQuestionUpdate[] | undefined; + + /** + *

A unique case-sensitive string used to ensure that this request is idempotent + * (executes only once).

+ *

You should not reuse the same token for other requests. If you retry a request with + * the same client request token and the same parameters after the original request has completed + * successfully, the result of the original request is returned.

+ * + *

This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs + * automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, + * you must provide this token or the request will fail.

+ *
+ */ + ClientRequestToken?: string; + + /** + *

The tags assigned to the profile.

+ */ + Tags?: Record; +} + +/** + * @public + */ +export interface CreateProfileOutput { + /** + *

The profile ARN.

+ */ + ProfileArn?: string; + + /** + *

Version of the profile.

+ */ + ProfileVersion?: string; +} + +/** + * @public + */ +export interface CreateProfileShareInput { + /** + *

The profile ARN.

+ */ + ProfileArn: string | undefined; + + /** + *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.

+ */ + SharedWith: string | undefined; + + /** + *

A unique case-sensitive string used to ensure that this request is idempotent + * (executes only once).

+ *

You should not reuse the same token for other requests. If you retry a request with + * the same client request token and the same parameters after the original request has completed + * successfully, the result of the original request is returned.

+ * + *

This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs + * automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, + * you must provide this token or the request will fail.

+ *
+ */ + ClientRequestToken?: string; +} + +/** + * @public + */ +export interface CreateProfileShareOutput { + /** + *

The ID associated with the share.

+ */ + ShareId?: string; + + /** + *

The profile ARN.

+ */ + ProfileArn?: string; +} + /** * @public * @enum @@ -1452,6 +1600,11 @@ export interface CreateWorkloadInput { *

List of AppRegistry application ARNs associated to the workload.

*/ Applications?: string[]; + + /** + *

The list of profile ARNs associated with the workload.

+ */ + ProfileArns?: string[]; } /** @@ -1495,12 +1648,12 @@ export interface CreateWorkloadShareInput { WorkloadId: string | undefined; /** - *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload is shared.

+ *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.

*/ SharedWith: string | undefined; /** - *

Permission granted on a workload share.

+ *

Permission granted on a share request.

*/ PermissionType: PermissionType | string | undefined; @@ -1530,7 +1683,7 @@ export interface CreateWorkloadShareOutput { WorkloadId?: string; /** - *

The ID associated with the workload share.

+ *

The ID associated with the share.

*/ ShareId?: string; } @@ -1591,7 +1744,7 @@ export interface DeleteLensInput { */ export interface DeleteLensShareInput { /** - *

The ID associated with the workload share.

+ *

The ID associated with the share.

*/ ShareId: string | undefined; @@ -1622,6 +1775,59 @@ export interface DeleteLensShareInput { ClientRequestToken?: string; } +/** + * @public + */ +export interface DeleteProfileInput { + /** + *

The profile ARN.

+ */ + ProfileArn: string | undefined; + + /** + *

A unique case-sensitive string used to ensure that this request is idempotent + * (executes only once).

+ *

You should not reuse the same token for other requests. If you retry a request with + * the same client request token and the same parameters after the original request has completed + * successfully, the result of the original request is returned.

+ * + *

This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs + * automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, + * you must provide this token or the request will fail.

+ *
+ */ + ClientRequestToken?: string; +} + +/** + * @public + */ +export interface DeleteProfileShareInput { + /** + *

The ID associated with the share.

+ */ + ShareId: string | undefined; + + /** + *

The profile ARN.

+ */ + ProfileArn: string | undefined; + + /** + *

A unique case-sensitive string used to ensure that this request is idempotent + * (executes only once).

+ *

You should not reuse the same token for other requests. If you retry a request with + * the same client request token and the same parameters after the original request has completed + * successfully, the result of the original request is returned.

+ * + *

This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs + * automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, + * you must provide this token or the request will fail.

+ *
+ */ + ClientRequestToken?: string; +} + /** * @public *

Input for workload deletion.

@@ -1653,7 +1859,7 @@ export interface DeleteWorkloadInput { */ export interface DeleteWorkloadShareInput { /** - *

The ID associated with the workload share.

+ *

The ID associated with the share.

*/ ShareId: string | undefined; @@ -1709,6 +1915,21 @@ export interface DisassociateLensesInput { LensAliases: string[] | undefined; } +/** + * @public + */ +export interface DisassociateProfilesInput { + /** + *

The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.

+ */ + WorkloadId: string | undefined; + + /** + *

The list of profile ARNs to disassociate from the workload.

+ */ + ProfileArns: string[] | undefined; +} + /** * @public * @enum @@ -2037,6 +2258,27 @@ export interface PillarReviewSummary { *

A map from risk names to the count of how many questions have that rating.

*/ RiskCounts?: Record; + + /** + *

A map from risk names to the count of how many questions have that rating.

+ */ + PrioritizedRiskCounts?: Record; +} + +/** + * @public + *

The profile associated with a workload.

+ */ +export interface WorkloadProfile { + /** + *

The profile ARN.

+ */ + ProfileArn?: string; + + /** + *

The profile version.

+ */ + ProfileVersion?: string; } /** @@ -2100,6 +2342,16 @@ export interface LensReview { *

The token to use to retrieve the next set of results.

*/ NextToken?: string; + + /** + *

The profiles associated with the workload.

+ */ + Profiles?: WorkloadProfile[]; + + /** + *

A map from risk names to the count of how many questions have that rating.

+ */ + PrioritizedRiskCounts?: Record; } /** @@ -2644,6 +2896,16 @@ export interface Workload { *

List of AppRegistry application ARNs associated to the workload.

*/ Applications?: string[]; + + /** + *

Profile associated with a workload.

+ */ + Profiles?: WorkloadProfile[]; + + /** + *

A map from risk names to the count of how many questions have that rating.

+ */ + PrioritizedRiskCounts?: Record; } /** @@ -2692,60 +2954,301 @@ export interface GetMilestoneOutput { /** * @public - *

Input to get a workload.

*/ -export interface GetWorkloadInput { +export interface GetProfileInput { /** - *

The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.

+ *

The profile ARN.

*/ - WorkloadId: string | undefined; + ProfileArn: string | undefined; + + /** + *

The profile version.

+ */ + ProfileVersion?: string; } /** * @public - *

Output of a get workload call.

+ *

The profile choice.

*/ -export interface GetWorkloadOutput { +export interface ProfileChoice { /** - *

A workload return object.

+ *

The ID of a choice.

*/ - Workload?: Workload; + ChoiceId?: string; + + /** + *

The title of a choice.

+ */ + ChoiceTitle?: string; + + /** + *

The description of a choice.

+ */ + ChoiceDescription?: string; } /** * @public + *

A profile question.

*/ -export interface ImportLensInput { +export interface ProfileQuestion { /** - *

The alias of the lens.

- *

For Amazon Web Services official lenses, this is either the lens alias, such as - * serverless, or the lens ARN, such as - * arn:aws:wellarchitected:us-east-1::lens/serverless. Note that some - * operations (such as ExportLens and CreateLensShare) are not permitted on Amazon Web Services official lenses.

- *

For custom lenses, this is the lens ARN, such as - * arn:aws:wellarchitected:us-west-2:123456789012:lens/0123456789abcdef01234567890abcdef.

- *

Each lens is identified by its LensSummary$LensAlias.

+ *

The ID of the question.

*/ - LensAlias?: string; + QuestionId?: string; /** - *

The JSON representation of a lens.

+ *

The title of the question.

*/ - JSONString: string | undefined; + QuestionTitle?: string; /** - *

A unique case-sensitive string used to ensure that this request is idempotent - * (executes only once).

- *

You should not reuse the same token for other requests. If you retry a request with - * the same client request token and the same parameters after the original request has completed - * successfully, the result of the original request is returned.

- * - *

This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs - * automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, - * you must provide this token or the request will fail.

- *
+ *

The description of the question.

*/ - ClientRequestToken?: string; + QuestionDescription?: string; + + /** + *

The question choices.

+ */ + QuestionChoices?: ProfileChoice[]; + + /** + *

The selected choices.

+ */ + SelectedChoiceIds?: string[]; + + /** + *

The minimum number of selected choices.

+ */ + MinSelectedChoices?: number; + + /** + *

The maximum number of selected choices.

+ */ + MaxSelectedChoices?: number; +} + +/** + * @public + *

A profile.

+ */ +export interface Profile { + /** + *

The profile ARN.

+ */ + ProfileArn?: string; + + /** + *

The profile version.

+ */ + ProfileVersion?: string; + + /** + *

The profile name.

+ */ + ProfileName?: string; + + /** + *

The profile description.

+ */ + ProfileDescription?: string; + + /** + *

Profile questions.

+ */ + ProfileQuestions?: ProfileQuestion[]; + + /** + *

An Amazon Web Services account ID.

+ */ + Owner?: string; + + /** + *

The date and time recorded.

+ */ + CreatedAt?: Date; + + /** + *

The date and time recorded.

+ */ + UpdatedAt?: Date; + + /** + *

The ID assigned to the share invitation.

+ */ + ShareInvitationId?: string; + + /** + *

The tags assigned to the profile.

+ */ + Tags?: Record; +} + +/** + * @public + */ +export interface GetProfileOutput { + /** + *

The profile.

+ */ + Profile?: Profile; +} + +/** + * @public + */ +export interface GetProfileTemplateInput {} + +/** + * @public + *

A profile template choice.

+ */ +export interface ProfileTemplateChoice { + /** + *

The ID of a choice.

+ */ + ChoiceId?: string; + + /** + *

The title of a choice.

+ */ + ChoiceTitle?: string; + + /** + *

The description of a choice.

+ */ + ChoiceDescription?: string; +} + +/** + * @public + *

A profile template question.

+ */ +export interface ProfileTemplateQuestion { + /** + *

The ID of the question.

+ */ + QuestionId?: string; + + /** + *

The title of the question.

+ */ + QuestionTitle?: string; + + /** + *

The description of the question.

+ */ + QuestionDescription?: string; + + /** + *

The question choices.

+ */ + QuestionChoices?: ProfileTemplateChoice[]; + + /** + *

The minimum number of choices selected.

+ */ + MinSelectedChoices?: number; + + /** + *

The maximum number of choices selected.

+ */ + MaxSelectedChoices?: number; +} + +/** + * @public + *

The profile template.

+ */ +export interface ProfileTemplate { + /** + *

The name of the profile template.

+ */ + TemplateName?: string; + + /** + *

Profile template questions.

+ */ + TemplateQuestions?: ProfileTemplateQuestion[]; + + /** + *

The date and time recorded.

+ */ + CreatedAt?: Date; + + /** + *

The date and time recorded.

+ */ + UpdatedAt?: Date; +} + +/** + * @public + */ +export interface GetProfileTemplateOutput { + /** + *

The profile template.

+ */ + ProfileTemplate?: ProfileTemplate; +} + +/** + * @public + *

Input to get a workload.

+ */ +export interface GetWorkloadInput { + /** + *

The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.

+ */ + WorkloadId: string | undefined; +} + +/** + * @public + *

Output of a get workload call.

+ */ +export interface GetWorkloadOutput { + /** + *

A workload return object.

+ */ + Workload?: Workload; +} + +/** + * @public + */ +export interface ImportLensInput { + /** + *

The alias of the lens.

+ *

For Amazon Web Services official lenses, this is either the lens alias, such as + * serverless, or the lens ARN, such as + * arn:aws:wellarchitected:us-east-1::lens/serverless. Note that some + * operations (such as ExportLens and CreateLensShare) are not permitted on Amazon Web Services official lenses.

+ *

For custom lenses, this is the lens ARN, such as + * arn:aws:wellarchitected:us-west-2:123456789012:lens/0123456789abcdef01234567890abcdef.

+ *

Each lens is identified by its LensSummary$LensAlias.

+ */ + LensAlias?: string; + + /** + *

The JSON representation of a lens.

+ */ + JSONString: string | undefined; + + /** + *

A unique case-sensitive string used to ensure that this request is idempotent + * (executes only once).

+ *

You should not reuse the same token for other requests. If you retry a request with + * the same client request token and the same parameters after the original request has completed + * successfully, the result of the original request is returned.

+ * + *

This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs + * automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, + * you must provide this token or the request will fail.

+ *
+ */ + ClientRequestToken?: string; /** *

Tags to associate to a lens.

@@ -2868,6 +3371,16 @@ export interface LensReviewSummary { *

A map from risk names to the count of how many questions have that rating.

*/ RiskCounts?: Record; + + /** + *

The profiles associated with the workload.

+ */ + Profiles?: WorkloadProfile[]; + + /** + *

A map from risk names to the count of how many questions have that rating.

+ */ + PrioritizedRiskCounts?: Record; } /** @@ -2896,17 +3409,17 @@ export type ShareStatus = (typeof ShareStatus)[keyof typeof ShareStatus]; */ export interface LensShareSummary { /** - *

The ID associated with the workload share.

+ *

The ID associated with the share.

*/ ShareId?: string; /** - *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload is shared.

+ *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.

*/ SharedWith?: string; /** - *

The status of a workload share.

+ *

The status of the share request.

*/ Status?: ShareStatus | string; @@ -3039,6 +3552,20 @@ export interface LensUpgradeSummary { LatestLensVersion?: string; } +/** + * @public + * @enum + */ +export const QuestionPriority = { + NONE: "NONE", + PRIORITIZED: "PRIORITIZED", +} as const; + +/** + * @public + */ +export type QuestionPriority = (typeof QuestionPriority)[keyof typeof QuestionPriority]; + /** * @public *

Input to list answers.

@@ -3082,6 +3609,11 @@ export interface ListAnswersInput { *

The maximum number of results to return for this request.

*/ MaxResults?: number; + + /** + *

The priority of the question.

+ */ + QuestionPriority?: QuestionPriority | string; } /** @@ -3330,6 +3862,11 @@ export interface ListLensReviewImprovementsInput { *

The maximum number of results to return for this request.

*/ MaxResults?: number; + + /** + *

The priority of the question.

+ */ + QuestionPriority?: QuestionPriority | string; } /** @@ -3462,7 +3999,7 @@ export interface ListLensSharesInput { MaxResults?: number; /** - *

The status of a workload share.

+ *

The status of the share request.

*/ Status?: ShareStatus | string; } @@ -3549,6 +4086,16 @@ export interface WorkloadSummary { *

The improvement status for a workload.

*/ ImprovementStatus?: WorkloadImprovementStatus | string; + + /** + *

Profile associated with a workload.

+ */ + Profiles?: WorkloadProfile[]; + + /** + *

A map from risk names to the count of how many questions have that rating.

+ */ + PrioritizedRiskCounts?: Record; } /** @@ -3665,12 +4212,271 @@ export interface ListNotificationsOutput { NextToken?: string; } +/** + * @public + */ +export interface ListProfileNotificationsInput { + /** + *

The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.

+ */ + WorkloadId?: string; + + /** + *

The token to use to retrieve the next set of results.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to return for this request.

+ */ + MaxResults?: number; +} + +/** + * @public + * @enum + */ +export const ProfileNotificationType = { + PROFILE_ANSWERS_UPDATED: "PROFILE_ANSWERS_UPDATED", + PROFILE_DELETED: "PROFILE_DELETED", +} as const; + +/** + * @public + */ +export type ProfileNotificationType = (typeof ProfileNotificationType)[keyof typeof ProfileNotificationType]; + +/** + * @public + *

The profile notification summary.

+ */ +export interface ProfileNotificationSummary { + /** + *

The current profile version.

+ */ + CurrentProfileVersion?: string; + + /** + *

The latest profile version.

+ */ + LatestProfileVersion?: string; + + /** + *

Type of notification.

+ */ + Type?: ProfileNotificationType | string; + + /** + *

The profile ARN.

+ */ + ProfileArn?: string; + + /** + *

The profile name.

+ */ + ProfileName?: string; + + /** + *

The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.

+ */ + WorkloadId?: string; + + /** + *

The name of the workload.

+ *

The name must be unique within an account within an Amazon Web Services Region. Spaces and capitalization + * are ignored when checking for uniqueness.

+ */ + WorkloadName?: string; +} + +/** + * @public + */ +export interface ListProfileNotificationsOutput { + /** + *

Notification summaries.

+ */ + NotificationSummaries?: ProfileNotificationSummary[]; + + /** + *

The token to use to retrieve the next set of results.

+ */ + NextToken?: string; +} + +/** + * @public + * @enum + */ +export const ProfileOwnerType = { + SELF: "SELF", + SHARED: "SHARED", +} as const; + +/** + * @public + */ +export type ProfileOwnerType = (typeof ProfileOwnerType)[keyof typeof ProfileOwnerType]; + +/** + * @public + */ +export interface ListProfilesInput { + /** + *

Prefix for profile name.

+ */ + ProfileNamePrefix?: string; + + /** + *

Profile owner type.

+ */ + ProfileOwnerType?: ProfileOwnerType | string; + + /** + *

The token to use to retrieve the next set of results.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to return for this request.

+ */ + MaxResults?: number; +} + +/** + * @public + *

Summary of a profile.

+ */ +export interface ProfileSummary { + /** + *

The profile ARN.

+ */ + ProfileArn?: string; + + /** + *

The profile version.

+ */ + ProfileVersion?: string; + + /** + *

The profile name.

+ */ + ProfileName?: string; + + /** + *

The profile description.

+ */ + ProfileDescription?: string; + + /** + *

An Amazon Web Services account ID.

+ */ + Owner?: string; + + /** + *

The date and time recorded.

+ */ + CreatedAt?: Date; + + /** + *

The date and time recorded.

+ */ + UpdatedAt?: Date; +} + +/** + * @public + */ +export interface ListProfilesOutput { + /** + *

Profile summaries.

+ */ + ProfileSummaries?: ProfileSummary[]; + + /** + *

The token to use to retrieve the next set of results.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListProfileSharesInput { + /** + *

The profile ARN.

+ */ + ProfileArn: string | undefined; + + /** + *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the profile is shared.

+ */ + SharedWithPrefix?: string; + + /** + *

The token to use to retrieve the next set of results.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to return for this request.

+ */ + MaxResults?: number; + + /** + *

The status of the share request.

+ */ + Status?: ShareStatus | string; +} + +/** + * @public + *

Summary of a profile share.

+ */ +export interface ProfileShareSummary { + /** + *

The ID associated with the share.

+ */ + ShareId?: string; + + /** + *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.

+ */ + SharedWith?: string; + + /** + *

The status of the share request.

+ */ + Status?: ShareStatus | string; + + /** + *

Profile share invitation status message.

+ */ + StatusMessage?: string; +} + +/** + * @public + */ +export interface ListProfileSharesOutput { + /** + *

Profile share summaries.

+ */ + ProfileShareSummaries?: ProfileShareSummary[]; + + /** + *

The token to use to retrieve the next set of results.

+ */ + NextToken?: string; +} + /** * @public * @enum */ export const ShareResourceType = { LENS: "LENS", + PROFILE: "PROFILE", WORKLOAD: "WORKLOAD", } as const; @@ -3709,6 +4515,11 @@ export interface ListShareInvitationsInput { *

The maximum number of results to return for this request.

*/ MaxResults?: number; + + /** + *

Profile name prefix.

+ */ + ProfileNamePrefix?: string; } /** @@ -3727,12 +4538,12 @@ export interface ShareInvitationSummary { SharedBy?: string; /** - *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload is shared.

+ *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.

*/ SharedWith?: string; /** - *

Permission granted on a workload share.

+ *

Permission granted on a share request.

*/ PermissionType?: PermissionType | string; @@ -3762,6 +4573,16 @@ export interface ShareInvitationSummary { *

The ARN for the lens.

*/ LensArn?: string; + + /** + *

The profile name.

+ */ + ProfileName?: string; + + /** + *

The profile ARN.

+ */ + ProfileArn?: string; } /** @@ -3864,7 +4685,7 @@ export interface ListWorkloadSharesInput { MaxResults?: number; /** - *

The status of a workload share.

+ *

The status of the share request.

*/ Status?: ShareStatus | string; } @@ -3875,22 +4696,22 @@ export interface ListWorkloadSharesInput { */ export interface WorkloadShareSummary { /** - *

The ID associated with the workload share.

+ *

The ID associated with the share.

*/ ShareId?: string; /** - *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload is shared.

+ *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.

*/ SharedWith?: string; /** - *

Permission granted on a workload share.

+ *

Permission granted on a share request.

*/ PermissionType?: PermissionType | string; /** - *

The status of a workload share.

+ *

The status of the share request.

*/ Status?: ShareStatus | string; @@ -3971,6 +4792,11 @@ export interface ShareInvitation { *

The ARN for the lens.

*/ LensArn?: string; + + /** + *

The profile ARN.

+ */ + ProfileArn?: string; } /** @@ -4180,6 +5006,36 @@ export interface UpdateLensReviewOutput { LensReview?: LensReview; } +/** + * @public + */ +export interface UpdateProfileInput { + /** + *

The profile ARN.

+ */ + ProfileArn: string | undefined; + + /** + *

The profile description.

+ */ + ProfileDescription?: string; + + /** + *

Profile questions.

+ */ + ProfileQuestions?: ProfileQuestionUpdate[]; +} + +/** + * @public + */ +export interface UpdateProfileOutput { + /** + *

The profile.

+ */ + Profile?: Profile; +} + /** * @public *

Input for Update Share Invitation

@@ -4461,7 +5317,7 @@ export interface UpdateWorkloadOutput { */ export interface UpdateWorkloadShareInput { /** - *

The ID associated with the workload share.

+ *

The ID associated with the share.

*/ ShareId: string | undefined; @@ -4471,7 +5327,7 @@ export interface UpdateWorkloadShareInput { WorkloadId: string | undefined; /** - *

Permission granted on a workload share.

+ *

Permission granted on a share request.

*/ PermissionType: PermissionType | string | undefined; } @@ -4482,7 +5338,7 @@ export interface UpdateWorkloadShareInput { */ export interface WorkloadShare { /** - *

The ID associated with the workload share.

+ *

The ID associated with the share.

*/ ShareId?: string; @@ -4492,17 +5348,17 @@ export interface WorkloadShare { SharedBy?: string; /** - *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload is shared.

+ *

The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.

*/ SharedWith?: string; /** - *

Permission granted on a workload share.

+ *

Permission granted on a share request.

*/ PermissionType?: PermissionType | string; /** - *

The status of a workload share.

+ *

The status of the share request.

*/ Status?: ShareStatus | string; @@ -4576,3 +5432,38 @@ export interface UpgradeLensReviewInput { */ ClientRequestToken?: string; } + +/** + * @public + */ +export interface UpgradeProfileVersionInput { + /** + *

The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.

+ */ + WorkloadId: string | undefined; + + /** + *

The profile ARN.

+ */ + ProfileArn: string | undefined; + + /** + *

The name of the milestone in a workload.

+ *

Milestone names must be unique within a workload.

+ */ + MilestoneName?: string; + + /** + *

A unique case-sensitive string used to ensure that this request is idempotent + * (executes only once).

+ *

You should not reuse the same token for other requests. If you retry a request with + * the same client request token and the same parameters after the original request has completed + * successfully, the result of the original request is returned.

+ * + *

This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs + * automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, + * you must provide this token or the request will fail.

+ *
+ */ + ClientRequestToken?: string; +} diff --git a/clients/client-wellarchitected/src/pagination/ListProfileNotificationsPaginator.ts b/clients/client-wellarchitected/src/pagination/ListProfileNotificationsPaginator.ts new file mode 100644 index 0000000000000..35cf9a7c5eea1 --- /dev/null +++ b/clients/client-wellarchitected/src/pagination/ListProfileNotificationsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@aws-sdk/types"; + +import { + ListProfileNotificationsCommand, + ListProfileNotificationsCommandInput, + ListProfileNotificationsCommandOutput, +} from "../commands/ListProfileNotificationsCommand"; +import { WellArchitectedClient } from "../WellArchitectedClient"; +import { WellArchitectedPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: WellArchitectedClient, + input: ListProfileNotificationsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListProfileNotificationsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListProfileNotifications( + config: WellArchitectedPaginationConfiguration, + input: ListProfileNotificationsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListProfileNotificationsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof WellArchitectedClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wellarchitected/src/pagination/ListProfileSharesPaginator.ts b/clients/client-wellarchitected/src/pagination/ListProfileSharesPaginator.ts new file mode 100644 index 0000000000000..6573b25aa9ca4 --- /dev/null +++ b/clients/client-wellarchitected/src/pagination/ListProfileSharesPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@aws-sdk/types"; + +import { + ListProfileSharesCommand, + ListProfileSharesCommandInput, + ListProfileSharesCommandOutput, +} from "../commands/ListProfileSharesCommand"; +import { WellArchitectedClient } from "../WellArchitectedClient"; +import { WellArchitectedPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: WellArchitectedClient, + input: ListProfileSharesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListProfileSharesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListProfileShares( + config: WellArchitectedPaginationConfiguration, + input: ListProfileSharesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListProfileSharesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof WellArchitectedClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wellarchitected/src/pagination/ListProfilesPaginator.ts b/clients/client-wellarchitected/src/pagination/ListProfilesPaginator.ts new file mode 100644 index 0000000000000..4ed8d9600008e --- /dev/null +++ b/clients/client-wellarchitected/src/pagination/ListProfilesPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@aws-sdk/types"; + +import { + ListProfilesCommand, + ListProfilesCommandInput, + ListProfilesCommandOutput, +} from "../commands/ListProfilesCommand"; +import { WellArchitectedClient } from "../WellArchitectedClient"; +import { WellArchitectedPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: WellArchitectedClient, + input: ListProfilesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListProfilesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListProfiles( + config: WellArchitectedPaginationConfiguration, + input: ListProfilesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListProfilesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof WellArchitectedClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-wellarchitected/src/pagination/index.ts b/clients/client-wellarchitected/src/pagination/index.ts index 6ffef8cb583b3..141bf1750ba3a 100644 --- a/clients/client-wellarchitected/src/pagination/index.ts +++ b/clients/client-wellarchitected/src/pagination/index.ts @@ -10,6 +10,9 @@ export * from "./ListLensSharesPaginator"; export * from "./ListLensesPaginator"; export * from "./ListMilestonesPaginator"; export * from "./ListNotificationsPaginator"; +export * from "./ListProfileNotificationsPaginator"; +export * from "./ListProfileSharesPaginator"; +export * from "./ListProfilesPaginator"; export * from "./ListShareInvitationsPaginator"; export * from "./ListWorkloadSharesPaginator"; export * from "./ListWorkloadsPaginator"; diff --git a/clients/client-wellarchitected/src/protocols/Aws_restJson1.ts b/clients/client-wellarchitected/src/protocols/Aws_restJson1.ts index 025665b9b8b67..94f7cfa8b5803 100644 --- a/clients/client-wellarchitected/src/protocols/Aws_restJson1.ts +++ b/clients/client-wellarchitected/src/protocols/Aws_restJson1.ts @@ -21,9 +21,12 @@ import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/ import { v4 as generateIdempotencyToken } from "uuid"; import { AssociateLensesCommandInput, AssociateLensesCommandOutput } from "../commands/AssociateLensesCommand"; +import { AssociateProfilesCommandInput, AssociateProfilesCommandOutput } from "../commands/AssociateProfilesCommand"; import { CreateLensShareCommandInput, CreateLensShareCommandOutput } from "../commands/CreateLensShareCommand"; import { CreateLensVersionCommandInput, CreateLensVersionCommandOutput } from "../commands/CreateLensVersionCommand"; import { CreateMilestoneCommandInput, CreateMilestoneCommandOutput } from "../commands/CreateMilestoneCommand"; +import { CreateProfileCommandInput, CreateProfileCommandOutput } from "../commands/CreateProfileCommand"; +import { CreateProfileShareCommandInput, CreateProfileShareCommandOutput } from "../commands/CreateProfileShareCommand"; import { CreateWorkloadCommandInput, CreateWorkloadCommandOutput } from "../commands/CreateWorkloadCommand"; import { CreateWorkloadShareCommandInput, @@ -31,12 +34,18 @@ import { } from "../commands/CreateWorkloadShareCommand"; import { DeleteLensCommandInput, DeleteLensCommandOutput } from "../commands/DeleteLensCommand"; import { DeleteLensShareCommandInput, DeleteLensShareCommandOutput } from "../commands/DeleteLensShareCommand"; +import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "../commands/DeleteProfileCommand"; +import { DeleteProfileShareCommandInput, DeleteProfileShareCommandOutput } from "../commands/DeleteProfileShareCommand"; import { DeleteWorkloadCommandInput, DeleteWorkloadCommandOutput } from "../commands/DeleteWorkloadCommand"; import { DeleteWorkloadShareCommandInput, DeleteWorkloadShareCommandOutput, } from "../commands/DeleteWorkloadShareCommand"; import { DisassociateLensesCommandInput, DisassociateLensesCommandOutput } from "../commands/DisassociateLensesCommand"; +import { + DisassociateProfilesCommandInput, + DisassociateProfilesCommandOutput, +} from "../commands/DisassociateProfilesCommand"; import { ExportLensCommandInput, ExportLensCommandOutput } from "../commands/ExportLensCommand"; import { GetAnswerCommandInput, GetAnswerCommandOutput } from "../commands/GetAnswerCommand"; import { @@ -54,6 +63,8 @@ import { GetLensVersionDifferenceCommandOutput, } from "../commands/GetLensVersionDifferenceCommand"; import { GetMilestoneCommandInput, GetMilestoneCommandOutput } from "../commands/GetMilestoneCommand"; +import { GetProfileCommandInput, GetProfileCommandOutput } from "../commands/GetProfileCommand"; +import { GetProfileTemplateCommandInput, GetProfileTemplateCommandOutput } from "../commands/GetProfileTemplateCommand"; import { GetWorkloadCommandInput, GetWorkloadCommandOutput } from "../commands/GetWorkloadCommand"; import { ImportLensCommandInput, ImportLensCommandOutput } from "../commands/ImportLensCommand"; import { ListAnswersCommandInput, ListAnswersCommandOutput } from "../commands/ListAnswersCommand"; @@ -68,6 +79,12 @@ import { ListLensReviewsCommandInput, ListLensReviewsCommandOutput } from "../co import { ListLensSharesCommandInput, ListLensSharesCommandOutput } from "../commands/ListLensSharesCommand"; import { ListMilestonesCommandInput, ListMilestonesCommandOutput } from "../commands/ListMilestonesCommand"; import { ListNotificationsCommandInput, ListNotificationsCommandOutput } from "../commands/ListNotificationsCommand"; +import { + ListProfileNotificationsCommandInput, + ListProfileNotificationsCommandOutput, +} from "../commands/ListProfileNotificationsCommand"; +import { ListProfilesCommandInput, ListProfilesCommandOutput } from "../commands/ListProfilesCommand"; +import { ListProfileSharesCommandInput, ListProfileSharesCommandOutput } from "../commands/ListProfileSharesCommand"; import { ListShareInvitationsCommandInput, ListShareInvitationsCommandOutput, @@ -86,6 +103,7 @@ import { UpdateGlobalSettingsCommandOutput, } from "../commands/UpdateGlobalSettingsCommand"; import { UpdateLensReviewCommandInput, UpdateLensReviewCommandOutput } from "../commands/UpdateLensReviewCommand"; +import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "../commands/UpdateProfileCommand"; import { UpdateShareInvitationCommandInput, UpdateShareInvitationCommandOutput, @@ -96,6 +114,10 @@ import { UpdateWorkloadShareCommandOutput, } from "../commands/UpdateWorkloadShareCommand"; import { UpgradeLensReviewCommandInput, UpgradeLensReviewCommandOutput } from "../commands/UpgradeLensReviewCommand"; +import { + UpgradeProfileVersionCommandInput, + UpgradeProfileVersionCommandOutput, +} from "../commands/UpgradeProfileVersionCommand"; import { AccessDeniedException, CheckDetail, @@ -110,6 +132,10 @@ import { LensSummary, Milestone, MilestoneSummary, + Profile, + ProfileQuestionUpdate, + ProfileSummary, + ProfileTemplate, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, @@ -151,6 +177,37 @@ export const se_AssociateLensesCommand = async ( }); }; +/** + * serializeAws_restJson1AssociateProfilesCommand + */ +export const se_AssociateProfilesCommand = async ( + input: AssociateProfilesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/associateProfiles"; + resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); + let body: any; + body = JSON.stringify( + take(input, { + ProfileArns: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1CreateLensShareCommand */ @@ -248,6 +305,71 @@ export const se_CreateMilestoneCommand = async ( }); }; +/** + * serializeAws_restJson1CreateProfileCommand + */ +export const se_CreateProfileCommand = async ( + input: CreateProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profiles"; + let body: any; + body = JSON.stringify( + take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + ProfileDescription: [], + ProfileName: [], + ProfileQuestions: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateProfileShareCommand + */ +export const se_CreateProfileShareCommand = async ( + input: CreateProfileShareCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profiles/{ProfileArn}/shares"; + resolvedPath = __resolvedPath(resolvedPath, input, "ProfileArn", () => input.ProfileArn!, "{ProfileArn}", false); + let body: any; + body = JSON.stringify( + take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + SharedWith: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1CreateWorkloadCommand */ @@ -277,6 +399,7 @@ export const se_CreateWorkloadCommand = async ( NonAwsRegions: (_) => _json(_), Notes: [], PillarPriorities: (_) => _json(_), + ProfileArns: (_) => _json(_), ReviewOwner: [], Tags: (_) => _json(_), WorkloadName: [], @@ -383,6 +506,62 @@ export const se_DeleteLensShareCommand = async ( }); }; +/** + * serializeAws_restJson1DeleteProfileCommand + */ +export const se_DeleteProfileCommand = async ( + input: DeleteProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profiles/{ProfileArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "ProfileArn", () => input.ProfileArn!, "{ProfileArn}", false); + const query: any = map({ + ClientRequestToken: [, __expectNonNull(input.ClientRequestToken!, `ClientRequestToken`)], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteProfileShareCommand + */ +export const se_DeleteProfileShareCommand = async ( + input: DeleteProfileShareCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profiles/{ProfileArn}/shares/{ShareId}"; + resolvedPath = __resolvedPath(resolvedPath, input, "ShareId", () => input.ShareId!, "{ShareId}", false); + resolvedPath = __resolvedPath(resolvedPath, input, "ProfileArn", () => input.ProfileArn!, "{ProfileArn}", false); + const query: any = map({ + ClientRequestToken: [, __expectNonNull(input.ClientRequestToken!, `ClientRequestToken`)], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + /** * serializeAws_restJson1DeleteWorkloadCommand */ @@ -471,6 +650,38 @@ export const se_DisassociateLensesCommand = async ( }); }; +/** + * serializeAws_restJson1DisassociateProfilesCommand + */ +export const se_DisassociateProfilesCommand = async ( + input: DisassociateProfilesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workloads/{WorkloadId}/disassociateProfiles"; + resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); + let body: any; + body = JSON.stringify( + take(input, { + ProfileArns: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1ExportLensCommand */ @@ -711,6 +922,58 @@ export const se_GetMilestoneCommand = async ( }); }; +/** + * serializeAws_restJson1GetProfileCommand + */ +export const se_GetProfileCommand = async ( + input: GetProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profiles/{ProfileArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "ProfileArn", () => input.ProfileArn!, "{ProfileArn}", false); + const query: any = map({ + ProfileVersion: [, input.ProfileVersion!], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1GetProfileTemplateCommand + */ +export const se_GetProfileTemplateCommand = async ( + input: GetProfileTemplateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profileTemplate"; + let body: any; + body = ""; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1GetWorkloadCommand */ @@ -785,6 +1048,7 @@ export const se_ListAnswersCommand = async ( MilestoneNumber: [() => input.MilestoneNumber !== void 0, () => input.MilestoneNumber!.toString()], NextToken: [, input.NextToken!], MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], + QuestionPriority: [, input.QuestionPriority!], }); let body: any; return new __HttpRequest({ @@ -920,6 +1184,7 @@ export const se_ListLensReviewImprovementsCommand = async ( MilestoneNumber: [() => input.MilestoneNumber !== void 0, () => input.MilestoneNumber!.toString()], NextToken: [, input.NextToken!], MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], + QuestionPriority: [, input.QuestionPriority!], }); let body: any; return new __HttpRequest({ @@ -1060,19 +1325,17 @@ export const se_ListNotificationsCommand = async ( }; /** - * serializeAws_restJson1ListShareInvitationsCommand + * serializeAws_restJson1ListProfileNotificationsCommand */ -export const se_ListShareInvitationsCommand = async ( - input: ListShareInvitationsCommandInput, +export const se_ListProfileNotificationsCommand = async ( + input: ListProfileNotificationsCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations"; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profileNotifications"; const query: any = map({ - WorkloadNamePrefix: [, input.WorkloadNamePrefix!], - LensNamePrefix: [, input.LensNamePrefix!], - ShareResourceType: [, input.ShareResourceType!], + WorkloadId: [, input.WorkloadId!], NextToken: [, input.NextToken!], MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], }); @@ -1090,16 +1353,21 @@ export const se_ListShareInvitationsCommand = async ( }; /** - * serializeAws_restJson1ListTagsForResourceCommand + * serializeAws_restJson1ListProfilesCommand */ -export const se_ListTagsForResourceCommand = async ( - input: ListTagsForResourceCommandInput, +export const se_ListProfilesCommand = async ( + input: ListProfilesCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}"; - resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadArn", () => input.WorkloadArn!, "{WorkloadArn}", false); + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profileSummaries"; + const query: any = map({ + ProfileNamePrefix: [, input.ProfileNamePrefix!], + ProfileOwnerType: [, input.ProfileOwnerType!], + NextToken: [, input.NextToken!], + MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], + }); let body: any; return new __HttpRequest({ protocol, @@ -1108,58 +1376,59 @@ export const se_ListTagsForResourceCommand = async ( method: "GET", headers, path: resolvedPath, + query, body, }); }; /** - * serializeAws_restJson1ListWorkloadsCommand + * serializeAws_restJson1ListProfileSharesCommand */ -export const se_ListWorkloadsCommand = async ( - input: ListWorkloadsCommandInput, +export const se_ListProfileSharesCommand = async ( + input: ListProfileSharesCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers: any = { - "content-type": "application/json", - }; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloadsSummaries"; + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profiles/{ProfileArn}/shares"; + resolvedPath = __resolvedPath(resolvedPath, input, "ProfileArn", () => input.ProfileArn!, "{ProfileArn}", false); + const query: any = map({ + SharedWithPrefix: [, input.SharedWithPrefix!], + NextToken: [, input.NextToken!], + MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], + Status: [, input.Status!], + }); let body: any; - body = JSON.stringify( - take(input, { - MaxResults: [], - NextToken: [], - WorkloadNamePrefix: [], - }) - ); return new __HttpRequest({ protocol, hostname, port, - method: "POST", + method: "GET", headers, path: resolvedPath, + query, body, }); }; /** - * serializeAws_restJson1ListWorkloadSharesCommand + * serializeAws_restJson1ListShareInvitationsCommand */ -export const se_ListWorkloadSharesCommand = async ( - input: ListWorkloadSharesCommandInput, +export const se_ListShareInvitationsCommand = async ( + input: ListShareInvitationsCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - let resolvedPath = - `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares"; - resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations"; const query: any = map({ - SharedWithPrefix: [, input.SharedWithPrefix!], + WorkloadNamePrefix: [, input.WorkloadNamePrefix!], + LensNamePrefix: [, input.LensNamePrefix!], + ShareResourceType: [, input.ShareResourceType!], NextToken: [, input.NextToken!], MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], - Status: [, input.Status!], + ProfileNamePrefix: [, input.ProfileNamePrefix!], }); let body: any; return new __HttpRequest({ @@ -1175,9 +1444,94 @@ export const se_ListWorkloadSharesCommand = async ( }; /** - * serializeAws_restJson1TagResourceCommand + * serializeAws_restJson1ListTagsForResourceCommand */ -export const se_TagResourceCommand = async ( +export const se_ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadArn", () => input.WorkloadArn!, "{WorkloadArn}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1ListWorkloadsCommand + */ +export const se_ListWorkloadsCommand = async ( + input: ListWorkloadsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloadsSummaries"; + let body: any; + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + WorkloadNamePrefix: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1ListWorkloadSharesCommand + */ +export const se_ListWorkloadSharesCommand = async ( + input: ListWorkloadSharesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares"; + resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); + const query: any = map({ + SharedWithPrefix: [, input.SharedWithPrefix!], + NextToken: [, input.NextToken!], + MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], + Status: [, input.Status!], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1TagResourceCommand + */ +export const se_TagResourceCommand = async ( input: TagResourceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { @@ -1336,6 +1690,37 @@ export const se_UpdateLensReviewCommand = async ( }); }; +/** + * serializeAws_restJson1UpdateProfileCommand + */ +export const se_UpdateProfileCommand = async ( + input: UpdateProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profiles/{ProfileArn}"; + resolvedPath = __resolvedPath(resolvedPath, input, "ProfileArn", () => input.ProfileArn!, "{ProfileArn}", false); + let body: any; + body = JSON.stringify( + take(input, { + ProfileDescription: [], + ProfileQuestions: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1UpdateShareInvitationCommand */ @@ -1485,6 +1870,40 @@ export const se_UpgradeLensReviewCommand = async ( }); }; +/** + * serializeAws_restJson1UpgradeProfileVersionCommand + */ +export const se_UpgradeProfileVersionCommand = async ( + input: UpgradeProfileVersionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/workloads/{WorkloadId}/profiles/{ProfileArn}/upgrade"; + resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); + resolvedPath = __resolvedPath(resolvedPath, input, "ProfileArn", () => input.ProfileArn!, "{ProfileArn}", false); + let body: any; + body = JSON.stringify( + take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + MilestoneName: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + /** * deserializeAws_restJson1AssociateLensesCommand */ @@ -1543,6 +1962,64 @@ const de_AssociateLensesCommandError = async ( } }; +/** + * deserializeAws_restJson1AssociateProfilesCommand + */ +export const de_AssociateProfilesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_AssociateProfilesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1AssociateProfilesCommandError + */ +const de_AssociateProfilesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1CreateLensShareCommand */ @@ -1741,34 +2218,34 @@ const de_CreateMilestoneCommandError = async ( }; /** - * deserializeAws_restJson1CreateWorkloadCommand + * deserializeAws_restJson1CreateProfileCommand */ -export const de_CreateWorkloadCommand = async ( +export const de_CreateProfileCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CreateWorkloadCommandError(output, context); + return de_CreateProfileCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - WorkloadArn: __expectString, - WorkloadId: __expectString, + ProfileArn: __expectString, + ProfileVersion: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1CreateWorkloadCommandError + * deserializeAws_restJson1CreateProfileCommandError */ -const de_CreateWorkloadCommandError = async ( +const de_CreateProfileCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -1784,9 +2261,6 @@ const de_CreateWorkloadCommandError = async ( case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.wellarchitected#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ServiceQuotaExceededException": case "com.amazonaws.wellarchitected#ServiceQuotaExceededException": throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); @@ -1807,34 +2281,34 @@ const de_CreateWorkloadCommandError = async ( }; /** - * deserializeAws_restJson1CreateWorkloadShareCommand + * deserializeAws_restJson1CreateProfileShareCommand */ -export const de_CreateWorkloadShareCommand = async ( +export const de_CreateProfileShareCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CreateWorkloadShareCommandError(output, context); + return de_CreateProfileShareCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { + ProfileArn: __expectString, ShareId: __expectString, - WorkloadId: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1CreateWorkloadShareCommandError + * deserializeAws_restJson1CreateProfileShareCommandError */ -const de_CreateWorkloadShareCommandError = async ( +const de_CreateProfileShareCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -1873,29 +2347,34 @@ const de_CreateWorkloadShareCommandError = async ( }; /** - * deserializeAws_restJson1DeleteLensCommand + * deserializeAws_restJson1CreateWorkloadCommand */ -export const de_DeleteLensCommand = async ( +export const de_CreateWorkloadCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_DeleteLensCommandError(output, context); + return de_CreateWorkloadCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + WorkloadArn: __expectString, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1DeleteLensCommandError + * deserializeAws_restJson1CreateWorkloadCommandError */ -const de_DeleteLensCommandError = async ( +const de_CreateWorkloadCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -1914,6 +2393,9 @@ const de_DeleteLensCommandError = async ( case "ResourceNotFoundException": case "com.amazonaws.wellarchitected#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.wellarchitected#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -1931,29 +2413,34 @@ const de_DeleteLensCommandError = async ( }; /** - * deserializeAws_restJson1DeleteLensShareCommand + * deserializeAws_restJson1CreateWorkloadShareCommand */ -export const de_DeleteLensShareCommand = async ( +export const de_CreateWorkloadShareCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_DeleteLensShareCommandError(output, context); + return de_CreateWorkloadShareCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + ShareId: __expectString, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1DeleteLensShareCommandError + * deserializeAws_restJson1CreateWorkloadShareCommandError */ -const de_DeleteLensShareCommandError = async ( +const de_CreateWorkloadShareCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -1972,7 +2459,242 @@ const de_DeleteLensShareCommandError = async ( case "ResourceNotFoundException": case "com.amazonaws.wellarchitected#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "ThrottlingException": + case "ServiceQuotaExceededException": + case "com.amazonaws.wellarchitected#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteLensCommand + */ +export const de_DeleteLensCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteLensCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteLensCommandError + */ +const de_DeleteLensCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteLensShareCommand + */ +export const de_DeleteLensShareCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteLensShareCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteLensShareCommandError + */ +const de_DeleteLensShareCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteProfileCommand + */ +export const de_DeleteProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteProfileCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteProfileCommandError + */ +const de_DeleteProfileCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteProfileShareCommand + */ +export const de_DeleteProfileShareCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteProfileShareCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteProfileShareCommandError + */ +const de_DeleteProfileShareCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); case "ValidationException": @@ -2124,10 +2846,374 @@ export const de_DisassociateLensesCommand = async ( /** * deserializeAws_restJson1DisassociateLensesCommandError */ -const de_DisassociateLensesCommandError = async ( +const de_DisassociateLensesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DisassociateProfilesCommand + */ +export const de_DisassociateProfilesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DisassociateProfilesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DisassociateProfilesCommandError + */ +const de_DisassociateProfilesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ExportLensCommand + */ +export const de_ExportLensCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ExportLensCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + LensJSON: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ExportLensCommandError + */ +const de_ExportLensCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetAnswerCommand + */ +export const de_GetAnswerCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetAnswerCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Answer: _json, + LensAlias: __expectString, + LensArn: __expectString, + MilestoneNumber: __expectInt32, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetAnswerCommandError + */ +const de_GetAnswerCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetConsolidatedReportCommand + */ +export const de_GetConsolidatedReportCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetConsolidatedReportCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Base64String: __expectString, + Metrics: (_) => de_ConsolidatedReportMetrics(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetConsolidatedReportCommandError + */ +const de_GetConsolidatedReportCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetLensCommand + */ +export const de_GetLensCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetLensCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Lens: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetLensCommandError + */ +const de_GetLensCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetLensReviewCommand + */ +export const de_GetLensReviewCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetLensReviewCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + LensReview: (_) => de_LensReview(_, context), + MilestoneNumber: __expectInt32, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetLensReviewCommandError + */ +const de_GetLensReviewCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2137,9 +3223,6 @@ const de_DisassociateLensesCommandError = async ( case "AccessDeniedException": case "com.amazonaws.wellarchitected#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "ConflictException": - case "com.amazonaws.wellarchitected#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); @@ -2163,33 +3246,35 @@ const de_DisassociateLensesCommandError = async ( }; /** - * deserializeAws_restJson1ExportLensCommand + * deserializeAws_restJson1GetLensReviewReportCommand */ -export const de_ExportLensCommand = async ( +export const de_GetLensReviewReportCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ExportLensCommandError(output, context); + return de_GetLensReviewReportCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - LensJSON: __expectString, + LensReviewReport: _json, + MilestoneNumber: __expectInt32, + WorkloadId: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1ExportLensCommandError + * deserializeAws_restJson1GetLensReviewReportCommandError */ -const de_ExportLensCommandError = async ( +const de_GetLensReviewReportCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2222,37 +3307,38 @@ const de_ExportLensCommandError = async ( }; /** - * deserializeAws_restJson1GetAnswerCommand + * deserializeAws_restJson1GetLensVersionDifferenceCommand */ -export const de_GetAnswerCommand = async ( +export const de_GetLensVersionDifferenceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_GetAnswerCommandError(output, context); + return de_GetLensVersionDifferenceCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - Answer: _json, + BaseLensVersion: __expectString, + LatestLensVersion: __expectString, LensAlias: __expectString, LensArn: __expectString, - MilestoneNumber: __expectInt32, - WorkloadId: __expectString, + TargetLensVersion: __expectString, + VersionDifferences: _json, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1GetAnswerCommandError + * deserializeAws_restJson1GetLensVersionDifferenceCommandError */ -const de_GetAnswerCommandError = async ( +const de_GetLensVersionDifferenceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2285,35 +3371,34 @@ const de_GetAnswerCommandError = async ( }; /** - * deserializeAws_restJson1GetConsolidatedReportCommand + * deserializeAws_restJson1GetMilestoneCommand */ -export const de_GetConsolidatedReportCommand = async ( +export const de_GetMilestoneCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_GetConsolidatedReportCommandError(output, context); + return de_GetMilestoneCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - Base64String: __expectString, - Metrics: (_) => de_ConsolidatedReportMetrics(_, context), - NextToken: __expectString, + Milestone: (_) => de_Milestone(_, context), + WorkloadId: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1GetConsolidatedReportCommandError + * deserializeAws_restJson1GetMilestoneCommandError */ -const de_GetConsolidatedReportCommandError = async ( +const de_GetMilestoneCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2323,12 +3408,12 @@ const de_GetConsolidatedReportCommandError = async ( case "AccessDeniedException": case "com.amazonaws.wellarchitected#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "ConflictException": - case "com.amazonaws.wellarchitected#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -2346,33 +3431,33 @@ const de_GetConsolidatedReportCommandError = async ( }; /** - * deserializeAws_restJson1GetLensCommand + * deserializeAws_restJson1GetProfileCommand */ -export const de_GetLensCommand = async ( +export const de_GetProfileCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_GetLensCommandError(output, context); + return de_GetProfileCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - Lens: _json, + Profile: (_) => de_Profile(_, context), }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1GetLensCommandError + * deserializeAws_restJson1GetProfileCommandError */ -const de_GetLensCommandError = async ( +const de_GetProfileCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2405,35 +3490,33 @@ const de_GetLensCommandError = async ( }; /** - * deserializeAws_restJson1GetLensReviewCommand + * deserializeAws_restJson1GetProfileTemplateCommand */ -export const de_GetLensReviewCommand = async ( +export const de_GetProfileTemplateCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_GetLensReviewCommandError(output, context); + return de_GetProfileTemplateCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - LensReview: (_) => de_LensReview(_, context), - MilestoneNumber: __expectInt32, - WorkloadId: __expectString, + ProfileTemplate: (_) => de_ProfileTemplate(_, context), }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1GetLensReviewCommandError + * deserializeAws_restJson1GetProfileTemplateCommandError */ -const de_GetLensReviewCommandError = async ( +const de_GetProfileTemplateCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2466,35 +3549,33 @@ const de_GetLensReviewCommandError = async ( }; /** - * deserializeAws_restJson1GetLensReviewReportCommand + * deserializeAws_restJson1GetWorkloadCommand */ -export const de_GetLensReviewReportCommand = async ( +export const de_GetWorkloadCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_GetLensReviewReportCommandError(output, context); + return de_GetWorkloadCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - LensReviewReport: _json, - MilestoneNumber: __expectInt32, - WorkloadId: __expectString, + Workload: (_) => de_Workload(_, context), }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1GetLensReviewReportCommandError + * deserializeAws_restJson1GetWorkloadCommandError */ -const de_GetLensReviewReportCommandError = async ( +const de_GetWorkloadCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2527,38 +3608,34 @@ const de_GetLensReviewReportCommandError = async ( }; /** - * deserializeAws_restJson1GetLensVersionDifferenceCommand + * deserializeAws_restJson1ImportLensCommand */ -export const de_GetLensVersionDifferenceCommand = async ( +export const de_ImportLensCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_GetLensVersionDifferenceCommandError(output, context); + return de_ImportLensCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - BaseLensVersion: __expectString, - LatestLensVersion: __expectString, - LensAlias: __expectString, LensArn: __expectString, - TargetLensVersion: __expectString, - VersionDifferences: _json, + Status: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1GetLensVersionDifferenceCommandError + * deserializeAws_restJson1ImportLensCommandError */ -const de_GetLensVersionDifferenceCommandError = async ( +const de_ImportLensCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2568,12 +3645,18 @@ const de_GetLensVersionDifferenceCommandError = async ( case "AccessDeniedException": case "com.amazonaws.wellarchitected#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); case "ResourceNotFoundException": case "com.amazonaws.wellarchitected#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.wellarchitected#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -2591,21 +3674,25 @@ const de_GetLensVersionDifferenceCommandError = async ( }; /** - * deserializeAws_restJson1GetMilestoneCommand + * deserializeAws_restJson1ListAnswersCommand */ -export const de_GetMilestoneCommand = async ( +export const de_ListAnswersCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_GetMilestoneCommandError(output, context); + return de_ListAnswersCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - Milestone: (_) => de_Milestone(_, context), + AnswerSummaries: _json, + LensAlias: __expectString, + LensArn: __expectString, + MilestoneNumber: __expectInt32, + NextToken: __expectString, WorkloadId: __expectString, }); Object.assign(contents, doc); @@ -2613,12 +3700,12 @@ export const de_GetMilestoneCommand = async ( }; /** - * deserializeAws_restJson1GetMilestoneCommandError + * deserializeAws_restJson1ListAnswersCommandError */ -const de_GetMilestoneCommandError = async ( +const de_ListAnswersCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2651,33 +3738,34 @@ const de_GetMilestoneCommandError = async ( }; /** - * deserializeAws_restJson1GetWorkloadCommand + * deserializeAws_restJson1ListCheckDetailsCommand */ -export const de_GetWorkloadCommand = async ( +export const de_ListCheckDetailsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_GetWorkloadCommandError(output, context); + return de_ListCheckDetailsCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - Workload: (_) => de_Workload(_, context), + CheckDetails: (_) => de_CheckDetails(_, context), + NextToken: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1GetWorkloadCommandError + * deserializeAws_restJson1ListCheckDetailsCommandError */ -const de_GetWorkloadCommandError = async ( +const de_ListCheckDetailsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2710,34 +3798,34 @@ const de_GetWorkloadCommandError = async ( }; /** - * deserializeAws_restJson1ImportLensCommand + * deserializeAws_restJson1ListCheckSummariesCommand */ -export const de_ImportLensCommand = async ( +export const de_ListCheckSummariesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ImportLensCommandError(output, context); + return de_ListCheckSummariesCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - LensArn: __expectString, - Status: __expectString, + CheckSummaries: (_) => de_CheckSummaries(_, context), + NextToken: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1ImportLensCommandError + * deserializeAws_restJson1ListCheckSummariesCommandError */ -const de_ImportLensCommandError = async ( +const de_ListCheckSummariesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2747,18 +3835,12 @@ const de_ImportLensCommandError = async ( case "AccessDeniedException": case "com.amazonaws.wellarchitected#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "ConflictException": - case "com.amazonaws.wellarchitected#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); case "ResourceNotFoundException": case "com.amazonaws.wellarchitected#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "ServiceQuotaExceededException": - case "com.amazonaws.wellarchitected#ServiceQuotaExceededException": - throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -2776,38 +3858,34 @@ const de_ImportLensCommandError = async ( }; /** - * deserializeAws_restJson1ListAnswersCommand + * deserializeAws_restJson1ListLensesCommand */ -export const de_ListAnswersCommand = async ( +export const de_ListLensesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListAnswersCommandError(output, context); + return de_ListLensesCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - AnswerSummaries: _json, - LensAlias: __expectString, - LensArn: __expectString, - MilestoneNumber: __expectInt32, + LensSummaries: (_) => de_LensSummaries(_, context), NextToken: __expectString, - WorkloadId: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1ListAnswersCommandError + * deserializeAws_restJson1ListLensesCommandError */ -const de_ListAnswersCommandError = async ( +const de_ListLensesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2820,9 +3898,6 @@ const de_ListAnswersCommandError = async ( case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.wellarchitected#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -2840,34 +3915,38 @@ const de_ListAnswersCommandError = async ( }; /** - * deserializeAws_restJson1ListCheckDetailsCommand + * deserializeAws_restJson1ListLensReviewImprovementsCommand */ -export const de_ListCheckDetailsCommand = async ( +export const de_ListLensReviewImprovementsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListCheckDetailsCommandError(output, context); + return de_ListLensReviewImprovementsCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - CheckDetails: (_) => de_CheckDetails(_, context), + ImprovementSummaries: _json, + LensAlias: __expectString, + LensArn: __expectString, + MilestoneNumber: __expectInt32, NextToken: __expectString, + WorkloadId: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1ListCheckDetailsCommandError + * deserializeAws_restJson1ListLensReviewImprovementsCommandError */ -const de_ListCheckDetailsCommandError = async ( +const de_ListLensReviewImprovementsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2900,34 +3979,36 @@ const de_ListCheckDetailsCommandError = async ( }; /** - * deserializeAws_restJson1ListCheckSummariesCommand + * deserializeAws_restJson1ListLensReviewsCommand */ -export const de_ListCheckSummariesCommand = async ( +export const de_ListLensReviewsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListCheckSummariesCommandError(output, context); + return de_ListLensReviewsCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - CheckSummaries: (_) => de_CheckSummaries(_, context), + LensReviewSummaries: (_) => de_LensReviewSummaries(_, context), + MilestoneNumber: __expectInt32, NextToken: __expectString, + WorkloadId: __expectString, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1ListCheckSummariesCommandError + * deserializeAws_restJson1ListLensReviewsCommandError */ -const de_ListCheckSummariesCommandError = async ( +const de_ListLensReviewsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2960,21 +4041,21 @@ const de_ListCheckSummariesCommandError = async ( }; /** - * deserializeAws_restJson1ListLensesCommand + * deserializeAws_restJson1ListLensSharesCommand */ -export const de_ListLensesCommand = async ( +export const de_ListLensSharesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListLensesCommandError(output, context); + return de_ListLensSharesCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - LensSummaries: (_) => de_LensSummaries(_, context), + LensShareSummaries: _json, NextToken: __expectString, }); Object.assign(contents, doc); @@ -2982,12 +4063,12 @@ export const de_ListLensesCommand = async ( }; /** - * deserializeAws_restJson1ListLensesCommandError + * deserializeAws_restJson1ListLensSharesCommandError */ -const de_ListLensesCommandError = async ( +const de_ListLensSharesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -3000,6 +4081,9 @@ const de_ListLensesCommandError = async ( case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -3017,24 +4101,21 @@ const de_ListLensesCommandError = async ( }; /** - * deserializeAws_restJson1ListLensReviewImprovementsCommand + * deserializeAws_restJson1ListMilestonesCommand */ -export const de_ListLensReviewImprovementsCommand = async ( +export const de_ListMilestonesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListLensReviewImprovementsCommandError(output, context); + return de_ListMilestonesCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - ImprovementSummaries: _json, - LensAlias: __expectString, - LensArn: __expectString, - MilestoneNumber: __expectInt32, + MilestoneSummaries: (_) => de_MilestoneSummaries(_, context), NextToken: __expectString, WorkloadId: __expectString, }); @@ -3043,12 +4124,12 @@ export const de_ListLensReviewImprovementsCommand = async ( }; /** - * deserializeAws_restJson1ListLensReviewImprovementsCommandError + * deserializeAws_restJson1ListMilestonesCommandError */ -const de_ListLensReviewImprovementsCommandError = async ( +const de_ListMilestonesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -3081,36 +4162,34 @@ const de_ListLensReviewImprovementsCommandError = async ( }; /** - * deserializeAws_restJson1ListLensReviewsCommand + * deserializeAws_restJson1ListNotificationsCommand */ -export const de_ListLensReviewsCommand = async ( +export const de_ListNotificationsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListLensReviewsCommandError(output, context); + return de_ListNotificationsCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - LensReviewSummaries: (_) => de_LensReviewSummaries(_, context), - MilestoneNumber: __expectInt32, NextToken: __expectString, - WorkloadId: __expectString, + NotificationSummaries: _json, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1ListLensReviewsCommandError + * deserializeAws_restJson1ListNotificationsCommandError */ -const de_ListLensReviewsCommandError = async ( +const de_ListNotificationsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -3123,9 +4202,6 @@ const de_ListLensReviewsCommandError = async ( case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.wellarchitected#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -3143,34 +4219,34 @@ const de_ListLensReviewsCommandError = async ( }; /** - * deserializeAws_restJson1ListLensSharesCommand + * deserializeAws_restJson1ListProfileNotificationsCommand */ -export const de_ListLensSharesCommand = async ( +export const de_ListProfileNotificationsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListLensSharesCommandError(output, context); + return de_ListProfileNotificationsCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - LensShareSummaries: _json, NextToken: __expectString, + NotificationSummaries: _json, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1ListLensSharesCommandError + * deserializeAws_restJson1ListProfileNotificationsCommandError */ -const de_ListLensSharesCommandError = async ( +const de_ListProfileNotificationsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -3183,9 +4259,6 @@ const de_ListLensSharesCommandError = async ( case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.wellarchitected#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -3203,35 +4276,34 @@ const de_ListLensSharesCommandError = async ( }; /** - * deserializeAws_restJson1ListMilestonesCommand + * deserializeAws_restJson1ListProfilesCommand */ -export const de_ListMilestonesCommand = async ( +export const de_ListProfilesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListMilestonesCommandError(output, context); + return de_ListProfilesCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { - MilestoneSummaries: (_) => de_MilestoneSummaries(_, context), NextToken: __expectString, - WorkloadId: __expectString, + ProfileSummaries: (_) => de_ProfileSummaries(_, context), }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1ListMilestonesCommandError + * deserializeAws_restJson1ListProfilesCommandError */ -const de_ListMilestonesCommandError = async ( +const de_ListProfilesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -3244,9 +4316,6 @@ const de_ListMilestonesCommandError = async ( case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.wellarchitected#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -3264,14 +4333,14 @@ const de_ListMilestonesCommandError = async ( }; /** - * deserializeAws_restJson1ListNotificationsCommand + * deserializeAws_restJson1ListProfileSharesCommand */ -export const de_ListNotificationsCommand = async ( +export const de_ListProfileSharesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListNotificationsCommandError(output, context); + return de_ListProfileSharesCommandError(output, context); } const contents: any = map({ $metadata: deserializeMetadata(output), @@ -3279,19 +4348,19 @@ export const de_ListNotificationsCommand = async ( const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { NextToken: __expectString, - NotificationSummaries: _json, + ProfileShareSummaries: _json, }); Object.assign(contents, doc); return contents; }; /** - * deserializeAws_restJson1ListNotificationsCommandError + * deserializeAws_restJson1ListProfileSharesCommandError */ -const de_ListNotificationsCommandError = async ( +const de_ListProfileSharesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -3304,6 +4373,9 @@ const de_ListNotificationsCommandError = async ( case "InternalServerException": case "com.amazonaws.wellarchitected#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.wellarchitected#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -3820,6 +4892,68 @@ const de_UpdateLensReviewCommandError = async ( } }; +/** + * deserializeAws_restJson1UpdateProfileCommand + */ +export const de_UpdateProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateProfileCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Profile: (_) => de_Profile(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateProfileCommandError + */ +const de_UpdateProfileCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1UpdateShareInvitationCommand */ @@ -4065,6 +5199,64 @@ const de_UpgradeLensReviewCommandError = async ( } }; +/** + * deserializeAws_restJson1UpgradeProfileVersionCommand + */ +export const de_UpgradeProfileVersionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpgradeProfileVersionCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpgradeProfileVersionCommandError + */ +const de_UpgradeProfileVersionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.wellarchitected#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.wellarchitected#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.wellarchitected#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.wellarchitected#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.wellarchitected#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.wellarchitected#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes @@ -4217,8 +5409,16 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_PillarNotes omitted. +// se_ProfileArns omitted. + +// se_ProfileQuestionUpdate omitted. + +// se_ProfileQuestionUpdates omitted. + // se_SelectedChoices omitted. +// se_SelectedProfileChoiceIds omitted. + // se_TagMap omitted. // se_WorkloadAccountIds omitted. @@ -4235,6 +5435,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_WorkloadPillarPriorities omitted. +// se_WorkloadProfileArns omitted. + // se_WorkloadResourceDefinition omitted. // de_AccountSummary omitted. @@ -4386,6 +5588,8 @@ const de_LensReview = (output: any, context: __SerdeContext): LensReview => { NextToken: __expectString, Notes: __expectString, PillarReviewSummaries: _json, + PrioritizedRiskCounts: _json, + Profiles: _json, RiskCounts: _json, UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), }) as any; @@ -4415,6 +5619,8 @@ const de_LensReviewSummary = (output: any, context: __SerdeContext): LensReviewS LensName: __expectString, LensStatus: __expectString, LensVersion: __expectString, + PrioritizedRiskCounts: _json, + Profiles: _json, RiskCounts: _json, UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), }) as any; @@ -4508,6 +5714,85 @@ const de_MilestoneSummary = (output: any, context: __SerdeContext): MilestoneSum // de_PillarReviewSummary omitted. +/** + * deserializeAws_restJson1Profile + */ +const de_Profile = (output: any, context: __SerdeContext): Profile => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Owner: __expectString, + ProfileArn: __expectString, + ProfileDescription: __expectString, + ProfileName: __expectString, + ProfileQuestions: _json, + ProfileVersion: __expectString, + ShareInvitationId: __expectString, + Tags: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_ProfileChoice omitted. + +// de_ProfileNotificationSummaries omitted. + +// de_ProfileNotificationSummary omitted. + +// de_ProfileQuestion omitted. + +// de_ProfileQuestionChoices omitted. + +// de_ProfileQuestions omitted. + +// de_ProfileShareSummaries omitted. + +// de_ProfileShareSummary omitted. + +/** + * deserializeAws_restJson1ProfileSummaries + */ +const de_ProfileSummaries = (output: any, context: __SerdeContext): ProfileSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ProfileSummary(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1ProfileSummary + */ +const de_ProfileSummary = (output: any, context: __SerdeContext): ProfileSummary => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Owner: __expectString, + ProfileArn: __expectString, + ProfileDescription: __expectString, + ProfileName: __expectString, + ProfileVersion: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +/** + * deserializeAws_restJson1ProfileTemplate + */ +const de_ProfileTemplate = (output: any, context: __SerdeContext): ProfileTemplate => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TemplateName: __expectString, + TemplateQuestions: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_ProfileTemplateChoice omitted. + +// de_ProfileTemplateQuestion omitted. + +// de_ProfileTemplateQuestionChoices omitted. + // de_QuestionDifference omitted. // de_QuestionDifferences omitted. @@ -4518,6 +5803,8 @@ const de_MilestoneSummary = (output: any, context: __SerdeContext): MilestoneSum // de_RiskCounts omitted. +// de_SelectedChoiceIds omitted. + // de_SelectedChoices omitted. // de_ShareInvitation omitted. @@ -4528,6 +5815,8 @@ const de_MilestoneSummary = (output: any, context: __SerdeContext): MilestoneSum // de_TagMap omitted. +// de_TemplateQuestions omitted. + // de_Urls omitted. // de_ValidationExceptionField omitted. @@ -4557,6 +5846,8 @@ const de_Workload = (output: any, context: __SerdeContext): Workload => { Notes: __expectString, Owner: __expectString, PillarPriorities: _json, + PrioritizedRiskCounts: _json, + Profiles: _json, ReviewOwner: __expectString, ReviewRestrictionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), RiskCounts: _json, @@ -4583,6 +5874,10 @@ const de_Workload = (output: any, context: __SerdeContext): Workload => { // de_WorkloadPillarPriorities omitted. +// de_WorkloadProfile omitted. + +// de_WorkloadProfiles omitted. + // de_WorkloadResourceDefinition omitted. // de_WorkloadShare omitted. @@ -4611,6 +5906,8 @@ const de_WorkloadSummary = (output: any, context: __SerdeContext): WorkloadSumma ImprovementStatus: __expectString, Lenses: _json, Owner: __expectString, + PrioritizedRiskCounts: _json, + Profiles: _json, RiskCounts: _json, UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), WorkloadArn: __expectString,