@aws-sdk/client-bcm-dashboards 3.927.0 → 3.928.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 (30) hide show
  1. package/dist-cjs/index.js +456 -643
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/BCMDashboardsClient.js +2 -0
  4. package/dist-es/commands/CreateDashboardCommand.js +3 -9
  5. package/dist-es/commands/DeleteDashboardCommand.js +3 -9
  6. package/dist-es/commands/GetDashboardCommand.js +3 -9
  7. package/dist-es/commands/GetResourcePolicyCommand.js +3 -9
  8. package/dist-es/commands/ListDashboardsCommand.js +3 -9
  9. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  10. package/dist-es/commands/TagResourceCommand.js +3 -9
  11. package/dist-es/commands/UntagResourceCommand.js +3 -9
  12. package/dist-es/commands/UpdateDashboardCommand.js +3 -9
  13. package/dist-es/runtimeConfig.shared.js +7 -0
  14. package/dist-es/schemas/schemas_0.js +423 -0
  15. package/dist-types/BCMDashboardsClient.d.ts +10 -1
  16. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  17. package/dist-types/runtimeConfig.d.ts +1 -0
  18. package/dist-types/runtimeConfig.native.d.ts +1 -0
  19. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  20. package/dist-types/schemas/schemas_0.d.ts +67 -0
  21. package/dist-types/ts3.4/BCMDashboardsClient.d.ts +4 -0
  22. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  23. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  24. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  25. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  26. package/dist-types/ts3.4/schemas/schemas_0.d.ts +73 -0
  27. package/package.json +5 -5
  28. package/dist-es/protocols/Aws_json1_0.js +0 -566
  29. package/dist-types/protocols/Aws_json1_0.d.ts +0 -83
  30. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +0 -113
@@ -0,0 +1,73 @@
1
+ import {
2
+ StaticErrorSchema,
3
+ StaticListSchema,
4
+ StaticMapSchema,
5
+ StaticOperationSchema,
6
+ StaticStructureSchema,
7
+ } from "@smithy/types";
8
+ export declare var AccessDeniedException: StaticErrorSchema;
9
+ export declare var CostAndUsageQuery: StaticStructureSchema;
10
+ export declare var CostCategoryValues: StaticStructureSchema;
11
+ export declare var CreateDashboardRequest: StaticStructureSchema;
12
+ export declare var CreateDashboardResponse: StaticStructureSchema;
13
+ export declare var DashboardReference: StaticStructureSchema;
14
+ export declare var DateTimeRange: StaticStructureSchema;
15
+ export declare var DateTimeValue: StaticStructureSchema;
16
+ export declare var DeleteDashboardRequest: StaticStructureSchema;
17
+ export declare var DeleteDashboardResponse: StaticStructureSchema;
18
+ export declare var DimensionValues: StaticStructureSchema;
19
+ export declare var Expression: StaticStructureSchema;
20
+ export declare var GetDashboardRequest: StaticStructureSchema;
21
+ export declare var GetDashboardResponse: StaticStructureSchema;
22
+ export declare var GetResourcePolicyRequest: StaticStructureSchema;
23
+ export declare var GetResourcePolicyResponse: StaticStructureSchema;
24
+ export declare var GraphDisplayConfig: StaticStructureSchema;
25
+ export declare var GroupDefinition: StaticStructureSchema;
26
+ export declare var InternalServerException: StaticErrorSchema;
27
+ export declare var ListDashboardsRequest: StaticStructureSchema;
28
+ export declare var ListDashboardsResponse: StaticStructureSchema;
29
+ export declare var ListTagsForResourceRequest: StaticStructureSchema;
30
+ export declare var ListTagsForResourceResponse: StaticStructureSchema;
31
+ export declare var ReservationCoverageQuery: StaticStructureSchema;
32
+ export declare var ReservationUtilizationQuery: StaticStructureSchema;
33
+ export declare var ResourceNotFoundException: StaticErrorSchema;
34
+ export declare var ResourceTag: StaticStructureSchema;
35
+ export declare var SavingsPlansCoverageQuery: StaticStructureSchema;
36
+ export declare var SavingsPlansUtilizationQuery: StaticStructureSchema;
37
+ export declare var ServiceQuotaExceededException: StaticErrorSchema;
38
+ export declare var TableDisplayConfigStruct: StaticStructureSchema;
39
+ export declare var TagResourceRequest: StaticStructureSchema;
40
+ export declare var TagResourceResponse: StaticStructureSchema;
41
+ export declare var TagValues: StaticStructureSchema;
42
+ export declare var ThrottlingException: StaticErrorSchema;
43
+ export declare var UntagResourceRequest: StaticStructureSchema;
44
+ export declare var UntagResourceResponse: StaticStructureSchema;
45
+ export declare var UpdateDashboardRequest: StaticStructureSchema;
46
+ export declare var UpdateDashboardResponse: StaticStructureSchema;
47
+ export declare var ValidationException: StaticErrorSchema;
48
+ export declare var Widget: StaticStructureSchema;
49
+ export declare var WidgetConfig: StaticStructureSchema;
50
+ export declare var __Unit: "unit";
51
+ export declare var BCMDashboardsServiceException: StaticErrorSchema;
52
+ export declare var DashboardReferenceList: StaticListSchema;
53
+ export declare var Expressions: StaticListSchema;
54
+ export declare var GroupDefinitions: StaticListSchema;
55
+ export declare var MatchOptions: number;
56
+ export declare var MetricNames: number;
57
+ export declare var ResourceTagKeyList: number;
58
+ export declare var ResourceTagList: StaticListSchema;
59
+ export declare var StringList: number;
60
+ export declare var WidgetConfigList: StaticListSchema;
61
+ export declare var WidgetList: StaticListSchema;
62
+ export declare var GraphDisplayConfigMap: StaticMapSchema;
63
+ export declare var DisplayConfig: StaticStructureSchema;
64
+ export declare var QueryParameters: StaticStructureSchema;
65
+ export declare var CreateDashboard: StaticOperationSchema;
66
+ export declare var DeleteDashboard: StaticOperationSchema;
67
+ export declare var GetDashboard: StaticOperationSchema;
68
+ export declare var GetResourcePolicy: StaticOperationSchema;
69
+ export declare var ListDashboards: StaticOperationSchema;
70
+ export declare var ListTagsForResource: StaticOperationSchema;
71
+ export declare var TagResource: StaticOperationSchema;
72
+ export declare var UntagResource: StaticOperationSchema;
73
+ export declare var UpdateDashboard: StaticOperationSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bcm-dashboards",
3
3
  "description": "AWS SDK for JavaScript Bcm Dashboards Client for Node.js, Browser and React Native",
4
- "version": "3.927.0",
4
+ "version": "3.928.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-bcm-dashboards",
@@ -20,17 +20,17 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.927.0",
24
- "@aws-sdk/credential-provider-node": "3.927.0",
23
+ "@aws-sdk/core": "3.928.0",
24
+ "@aws-sdk/credential-provider-node": "3.928.0",
25
25
  "@aws-sdk/middleware-host-header": "3.922.0",
26
26
  "@aws-sdk/middleware-logger": "3.922.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.922.0",
28
- "@aws-sdk/middleware-user-agent": "3.927.0",
28
+ "@aws-sdk/middleware-user-agent": "3.928.0",
29
29
  "@aws-sdk/region-config-resolver": "3.925.0",
30
30
  "@aws-sdk/types": "3.922.0",
31
31
  "@aws-sdk/util-endpoints": "3.922.0",
32
32
  "@aws-sdk/util-user-agent-browser": "3.922.0",
33
- "@aws-sdk/util-user-agent-node": "3.927.0",
33
+ "@aws-sdk/util-user-agent-node": "3.928.0",
34
34
  "@smithy/config-resolver": "^4.4.2",
35
35
  "@smithy/core": "^3.17.2",
36
36
  "@smithy/fetch-http-handler": "^5.3.5",
@@ -1,566 +0,0 @@
1
- import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { BCMDashboardsServiceException as __BaseException } from "../models/BCMDashboardsServiceException";
5
- import { AccessDeniedException, InternalServerException, QueryParameters, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- export const se_CreateDashboardCommand = async (input, context) => {
7
- const headers = sharedHeaders("CreateDashboard");
8
- let body;
9
- body = JSON.stringify(se_CreateDashboardRequest(input, context));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_DeleteDashboardCommand = async (input, context) => {
13
- const headers = sharedHeaders("DeleteDashboard");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_GetDashboardCommand = async (input, context) => {
19
- const headers = sharedHeaders("GetDashboard");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_GetResourcePolicyCommand = async (input, context) => {
25
- const headers = sharedHeaders("GetResourcePolicy");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_ListDashboardsCommand = async (input, context) => {
31
- const headers = sharedHeaders("ListDashboards");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_ListTagsForResourceCommand = async (input, context) => {
37
- const headers = sharedHeaders("ListTagsForResource");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_TagResourceCommand = async (input, context) => {
43
- const headers = sharedHeaders("TagResource");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_UntagResourceCommand = async (input, context) => {
49
- const headers = sharedHeaders("UntagResource");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_UpdateDashboardCommand = async (input, context) => {
55
- const headers = sharedHeaders("UpdateDashboard");
56
- let body;
57
- body = JSON.stringify(se_UpdateDashboardRequest(input, context));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const de_CreateDashboardCommand = async (output, context) => {
61
- if (output.statusCode >= 300) {
62
- return de_CommandError(output, context);
63
- }
64
- const data = await parseBody(output.body, context);
65
- let contents = {};
66
- contents = _json(data);
67
- const response = {
68
- $metadata: deserializeMetadata(output),
69
- ...contents,
70
- };
71
- return response;
72
- };
73
- export const de_DeleteDashboardCommand = async (output, context) => {
74
- if (output.statusCode >= 300) {
75
- return de_CommandError(output, context);
76
- }
77
- const data = await parseBody(output.body, context);
78
- let contents = {};
79
- contents = _json(data);
80
- const response = {
81
- $metadata: deserializeMetadata(output),
82
- ...contents,
83
- };
84
- return response;
85
- };
86
- export const de_GetDashboardCommand = async (output, context) => {
87
- if (output.statusCode >= 300) {
88
- return de_CommandError(output, context);
89
- }
90
- const data = await parseBody(output.body, context);
91
- let contents = {};
92
- contents = de_GetDashboardResponse(data, context);
93
- const response = {
94
- $metadata: deserializeMetadata(output),
95
- ...contents,
96
- };
97
- return response;
98
- };
99
- export const de_GetResourcePolicyCommand = async (output, context) => {
100
- if (output.statusCode >= 300) {
101
- return de_CommandError(output, context);
102
- }
103
- const data = await parseBody(output.body, context);
104
- let contents = {};
105
- contents = _json(data);
106
- const response = {
107
- $metadata: deserializeMetadata(output),
108
- ...contents,
109
- };
110
- return response;
111
- };
112
- export const de_ListDashboardsCommand = async (output, context) => {
113
- if (output.statusCode >= 300) {
114
- return de_CommandError(output, context);
115
- }
116
- const data = await parseBody(output.body, context);
117
- let contents = {};
118
- contents = de_ListDashboardsResponse(data, context);
119
- const response = {
120
- $metadata: deserializeMetadata(output),
121
- ...contents,
122
- };
123
- return response;
124
- };
125
- export const de_ListTagsForResourceCommand = async (output, context) => {
126
- if (output.statusCode >= 300) {
127
- return de_CommandError(output, context);
128
- }
129
- const data = await parseBody(output.body, context);
130
- let contents = {};
131
- contents = _json(data);
132
- const response = {
133
- $metadata: deserializeMetadata(output),
134
- ...contents,
135
- };
136
- return response;
137
- };
138
- export const de_TagResourceCommand = async (output, context) => {
139
- if (output.statusCode >= 300) {
140
- return de_CommandError(output, context);
141
- }
142
- const data = await parseBody(output.body, context);
143
- let contents = {};
144
- contents = _json(data);
145
- const response = {
146
- $metadata: deserializeMetadata(output),
147
- ...contents,
148
- };
149
- return response;
150
- };
151
- export const de_UntagResourceCommand = async (output, context) => {
152
- if (output.statusCode >= 300) {
153
- return de_CommandError(output, context);
154
- }
155
- const data = await parseBody(output.body, context);
156
- let contents = {};
157
- contents = _json(data);
158
- const response = {
159
- $metadata: deserializeMetadata(output),
160
- ...contents,
161
- };
162
- return response;
163
- };
164
- export const de_UpdateDashboardCommand = async (output, context) => {
165
- if (output.statusCode >= 300) {
166
- return de_CommandError(output, context);
167
- }
168
- const data = await parseBody(output.body, context);
169
- let contents = {};
170
- contents = _json(data);
171
- const response = {
172
- $metadata: deserializeMetadata(output),
173
- ...contents,
174
- };
175
- return response;
176
- };
177
- const de_CommandError = async (output, context) => {
178
- const parsedOutput = {
179
- ...output,
180
- body: await parseErrorBody(output.body, context),
181
- };
182
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
183
- switch (errorCode) {
184
- case "AccessDeniedException":
185
- case "com.amazonaws.bcmdashboards#AccessDeniedException":
186
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
187
- case "InternalServerException":
188
- case "com.amazonaws.bcmdashboards#InternalServerException":
189
- throw await de_InternalServerExceptionRes(parsedOutput, context);
190
- case "ServiceQuotaExceededException":
191
- case "com.amazonaws.bcmdashboards#ServiceQuotaExceededException":
192
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
193
- case "ThrottlingException":
194
- case "com.amazonaws.bcmdashboards#ThrottlingException":
195
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
196
- case "ValidationException":
197
- case "com.amazonaws.bcmdashboards#ValidationException":
198
- throw await de_ValidationExceptionRes(parsedOutput, context);
199
- case "ResourceNotFoundException":
200
- case "com.amazonaws.bcmdashboards#ResourceNotFoundException":
201
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
202
- default:
203
- const parsedBody = parsedOutput.body;
204
- return throwDefaultError({
205
- output,
206
- parsedBody,
207
- errorCode,
208
- });
209
- }
210
- };
211
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
212
- const body = parsedOutput.body;
213
- const deserialized = _json(body);
214
- const exception = new AccessDeniedException({
215
- $metadata: deserializeMetadata(parsedOutput),
216
- ...deserialized,
217
- });
218
- return __decorateServiceException(exception, body);
219
- };
220
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
221
- const body = parsedOutput.body;
222
- const deserialized = _json(body);
223
- const exception = new InternalServerException({
224
- $metadata: deserializeMetadata(parsedOutput),
225
- ...deserialized,
226
- });
227
- return __decorateServiceException(exception, body);
228
- };
229
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
230
- const body = parsedOutput.body;
231
- const deserialized = _json(body);
232
- const exception = new ResourceNotFoundException({
233
- $metadata: deserializeMetadata(parsedOutput),
234
- ...deserialized,
235
- });
236
- return __decorateServiceException(exception, body);
237
- };
238
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
239
- const body = parsedOutput.body;
240
- const deserialized = _json(body);
241
- const exception = new ServiceQuotaExceededException({
242
- $metadata: deserializeMetadata(parsedOutput),
243
- ...deserialized,
244
- });
245
- return __decorateServiceException(exception, body);
246
- };
247
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
248
- const body = parsedOutput.body;
249
- const deserialized = _json(body);
250
- const exception = new ThrottlingException({
251
- $metadata: deserializeMetadata(parsedOutput),
252
- ...deserialized,
253
- });
254
- return __decorateServiceException(exception, body);
255
- };
256
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
257
- const body = parsedOutput.body;
258
- const deserialized = _json(body);
259
- const exception = new ValidationException({
260
- $metadata: deserializeMetadata(parsedOutput),
261
- ...deserialized,
262
- });
263
- return __decorateServiceException(exception, body);
264
- };
265
- const se_CostAndUsageQuery = (input, context) => {
266
- return take(input, {
267
- filter: (_) => se_Expression(_, context),
268
- granularity: [],
269
- groupBy: _json,
270
- metrics: _json,
271
- timeRange: _json,
272
- });
273
- };
274
- const se_CreateDashboardRequest = (input, context) => {
275
- return take(input, {
276
- description: [],
277
- name: [],
278
- resourceTags: _json,
279
- widgets: (_) => se_WidgetList(_, context),
280
- });
281
- };
282
- const se_Expression = (input, context) => {
283
- return take(input, {
284
- and: (_) => se_Expressions(_, context),
285
- costCategories: _json,
286
- dimensions: _json,
287
- not: (_) => se_Expression(_, context),
288
- or: (_) => se_Expressions(_, context),
289
- tags: _json,
290
- });
291
- };
292
- const se_Expressions = (input, context) => {
293
- return input
294
- .filter((e) => e != null)
295
- .map((entry) => {
296
- return se_Expression(entry, context);
297
- });
298
- };
299
- const se_QueryParameters = (input, context) => {
300
- return QueryParameters.visit(input, {
301
- costAndUsage: (value) => ({ costAndUsage: se_CostAndUsageQuery(value, context) }),
302
- reservationCoverage: (value) => ({ reservationCoverage: se_ReservationCoverageQuery(value, context) }),
303
- reservationUtilization: (value) => ({ reservationUtilization: se_ReservationUtilizationQuery(value, context) }),
304
- savingsPlansCoverage: (value) => ({ savingsPlansCoverage: se_SavingsPlansCoverageQuery(value, context) }),
305
- savingsPlansUtilization: (value) => ({ savingsPlansUtilization: se_SavingsPlansUtilizationQuery(value, context) }),
306
- _: (name, value) => ({ [name]: value }),
307
- });
308
- };
309
- const se_ReservationCoverageQuery = (input, context) => {
310
- return take(input, {
311
- filter: (_) => se_Expression(_, context),
312
- granularity: [],
313
- groupBy: _json,
314
- metrics: _json,
315
- timeRange: _json,
316
- });
317
- };
318
- const se_ReservationUtilizationQuery = (input, context) => {
319
- return take(input, {
320
- filter: (_) => se_Expression(_, context),
321
- granularity: [],
322
- groupBy: _json,
323
- timeRange: _json,
324
- });
325
- };
326
- const se_SavingsPlansCoverageQuery = (input, context) => {
327
- return take(input, {
328
- filter: (_) => se_Expression(_, context),
329
- granularity: [],
330
- groupBy: _json,
331
- metrics: _json,
332
- timeRange: _json,
333
- });
334
- };
335
- const se_SavingsPlansUtilizationQuery = (input, context) => {
336
- return take(input, {
337
- filter: (_) => se_Expression(_, context),
338
- granularity: [],
339
- timeRange: _json,
340
- });
341
- };
342
- const se_UpdateDashboardRequest = (input, context) => {
343
- return take(input, {
344
- arn: [],
345
- description: [],
346
- name: [],
347
- widgets: (_) => se_WidgetList(_, context),
348
- });
349
- };
350
- const se_Widget = (input, context) => {
351
- return take(input, {
352
- configs: (_) => se_WidgetConfigList(_, context),
353
- description: [],
354
- height: [],
355
- horizontalOffset: [],
356
- title: [],
357
- width: [],
358
- });
359
- };
360
- const se_WidgetConfig = (input, context) => {
361
- return take(input, {
362
- displayConfig: _json,
363
- queryParameters: (_) => se_QueryParameters(_, context),
364
- });
365
- };
366
- const se_WidgetConfigList = (input, context) => {
367
- return input
368
- .filter((e) => e != null)
369
- .map((entry) => {
370
- return se_WidgetConfig(entry, context);
371
- });
372
- };
373
- const se_WidgetList = (input, context) => {
374
- return input
375
- .filter((e) => e != null)
376
- .map((entry) => {
377
- return se_Widget(entry, context);
378
- });
379
- };
380
- const de_CostAndUsageQuery = (output, context) => {
381
- return take(output, {
382
- filter: (_) => de_Expression(_, context),
383
- granularity: __expectString,
384
- groupBy: _json,
385
- metrics: _json,
386
- timeRange: _json,
387
- });
388
- };
389
- const de_DashboardReference = (output, context) => {
390
- return take(output, {
391
- arn: __expectString,
392
- createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
393
- description: __expectString,
394
- name: __expectString,
395
- type: __expectString,
396
- updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
397
- });
398
- };
399
- const de_DashboardReferenceList = (output, context) => {
400
- const retVal = (output || [])
401
- .filter((e) => e != null)
402
- .map((entry) => {
403
- return de_DashboardReference(entry, context);
404
- });
405
- return retVal;
406
- };
407
- const de_Expression = (output, context) => {
408
- return take(output, {
409
- and: (_) => de_Expressions(_, context),
410
- costCategories: _json,
411
- dimensions: _json,
412
- not: (_) => de_Expression(_, context),
413
- or: (_) => de_Expressions(_, context),
414
- tags: _json,
415
- });
416
- };
417
- const de_Expressions = (output, context) => {
418
- const retVal = (output || [])
419
- .filter((e) => e != null)
420
- .map((entry) => {
421
- return de_Expression(entry, context);
422
- });
423
- return retVal;
424
- };
425
- const de_GetDashboardResponse = (output, context) => {
426
- return take(output, {
427
- arn: __expectString,
428
- createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
429
- description: __expectString,
430
- name: __expectString,
431
- type: __expectString,
432
- updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
433
- widgets: (_) => de_WidgetList(_, context),
434
- });
435
- };
436
- const de_ListDashboardsResponse = (output, context) => {
437
- return take(output, {
438
- dashboards: (_) => de_DashboardReferenceList(_, context),
439
- nextToken: __expectString,
440
- });
441
- };
442
- const de_QueryParameters = (output, context) => {
443
- if (output.costAndUsage != null) {
444
- return {
445
- costAndUsage: de_CostAndUsageQuery(output.costAndUsage, context),
446
- };
447
- }
448
- if (output.reservationCoverage != null) {
449
- return {
450
- reservationCoverage: de_ReservationCoverageQuery(output.reservationCoverage, context),
451
- };
452
- }
453
- if (output.reservationUtilization != null) {
454
- return {
455
- reservationUtilization: de_ReservationUtilizationQuery(output.reservationUtilization, context),
456
- };
457
- }
458
- if (output.savingsPlansCoverage != null) {
459
- return {
460
- savingsPlansCoverage: de_SavingsPlansCoverageQuery(output.savingsPlansCoverage, context),
461
- };
462
- }
463
- if (output.savingsPlansUtilization != null) {
464
- return {
465
- savingsPlansUtilization: de_SavingsPlansUtilizationQuery(output.savingsPlansUtilization, context),
466
- };
467
- }
468
- return { $unknown: Object.entries(output)[0] };
469
- };
470
- const de_ReservationCoverageQuery = (output, context) => {
471
- return take(output, {
472
- filter: (_) => de_Expression(_, context),
473
- granularity: __expectString,
474
- groupBy: _json,
475
- metrics: _json,
476
- timeRange: _json,
477
- });
478
- };
479
- const de_ReservationUtilizationQuery = (output, context) => {
480
- return take(output, {
481
- filter: (_) => de_Expression(_, context),
482
- granularity: __expectString,
483
- groupBy: _json,
484
- timeRange: _json,
485
- });
486
- };
487
- const de_SavingsPlansCoverageQuery = (output, context) => {
488
- return take(output, {
489
- filter: (_) => de_Expression(_, context),
490
- granularity: __expectString,
491
- groupBy: _json,
492
- metrics: _json,
493
- timeRange: _json,
494
- });
495
- };
496
- const de_SavingsPlansUtilizationQuery = (output, context) => {
497
- return take(output, {
498
- filter: (_) => de_Expression(_, context),
499
- granularity: __expectString,
500
- timeRange: _json,
501
- });
502
- };
503
- const de_Widget = (output, context) => {
504
- return take(output, {
505
- configs: (_) => de_WidgetConfigList(_, context),
506
- description: __expectString,
507
- height: __expectInt32,
508
- horizontalOffset: __expectInt32,
509
- title: __expectString,
510
- width: __expectInt32,
511
- });
512
- };
513
- const de_WidgetConfig = (output, context) => {
514
- return take(output, {
515
- displayConfig: (_) => _json(__expectUnion(_)),
516
- queryParameters: (_) => de_QueryParameters(__expectUnion(_), context),
517
- });
518
- };
519
- const de_WidgetConfigList = (output, context) => {
520
- const retVal = (output || [])
521
- .filter((e) => e != null)
522
- .map((entry) => {
523
- return de_WidgetConfig(entry, context);
524
- });
525
- return retVal;
526
- };
527
- const de_WidgetList = (output, context) => {
528
- const retVal = (output || [])
529
- .filter((e) => e != null)
530
- .map((entry) => {
531
- return de_Widget(entry, context);
532
- });
533
- return retVal;
534
- };
535
- const deserializeMetadata = (output) => ({
536
- httpStatusCode: output.statusCode,
537
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
538
- extendedRequestId: output.headers["x-amz-id-2"],
539
- cfId: output.headers["x-amz-cf-id"],
540
- });
541
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
542
- const throwDefaultError = withBaseException(__BaseException);
543
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
544
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
545
- const contents = {
546
- protocol,
547
- hostname,
548
- port,
549
- method: "POST",
550
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
551
- headers,
552
- };
553
- if (resolvedHostname !== undefined) {
554
- contents.hostname = resolvedHostname;
555
- }
556
- if (body !== undefined) {
557
- contents.body = body;
558
- }
559
- return new __HttpRequest(contents);
560
- };
561
- function sharedHeaders(operation) {
562
- return {
563
- "content-type": "application/x-amz-json-1.0",
564
- "x-amz-target": `AWSBCMDashboardsService.${operation}`,
565
- };
566
- }