@aws-sdk/client-pi 3.183.0 → 3.185.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/CHANGELOG.md +11 -0
- package/dist-cjs/protocols/Aws_json1_1.js +2 -2
- package/dist-es/PI.js +33 -26
- package/dist-es/PIClient.js +28 -22
- package/dist-es/commands/DescribeDimensionKeysCommand.js +28 -21
- package/dist-es/commands/GetDimensionKeyDetailsCommand.js +28 -21
- package/dist-es/commands/GetResourceMetadataCommand.js +28 -21
- package/dist-es/commands/GetResourceMetricsCommand.js +28 -21
- package/dist-es/commands/ListAvailableResourceDimensionsCommand.js +28 -21
- package/dist-es/commands/ListAvailableResourceMetricsCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/PIServiceException.js +10 -5
- package/dist-es/models/models_0.js +62 -111
- package/dist-es/pagination/DescribeDimensionKeysPaginator.js +68 -25
- package/dist-es/pagination/GetResourceMetricsPaginator.js +68 -25
- package/dist-es/pagination/ListAvailableResourceDimensionsPaginator.js +68 -25
- package/dist-es/pagination/ListAvailableResourceMetricsPaginator.js +68 -25
- package/dist-es/protocols/Aws_json1_1.js +629 -528
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +5 -5
|
@@ -1,477 +1,557 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { InternalServiceError, InvalidArgumentException, NotAuthorizedException, } from "../models/models_0";
|
|
4
5
|
import { PIServiceException as __BaseException } from "../models/PIServiceException";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export const serializeAws_json1_1GetDimensionKeyDetailsCommand = async (input, context) => {
|
|
15
|
-
const headers = {
|
|
16
|
-
"content-type": "application/x-amz-json-1.1",
|
|
17
|
-
"x-amz-target": "PerformanceInsightsv20180227.GetDimensionKeyDetails",
|
|
18
|
-
};
|
|
19
|
-
let body;
|
|
20
|
-
body = JSON.stringify(serializeAws_json1_1GetDimensionKeyDetailsRequest(input, context));
|
|
21
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
-
};
|
|
23
|
-
export const serializeAws_json1_1GetResourceMetadataCommand = async (input, context) => {
|
|
24
|
-
const headers = {
|
|
25
|
-
"content-type": "application/x-amz-json-1.1",
|
|
26
|
-
"x-amz-target": "PerformanceInsightsv20180227.GetResourceMetadata",
|
|
27
|
-
};
|
|
28
|
-
let body;
|
|
29
|
-
body = JSON.stringify(serializeAws_json1_1GetResourceMetadataRequest(input, context));
|
|
30
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
-
};
|
|
32
|
-
export const serializeAws_json1_1GetResourceMetricsCommand = async (input, context) => {
|
|
33
|
-
const headers = {
|
|
34
|
-
"content-type": "application/x-amz-json-1.1",
|
|
35
|
-
"x-amz-target": "PerformanceInsightsv20180227.GetResourceMetrics",
|
|
36
|
-
};
|
|
37
|
-
let body;
|
|
38
|
-
body = JSON.stringify(serializeAws_json1_1GetResourceMetricsRequest(input, context));
|
|
39
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
-
};
|
|
41
|
-
export const serializeAws_json1_1ListAvailableResourceDimensionsCommand = async (input, context) => {
|
|
42
|
-
const headers = {
|
|
43
|
-
"content-type": "application/x-amz-json-1.1",
|
|
44
|
-
"x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceDimensions",
|
|
45
|
-
};
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify(serializeAws_json1_1ListAvailableResourceDimensionsRequest(input, context));
|
|
48
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
-
};
|
|
50
|
-
export const serializeAws_json1_1ListAvailableResourceMetricsCommand = async (input, context) => {
|
|
51
|
-
const headers = {
|
|
52
|
-
"content-type": "application/x-amz-json-1.1",
|
|
53
|
-
"x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceMetrics",
|
|
54
|
-
};
|
|
55
|
-
let body;
|
|
56
|
-
body = JSON.stringify(serializeAws_json1_1ListAvailableResourceMetricsRequest(input, context));
|
|
57
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
-
};
|
|
59
|
-
export const deserializeAws_json1_1DescribeDimensionKeysCommand = async (output, context) => {
|
|
60
|
-
if (output.statusCode >= 300) {
|
|
61
|
-
return deserializeAws_json1_1DescribeDimensionKeysCommandError(output, context);
|
|
62
|
-
}
|
|
63
|
-
const data = await parseBody(output.body, context);
|
|
64
|
-
let contents = {};
|
|
65
|
-
contents = deserializeAws_json1_1DescribeDimensionKeysResponse(data, context);
|
|
66
|
-
const response = {
|
|
67
|
-
$metadata: deserializeMetadata(output),
|
|
68
|
-
...contents,
|
|
69
|
-
};
|
|
70
|
-
return Promise.resolve(response);
|
|
71
|
-
};
|
|
72
|
-
const deserializeAws_json1_1DescribeDimensionKeysCommandError = async (output, context) => {
|
|
73
|
-
const parsedOutput = {
|
|
74
|
-
...output,
|
|
75
|
-
body: await parseErrorBody(output.body, context),
|
|
76
|
-
};
|
|
77
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
78
|
-
switch (errorCode) {
|
|
79
|
-
case "InternalServiceError":
|
|
80
|
-
case "com.amazonaws.pi#InternalServiceError":
|
|
81
|
-
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
82
|
-
case "InvalidArgumentException":
|
|
83
|
-
case "com.amazonaws.pi#InvalidArgumentException":
|
|
84
|
-
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
85
|
-
case "NotAuthorizedException":
|
|
86
|
-
case "com.amazonaws.pi#NotAuthorizedException":
|
|
87
|
-
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
88
|
-
default:
|
|
89
|
-
const parsedBody = parsedOutput.body;
|
|
90
|
-
throwDefaultError({
|
|
91
|
-
output,
|
|
92
|
-
parsedBody,
|
|
93
|
-
exceptionCtor: __BaseException,
|
|
94
|
-
errorCode,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
export const deserializeAws_json1_1GetDimensionKeyDetailsCommand = async (output, context) => {
|
|
99
|
-
if (output.statusCode >= 300) {
|
|
100
|
-
return deserializeAws_json1_1GetDimensionKeyDetailsCommandError(output, context);
|
|
101
|
-
}
|
|
102
|
-
const data = await parseBody(output.body, context);
|
|
103
|
-
let contents = {};
|
|
104
|
-
contents = deserializeAws_json1_1GetDimensionKeyDetailsResponse(data, context);
|
|
105
|
-
const response = {
|
|
106
|
-
$metadata: deserializeMetadata(output),
|
|
107
|
-
...contents,
|
|
108
|
-
};
|
|
109
|
-
return Promise.resolve(response);
|
|
110
|
-
};
|
|
111
|
-
const deserializeAws_json1_1GetDimensionKeyDetailsCommandError = async (output, context) => {
|
|
112
|
-
const parsedOutput = {
|
|
113
|
-
...output,
|
|
114
|
-
body: await parseErrorBody(output.body, context),
|
|
115
|
-
};
|
|
116
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
117
|
-
switch (errorCode) {
|
|
118
|
-
case "InternalServiceError":
|
|
119
|
-
case "com.amazonaws.pi#InternalServiceError":
|
|
120
|
-
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
121
|
-
case "InvalidArgumentException":
|
|
122
|
-
case "com.amazonaws.pi#InvalidArgumentException":
|
|
123
|
-
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
124
|
-
case "NotAuthorizedException":
|
|
125
|
-
case "com.amazonaws.pi#NotAuthorizedException":
|
|
126
|
-
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
127
|
-
default:
|
|
128
|
-
const parsedBody = parsedOutput.body;
|
|
129
|
-
throwDefaultError({
|
|
130
|
-
output,
|
|
131
|
-
parsedBody,
|
|
132
|
-
exceptionCtor: __BaseException,
|
|
133
|
-
errorCode,
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
export const deserializeAws_json1_1GetResourceMetadataCommand = async (output, context) => {
|
|
138
|
-
if (output.statusCode >= 300) {
|
|
139
|
-
return deserializeAws_json1_1GetResourceMetadataCommandError(output, context);
|
|
140
|
-
}
|
|
141
|
-
const data = await parseBody(output.body, context);
|
|
142
|
-
let contents = {};
|
|
143
|
-
contents = deserializeAws_json1_1GetResourceMetadataResponse(data, context);
|
|
144
|
-
const response = {
|
|
145
|
-
$metadata: deserializeMetadata(output),
|
|
146
|
-
...contents,
|
|
147
|
-
};
|
|
148
|
-
return Promise.resolve(response);
|
|
149
|
-
};
|
|
150
|
-
const deserializeAws_json1_1GetResourceMetadataCommandError = async (output, context) => {
|
|
151
|
-
const parsedOutput = {
|
|
152
|
-
...output,
|
|
153
|
-
body: await parseErrorBody(output.body, context),
|
|
154
|
-
};
|
|
155
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
156
|
-
switch (errorCode) {
|
|
157
|
-
case "InternalServiceError":
|
|
158
|
-
case "com.amazonaws.pi#InternalServiceError":
|
|
159
|
-
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
160
|
-
case "InvalidArgumentException":
|
|
161
|
-
case "com.amazonaws.pi#InvalidArgumentException":
|
|
162
|
-
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
163
|
-
case "NotAuthorizedException":
|
|
164
|
-
case "com.amazonaws.pi#NotAuthorizedException":
|
|
165
|
-
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
166
|
-
default:
|
|
167
|
-
const parsedBody = parsedOutput.body;
|
|
168
|
-
throwDefaultError({
|
|
169
|
-
output,
|
|
170
|
-
parsedBody,
|
|
171
|
-
exceptionCtor: __BaseException,
|
|
172
|
-
errorCode,
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
export const deserializeAws_json1_1GetResourceMetricsCommand = async (output, context) => {
|
|
177
|
-
if (output.statusCode >= 300) {
|
|
178
|
-
return deserializeAws_json1_1GetResourceMetricsCommandError(output, context);
|
|
179
|
-
}
|
|
180
|
-
const data = await parseBody(output.body, context);
|
|
181
|
-
let contents = {};
|
|
182
|
-
contents = deserializeAws_json1_1GetResourceMetricsResponse(data, context);
|
|
183
|
-
const response = {
|
|
184
|
-
$metadata: deserializeMetadata(output),
|
|
185
|
-
...contents,
|
|
186
|
-
};
|
|
187
|
-
return Promise.resolve(response);
|
|
188
|
-
};
|
|
189
|
-
const deserializeAws_json1_1GetResourceMetricsCommandError = async (output, context) => {
|
|
190
|
-
const parsedOutput = {
|
|
191
|
-
...output,
|
|
192
|
-
body: await parseErrorBody(output.body, context),
|
|
193
|
-
};
|
|
194
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
195
|
-
switch (errorCode) {
|
|
196
|
-
case "InternalServiceError":
|
|
197
|
-
case "com.amazonaws.pi#InternalServiceError":
|
|
198
|
-
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
199
|
-
case "InvalidArgumentException":
|
|
200
|
-
case "com.amazonaws.pi#InvalidArgumentException":
|
|
201
|
-
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
202
|
-
case "NotAuthorizedException":
|
|
203
|
-
case "com.amazonaws.pi#NotAuthorizedException":
|
|
204
|
-
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
205
|
-
default:
|
|
206
|
-
const parsedBody = parsedOutput.body;
|
|
207
|
-
throwDefaultError({
|
|
208
|
-
output,
|
|
209
|
-
parsedBody,
|
|
210
|
-
exceptionCtor: __BaseException,
|
|
211
|
-
errorCode,
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
export const deserializeAws_json1_1ListAvailableResourceDimensionsCommand = async (output, context) => {
|
|
216
|
-
if (output.statusCode >= 300) {
|
|
217
|
-
return deserializeAws_json1_1ListAvailableResourceDimensionsCommandError(output, context);
|
|
218
|
-
}
|
|
219
|
-
const data = await parseBody(output.body, context);
|
|
220
|
-
let contents = {};
|
|
221
|
-
contents = deserializeAws_json1_1ListAvailableResourceDimensionsResponse(data, context);
|
|
222
|
-
const response = {
|
|
223
|
-
$metadata: deserializeMetadata(output),
|
|
224
|
-
...contents,
|
|
225
|
-
};
|
|
226
|
-
return Promise.resolve(response);
|
|
227
|
-
};
|
|
228
|
-
const deserializeAws_json1_1ListAvailableResourceDimensionsCommandError = async (output, context) => {
|
|
229
|
-
const parsedOutput = {
|
|
230
|
-
...output,
|
|
231
|
-
body: await parseErrorBody(output.body, context),
|
|
232
|
-
};
|
|
233
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
234
|
-
switch (errorCode) {
|
|
235
|
-
case "InternalServiceError":
|
|
236
|
-
case "com.amazonaws.pi#InternalServiceError":
|
|
237
|
-
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
238
|
-
case "InvalidArgumentException":
|
|
239
|
-
case "com.amazonaws.pi#InvalidArgumentException":
|
|
240
|
-
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
241
|
-
case "NotAuthorizedException":
|
|
242
|
-
case "com.amazonaws.pi#NotAuthorizedException":
|
|
243
|
-
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
244
|
-
default:
|
|
245
|
-
const parsedBody = parsedOutput.body;
|
|
246
|
-
throwDefaultError({
|
|
247
|
-
output,
|
|
248
|
-
parsedBody,
|
|
249
|
-
exceptionCtor: __BaseException,
|
|
250
|
-
errorCode,
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
export const deserializeAws_json1_1ListAvailableResourceMetricsCommand = async (output, context) => {
|
|
255
|
-
if (output.statusCode >= 300) {
|
|
256
|
-
return deserializeAws_json1_1ListAvailableResourceMetricsCommandError(output, context);
|
|
257
|
-
}
|
|
258
|
-
const data = await parseBody(output.body, context);
|
|
259
|
-
let contents = {};
|
|
260
|
-
contents = deserializeAws_json1_1ListAvailableResourceMetricsResponse(data, context);
|
|
261
|
-
const response = {
|
|
262
|
-
$metadata: deserializeMetadata(output),
|
|
263
|
-
...contents,
|
|
264
|
-
};
|
|
265
|
-
return Promise.resolve(response);
|
|
266
|
-
};
|
|
267
|
-
const deserializeAws_json1_1ListAvailableResourceMetricsCommandError = async (output, context) => {
|
|
268
|
-
const parsedOutput = {
|
|
269
|
-
...output,
|
|
270
|
-
body: await parseErrorBody(output.body, context),
|
|
271
|
-
};
|
|
272
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
273
|
-
switch (errorCode) {
|
|
274
|
-
case "InternalServiceError":
|
|
275
|
-
case "com.amazonaws.pi#InternalServiceError":
|
|
276
|
-
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
277
|
-
case "InvalidArgumentException":
|
|
278
|
-
case "com.amazonaws.pi#InvalidArgumentException":
|
|
279
|
-
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
280
|
-
case "NotAuthorizedException":
|
|
281
|
-
case "com.amazonaws.pi#NotAuthorizedException":
|
|
282
|
-
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
283
|
-
default:
|
|
284
|
-
const parsedBody = parsedOutput.body;
|
|
285
|
-
throwDefaultError({
|
|
286
|
-
output,
|
|
287
|
-
parsedBody,
|
|
288
|
-
exceptionCtor: __BaseException,
|
|
289
|
-
errorCode,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
const deserializeAws_json1_1InternalServiceErrorResponse = async (parsedOutput, context) => {
|
|
294
|
-
const body = parsedOutput.body;
|
|
295
|
-
const deserialized = deserializeAws_json1_1InternalServiceError(body, context);
|
|
296
|
-
const exception = new InternalServiceError({
|
|
297
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
298
|
-
...deserialized,
|
|
6
|
+
export var serializeAws_json1_1DescribeDimensionKeysCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var headers, body;
|
|
8
|
+
return __generator(this, function (_a) {
|
|
9
|
+
headers = {
|
|
10
|
+
"content-type": "application/x-amz-json-1.1",
|
|
11
|
+
"x-amz-target": "PerformanceInsightsv20180227.DescribeDimensionKeys",
|
|
12
|
+
};
|
|
13
|
+
body = JSON.stringify(serializeAws_json1_1DescribeDimensionKeysRequest(input, context));
|
|
14
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
299
15
|
});
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
16
|
+
}); };
|
|
17
|
+
export var serializeAws_json1_1GetDimensionKeyDetailsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
18
|
+
var headers, body;
|
|
19
|
+
return __generator(this, function (_a) {
|
|
20
|
+
headers = {
|
|
21
|
+
"content-type": "application/x-amz-json-1.1",
|
|
22
|
+
"x-amz-target": "PerformanceInsightsv20180227.GetDimensionKeyDetails",
|
|
23
|
+
};
|
|
24
|
+
body = JSON.stringify(serializeAws_json1_1GetDimensionKeyDetailsRequest(input, context));
|
|
25
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
308
26
|
});
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
27
|
+
}); };
|
|
28
|
+
export var serializeAws_json1_1GetResourceMetadataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29
|
+
var headers, body;
|
|
30
|
+
return __generator(this, function (_a) {
|
|
31
|
+
headers = {
|
|
32
|
+
"content-type": "application/x-amz-json-1.1",
|
|
33
|
+
"x-amz-target": "PerformanceInsightsv20180227.GetResourceMetadata",
|
|
34
|
+
};
|
|
35
|
+
body = JSON.stringify(serializeAws_json1_1GetResourceMetadataRequest(input, context));
|
|
36
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
317
37
|
});
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
38
|
+
}); };
|
|
39
|
+
export var serializeAws_json1_1GetResourceMetricsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
40
|
+
var headers, body;
|
|
41
|
+
return __generator(this, function (_a) {
|
|
42
|
+
headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "PerformanceInsightsv20180227.GetResourceMetrics",
|
|
45
|
+
};
|
|
46
|
+
body = JSON.stringify(serializeAws_json1_1GetResourceMetricsRequest(input, context));
|
|
47
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
48
|
+
});
|
|
49
|
+
}); };
|
|
50
|
+
export var serializeAws_json1_1ListAvailableResourceDimensionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
51
|
+
var headers, body;
|
|
52
|
+
return __generator(this, function (_a) {
|
|
53
|
+
headers = {
|
|
54
|
+
"content-type": "application/x-amz-json-1.1",
|
|
55
|
+
"x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceDimensions",
|
|
56
|
+
};
|
|
57
|
+
body = JSON.stringify(serializeAws_json1_1ListAvailableResourceDimensionsRequest(input, context));
|
|
58
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
59
|
+
});
|
|
60
|
+
}); };
|
|
61
|
+
export var serializeAws_json1_1ListAvailableResourceMetricsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
62
|
+
var headers, body;
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
headers = {
|
|
65
|
+
"content-type": "application/x-amz-json-1.1",
|
|
66
|
+
"x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceMetrics",
|
|
67
|
+
};
|
|
68
|
+
body = JSON.stringify(serializeAws_json1_1ListAvailableResourceMetricsRequest(input, context));
|
|
69
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
70
|
+
});
|
|
71
|
+
}); };
|
|
72
|
+
export var deserializeAws_json1_1DescribeDimensionKeysCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
73
|
+
var data, contents, response;
|
|
74
|
+
return __generator(this, function (_a) {
|
|
75
|
+
switch (_a.label) {
|
|
76
|
+
case 0:
|
|
77
|
+
if (output.statusCode >= 300) {
|
|
78
|
+
return [2, deserializeAws_json1_1DescribeDimensionKeysCommandError(output, context)];
|
|
79
|
+
}
|
|
80
|
+
return [4, parseBody(output.body, context)];
|
|
81
|
+
case 1:
|
|
82
|
+
data = _a.sent();
|
|
83
|
+
contents = {};
|
|
84
|
+
contents = deserializeAws_json1_1DescribeDimensionKeysResponse(data, context);
|
|
85
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
86
|
+
return [2, Promise.resolve(response)];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}); };
|
|
90
|
+
var deserializeAws_json1_1DescribeDimensionKeysCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
91
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
92
|
+
var _c;
|
|
93
|
+
return __generator(this, function (_d) {
|
|
94
|
+
switch (_d.label) {
|
|
95
|
+
case 0:
|
|
96
|
+
_a = [__assign({}, output)];
|
|
97
|
+
_c = {};
|
|
98
|
+
return [4, parseErrorBody(output.body, context)];
|
|
99
|
+
case 1:
|
|
100
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
101
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
102
|
+
_b = errorCode;
|
|
103
|
+
switch (_b) {
|
|
104
|
+
case "InternalServiceError": return [3, 2];
|
|
105
|
+
case "com.amazonaws.pi#InternalServiceError": return [3, 2];
|
|
106
|
+
case "InvalidArgumentException": return [3, 4];
|
|
107
|
+
case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
|
|
108
|
+
case "NotAuthorizedException": return [3, 6];
|
|
109
|
+
case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
|
|
110
|
+
}
|
|
111
|
+
return [3, 8];
|
|
112
|
+
case 2: return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
113
|
+
case 3: throw _d.sent();
|
|
114
|
+
case 4: return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
|
|
115
|
+
case 5: throw _d.sent();
|
|
116
|
+
case 6: return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
117
|
+
case 7: throw _d.sent();
|
|
118
|
+
case 8:
|
|
119
|
+
parsedBody = parsedOutput.body;
|
|
120
|
+
throwDefaultError({
|
|
121
|
+
output: output,
|
|
122
|
+
parsedBody: parsedBody,
|
|
123
|
+
exceptionCtor: __BaseException,
|
|
124
|
+
errorCode: errorCode,
|
|
125
|
+
});
|
|
126
|
+
_d.label = 9;
|
|
127
|
+
case 9: return [2];
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}); };
|
|
131
|
+
export var deserializeAws_json1_1GetDimensionKeyDetailsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
132
|
+
var data, contents, response;
|
|
133
|
+
return __generator(this, function (_a) {
|
|
134
|
+
switch (_a.label) {
|
|
135
|
+
case 0:
|
|
136
|
+
if (output.statusCode >= 300) {
|
|
137
|
+
return [2, deserializeAws_json1_1GetDimensionKeyDetailsCommandError(output, context)];
|
|
138
|
+
}
|
|
139
|
+
return [4, parseBody(output.body, context)];
|
|
140
|
+
case 1:
|
|
141
|
+
data = _a.sent();
|
|
142
|
+
contents = {};
|
|
143
|
+
contents = deserializeAws_json1_1GetDimensionKeyDetailsResponse(data, context);
|
|
144
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
145
|
+
return [2, Promise.resolve(response)];
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}); };
|
|
149
|
+
var deserializeAws_json1_1GetDimensionKeyDetailsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
150
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
151
|
+
var _c;
|
|
152
|
+
return __generator(this, function (_d) {
|
|
153
|
+
switch (_d.label) {
|
|
154
|
+
case 0:
|
|
155
|
+
_a = [__assign({}, output)];
|
|
156
|
+
_c = {};
|
|
157
|
+
return [4, parseErrorBody(output.body, context)];
|
|
158
|
+
case 1:
|
|
159
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
160
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
161
|
+
_b = errorCode;
|
|
162
|
+
switch (_b) {
|
|
163
|
+
case "InternalServiceError": return [3, 2];
|
|
164
|
+
case "com.amazonaws.pi#InternalServiceError": return [3, 2];
|
|
165
|
+
case "InvalidArgumentException": return [3, 4];
|
|
166
|
+
case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
|
|
167
|
+
case "NotAuthorizedException": return [3, 6];
|
|
168
|
+
case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
|
|
169
|
+
}
|
|
170
|
+
return [3, 8];
|
|
171
|
+
case 2: return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
172
|
+
case 3: throw _d.sent();
|
|
173
|
+
case 4: return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
|
|
174
|
+
case 5: throw _d.sent();
|
|
175
|
+
case 6: return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
176
|
+
case 7: throw _d.sent();
|
|
177
|
+
case 8:
|
|
178
|
+
parsedBody = parsedOutput.body;
|
|
179
|
+
throwDefaultError({
|
|
180
|
+
output: output,
|
|
181
|
+
parsedBody: parsedBody,
|
|
182
|
+
exceptionCtor: __BaseException,
|
|
183
|
+
errorCode: errorCode,
|
|
184
|
+
});
|
|
185
|
+
_d.label = 9;
|
|
186
|
+
case 9: return [2];
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}); };
|
|
190
|
+
export var deserializeAws_json1_1GetResourceMetadataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
191
|
+
var data, contents, response;
|
|
192
|
+
return __generator(this, function (_a) {
|
|
193
|
+
switch (_a.label) {
|
|
194
|
+
case 0:
|
|
195
|
+
if (output.statusCode >= 300) {
|
|
196
|
+
return [2, deserializeAws_json1_1GetResourceMetadataCommandError(output, context)];
|
|
197
|
+
}
|
|
198
|
+
return [4, parseBody(output.body, context)];
|
|
199
|
+
case 1:
|
|
200
|
+
data = _a.sent();
|
|
201
|
+
contents = {};
|
|
202
|
+
contents = deserializeAws_json1_1GetResourceMetadataResponse(data, context);
|
|
203
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
204
|
+
return [2, Promise.resolve(response)];
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}); };
|
|
208
|
+
var deserializeAws_json1_1GetResourceMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
209
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
210
|
+
var _c;
|
|
211
|
+
return __generator(this, function (_d) {
|
|
212
|
+
switch (_d.label) {
|
|
213
|
+
case 0:
|
|
214
|
+
_a = [__assign({}, output)];
|
|
215
|
+
_c = {};
|
|
216
|
+
return [4, parseErrorBody(output.body, context)];
|
|
217
|
+
case 1:
|
|
218
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
219
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
220
|
+
_b = errorCode;
|
|
221
|
+
switch (_b) {
|
|
222
|
+
case "InternalServiceError": return [3, 2];
|
|
223
|
+
case "com.amazonaws.pi#InternalServiceError": return [3, 2];
|
|
224
|
+
case "InvalidArgumentException": return [3, 4];
|
|
225
|
+
case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
|
|
226
|
+
case "NotAuthorizedException": return [3, 6];
|
|
227
|
+
case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
|
|
228
|
+
}
|
|
229
|
+
return [3, 8];
|
|
230
|
+
case 2: return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
231
|
+
case 3: throw _d.sent();
|
|
232
|
+
case 4: return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
|
|
233
|
+
case 5: throw _d.sent();
|
|
234
|
+
case 6: return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
235
|
+
case 7: throw _d.sent();
|
|
236
|
+
case 8:
|
|
237
|
+
parsedBody = parsedOutput.body;
|
|
238
|
+
throwDefaultError({
|
|
239
|
+
output: output,
|
|
240
|
+
parsedBody: parsedBody,
|
|
241
|
+
exceptionCtor: __BaseException,
|
|
242
|
+
errorCode: errorCode,
|
|
243
|
+
});
|
|
244
|
+
_d.label = 9;
|
|
245
|
+
case 9: return [2];
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}); };
|
|
249
|
+
export var deserializeAws_json1_1GetResourceMetricsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
250
|
+
var data, contents, response;
|
|
251
|
+
return __generator(this, function (_a) {
|
|
252
|
+
switch (_a.label) {
|
|
253
|
+
case 0:
|
|
254
|
+
if (output.statusCode >= 300) {
|
|
255
|
+
return [2, deserializeAws_json1_1GetResourceMetricsCommandError(output, context)];
|
|
256
|
+
}
|
|
257
|
+
return [4, parseBody(output.body, context)];
|
|
258
|
+
case 1:
|
|
259
|
+
data = _a.sent();
|
|
260
|
+
contents = {};
|
|
261
|
+
contents = deserializeAws_json1_1GetResourceMetricsResponse(data, context);
|
|
262
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
263
|
+
return [2, Promise.resolve(response)];
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}); };
|
|
267
|
+
var deserializeAws_json1_1GetResourceMetricsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
269
|
+
var _c;
|
|
270
|
+
return __generator(this, function (_d) {
|
|
271
|
+
switch (_d.label) {
|
|
272
|
+
case 0:
|
|
273
|
+
_a = [__assign({}, output)];
|
|
274
|
+
_c = {};
|
|
275
|
+
return [4, parseErrorBody(output.body, context)];
|
|
276
|
+
case 1:
|
|
277
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
278
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
279
|
+
_b = errorCode;
|
|
280
|
+
switch (_b) {
|
|
281
|
+
case "InternalServiceError": return [3, 2];
|
|
282
|
+
case "com.amazonaws.pi#InternalServiceError": return [3, 2];
|
|
283
|
+
case "InvalidArgumentException": return [3, 4];
|
|
284
|
+
case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
|
|
285
|
+
case "NotAuthorizedException": return [3, 6];
|
|
286
|
+
case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
|
|
287
|
+
}
|
|
288
|
+
return [3, 8];
|
|
289
|
+
case 2: return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
290
|
+
case 3: throw _d.sent();
|
|
291
|
+
case 4: return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
|
|
292
|
+
case 5: throw _d.sent();
|
|
293
|
+
case 6: return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
294
|
+
case 7: throw _d.sent();
|
|
295
|
+
case 8:
|
|
296
|
+
parsedBody = parsedOutput.body;
|
|
297
|
+
throwDefaultError({
|
|
298
|
+
output: output,
|
|
299
|
+
parsedBody: parsedBody,
|
|
300
|
+
exceptionCtor: __BaseException,
|
|
301
|
+
errorCode: errorCode,
|
|
302
|
+
});
|
|
303
|
+
_d.label = 9;
|
|
304
|
+
case 9: return [2];
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
}); };
|
|
308
|
+
export var deserializeAws_json1_1ListAvailableResourceDimensionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
309
|
+
var data, contents, response;
|
|
310
|
+
return __generator(this, function (_a) {
|
|
311
|
+
switch (_a.label) {
|
|
312
|
+
case 0:
|
|
313
|
+
if (output.statusCode >= 300) {
|
|
314
|
+
return [2, deserializeAws_json1_1ListAvailableResourceDimensionsCommandError(output, context)];
|
|
315
|
+
}
|
|
316
|
+
return [4, parseBody(output.body, context)];
|
|
317
|
+
case 1:
|
|
318
|
+
data = _a.sent();
|
|
319
|
+
contents = {};
|
|
320
|
+
contents = deserializeAws_json1_1ListAvailableResourceDimensionsResponse(data, context);
|
|
321
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
322
|
+
return [2, Promise.resolve(response)];
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
}); };
|
|
326
|
+
var deserializeAws_json1_1ListAvailableResourceDimensionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
327
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
328
|
+
var _c;
|
|
329
|
+
return __generator(this, function (_d) {
|
|
330
|
+
switch (_d.label) {
|
|
331
|
+
case 0:
|
|
332
|
+
_a = [__assign({}, output)];
|
|
333
|
+
_c = {};
|
|
334
|
+
return [4, parseErrorBody(output.body, context)];
|
|
335
|
+
case 1:
|
|
336
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
337
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
338
|
+
_b = errorCode;
|
|
339
|
+
switch (_b) {
|
|
340
|
+
case "InternalServiceError": return [3, 2];
|
|
341
|
+
case "com.amazonaws.pi#InternalServiceError": return [3, 2];
|
|
342
|
+
case "InvalidArgumentException": return [3, 4];
|
|
343
|
+
case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
|
|
344
|
+
case "NotAuthorizedException": return [3, 6];
|
|
345
|
+
case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
|
|
346
|
+
}
|
|
347
|
+
return [3, 8];
|
|
348
|
+
case 2: return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
349
|
+
case 3: throw _d.sent();
|
|
350
|
+
case 4: return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
|
|
351
|
+
case 5: throw _d.sent();
|
|
352
|
+
case 6: return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
353
|
+
case 7: throw _d.sent();
|
|
354
|
+
case 8:
|
|
355
|
+
parsedBody = parsedOutput.body;
|
|
356
|
+
throwDefaultError({
|
|
357
|
+
output: output,
|
|
358
|
+
parsedBody: parsedBody,
|
|
359
|
+
exceptionCtor: __BaseException,
|
|
360
|
+
errorCode: errorCode,
|
|
361
|
+
});
|
|
362
|
+
_d.label = 9;
|
|
363
|
+
case 9: return [2];
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
}); };
|
|
367
|
+
export var deserializeAws_json1_1ListAvailableResourceMetricsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
368
|
+
var data, contents, response;
|
|
369
|
+
return __generator(this, function (_a) {
|
|
370
|
+
switch (_a.label) {
|
|
371
|
+
case 0:
|
|
372
|
+
if (output.statusCode >= 300) {
|
|
373
|
+
return [2, deserializeAws_json1_1ListAvailableResourceMetricsCommandError(output, context)];
|
|
374
|
+
}
|
|
375
|
+
return [4, parseBody(output.body, context)];
|
|
376
|
+
case 1:
|
|
377
|
+
data = _a.sent();
|
|
378
|
+
contents = {};
|
|
379
|
+
contents = deserializeAws_json1_1ListAvailableResourceMetricsResponse(data, context);
|
|
380
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
381
|
+
return [2, Promise.resolve(response)];
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
}); };
|
|
385
|
+
var deserializeAws_json1_1ListAvailableResourceMetricsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
386
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
387
|
+
var _c;
|
|
388
|
+
return __generator(this, function (_d) {
|
|
389
|
+
switch (_d.label) {
|
|
390
|
+
case 0:
|
|
391
|
+
_a = [__assign({}, output)];
|
|
392
|
+
_c = {};
|
|
393
|
+
return [4, parseErrorBody(output.body, context)];
|
|
394
|
+
case 1:
|
|
395
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
396
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
397
|
+
_b = errorCode;
|
|
398
|
+
switch (_b) {
|
|
399
|
+
case "InternalServiceError": return [3, 2];
|
|
400
|
+
case "com.amazonaws.pi#InternalServiceError": return [3, 2];
|
|
401
|
+
case "InvalidArgumentException": return [3, 4];
|
|
402
|
+
case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
|
|
403
|
+
case "NotAuthorizedException": return [3, 6];
|
|
404
|
+
case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
|
|
405
|
+
}
|
|
406
|
+
return [3, 8];
|
|
407
|
+
case 2: return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
408
|
+
case 3: throw _d.sent();
|
|
409
|
+
case 4: return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
|
|
410
|
+
case 5: throw _d.sent();
|
|
411
|
+
case 6: return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
412
|
+
case 7: throw _d.sent();
|
|
413
|
+
case 8:
|
|
414
|
+
parsedBody = parsedOutput.body;
|
|
415
|
+
throwDefaultError({
|
|
416
|
+
output: output,
|
|
417
|
+
parsedBody: parsedBody,
|
|
418
|
+
exceptionCtor: __BaseException,
|
|
419
|
+
errorCode: errorCode,
|
|
420
|
+
});
|
|
421
|
+
_d.label = 9;
|
|
422
|
+
case 9: return [2];
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
}); };
|
|
426
|
+
var deserializeAws_json1_1InternalServiceErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
427
|
+
var body, deserialized, exception;
|
|
428
|
+
return __generator(this, function (_a) {
|
|
429
|
+
body = parsedOutput.body;
|
|
430
|
+
deserialized = deserializeAws_json1_1InternalServiceError(body, context);
|
|
431
|
+
exception = new InternalServiceError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
432
|
+
return [2, __decorateServiceException(exception, body)];
|
|
433
|
+
});
|
|
434
|
+
}); };
|
|
435
|
+
var deserializeAws_json1_1InvalidArgumentExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
436
|
+
var body, deserialized, exception;
|
|
437
|
+
return __generator(this, function (_a) {
|
|
438
|
+
body = parsedOutput.body;
|
|
439
|
+
deserialized = deserializeAws_json1_1InvalidArgumentException(body, context);
|
|
440
|
+
exception = new InvalidArgumentException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
441
|
+
return [2, __decorateServiceException(exception, body)];
|
|
442
|
+
});
|
|
443
|
+
}); };
|
|
444
|
+
var deserializeAws_json1_1NotAuthorizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
445
|
+
var body, deserialized, exception;
|
|
446
|
+
return __generator(this, function (_a) {
|
|
447
|
+
body = parsedOutput.body;
|
|
448
|
+
deserialized = deserializeAws_json1_1NotAuthorizedException(body, context);
|
|
449
|
+
exception = new NotAuthorizedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
450
|
+
return [2, __decorateServiceException(exception, body)];
|
|
451
|
+
});
|
|
452
|
+
}); };
|
|
453
|
+
var serializeAws_json1_1AdditionalMetricsList = function (input, context) {
|
|
321
454
|
return input
|
|
322
|
-
.filter((e)
|
|
323
|
-
.map((entry)
|
|
455
|
+
.filter(function (e) { return e != null; })
|
|
456
|
+
.map(function (entry) {
|
|
324
457
|
return entry;
|
|
325
458
|
});
|
|
326
459
|
};
|
|
327
|
-
|
|
328
|
-
return {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}),
|
|
332
|
-
...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
|
|
333
|
-
...(input.Filter != null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) }),
|
|
334
|
-
...(input.GroupBy != null && { GroupBy: serializeAws_json1_1DimensionGroup(input.GroupBy, context) }),
|
|
335
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
336
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
337
|
-
...(input.Metric != null && { Metric: input.Metric }),
|
|
338
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
339
|
-
...(input.PartitionBy != null && { PartitionBy: serializeAws_json1_1DimensionGroup(input.PartitionBy, context) }),
|
|
340
|
-
...(input.PeriodInSeconds != null && { PeriodInSeconds: input.PeriodInSeconds }),
|
|
341
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
342
|
-
...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
|
|
343
|
-
};
|
|
460
|
+
var serializeAws_json1_1DescribeDimensionKeysRequest = function (input, context) {
|
|
461
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AdditionalMetrics != null && {
|
|
462
|
+
AdditionalMetrics: serializeAws_json1_1AdditionalMetricsList(input.AdditionalMetrics, context),
|
|
463
|
+
})), (input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) })), (input.Filter != null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) })), (input.GroupBy != null && { GroupBy: serializeAws_json1_1DimensionGroup(input.GroupBy, context) })), (input.Identifier != null && { Identifier: input.Identifier })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.Metric != null && { Metric: input.Metric })), (input.NextToken != null && { NextToken: input.NextToken })), (input.PartitionBy != null && { PartitionBy: serializeAws_json1_1DimensionGroup(input.PartitionBy, context) })), (input.PeriodInSeconds != null && { PeriodInSeconds: input.PeriodInSeconds })), (input.ServiceType != null && { ServiceType: input.ServiceType })), (input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }));
|
|
344
464
|
};
|
|
345
|
-
|
|
346
|
-
return {
|
|
347
|
-
...(input.Dimensions != null && { Dimensions: serializeAws_json1_1RequestStringList(input.Dimensions, context) }),
|
|
348
|
-
...(input.Group != null && { Group: input.Group }),
|
|
349
|
-
...(input.Limit != null && { Limit: input.Limit }),
|
|
350
|
-
};
|
|
465
|
+
var serializeAws_json1_1DimensionGroup = function (input, context) {
|
|
466
|
+
return __assign(__assign(__assign({}, (input.Dimensions != null && { Dimensions: serializeAws_json1_1RequestStringList(input.Dimensions, context) })), (input.Group != null && { Group: input.Group })), (input.Limit != null && { Limit: input.Limit }));
|
|
351
467
|
};
|
|
352
|
-
|
|
468
|
+
var serializeAws_json1_1DimensionsMetricList = function (input, context) {
|
|
353
469
|
return input
|
|
354
|
-
.filter((e)
|
|
355
|
-
.map((entry)
|
|
470
|
+
.filter(function (e) { return e != null; })
|
|
471
|
+
.map(function (entry) {
|
|
356
472
|
return entry;
|
|
357
473
|
});
|
|
358
474
|
};
|
|
359
|
-
|
|
360
|
-
return {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
364
|
-
...(input.RequestedDimensions != null && {
|
|
365
|
-
RequestedDimensions: serializeAws_json1_1RequestedDimensionList(input.RequestedDimensions, context),
|
|
366
|
-
}),
|
|
367
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
368
|
-
};
|
|
475
|
+
var serializeAws_json1_1GetDimensionKeyDetailsRequest = function (input, context) {
|
|
476
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.Group != null && { Group: input.Group })), (input.GroupIdentifier != null && { GroupIdentifier: input.GroupIdentifier })), (input.Identifier != null && { Identifier: input.Identifier })), (input.RequestedDimensions != null && {
|
|
477
|
+
RequestedDimensions: serializeAws_json1_1RequestedDimensionList(input.RequestedDimensions, context),
|
|
478
|
+
})), (input.ServiceType != null && { ServiceType: input.ServiceType }));
|
|
369
479
|
};
|
|
370
|
-
|
|
371
|
-
return {
|
|
372
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
373
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
374
|
-
};
|
|
480
|
+
var serializeAws_json1_1GetResourceMetadataRequest = function (input, context) {
|
|
481
|
+
return __assign(__assign({}, (input.Identifier != null && { Identifier: input.Identifier })), (input.ServiceType != null && { ServiceType: input.ServiceType }));
|
|
375
482
|
};
|
|
376
|
-
|
|
377
|
-
return {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
381
|
-
...(input.MetricQueries != null && {
|
|
382
|
-
MetricQueries: serializeAws_json1_1MetricQueryList(input.MetricQueries, context),
|
|
383
|
-
}),
|
|
384
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
385
|
-
...(input.PeriodInSeconds != null && { PeriodInSeconds: input.PeriodInSeconds }),
|
|
386
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
387
|
-
...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
|
|
388
|
-
};
|
|
483
|
+
var serializeAws_json1_1GetResourceMetricsRequest = function (input, context) {
|
|
484
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) })), (input.Identifier != null && { Identifier: input.Identifier })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.MetricQueries != null && {
|
|
485
|
+
MetricQueries: serializeAws_json1_1MetricQueryList(input.MetricQueries, context),
|
|
486
|
+
})), (input.NextToken != null && { NextToken: input.NextToken })), (input.PeriodInSeconds != null && { PeriodInSeconds: input.PeriodInSeconds })), (input.ServiceType != null && { ServiceType: input.ServiceType })), (input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }));
|
|
389
487
|
};
|
|
390
|
-
|
|
391
|
-
return {
|
|
392
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
393
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
394
|
-
...(input.Metrics != null && { Metrics: serializeAws_json1_1DimensionsMetricList(input.Metrics, context) }),
|
|
395
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
396
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
397
|
-
};
|
|
488
|
+
var serializeAws_json1_1ListAvailableResourceDimensionsRequest = function (input, context) {
|
|
489
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.Identifier != null && { Identifier: input.Identifier })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.Metrics != null && { Metrics: serializeAws_json1_1DimensionsMetricList(input.Metrics, context) })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ServiceType != null && { ServiceType: input.ServiceType }));
|
|
398
490
|
};
|
|
399
|
-
|
|
400
|
-
return {
|
|
401
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
402
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
403
|
-
...(input.MetricTypes != null && { MetricTypes: serializeAws_json1_1MetricTypeList(input.MetricTypes, context) }),
|
|
404
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
405
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
406
|
-
};
|
|
491
|
+
var serializeAws_json1_1ListAvailableResourceMetricsRequest = function (input, context) {
|
|
492
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.Identifier != null && { Identifier: input.Identifier })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.MetricTypes != null && { MetricTypes: serializeAws_json1_1MetricTypeList(input.MetricTypes, context) })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ServiceType != null && { ServiceType: input.ServiceType }));
|
|
407
493
|
};
|
|
408
|
-
|
|
409
|
-
return {
|
|
410
|
-
...(input.Filter != null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) }),
|
|
411
|
-
...(input.GroupBy != null && { GroupBy: serializeAws_json1_1DimensionGroup(input.GroupBy, context) }),
|
|
412
|
-
...(input.Metric != null && { Metric: input.Metric }),
|
|
413
|
-
};
|
|
494
|
+
var serializeAws_json1_1MetricQuery = function (input, context) {
|
|
495
|
+
return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) })), (input.GroupBy != null && { GroupBy: serializeAws_json1_1DimensionGroup(input.GroupBy, context) })), (input.Metric != null && { Metric: input.Metric }));
|
|
414
496
|
};
|
|
415
|
-
|
|
416
|
-
return Object.entries(input).reduce((acc,
|
|
497
|
+
var serializeAws_json1_1MetricQueryFilterMap = function (input, context) {
|
|
498
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
499
|
+
var _b;
|
|
500
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
417
501
|
if (value === null) {
|
|
418
502
|
return acc;
|
|
419
503
|
}
|
|
420
|
-
return {
|
|
421
|
-
...acc,
|
|
422
|
-
[key]: value,
|
|
423
|
-
};
|
|
504
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
424
505
|
}, {});
|
|
425
506
|
};
|
|
426
|
-
|
|
507
|
+
var serializeAws_json1_1MetricQueryList = function (input, context) {
|
|
427
508
|
return input
|
|
428
|
-
.filter((e)
|
|
429
|
-
.map((entry)
|
|
509
|
+
.filter(function (e) { return e != null; })
|
|
510
|
+
.map(function (entry) {
|
|
430
511
|
return serializeAws_json1_1MetricQuery(entry, context);
|
|
431
512
|
});
|
|
432
513
|
};
|
|
433
|
-
|
|
514
|
+
var serializeAws_json1_1MetricTypeList = function (input, context) {
|
|
434
515
|
return input
|
|
435
|
-
.filter((e)
|
|
436
|
-
.map((entry)
|
|
516
|
+
.filter(function (e) { return e != null; })
|
|
517
|
+
.map(function (entry) {
|
|
437
518
|
return entry;
|
|
438
519
|
});
|
|
439
520
|
};
|
|
440
|
-
|
|
521
|
+
var serializeAws_json1_1RequestedDimensionList = function (input, context) {
|
|
441
522
|
return input
|
|
442
|
-
.filter((e)
|
|
443
|
-
.map((entry)
|
|
523
|
+
.filter(function (e) { return e != null; })
|
|
524
|
+
.map(function (entry) {
|
|
444
525
|
return entry;
|
|
445
526
|
});
|
|
446
527
|
};
|
|
447
|
-
|
|
528
|
+
var serializeAws_json1_1RequestStringList = function (input, context) {
|
|
448
529
|
return input
|
|
449
|
-
.filter((e)
|
|
450
|
-
.map((entry)
|
|
530
|
+
.filter(function (e) { return e != null; })
|
|
531
|
+
.map(function (entry) {
|
|
451
532
|
return entry;
|
|
452
533
|
});
|
|
453
534
|
};
|
|
454
|
-
|
|
455
|
-
return Object.entries(output).reduce((acc,
|
|
535
|
+
var deserializeAws_json1_1AdditionalMetricsMap = function (output, context) {
|
|
536
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
537
|
+
var _b;
|
|
538
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
456
539
|
if (value === null) {
|
|
457
540
|
return acc;
|
|
458
541
|
}
|
|
459
|
-
return {
|
|
460
|
-
...acc,
|
|
461
|
-
[key]: __limitedParseDouble(value),
|
|
462
|
-
};
|
|
542
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __limitedParseDouble(value), _b));
|
|
463
543
|
}, {});
|
|
464
544
|
};
|
|
465
|
-
|
|
545
|
+
var deserializeAws_json1_1DataPoint = function (output, context) {
|
|
466
546
|
return {
|
|
467
547
|
Timestamp: output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined,
|
|
468
548
|
Value: __limitedParseDouble(output.Value),
|
|
469
549
|
};
|
|
470
550
|
};
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
.filter((e)
|
|
474
|
-
.map((entry)
|
|
551
|
+
var deserializeAws_json1_1DataPointsList = function (output, context) {
|
|
552
|
+
var retVal = (output || [])
|
|
553
|
+
.filter(function (e) { return e != null; })
|
|
554
|
+
.map(function (entry) {
|
|
475
555
|
if (entry === null) {
|
|
476
556
|
return null;
|
|
477
557
|
}
|
|
@@ -479,7 +559,7 @@ const deserializeAws_json1_1DataPointsList = (output, context) => {
|
|
|
479
559
|
});
|
|
480
560
|
return retVal;
|
|
481
561
|
};
|
|
482
|
-
|
|
562
|
+
var deserializeAws_json1_1DescribeDimensionKeysResponse = function (output, context) {
|
|
483
563
|
return {
|
|
484
564
|
AlignedEndTime: output.AlignedEndTime != null
|
|
485
565
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AlignedEndTime)))
|
|
@@ -494,15 +574,15 @@ const deserializeAws_json1_1DescribeDimensionKeysResponse = (output, context) =>
|
|
|
494
574
|
: undefined,
|
|
495
575
|
};
|
|
496
576
|
};
|
|
497
|
-
|
|
577
|
+
var deserializeAws_json1_1DimensionDetail = function (output, context) {
|
|
498
578
|
return {
|
|
499
579
|
Identifier: __expectString(output.Identifier),
|
|
500
580
|
};
|
|
501
581
|
};
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
.filter((e)
|
|
505
|
-
.map((entry)
|
|
582
|
+
var deserializeAws_json1_1DimensionDetailList = function (output, context) {
|
|
583
|
+
var retVal = (output || [])
|
|
584
|
+
.filter(function (e) { return e != null; })
|
|
585
|
+
.map(function (entry) {
|
|
506
586
|
if (entry === null) {
|
|
507
587
|
return null;
|
|
508
588
|
}
|
|
@@ -510,16 +590,16 @@ const deserializeAws_json1_1DimensionDetailList = (output, context) => {
|
|
|
510
590
|
});
|
|
511
591
|
return retVal;
|
|
512
592
|
};
|
|
513
|
-
|
|
593
|
+
var deserializeAws_json1_1DimensionGroupDetail = function (output, context) {
|
|
514
594
|
return {
|
|
515
595
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1DimensionDetailList(output.Dimensions, context) : undefined,
|
|
516
596
|
Group: __expectString(output.Group),
|
|
517
597
|
};
|
|
518
598
|
};
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
.filter((e)
|
|
522
|
-
.map((entry)
|
|
599
|
+
var deserializeAws_json1_1DimensionGroupDetailList = function (output, context) {
|
|
600
|
+
var retVal = (output || [])
|
|
601
|
+
.filter(function (e) { return e != null; })
|
|
602
|
+
.map(function (entry) {
|
|
523
603
|
if (entry === null) {
|
|
524
604
|
return null;
|
|
525
605
|
}
|
|
@@ -527,7 +607,7 @@ const deserializeAws_json1_1DimensionGroupDetailList = (output, context) => {
|
|
|
527
607
|
});
|
|
528
608
|
return retVal;
|
|
529
609
|
};
|
|
530
|
-
|
|
610
|
+
var deserializeAws_json1_1DimensionKeyDescription = function (output, context) {
|
|
531
611
|
return {
|
|
532
612
|
AdditionalMetrics: output.AdditionalMetrics != null
|
|
533
613
|
? deserializeAws_json1_1AdditionalMetricsMap(output.AdditionalMetrics, context)
|
|
@@ -537,10 +617,10 @@ const deserializeAws_json1_1DimensionKeyDescription = (output, context) => {
|
|
|
537
617
|
Total: __limitedParseDouble(output.Total),
|
|
538
618
|
};
|
|
539
619
|
};
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
.filter((e)
|
|
543
|
-
.map((entry)
|
|
620
|
+
var deserializeAws_json1_1DimensionKeyDescriptionList = function (output, context) {
|
|
621
|
+
var retVal = (output || [])
|
|
622
|
+
.filter(function (e) { return e != null; })
|
|
623
|
+
.map(function (entry) {
|
|
544
624
|
if (entry === null) {
|
|
545
625
|
return null;
|
|
546
626
|
}
|
|
@@ -548,17 +628,17 @@ const deserializeAws_json1_1DimensionKeyDescriptionList = (output, context) => {
|
|
|
548
628
|
});
|
|
549
629
|
return retVal;
|
|
550
630
|
};
|
|
551
|
-
|
|
631
|
+
var deserializeAws_json1_1DimensionKeyDetail = function (output, context) {
|
|
552
632
|
return {
|
|
553
633
|
Dimension: __expectString(output.Dimension),
|
|
554
634
|
Status: __expectString(output.Status),
|
|
555
635
|
Value: __expectString(output.Value),
|
|
556
636
|
};
|
|
557
637
|
};
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
.filter((e)
|
|
561
|
-
.map((entry)
|
|
638
|
+
var deserializeAws_json1_1DimensionKeyDetailList = function (output, context) {
|
|
639
|
+
var retVal = (output || [])
|
|
640
|
+
.filter(function (e) { return e != null; })
|
|
641
|
+
.map(function (entry) {
|
|
562
642
|
if (entry === null) {
|
|
563
643
|
return null;
|
|
564
644
|
}
|
|
@@ -566,45 +646,43 @@ const deserializeAws_json1_1DimensionKeyDetailList = (output, context) => {
|
|
|
566
646
|
});
|
|
567
647
|
return retVal;
|
|
568
648
|
};
|
|
569
|
-
|
|
570
|
-
return Object.entries(output).reduce((acc,
|
|
649
|
+
var deserializeAws_json1_1DimensionMap = function (output, context) {
|
|
650
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
651
|
+
var _b;
|
|
652
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
571
653
|
if (value === null) {
|
|
572
654
|
return acc;
|
|
573
655
|
}
|
|
574
|
-
return {
|
|
575
|
-
...acc,
|
|
576
|
-
[key]: __expectString(value),
|
|
577
|
-
};
|
|
656
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
578
657
|
}, {});
|
|
579
658
|
};
|
|
580
|
-
|
|
659
|
+
var deserializeAws_json1_1FeatureMetadata = function (output, context) {
|
|
581
660
|
return {
|
|
582
661
|
Status: __expectString(output.Status),
|
|
583
662
|
};
|
|
584
663
|
};
|
|
585
|
-
|
|
586
|
-
return Object.entries(output).reduce((acc,
|
|
664
|
+
var deserializeAws_json1_1FeatureMetadataMap = function (output, context) {
|
|
665
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
666
|
+
var _b;
|
|
667
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
587
668
|
if (value === null) {
|
|
588
669
|
return acc;
|
|
589
670
|
}
|
|
590
|
-
return {
|
|
591
|
-
...acc,
|
|
592
|
-
[key]: deserializeAws_json1_1FeatureMetadata(value, context),
|
|
593
|
-
};
|
|
671
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1FeatureMetadata(value, context), _b));
|
|
594
672
|
}, {});
|
|
595
673
|
};
|
|
596
|
-
|
|
674
|
+
var deserializeAws_json1_1GetDimensionKeyDetailsResponse = function (output, context) {
|
|
597
675
|
return {
|
|
598
676
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1DimensionKeyDetailList(output.Dimensions, context) : undefined,
|
|
599
677
|
};
|
|
600
678
|
};
|
|
601
|
-
|
|
679
|
+
var deserializeAws_json1_1GetResourceMetadataResponse = function (output, context) {
|
|
602
680
|
return {
|
|
603
681
|
Features: output.Features != null ? deserializeAws_json1_1FeatureMetadataMap(output.Features, context) : undefined,
|
|
604
682
|
Identifier: __expectString(output.Identifier),
|
|
605
683
|
};
|
|
606
684
|
};
|
|
607
|
-
|
|
685
|
+
var deserializeAws_json1_1GetResourceMetricsResponse = function (output, context) {
|
|
608
686
|
return {
|
|
609
687
|
AlignedEndTime: output.AlignedEndTime != null
|
|
610
688
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AlignedEndTime)))
|
|
@@ -617,17 +695,17 @@ const deserializeAws_json1_1GetResourceMetricsResponse = (output, context) => {
|
|
|
617
695
|
NextToken: __expectString(output.NextToken),
|
|
618
696
|
};
|
|
619
697
|
};
|
|
620
|
-
|
|
698
|
+
var deserializeAws_json1_1InternalServiceError = function (output, context) {
|
|
621
699
|
return {
|
|
622
700
|
Message: __expectString(output.Message),
|
|
623
701
|
};
|
|
624
702
|
};
|
|
625
|
-
|
|
703
|
+
var deserializeAws_json1_1InvalidArgumentException = function (output, context) {
|
|
626
704
|
return {
|
|
627
705
|
Message: __expectString(output.Message),
|
|
628
706
|
};
|
|
629
707
|
};
|
|
630
|
-
|
|
708
|
+
var deserializeAws_json1_1ListAvailableResourceDimensionsResponse = function (output, context) {
|
|
631
709
|
return {
|
|
632
710
|
MetricDimensions: output.MetricDimensions != null
|
|
633
711
|
? deserializeAws_json1_1MetricDimensionsList(output.MetricDimensions, context)
|
|
@@ -635,22 +713,22 @@ const deserializeAws_json1_1ListAvailableResourceDimensionsResponse = (output, c
|
|
|
635
713
|
NextToken: __expectString(output.NextToken),
|
|
636
714
|
};
|
|
637
715
|
};
|
|
638
|
-
|
|
716
|
+
var deserializeAws_json1_1ListAvailableResourceMetricsResponse = function (output, context) {
|
|
639
717
|
return {
|
|
640
718
|
Metrics: output.Metrics != null ? deserializeAws_json1_1ResponseResourceMetricList(output.Metrics, context) : undefined,
|
|
641
719
|
NextToken: __expectString(output.NextToken),
|
|
642
720
|
};
|
|
643
721
|
};
|
|
644
|
-
|
|
722
|
+
var deserializeAws_json1_1MetricDimensionGroups = function (output, context) {
|
|
645
723
|
return {
|
|
646
724
|
Groups: output.Groups != null ? deserializeAws_json1_1DimensionGroupDetailList(output.Groups, context) : undefined,
|
|
647
725
|
Metric: __expectString(output.Metric),
|
|
648
726
|
};
|
|
649
727
|
};
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
.filter((e)
|
|
653
|
-
.map((entry)
|
|
728
|
+
var deserializeAws_json1_1MetricDimensionsList = function (output, context) {
|
|
729
|
+
var retVal = (output || [])
|
|
730
|
+
.filter(function (e) { return e != null; })
|
|
731
|
+
.map(function (entry) {
|
|
654
732
|
if (entry === null) {
|
|
655
733
|
return null;
|
|
656
734
|
}
|
|
@@ -658,16 +736,16 @@ const deserializeAws_json1_1MetricDimensionsList = (output, context) => {
|
|
|
658
736
|
});
|
|
659
737
|
return retVal;
|
|
660
738
|
};
|
|
661
|
-
|
|
739
|
+
var deserializeAws_json1_1MetricKeyDataPoints = function (output, context) {
|
|
662
740
|
return {
|
|
663
741
|
DataPoints: output.DataPoints != null ? deserializeAws_json1_1DataPointsList(output.DataPoints, context) : undefined,
|
|
664
742
|
Key: output.Key != null ? deserializeAws_json1_1ResponseResourceMetricKey(output.Key, context) : undefined,
|
|
665
743
|
};
|
|
666
744
|
};
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
.filter((e)
|
|
670
|
-
.map((entry)
|
|
745
|
+
var deserializeAws_json1_1MetricKeyDataPointsList = function (output, context) {
|
|
746
|
+
var retVal = (output || [])
|
|
747
|
+
.filter(function (e) { return e != null; })
|
|
748
|
+
.map(function (entry) {
|
|
671
749
|
if (entry === null) {
|
|
672
750
|
return null;
|
|
673
751
|
}
|
|
@@ -675,10 +753,10 @@ const deserializeAws_json1_1MetricKeyDataPointsList = (output, context) => {
|
|
|
675
753
|
});
|
|
676
754
|
return retVal;
|
|
677
755
|
};
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
.filter((e)
|
|
681
|
-
.map((entry)
|
|
756
|
+
var deserializeAws_json1_1MetricValuesList = function (output, context) {
|
|
757
|
+
var retVal = (output || [])
|
|
758
|
+
.filter(function (e) { return e != null; })
|
|
759
|
+
.map(function (entry) {
|
|
682
760
|
if (entry === null) {
|
|
683
761
|
return null;
|
|
684
762
|
}
|
|
@@ -686,20 +764,20 @@ const deserializeAws_json1_1MetricValuesList = (output, context) => {
|
|
|
686
764
|
});
|
|
687
765
|
return retVal;
|
|
688
766
|
};
|
|
689
|
-
|
|
767
|
+
var deserializeAws_json1_1NotAuthorizedException = function (output, context) {
|
|
690
768
|
return {
|
|
691
769
|
Message: __expectString(output.Message),
|
|
692
770
|
};
|
|
693
771
|
};
|
|
694
|
-
|
|
772
|
+
var deserializeAws_json1_1ResponsePartitionKey = function (output, context) {
|
|
695
773
|
return {
|
|
696
774
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1DimensionMap(output.Dimensions, context) : undefined,
|
|
697
775
|
};
|
|
698
776
|
};
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
.filter((e)
|
|
702
|
-
.map((entry)
|
|
777
|
+
var deserializeAws_json1_1ResponsePartitionKeyList = function (output, context) {
|
|
778
|
+
var retVal = (output || [])
|
|
779
|
+
.filter(function (e) { return e != null; })
|
|
780
|
+
.map(function (entry) {
|
|
703
781
|
if (entry === null) {
|
|
704
782
|
return null;
|
|
705
783
|
}
|
|
@@ -707,23 +785,23 @@ const deserializeAws_json1_1ResponsePartitionKeyList = (output, context) => {
|
|
|
707
785
|
});
|
|
708
786
|
return retVal;
|
|
709
787
|
};
|
|
710
|
-
|
|
788
|
+
var deserializeAws_json1_1ResponseResourceMetric = function (output, context) {
|
|
711
789
|
return {
|
|
712
790
|
Description: __expectString(output.Description),
|
|
713
791
|
Metric: __expectString(output.Metric),
|
|
714
792
|
Unit: __expectString(output.Unit),
|
|
715
793
|
};
|
|
716
794
|
};
|
|
717
|
-
|
|
795
|
+
var deserializeAws_json1_1ResponseResourceMetricKey = function (output, context) {
|
|
718
796
|
return {
|
|
719
797
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1DimensionMap(output.Dimensions, context) : undefined,
|
|
720
798
|
Metric: __expectString(output.Metric),
|
|
721
799
|
};
|
|
722
800
|
};
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
.filter((e)
|
|
726
|
-
.map((entry)
|
|
801
|
+
var deserializeAws_json1_1ResponseResourceMetricList = function (output, context) {
|
|
802
|
+
var retVal = (output || [])
|
|
803
|
+
.filter(function (e) { return e != null; })
|
|
804
|
+
.map(function (entry) {
|
|
727
805
|
if (entry === null) {
|
|
728
806
|
return null;
|
|
729
807
|
}
|
|
@@ -731,52 +809,75 @@ const deserializeAws_json1_1ResponseResourceMetricList = (output, context) => {
|
|
|
731
809
|
});
|
|
732
810
|
return retVal;
|
|
733
811
|
};
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
812
|
+
var deserializeMetadata = function (output) {
|
|
813
|
+
var _a, _b;
|
|
814
|
+
return ({
|
|
815
|
+
httpStatusCode: output.statusCode,
|
|
816
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
817
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
818
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
819
|
+
});
|
|
820
|
+
};
|
|
821
|
+
var collectBody = function (streamBody, context) {
|
|
822
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
741
823
|
if (streamBody instanceof Uint8Array) {
|
|
742
824
|
return Promise.resolve(streamBody);
|
|
743
825
|
}
|
|
744
826
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
745
827
|
};
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
828
|
+
var collectBodyString = function (streamBody, context) {
|
|
829
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
830
|
+
};
|
|
831
|
+
var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
832
|
+
var _a, hostname, _b, protocol, port, basePath, contents;
|
|
833
|
+
return __generator(this, function (_c) {
|
|
834
|
+
switch (_c.label) {
|
|
835
|
+
case 0: return [4, context.endpoint()];
|
|
836
|
+
case 1:
|
|
837
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
838
|
+
contents = {
|
|
839
|
+
protocol: protocol,
|
|
840
|
+
hostname: hostname,
|
|
841
|
+
port: port,
|
|
842
|
+
method: "POST",
|
|
843
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
844
|
+
headers: headers,
|
|
845
|
+
};
|
|
846
|
+
if (resolvedHostname !== undefined) {
|
|
847
|
+
contents.hostname = resolvedHostname;
|
|
848
|
+
}
|
|
849
|
+
if (body !== undefined) {
|
|
850
|
+
contents.body = body;
|
|
851
|
+
}
|
|
852
|
+
return [2, new __HttpRequest(contents)];
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
}); };
|
|
856
|
+
var parseBody = function (streamBody, context) {
|
|
857
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
858
|
+
if (encoded.length) {
|
|
859
|
+
return JSON.parse(encoded);
|
|
860
|
+
}
|
|
861
|
+
return {};
|
|
862
|
+
});
|
|
764
863
|
};
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
864
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
865
|
+
var value;
|
|
866
|
+
var _a;
|
|
867
|
+
return __generator(this, function (_b) {
|
|
868
|
+
switch (_b.label) {
|
|
869
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
870
|
+
case 1:
|
|
871
|
+
value = _b.sent();
|
|
872
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
873
|
+
return [2, value];
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
}); };
|
|
877
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
878
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
879
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
880
|
+
var cleanValue = rawValue;
|
|
780
881
|
if (typeof cleanValue === "number") {
|
|
781
882
|
cleanValue = cleanValue.toString();
|
|
782
883
|
}
|
|
@@ -791,7 +892,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
791
892
|
}
|
|
792
893
|
return cleanValue;
|
|
793
894
|
};
|
|
794
|
-
|
|
895
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
795
896
|
if (headerKey !== undefined) {
|
|
796
897
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
797
898
|
}
|