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