@aws-sdk/client-wellarchitected 3.301.0 → 3.306.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +8 -0
  2. package/dist-cjs/WellArchitected.js +15 -0
  3. package/dist-cjs/commands/GetConsolidatedReportCommand.js +45 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/endpoint/ruleset.js +3 -3
  6. package/dist-cjs/models/models_0.js +132 -148
  7. package/dist-cjs/pagination/GetConsolidatedReportPaginator.js +29 -0
  8. package/dist-cjs/pagination/index.js +1 -0
  9. package/dist-cjs/protocols/Aws_restJson1.js +177 -2
  10. package/dist-es/WellArchitected.js +15 -0
  11. package/dist-es/commands/GetConsolidatedReportCommand.js +41 -0
  12. package/dist-es/commands/index.js +1 -0
  13. package/dist-es/endpoint/ruleset.js +3 -3
  14. package/dist-es/models/models_0.js +131 -147
  15. package/dist-es/pagination/GetConsolidatedReportPaginator.js +25 -0
  16. package/dist-es/pagination/index.js +1 -0
  17. package/dist-es/protocols/Aws_restJson1.js +173 -0
  18. package/dist-types/WellArchitected.d.ts +69 -43
  19. package/dist-types/WellArchitectedClient.d.ts +3 -3
  20. package/dist-types/commands/AssociateLensesCommand.d.ts +3 -3
  21. package/dist-types/commands/CreateLensShareCommand.d.ts +9 -3
  22. package/dist-types/commands/CreateLensVersionCommand.d.ts +6 -4
  23. package/dist-types/commands/CreateMilestoneCommand.d.ts +1 -1
  24. package/dist-types/commands/CreateWorkloadCommand.d.ts +13 -3
  25. package/dist-types/commands/CreateWorkloadShareCommand.d.ts +5 -3
  26. package/dist-types/commands/DeleteLensCommand.d.ts +3 -3
  27. package/dist-types/commands/DeleteLensShareCommand.d.ts +3 -3
  28. package/dist-types/commands/DeleteWorkloadCommand.d.ts +1 -1
  29. package/dist-types/commands/DeleteWorkloadShareCommand.d.ts +1 -1
  30. package/dist-types/commands/DisassociateLensesCommand.d.ts +4 -4
  31. package/dist-types/commands/ExportLensCommand.d.ts +5 -4
  32. package/dist-types/commands/GetConsolidatedReportCommand.d.ts +82 -0
  33. package/dist-types/commands/ImportLensCommand.d.ts +10 -9
  34. package/dist-types/commands/ListAnswersCommand.d.ts +1 -1
  35. package/dist-types/commands/ListLensReviewsCommand.d.ts +1 -1
  36. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  37. package/dist-types/commands/ListWorkloadsCommand.d.ts +1 -1
  38. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  39. package/dist-types/commands/UntagResourceCommand.d.ts +3 -4
  40. package/dist-types/commands/UpdateAnswerCommand.d.ts +1 -1
  41. package/dist-types/commands/UpdateGlobalSettingsCommand.d.ts +1 -1
  42. package/dist-types/commands/UpdateLensReviewCommand.d.ts +2 -2
  43. package/dist-types/commands/UpdateShareInvitationCommand.d.ts +2 -2
  44. package/dist-types/commands/UpdateWorkloadCommand.d.ts +1 -1
  45. package/dist-types/commands/UpdateWorkloadShareCommand.d.ts +1 -1
  46. package/dist-types/commands/UpgradeLensReviewCommand.d.ts +2 -2
  47. package/dist-types/commands/index.d.ts +1 -0
  48. package/dist-types/models/models_0.d.ts +833 -445
  49. package/dist-types/pagination/GetConsolidatedReportPaginator.d.ts +7 -0
  50. package/dist-types/pagination/index.d.ts +1 -0
  51. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  52. package/dist-types/ts3.4/WellArchitected.d.ts +17 -0
  53. package/dist-types/ts3.4/WellArchitectedClient.d.ts +6 -0
  54. package/dist-types/ts3.4/commands/GetConsolidatedReportCommand.d.ts +41 -0
  55. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  56. package/dist-types/ts3.4/models/models_0.d.ts +210 -124
  57. package/dist-types/ts3.4/pagination/GetConsolidatedReportPaginator.d.ts +11 -0
  58. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  59. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  60. package/package.json +34 -34
@@ -12,49 +12,43 @@ export class AccessDeniedException extends __BaseException {
12
12
  this.Message = opts.Message;
13
13
  }
14
14
  }
15
- export var CheckStatus;
16
- (function (CheckStatus) {
17
- CheckStatus["ERROR"] = "ERROR";
18
- CheckStatus["FETCH_FAILED"] = "FETCH_FAILED";
19
- CheckStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
20
- CheckStatus["OKAY"] = "OKAY";
21
- CheckStatus["WARNING"] = "WARNING";
22
- })(CheckStatus || (CheckStatus = {}));
23
- export var AdditionalResourceType;
24
- (function (AdditionalResourceType) {
25
- AdditionalResourceType["HELPFUL_RESOURCE"] = "HELPFUL_RESOURCE";
26
- AdditionalResourceType["IMPROVEMENT_PLAN"] = "IMPROVEMENT_PLAN";
27
- })(AdditionalResourceType || (AdditionalResourceType = {}));
28
- export var ChoiceReason;
29
- (function (ChoiceReason) {
30
- ChoiceReason["ARCHITECTURE_CONSTRAINTS"] = "ARCHITECTURE_CONSTRAINTS";
31
- ChoiceReason["BUSINESS_PRIORITIES"] = "BUSINESS_PRIORITIES";
32
- ChoiceReason["NONE"] = "NONE";
33
- ChoiceReason["OTHER"] = "OTHER";
34
- ChoiceReason["OUT_OF_SCOPE"] = "OUT_OF_SCOPE";
35
- })(ChoiceReason || (ChoiceReason = {}));
36
- export var ChoiceStatus;
37
- (function (ChoiceStatus) {
38
- ChoiceStatus["NOT_APPLICABLE"] = "NOT_APPLICABLE";
39
- ChoiceStatus["SELECTED"] = "SELECTED";
40
- ChoiceStatus["UNSELECTED"] = "UNSELECTED";
41
- })(ChoiceStatus || (ChoiceStatus = {}));
42
- export var AnswerReason;
43
- (function (AnswerReason) {
44
- AnswerReason["ARCHITECTURE_CONSTRAINTS"] = "ARCHITECTURE_CONSTRAINTS";
45
- AnswerReason["BUSINESS_PRIORITIES"] = "BUSINESS_PRIORITIES";
46
- AnswerReason["NONE"] = "NONE";
47
- AnswerReason["OTHER"] = "OTHER";
48
- AnswerReason["OUT_OF_SCOPE"] = "OUT_OF_SCOPE";
49
- })(AnswerReason || (AnswerReason = {}));
50
- export var Risk;
51
- (function (Risk) {
52
- Risk["HIGH"] = "HIGH";
53
- Risk["MEDIUM"] = "MEDIUM";
54
- Risk["NONE"] = "NONE";
55
- Risk["NOT_APPLICABLE"] = "NOT_APPLICABLE";
56
- Risk["UNANSWERED"] = "UNANSWERED";
57
- })(Risk || (Risk = {}));
15
+ export const CheckStatus = {
16
+ ERROR: "ERROR",
17
+ FETCH_FAILED: "FETCH_FAILED",
18
+ NOT_AVAILABLE: "NOT_AVAILABLE",
19
+ OKAY: "OKAY",
20
+ WARNING: "WARNING",
21
+ };
22
+ export const AdditionalResourceType = {
23
+ HELPFUL_RESOURCE: "HELPFUL_RESOURCE",
24
+ IMPROVEMENT_PLAN: "IMPROVEMENT_PLAN",
25
+ };
26
+ export const ChoiceReason = {
27
+ ARCHITECTURE_CONSTRAINTS: "ARCHITECTURE_CONSTRAINTS",
28
+ BUSINESS_PRIORITIES: "BUSINESS_PRIORITIES",
29
+ NONE: "NONE",
30
+ OTHER: "OTHER",
31
+ OUT_OF_SCOPE: "OUT_OF_SCOPE",
32
+ };
33
+ export const ChoiceStatus = {
34
+ NOT_APPLICABLE: "NOT_APPLICABLE",
35
+ SELECTED: "SELECTED",
36
+ UNSELECTED: "UNSELECTED",
37
+ };
38
+ export const AnswerReason = {
39
+ ARCHITECTURE_CONSTRAINTS: "ARCHITECTURE_CONSTRAINTS",
40
+ BUSINESS_PRIORITIES: "BUSINESS_PRIORITIES",
41
+ NONE: "NONE",
42
+ OTHER: "OTHER",
43
+ OUT_OF_SCOPE: "OUT_OF_SCOPE",
44
+ };
45
+ export const Risk = {
46
+ HIGH: "HIGH",
47
+ MEDIUM: "MEDIUM",
48
+ NONE: "NONE",
49
+ NOT_APPLICABLE: "NOT_APPLICABLE",
50
+ UNANSWERED: "UNANSWERED",
51
+ };
58
52
  export class ConflictException extends __BaseException {
59
53
  constructor(opts) {
60
54
  super({
@@ -113,13 +107,12 @@ export class ThrottlingException extends __BaseException {
113
107
  this.ServiceCode = opts.ServiceCode;
114
108
  }
115
109
  }
116
- export var ValidationExceptionReason;
117
- (function (ValidationExceptionReason) {
118
- ValidationExceptionReason["CANNOT_PARSE"] = "CANNOT_PARSE";
119
- ValidationExceptionReason["FIELD_VALIDATION_FAILED"] = "FIELD_VALIDATION_FAILED";
120
- ValidationExceptionReason["OTHER"] = "OTHER";
121
- ValidationExceptionReason["UNKNOWN_OPERATION"] = "UNKNOWN_OPERATION";
122
- })(ValidationExceptionReason || (ValidationExceptionReason = {}));
110
+ export const ValidationExceptionReason = {
111
+ CANNOT_PARSE: "CANNOT_PARSE",
112
+ FIELD_VALIDATION_FAILED: "FIELD_VALIDATION_FAILED",
113
+ OTHER: "OTHER",
114
+ UNKNOWN_OPERATION: "UNKNOWN_OPERATION",
115
+ };
123
116
  export class ValidationException extends __BaseException {
124
117
  constructor(opts) {
125
118
  super({
@@ -135,17 +128,18 @@ export class ValidationException extends __BaseException {
135
128
  this.Fields = opts.Fields;
136
129
  }
137
130
  }
138
- export var CheckProvider;
139
- (function (CheckProvider) {
140
- CheckProvider["TRUSTED_ADVISOR"] = "TRUSTED_ADVISOR";
141
- })(CheckProvider || (CheckProvider = {}));
142
- export var CheckFailureReason;
143
- (function (CheckFailureReason) {
144
- CheckFailureReason["ACCESS_DENIED"] = "ACCESS_DENIED";
145
- CheckFailureReason["ASSUME_ROLE_ERROR"] = "ASSUME_ROLE_ERROR";
146
- CheckFailureReason["PREMIUM_SUPPORT_REQUIRED"] = "PREMIUM_SUPPORT_REQUIRED";
147
- CheckFailureReason["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
148
- })(CheckFailureReason || (CheckFailureReason = {}));
131
+ export const CheckProvider = {
132
+ TRUSTED_ADVISOR: "TRUSTED_ADVISOR",
133
+ };
134
+ export const CheckFailureReason = {
135
+ ACCESS_DENIED: "ACCESS_DENIED",
136
+ ASSUME_ROLE_ERROR: "ASSUME_ROLE_ERROR",
137
+ PREMIUM_SUPPORT_REQUIRED: "PREMIUM_SUPPORT_REQUIRED",
138
+ UNKNOWN_ERROR: "UNKNOWN_ERROR",
139
+ };
140
+ export const MetricType = {
141
+ WORKLOAD: "WORKLOAD",
142
+ };
149
143
  export class ServiceQuotaExceededException extends __BaseException {
150
144
  constructor(opts) {
151
145
  super({
@@ -163,89 +157,79 @@ export class ServiceQuotaExceededException extends __BaseException {
163
157
  this.ServiceCode = opts.ServiceCode;
164
158
  }
165
159
  }
166
- export var TrustedAdvisorIntegrationStatus;
167
- (function (TrustedAdvisorIntegrationStatus) {
168
- TrustedAdvisorIntegrationStatus["DISABLED"] = "DISABLED";
169
- TrustedAdvisorIntegrationStatus["ENABLED"] = "ENABLED";
170
- })(TrustedAdvisorIntegrationStatus || (TrustedAdvisorIntegrationStatus = {}));
171
- export var WorkloadEnvironment;
172
- (function (WorkloadEnvironment) {
173
- WorkloadEnvironment["PREPRODUCTION"] = "PREPRODUCTION";
174
- WorkloadEnvironment["PRODUCTION"] = "PRODUCTION";
175
- })(WorkloadEnvironment || (WorkloadEnvironment = {}));
176
- export var PermissionType;
177
- (function (PermissionType) {
178
- PermissionType["CONTRIBUTOR"] = "CONTRIBUTOR";
179
- PermissionType["READONLY"] = "READONLY";
180
- })(PermissionType || (PermissionType = {}));
181
- export var LensStatusType;
182
- (function (LensStatusType) {
183
- LensStatusType["ALL"] = "ALL";
184
- LensStatusType["DRAFT"] = "DRAFT";
185
- LensStatusType["PUBLISHED"] = "PUBLISHED";
186
- })(LensStatusType || (LensStatusType = {}));
187
- export var DifferenceStatus;
188
- (function (DifferenceStatus) {
189
- DifferenceStatus["DELETED"] = "DELETED";
190
- DifferenceStatus["NEW"] = "NEW";
191
- DifferenceStatus["UPDATED"] = "UPDATED";
192
- })(DifferenceStatus || (DifferenceStatus = {}));
193
- export var LensStatus;
194
- (function (LensStatus) {
195
- LensStatus["CURRENT"] = "CURRENT";
196
- LensStatus["DELETED"] = "DELETED";
197
- LensStatus["DEPRECATED"] = "DEPRECATED";
198
- LensStatus["NOT_CURRENT"] = "NOT_CURRENT";
199
- LensStatus["UNSHARED"] = "UNSHARED";
200
- })(LensStatus || (LensStatus = {}));
201
- export var WorkloadImprovementStatus;
202
- (function (WorkloadImprovementStatus) {
203
- WorkloadImprovementStatus["COMPLETE"] = "COMPLETE";
204
- WorkloadImprovementStatus["IN_PROGRESS"] = "IN_PROGRESS";
205
- WorkloadImprovementStatus["NOT_APPLICABLE"] = "NOT_APPLICABLE";
206
- WorkloadImprovementStatus["NOT_STARTED"] = "NOT_STARTED";
207
- WorkloadImprovementStatus["RISK_ACKNOWLEDGED"] = "RISK_ACKNOWLEDGED";
208
- })(WorkloadImprovementStatus || (WorkloadImprovementStatus = {}));
209
- export var ImportLensStatus;
210
- (function (ImportLensStatus) {
211
- ImportLensStatus["COMPLETE"] = "COMPLETE";
212
- ImportLensStatus["ERROR"] = "ERROR";
213
- ImportLensStatus["IN_PROGRESS"] = "IN_PROGRESS";
214
- })(ImportLensStatus || (ImportLensStatus = {}));
215
- export var ShareStatus;
216
- (function (ShareStatus) {
217
- ShareStatus["ACCEPTED"] = "ACCEPTED";
218
- ShareStatus["ASSOCIATED"] = "ASSOCIATED";
219
- ShareStatus["ASSOCIATING"] = "ASSOCIATING";
220
- ShareStatus["EXPIRED"] = "EXPIRED";
221
- ShareStatus["FAILED"] = "FAILED";
222
- ShareStatus["PENDING"] = "PENDING";
223
- ShareStatus["REJECTED"] = "REJECTED";
224
- ShareStatus["REVOKED"] = "REVOKED";
225
- })(ShareStatus || (ShareStatus = {}));
226
- export var LensType;
227
- (function (LensType) {
228
- LensType["AWS_OFFICIAL"] = "AWS_OFFICIAL";
229
- LensType["CUSTOM_SELF"] = "CUSTOM_SELF";
230
- LensType["CUSTOM_SHARED"] = "CUSTOM_SHARED";
231
- })(LensType || (LensType = {}));
232
- export var NotificationType;
233
- (function (NotificationType) {
234
- NotificationType["LENS_VERSION_DEPRECATED"] = "LENS_VERSION_DEPRECATED";
235
- NotificationType["LENS_VERSION_UPGRADED"] = "LENS_VERSION_UPGRADED";
236
- })(NotificationType || (NotificationType = {}));
237
- export var ShareResourceType;
238
- (function (ShareResourceType) {
239
- ShareResourceType["LENS"] = "LENS";
240
- ShareResourceType["WORKLOAD"] = "WORKLOAD";
241
- })(ShareResourceType || (ShareResourceType = {}));
242
- export var OrganizationSharingStatus;
243
- (function (OrganizationSharingStatus) {
244
- OrganizationSharingStatus["DISABLED"] = "DISABLED";
245
- OrganizationSharingStatus["ENABLED"] = "ENABLED";
246
- })(OrganizationSharingStatus || (OrganizationSharingStatus = {}));
247
- export var ShareInvitationAction;
248
- (function (ShareInvitationAction) {
249
- ShareInvitationAction["ACCEPT"] = "ACCEPT";
250
- ShareInvitationAction["REJECT"] = "REJECT";
251
- })(ShareInvitationAction || (ShareInvitationAction = {}));
160
+ export const TrustedAdvisorIntegrationStatus = {
161
+ DISABLED: "DISABLED",
162
+ ENABLED: "ENABLED",
163
+ };
164
+ export const WorkloadEnvironment = {
165
+ PREPRODUCTION: "PREPRODUCTION",
166
+ PRODUCTION: "PRODUCTION",
167
+ };
168
+ export const PermissionType = {
169
+ CONTRIBUTOR: "CONTRIBUTOR",
170
+ READONLY: "READONLY",
171
+ };
172
+ export const LensStatusType = {
173
+ ALL: "ALL",
174
+ DRAFT: "DRAFT",
175
+ PUBLISHED: "PUBLISHED",
176
+ };
177
+ export const DifferenceStatus = {
178
+ DELETED: "DELETED",
179
+ NEW: "NEW",
180
+ UPDATED: "UPDATED",
181
+ };
182
+ export const ReportFormat = {
183
+ JSON: "JSON",
184
+ PDF: "PDF",
185
+ };
186
+ export const LensStatus = {
187
+ CURRENT: "CURRENT",
188
+ DELETED: "DELETED",
189
+ DEPRECATED: "DEPRECATED",
190
+ NOT_CURRENT: "NOT_CURRENT",
191
+ UNSHARED: "UNSHARED",
192
+ };
193
+ export const WorkloadImprovementStatus = {
194
+ COMPLETE: "COMPLETE",
195
+ IN_PROGRESS: "IN_PROGRESS",
196
+ NOT_APPLICABLE: "NOT_APPLICABLE",
197
+ NOT_STARTED: "NOT_STARTED",
198
+ RISK_ACKNOWLEDGED: "RISK_ACKNOWLEDGED",
199
+ };
200
+ export const ImportLensStatus = {
201
+ COMPLETE: "COMPLETE",
202
+ ERROR: "ERROR",
203
+ IN_PROGRESS: "IN_PROGRESS",
204
+ };
205
+ export const ShareStatus = {
206
+ ACCEPTED: "ACCEPTED",
207
+ ASSOCIATED: "ASSOCIATED",
208
+ ASSOCIATING: "ASSOCIATING",
209
+ EXPIRED: "EXPIRED",
210
+ FAILED: "FAILED",
211
+ PENDING: "PENDING",
212
+ REJECTED: "REJECTED",
213
+ REVOKED: "REVOKED",
214
+ };
215
+ export const LensType = {
216
+ AWS_OFFICIAL: "AWS_OFFICIAL",
217
+ CUSTOM_SELF: "CUSTOM_SELF",
218
+ CUSTOM_SHARED: "CUSTOM_SHARED",
219
+ };
220
+ export const NotificationType = {
221
+ LENS_VERSION_DEPRECATED: "LENS_VERSION_DEPRECATED",
222
+ LENS_VERSION_UPGRADED: "LENS_VERSION_UPGRADED",
223
+ };
224
+ export const ShareResourceType = {
225
+ LENS: "LENS",
226
+ WORKLOAD: "WORKLOAD",
227
+ };
228
+ export const OrganizationSharingStatus = {
229
+ DISABLED: "DISABLED",
230
+ ENABLED: "ENABLED",
231
+ };
232
+ export const ShareInvitationAction = {
233
+ ACCEPT: "ACCEPT",
234
+ REJECT: "REJECT",
235
+ };
@@ -0,0 +1,25 @@
1
+ import { GetConsolidatedReportCommand, } from "../commands/GetConsolidatedReportCommand";
2
+ import { WellArchitectedClient } from "../WellArchitectedClient";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new GetConsolidatedReportCommand(input), ...args);
5
+ };
6
+ export async function* paginateGetConsolidatedReport(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.NextToken = token;
12
+ input["MaxResults"] = config.pageSize;
13
+ if (config.client instanceof WellArchitectedClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.NextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -1,3 +1,4 @@
1
+ export * from "./GetConsolidatedReportPaginator";
1
2
  export * from "./Interfaces";
2
3
  export * from "./ListAnswersPaginator";
3
4
  export * from "./ListCheckDetailsPaginator";
@@ -310,6 +310,31 @@ export const serializeAws_restJson1GetAnswerCommand = async (input, context) =>
310
310
  body,
311
311
  });
312
312
  };
313
+ export const serializeAws_restJson1GetConsolidatedReportCommand = async (input, context) => {
314
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
315
+ const headers = {};
316
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/consolidatedReport";
317
+ const query = map({
318
+ Format: [, __expectNonNull(input.Format, `Format`)],
319
+ IncludeSharedResources: [
320
+ () => input.IncludeSharedResources !== void 0,
321
+ () => input.IncludeSharedResources.toString(),
322
+ ],
323
+ NextToken: [, input.NextToken],
324
+ MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
325
+ });
326
+ let body;
327
+ return new __HttpRequest({
328
+ protocol,
329
+ hostname,
330
+ port,
331
+ method: "GET",
332
+ headers,
333
+ path: resolvedPath,
334
+ query,
335
+ body,
336
+ });
337
+ };
313
338
  export const serializeAws_restJson1GetLensCommand = async (input, context) => {
314
339
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
315
340
  const headers = {};
@@ -1224,6 +1249,9 @@ const deserializeAws_restJson1CreateWorkloadCommandError = async (output, contex
1224
1249
  case "InternalServerException":
1225
1250
  case "com.amazonaws.wellarchitected#InternalServerException":
1226
1251
  throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1252
+ case "ResourceNotFoundException":
1253
+ case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1254
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1227
1255
  case "ServiceQuotaExceededException":
1228
1256
  case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1229
1257
  throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
@@ -1624,6 +1652,57 @@ const deserializeAws_restJson1GetAnswerCommandError = async (output, context) =>
1624
1652
  });
1625
1653
  }
1626
1654
  };
1655
+ export const deserializeAws_restJson1GetConsolidatedReportCommand = async (output, context) => {
1656
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1657
+ return deserializeAws_restJson1GetConsolidatedReportCommandError(output, context);
1658
+ }
1659
+ const contents = map({
1660
+ $metadata: deserializeMetadata(output),
1661
+ });
1662
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1663
+ if (data.Base64String != null) {
1664
+ contents.Base64String = __expectString(data.Base64String);
1665
+ }
1666
+ if (data.Metrics != null) {
1667
+ contents.Metrics = deserializeAws_restJson1ConsolidatedReportMetrics(data.Metrics, context);
1668
+ }
1669
+ if (data.NextToken != null) {
1670
+ contents.NextToken = __expectString(data.NextToken);
1671
+ }
1672
+ return contents;
1673
+ };
1674
+ const deserializeAws_restJson1GetConsolidatedReportCommandError = async (output, context) => {
1675
+ const parsedOutput = {
1676
+ ...output,
1677
+ body: await parseErrorBody(output.body, context),
1678
+ };
1679
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1680
+ switch (errorCode) {
1681
+ case "AccessDeniedException":
1682
+ case "com.amazonaws.wellarchitected#AccessDeniedException":
1683
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1684
+ case "ConflictException":
1685
+ case "com.amazonaws.wellarchitected#ConflictException":
1686
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1687
+ case "InternalServerException":
1688
+ case "com.amazonaws.wellarchitected#InternalServerException":
1689
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1690
+ case "ThrottlingException":
1691
+ case "com.amazonaws.wellarchitected#ThrottlingException":
1692
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1693
+ case "ValidationException":
1694
+ case "com.amazonaws.wellarchitected#ValidationException":
1695
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1696
+ default:
1697
+ const parsedBody = parsedOutput.body;
1698
+ throwDefaultError({
1699
+ output,
1700
+ parsedBody,
1701
+ exceptionCtor: __BaseException,
1702
+ errorCode,
1703
+ });
1704
+ }
1705
+ };
1627
1706
  export const deserializeAws_restJson1GetLensCommand = async (output, context) => {
1628
1707
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1629
1708
  return deserializeAws_restJson1GetLensCommandError(output, context);
@@ -3314,6 +3393,23 @@ const deserializeAws_restJson1AnswerSummary = (output, context) => {
3314
3393
  : undefined,
3315
3394
  };
3316
3395
  };
3396
+ const deserializeAws_restJson1BestPractice = (output, context) => {
3397
+ return {
3398
+ ChoiceId: __expectString(output.ChoiceId),
3399
+ ChoiceTitle: __expectString(output.ChoiceTitle),
3400
+ };
3401
+ };
3402
+ const deserializeAws_restJson1BestPractices = (output, context) => {
3403
+ const retVal = (output || [])
3404
+ .filter((e) => e != null)
3405
+ .map((entry) => {
3406
+ if (entry === null) {
3407
+ return null;
3408
+ }
3409
+ return deserializeAws_restJson1BestPractice(entry, context);
3410
+ });
3411
+ return retVal;
3412
+ };
3317
3413
  const deserializeAws_restJson1CheckDetail = (output, context) => {
3318
3414
  return {
3319
3415
  AccountId: __expectString(output.AccountId),
@@ -3458,6 +3554,29 @@ const deserializeAws_restJson1Choices = (output, context) => {
3458
3554
  });
3459
3555
  return retVal;
3460
3556
  };
3557
+ const deserializeAws_restJson1ConsolidatedReportMetric = (output, context) => {
3558
+ return {
3559
+ Lenses: output.Lenses != null ? deserializeAws_restJson1LensMetrics(output.Lenses, context) : undefined,
3560
+ LensesAppliedCount: __expectInt32(output.LensesAppliedCount),
3561
+ MetricType: __expectString(output.MetricType),
3562
+ RiskCounts: output.RiskCounts != null ? deserializeAws_restJson1RiskCounts(output.RiskCounts, context) : undefined,
3563
+ UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
3564
+ WorkloadArn: __expectString(output.WorkloadArn),
3565
+ WorkloadId: __expectString(output.WorkloadId),
3566
+ WorkloadName: __expectString(output.WorkloadName),
3567
+ };
3568
+ };
3569
+ const deserializeAws_restJson1ConsolidatedReportMetrics = (output, context) => {
3570
+ const retVal = (output || [])
3571
+ .filter((e) => e != null)
3572
+ .map((entry) => {
3573
+ if (entry === null) {
3574
+ return null;
3575
+ }
3576
+ return deserializeAws_restJson1ConsolidatedReportMetric(entry, context);
3577
+ });
3578
+ return retVal;
3579
+ };
3461
3580
  const deserializeAws_restJson1ImprovementSummaries = (output, context) => {
3462
3581
  const retVal = (output || [])
3463
3582
  .filter((e) => e != null)
@@ -3492,6 +3611,24 @@ const deserializeAws_restJson1Lens = (output, context) => {
3492
3611
  Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
3493
3612
  };
3494
3613
  };
3614
+ const deserializeAws_restJson1LensMetric = (output, context) => {
3615
+ return {
3616
+ LensArn: __expectString(output.LensArn),
3617
+ Pillars: output.Pillars != null ? deserializeAws_restJson1PillarMetrics(output.Pillars, context) : undefined,
3618
+ RiskCounts: output.RiskCounts != null ? deserializeAws_restJson1RiskCounts(output.RiskCounts, context) : undefined,
3619
+ };
3620
+ };
3621
+ const deserializeAws_restJson1LensMetrics = (output, context) => {
3622
+ const retVal = (output || [])
3623
+ .filter((e) => e != null)
3624
+ .map((entry) => {
3625
+ if (entry === null) {
3626
+ return null;
3627
+ }
3628
+ return deserializeAws_restJson1LensMetric(entry, context);
3629
+ });
3630
+ return retVal;
3631
+ };
3495
3632
  const deserializeAws_restJson1LensReview = (output, context) => {
3496
3633
  return {
3497
3634
  LensAlias: __expectString(output.LensAlias),
@@ -3660,6 +3797,24 @@ const deserializeAws_restJson1PillarDifferences = (output, context) => {
3660
3797
  });
3661
3798
  return retVal;
3662
3799
  };
3800
+ const deserializeAws_restJson1PillarMetric = (output, context) => {
3801
+ return {
3802
+ PillarId: __expectString(output.PillarId),
3803
+ Questions: output.Questions != null ? deserializeAws_restJson1QuestionMetrics(output.Questions, context) : undefined,
3804
+ RiskCounts: output.RiskCounts != null ? deserializeAws_restJson1RiskCounts(output.RiskCounts, context) : undefined,
3805
+ };
3806
+ };
3807
+ const deserializeAws_restJson1PillarMetrics = (output, context) => {
3808
+ const retVal = (output || [])
3809
+ .filter((e) => e != null)
3810
+ .map((entry) => {
3811
+ if (entry === null) {
3812
+ return null;
3813
+ }
3814
+ return deserializeAws_restJson1PillarMetric(entry, context);
3815
+ });
3816
+ return retVal;
3817
+ };
3663
3818
  const deserializeAws_restJson1PillarReviewSummaries = (output, context) => {
3664
3819
  const retVal = (output || [])
3665
3820
  .filter((e) => e != null)
@@ -3697,6 +3852,24 @@ const deserializeAws_restJson1QuestionDifferences = (output, context) => {
3697
3852
  });
3698
3853
  return retVal;
3699
3854
  };
3855
+ const deserializeAws_restJson1QuestionMetric = (output, context) => {
3856
+ return {
3857
+ BestPractices: output.BestPractices != null ? deserializeAws_restJson1BestPractices(output.BestPractices, context) : undefined,
3858
+ QuestionId: __expectString(output.QuestionId),
3859
+ Risk: __expectString(output.Risk),
3860
+ };
3861
+ };
3862
+ const deserializeAws_restJson1QuestionMetrics = (output, context) => {
3863
+ const retVal = (output || [])
3864
+ .filter((e) => e != null)
3865
+ .map((entry) => {
3866
+ if (entry === null) {
3867
+ return null;
3868
+ }
3869
+ return deserializeAws_restJson1QuestionMetric(entry, context);
3870
+ });
3871
+ return retVal;
3872
+ };
3700
3873
  const deserializeAws_restJson1RiskCounts = (output, context) => {
3701
3874
  return Object.entries(output).reduce((acc, [key, value]) => {
3702
3875
  if (value === null) {