@aws-sdk/client-rum 3.190.0 → 3.193.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 +19 -0
- package/README.md +7 -7
- package/dist-cjs/RUM.js +105 -0
- package/dist-cjs/RUMClient.js +11 -8
- package/dist-cjs/commands/BatchCreateRumMetricDefinitionsCommand.js +46 -0
- package/dist-cjs/commands/BatchDeleteRumMetricDefinitionsCommand.js +46 -0
- package/dist-cjs/commands/BatchGetRumMetricDefinitionsCommand.js +46 -0
- package/dist-cjs/commands/CreateAppMonitorCommand.js +10 -0
- package/dist-cjs/commands/DeleteAppMonitorCommand.js +10 -0
- package/dist-cjs/commands/DeleteRumMetricsDestinationCommand.js +46 -0
- package/dist-cjs/commands/GetAppMonitorCommand.js +10 -0
- package/dist-cjs/commands/GetAppMonitorDataCommand.js +10 -0
- package/dist-cjs/commands/ListAppMonitorsCommand.js +10 -0
- package/dist-cjs/commands/ListRumMetricsDestinationsCommand.js +46 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +10 -0
- package/dist-cjs/commands/PutRumEventsCommand.js +10 -0
- package/dist-cjs/commands/PutRumMetricsDestinationCommand.js +46 -0
- package/dist-cjs/commands/TagResourceCommand.js +10 -0
- package/dist-cjs/commands/UntagResourceCommand.js +10 -0
- package/dist-cjs/commands/UpdateAppMonitorCommand.js +10 -0
- package/dist-cjs/commands/UpdateRumMetricDefinitionCommand.js +46 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/endpoint/EndpointParameters.js +13 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +318 -0
- package/dist-cjs/models/models_0.js +98 -16
- package/dist-cjs/pagination/BatchGetRumMetricDefinitionsPaginator.js +36 -0
- package/dist-cjs/pagination/ListRumMetricsDestinationsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +675 -17
- package/dist-cjs/runtimeConfig.shared.js +3 -3
- package/dist-es/RUM.js +105 -0
- package/dist-es/RUMClient.js +12 -9
- package/dist-es/commands/BatchCreateRumMetricDefinitionsCommand.js +42 -0
- package/dist-es/commands/BatchDeleteRumMetricDefinitionsCommand.js +42 -0
- package/dist-es/commands/BatchGetRumMetricDefinitionsCommand.js +42 -0
- package/dist-es/commands/CreateAppMonitorCommand.js +10 -0
- package/dist-es/commands/DeleteAppMonitorCommand.js +10 -0
- package/dist-es/commands/DeleteRumMetricsDestinationCommand.js +42 -0
- package/dist-es/commands/GetAppMonitorCommand.js +10 -0
- package/dist-es/commands/GetAppMonitorDataCommand.js +10 -0
- package/dist-es/commands/ListAppMonitorsCommand.js +10 -0
- package/dist-es/commands/ListRumMetricsDestinationsCommand.js +42 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +10 -0
- package/dist-es/commands/PutRumEventsCommand.js +10 -0
- package/dist-es/commands/PutRumMetricsDestinationCommand.js +42 -0
- package/dist-es/commands/TagResourceCommand.js +10 -0
- package/dist-es/commands/UntagResourceCommand.js +10 -0
- package/dist-es/commands/UpdateAppMonitorCommand.js +10 -0
- package/dist-es/commands/UpdateRumMetricDefinitionCommand.js +42 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +315 -0
- package/dist-es/models/models_0.js +76 -14
- package/dist-es/pagination/BatchGetRumMetricDefinitionsPaginator.js +32 -0
- package/dist-es/pagination/ListRumMetricsDestinationsPaginator.js +32 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +657 -13
- package/dist-es/runtimeConfig.shared.js +2 -2
- package/dist-types/RUM.d.ts +83 -0
- package/dist-types/RUMClient.d.ts +15 -11
- package/dist-types/commands/BatchCreateRumMetricDefinitionsCommand.d.ts +60 -0
- package/dist-types/commands/BatchDeleteRumMetricDefinitionsCommand.d.ts +42 -0
- package/dist-types/commands/BatchGetRumMetricDefinitionsCommand.d.ts +37 -0
- package/dist-types/commands/CreateAppMonitorCommand.d.ts +2 -0
- package/dist-types/commands/DeleteAppMonitorCommand.d.ts +2 -0
- package/dist-types/commands/DeleteRumMetricsDestinationCommand.d.ts +38 -0
- package/dist-types/commands/GetAppMonitorCommand.d.ts +2 -0
- package/dist-types/commands/GetAppMonitorDataCommand.d.ts +2 -0
- package/dist-types/commands/ListAppMonitorsCommand.d.ts +2 -0
- package/dist-types/commands/ListRumMetricsDestinationsCommand.d.ts +39 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +2 -0
- package/dist-types/commands/PutRumEventsCommand.d.ts +2 -0
- package/dist-types/commands/PutRumMetricsDestinationCommand.d.ts +39 -0
- package/dist-types/commands/TagResourceCommand.d.ts +2 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +2 -0
- package/dist-types/commands/UpdateAppMonitorCommand.d.ts +2 -0
- package/dist-types/commands/UpdateRumMetricDefinitionCommand.d.ts +38 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +719 -57
- package/dist-types/pagination/BatchGetRumMetricDefinitionsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListRumMetricsDestinationsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +21 -0
- package/dist-types/runtimeConfig.browser.d.ts +4 -2
- package/dist-types/runtimeConfig.d.ts +4 -2
- package/dist-types/runtimeConfig.native.d.ts +4 -2
- package/dist-types/runtimeConfig.shared.d.ts +3 -1
- package/dist-types/ts3.4/RUM.d.ts +119 -0
- package/dist-types/ts3.4/RUMClient.d.ts +59 -10
- package/dist-types/ts3.4/commands/BatchCreateRumMetricDefinitionsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/BatchDeleteRumMetricDefinitionsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/BatchGetRumMetricDefinitionsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/CreateAppMonitorCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/DeleteAppMonitorCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/DeleteRumMetricsDestinationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/GetAppMonitorCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/GetAppMonitorDataCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/ListAppMonitorsCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/ListRumMetricsDestinationsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/PutRumEventsCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/PutRumMetricsDestinationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/UpdateAppMonitorCommand.d.ts +2 -0
- package/dist-types/ts3.4/commands/UpdateRumMetricDefinitionCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +26 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +170 -18
- package/dist-types/ts3.4/pagination/BatchGetRumMetricDefinitionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRumMetricsDestinationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +84 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +14 -4
- package/dist-types/ts3.4/runtimeConfig.d.ts +14 -4
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +14 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +6 -1
- package/package.json +28 -26
- package/dist-cjs/endpoints.js +0 -132
- package/dist-es/endpoints.js +0 -128
- package/dist-types/endpoints.d.ts +0 -2
- package/dist-types/ts3.4/endpoints.d.ts +0 -2
|
@@ -2,6 +2,79 @@ import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } f
|
|
|
2
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, map as __map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
4
4
|
import { RUMServiceException as __BaseException } from "../models/RUMServiceException";
|
|
5
|
+
export const serializeAws_restJson1BatchCreateRumMetricDefinitionsCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
|
|
11
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
12
|
+
let body;
|
|
13
|
+
body = JSON.stringify({
|
|
14
|
+
...(input.Destination != null && { Destination: input.Destination }),
|
|
15
|
+
...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }),
|
|
16
|
+
...(input.MetricDefinitions != null && {
|
|
17
|
+
MetricDefinitions: serializeAws_restJson1MetricDefinitionsRequest(input.MetricDefinitions, context),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
return new __HttpRequest({
|
|
21
|
+
protocol,
|
|
22
|
+
hostname,
|
|
23
|
+
port,
|
|
24
|
+
method: "POST",
|
|
25
|
+
headers,
|
|
26
|
+
path: resolvedPath,
|
|
27
|
+
body,
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export const serializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand = async (input, context) => {
|
|
31
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
32
|
+
const headers = {};
|
|
33
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
|
|
34
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
35
|
+
const query = map({
|
|
36
|
+
destination: [, input.Destination],
|
|
37
|
+
destinationArn: [, input.DestinationArn],
|
|
38
|
+
metricDefinitionIds: [
|
|
39
|
+
() => input.MetricDefinitionIds !== void 0,
|
|
40
|
+
() => (input.MetricDefinitionIds || []).map((_entry) => _entry),
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
let body;
|
|
44
|
+
return new __HttpRequest({
|
|
45
|
+
protocol,
|
|
46
|
+
hostname,
|
|
47
|
+
port,
|
|
48
|
+
method: "DELETE",
|
|
49
|
+
headers,
|
|
50
|
+
path: resolvedPath,
|
|
51
|
+
query,
|
|
52
|
+
body,
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
export const serializeAws_restJson1BatchGetRumMetricDefinitionsCommand = async (input, context) => {
|
|
56
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
57
|
+
const headers = {};
|
|
58
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
|
|
59
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
60
|
+
const query = map({
|
|
61
|
+
destination: [, input.Destination],
|
|
62
|
+
destinationArn: [, input.DestinationArn],
|
|
63
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
64
|
+
nextToken: [, input.NextToken],
|
|
65
|
+
});
|
|
66
|
+
let body;
|
|
67
|
+
return new __HttpRequest({
|
|
68
|
+
protocol,
|
|
69
|
+
hostname,
|
|
70
|
+
port,
|
|
71
|
+
method: "GET",
|
|
72
|
+
headers,
|
|
73
|
+
path: resolvedPath,
|
|
74
|
+
query,
|
|
75
|
+
body,
|
|
76
|
+
});
|
|
77
|
+
};
|
|
5
78
|
export const serializeAws_restJson1CreateAppMonitorCommand = async (input, context) => {
|
|
6
79
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
80
|
const headers = {
|
|
@@ -44,6 +117,28 @@ export const serializeAws_restJson1DeleteAppMonitorCommand = async (input, conte
|
|
|
44
117
|
body,
|
|
45
118
|
});
|
|
46
119
|
};
|
|
120
|
+
export const serializeAws_restJson1DeleteRumMetricsDestinationCommand = async (input, context) => {
|
|
121
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
122
|
+
const headers = {};
|
|
123
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
124
|
+
"/rummetrics/{AppMonitorName}/metricsdestination";
|
|
125
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
126
|
+
const query = map({
|
|
127
|
+
destination: [, input.Destination],
|
|
128
|
+
destinationArn: [, input.DestinationArn],
|
|
129
|
+
});
|
|
130
|
+
let body;
|
|
131
|
+
return new __HttpRequest({
|
|
132
|
+
protocol,
|
|
133
|
+
hostname,
|
|
134
|
+
port,
|
|
135
|
+
method: "DELETE",
|
|
136
|
+
headers,
|
|
137
|
+
path: resolvedPath,
|
|
138
|
+
query,
|
|
139
|
+
body,
|
|
140
|
+
});
|
|
141
|
+
};
|
|
47
142
|
export const serializeAws_restJson1GetAppMonitorCommand = async (input, context) => {
|
|
48
143
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
49
144
|
const headers = {};
|
|
@@ -104,6 +199,28 @@ export const serializeAws_restJson1ListAppMonitorsCommand = async (input, contex
|
|
|
104
199
|
body,
|
|
105
200
|
});
|
|
106
201
|
};
|
|
202
|
+
export const serializeAws_restJson1ListRumMetricsDestinationsCommand = async (input, context) => {
|
|
203
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
204
|
+
const headers = {};
|
|
205
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
206
|
+
"/rummetrics/{AppMonitorName}/metricsdestination";
|
|
207
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
208
|
+
const query = map({
|
|
209
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
210
|
+
nextToken: [, input.NextToken],
|
|
211
|
+
});
|
|
212
|
+
let body;
|
|
213
|
+
return new __HttpRequest({
|
|
214
|
+
protocol,
|
|
215
|
+
hostname,
|
|
216
|
+
port,
|
|
217
|
+
method: "GET",
|
|
218
|
+
headers,
|
|
219
|
+
path: resolvedPath,
|
|
220
|
+
query,
|
|
221
|
+
body,
|
|
222
|
+
});
|
|
223
|
+
};
|
|
107
224
|
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
108
225
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
109
226
|
const headers = {};
|
|
@@ -153,6 +270,30 @@ export const serializeAws_restJson1PutRumEventsCommand = async (input, context)
|
|
|
153
270
|
body,
|
|
154
271
|
});
|
|
155
272
|
};
|
|
273
|
+
export const serializeAws_restJson1PutRumMetricsDestinationCommand = async (input, context) => {
|
|
274
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
275
|
+
const headers = {
|
|
276
|
+
"content-type": "application/json",
|
|
277
|
+
};
|
|
278
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
279
|
+
"/rummetrics/{AppMonitorName}/metricsdestination";
|
|
280
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
281
|
+
let body;
|
|
282
|
+
body = JSON.stringify({
|
|
283
|
+
...(input.Destination != null && { Destination: input.Destination }),
|
|
284
|
+
...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }),
|
|
285
|
+
...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
|
|
286
|
+
});
|
|
287
|
+
return new __HttpRequest({
|
|
288
|
+
protocol,
|
|
289
|
+
hostname,
|
|
290
|
+
port,
|
|
291
|
+
method: "POST",
|
|
292
|
+
headers,
|
|
293
|
+
path: resolvedPath,
|
|
294
|
+
body,
|
|
295
|
+
});
|
|
296
|
+
};
|
|
156
297
|
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
157
298
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
158
299
|
const headers = {
|
|
@@ -219,20 +360,244 @@ export const serializeAws_restJson1UpdateAppMonitorCommand = async (input, conte
|
|
|
219
360
|
body,
|
|
220
361
|
});
|
|
221
362
|
};
|
|
222
|
-
export const
|
|
363
|
+
export const serializeAws_restJson1UpdateRumMetricDefinitionCommand = async (input, context) => {
|
|
364
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
365
|
+
const headers = {
|
|
366
|
+
"content-type": "application/json",
|
|
367
|
+
};
|
|
368
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
|
|
369
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
370
|
+
let body;
|
|
371
|
+
body = JSON.stringify({
|
|
372
|
+
...(input.Destination != null && { Destination: input.Destination }),
|
|
373
|
+
...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }),
|
|
374
|
+
...(input.MetricDefinition != null && {
|
|
375
|
+
MetricDefinition: serializeAws_restJson1MetricDefinitionRequest(input.MetricDefinition, context),
|
|
376
|
+
}),
|
|
377
|
+
...(input.MetricDefinitionId != null && { MetricDefinitionId: input.MetricDefinitionId }),
|
|
378
|
+
});
|
|
379
|
+
return new __HttpRequest({
|
|
380
|
+
protocol,
|
|
381
|
+
hostname,
|
|
382
|
+
port,
|
|
383
|
+
method: "PATCH",
|
|
384
|
+
headers,
|
|
385
|
+
path: resolvedPath,
|
|
386
|
+
body,
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
export const deserializeAws_restJson1BatchCreateRumMetricDefinitionsCommand = async (output, context) => {
|
|
390
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
391
|
+
return deserializeAws_restJson1BatchCreateRumMetricDefinitionsCommandError(output, context);
|
|
392
|
+
}
|
|
393
|
+
const contents = map({
|
|
394
|
+
$metadata: deserializeMetadata(output),
|
|
395
|
+
});
|
|
396
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
397
|
+
if (data.Errors != null) {
|
|
398
|
+
contents.Errors = deserializeAws_restJson1BatchCreateRumMetricDefinitionsErrors(data.Errors, context);
|
|
399
|
+
}
|
|
400
|
+
if (data.MetricDefinitions != null) {
|
|
401
|
+
contents.MetricDefinitions = deserializeAws_restJson1MetricDefinitions(data.MetricDefinitions, context);
|
|
402
|
+
}
|
|
403
|
+
return contents;
|
|
404
|
+
};
|
|
405
|
+
const deserializeAws_restJson1BatchCreateRumMetricDefinitionsCommandError = async (output, context) => {
|
|
406
|
+
const parsedOutput = {
|
|
407
|
+
...output,
|
|
408
|
+
body: await parseErrorBody(output.body, context),
|
|
409
|
+
};
|
|
410
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
411
|
+
switch (errorCode) {
|
|
412
|
+
case "AccessDeniedException":
|
|
413
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
414
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
415
|
+
case "ConflictException":
|
|
416
|
+
case "com.amazonaws.rum#ConflictException":
|
|
417
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
418
|
+
case "InternalServerException":
|
|
419
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
420
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
421
|
+
case "ResourceNotFoundException":
|
|
422
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
423
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
424
|
+
case "ServiceQuotaExceededException":
|
|
425
|
+
case "com.amazonaws.rum#ServiceQuotaExceededException":
|
|
426
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
427
|
+
case "ThrottlingException":
|
|
428
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
429
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
430
|
+
case "ValidationException":
|
|
431
|
+
case "com.amazonaws.rum#ValidationException":
|
|
432
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
433
|
+
default:
|
|
434
|
+
const parsedBody = parsedOutput.body;
|
|
435
|
+
throwDefaultError({
|
|
436
|
+
output,
|
|
437
|
+
parsedBody,
|
|
438
|
+
exceptionCtor: __BaseException,
|
|
439
|
+
errorCode,
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
export const deserializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand = async (output, context) => {
|
|
444
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
445
|
+
return deserializeAws_restJson1BatchDeleteRumMetricDefinitionsCommandError(output, context);
|
|
446
|
+
}
|
|
447
|
+
const contents = map({
|
|
448
|
+
$metadata: deserializeMetadata(output),
|
|
449
|
+
});
|
|
450
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
451
|
+
if (data.Errors != null) {
|
|
452
|
+
contents.Errors = deserializeAws_restJson1BatchDeleteRumMetricDefinitionsErrors(data.Errors, context);
|
|
453
|
+
}
|
|
454
|
+
if (data.MetricDefinitionIds != null) {
|
|
455
|
+
contents.MetricDefinitionIds = deserializeAws_restJson1MetricDefinitionIds(data.MetricDefinitionIds, context);
|
|
456
|
+
}
|
|
457
|
+
return contents;
|
|
458
|
+
};
|
|
459
|
+
const deserializeAws_restJson1BatchDeleteRumMetricDefinitionsCommandError = async (output, context) => {
|
|
460
|
+
const parsedOutput = {
|
|
461
|
+
...output,
|
|
462
|
+
body: await parseErrorBody(output.body, context),
|
|
463
|
+
};
|
|
464
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
465
|
+
switch (errorCode) {
|
|
466
|
+
case "AccessDeniedException":
|
|
467
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
468
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
469
|
+
case "ConflictException":
|
|
470
|
+
case "com.amazonaws.rum#ConflictException":
|
|
471
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
472
|
+
case "InternalServerException":
|
|
473
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
474
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
475
|
+
case "ResourceNotFoundException":
|
|
476
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
477
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
478
|
+
case "ThrottlingException":
|
|
479
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
480
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
481
|
+
case "ValidationException":
|
|
482
|
+
case "com.amazonaws.rum#ValidationException":
|
|
483
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
484
|
+
default:
|
|
485
|
+
const parsedBody = parsedOutput.body;
|
|
486
|
+
throwDefaultError({
|
|
487
|
+
output,
|
|
488
|
+
parsedBody,
|
|
489
|
+
exceptionCtor: __BaseException,
|
|
490
|
+
errorCode,
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
export const deserializeAws_restJson1BatchGetRumMetricDefinitionsCommand = async (output, context) => {
|
|
495
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
496
|
+
return deserializeAws_restJson1BatchGetRumMetricDefinitionsCommandError(output, context);
|
|
497
|
+
}
|
|
498
|
+
const contents = map({
|
|
499
|
+
$metadata: deserializeMetadata(output),
|
|
500
|
+
});
|
|
501
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
502
|
+
if (data.MetricDefinitions != null) {
|
|
503
|
+
contents.MetricDefinitions = deserializeAws_restJson1MetricDefinitions(data.MetricDefinitions, context);
|
|
504
|
+
}
|
|
505
|
+
if (data.NextToken != null) {
|
|
506
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
507
|
+
}
|
|
508
|
+
return contents;
|
|
509
|
+
};
|
|
510
|
+
const deserializeAws_restJson1BatchGetRumMetricDefinitionsCommandError = async (output, context) => {
|
|
511
|
+
const parsedOutput = {
|
|
512
|
+
...output,
|
|
513
|
+
body: await parseErrorBody(output.body, context),
|
|
514
|
+
};
|
|
515
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
516
|
+
switch (errorCode) {
|
|
517
|
+
case "AccessDeniedException":
|
|
518
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
519
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
520
|
+
case "InternalServerException":
|
|
521
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
522
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
523
|
+
case "ResourceNotFoundException":
|
|
524
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
525
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
526
|
+
case "ValidationException":
|
|
527
|
+
case "com.amazonaws.rum#ValidationException":
|
|
528
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
529
|
+
default:
|
|
530
|
+
const parsedBody = parsedOutput.body;
|
|
531
|
+
throwDefaultError({
|
|
532
|
+
output,
|
|
533
|
+
parsedBody,
|
|
534
|
+
exceptionCtor: __BaseException,
|
|
535
|
+
errorCode,
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
export const deserializeAws_restJson1CreateAppMonitorCommand = async (output, context) => {
|
|
540
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
541
|
+
return deserializeAws_restJson1CreateAppMonitorCommandError(output, context);
|
|
542
|
+
}
|
|
543
|
+
const contents = map({
|
|
544
|
+
$metadata: deserializeMetadata(output),
|
|
545
|
+
});
|
|
546
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
547
|
+
if (data.Id != null) {
|
|
548
|
+
contents.Id = __expectString(data.Id);
|
|
549
|
+
}
|
|
550
|
+
return contents;
|
|
551
|
+
};
|
|
552
|
+
const deserializeAws_restJson1CreateAppMonitorCommandError = async (output, context) => {
|
|
553
|
+
const parsedOutput = {
|
|
554
|
+
...output,
|
|
555
|
+
body: await parseErrorBody(output.body, context),
|
|
556
|
+
};
|
|
557
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
558
|
+
switch (errorCode) {
|
|
559
|
+
case "AccessDeniedException":
|
|
560
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
561
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
562
|
+
case "ConflictException":
|
|
563
|
+
case "com.amazonaws.rum#ConflictException":
|
|
564
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
565
|
+
case "InternalServerException":
|
|
566
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
567
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
568
|
+
case "ResourceNotFoundException":
|
|
569
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
570
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
571
|
+
case "ServiceQuotaExceededException":
|
|
572
|
+
case "com.amazonaws.rum#ServiceQuotaExceededException":
|
|
573
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
574
|
+
case "ThrottlingException":
|
|
575
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
576
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
577
|
+
case "ValidationException":
|
|
578
|
+
case "com.amazonaws.rum#ValidationException":
|
|
579
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
580
|
+
default:
|
|
581
|
+
const parsedBody = parsedOutput.body;
|
|
582
|
+
throwDefaultError({
|
|
583
|
+
output,
|
|
584
|
+
parsedBody,
|
|
585
|
+
exceptionCtor: __BaseException,
|
|
586
|
+
errorCode,
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
export const deserializeAws_restJson1DeleteAppMonitorCommand = async (output, context) => {
|
|
223
591
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
224
|
-
return
|
|
592
|
+
return deserializeAws_restJson1DeleteAppMonitorCommandError(output, context);
|
|
225
593
|
}
|
|
226
594
|
const contents = map({
|
|
227
595
|
$metadata: deserializeMetadata(output),
|
|
228
596
|
});
|
|
229
|
-
|
|
230
|
-
if (data.Id != null) {
|
|
231
|
-
contents.Id = __expectString(data.Id);
|
|
232
|
-
}
|
|
597
|
+
await collectBody(output.body, context);
|
|
233
598
|
return contents;
|
|
234
599
|
};
|
|
235
|
-
const
|
|
600
|
+
const deserializeAws_restJson1DeleteAppMonitorCommandError = async (output, context) => {
|
|
236
601
|
const parsedOutput = {
|
|
237
602
|
...output,
|
|
238
603
|
body: await parseErrorBody(output.body, context),
|
|
@@ -248,9 +613,9 @@ const deserializeAws_restJson1CreateAppMonitorCommandError = async (output, cont
|
|
|
248
613
|
case "InternalServerException":
|
|
249
614
|
case "com.amazonaws.rum#InternalServerException":
|
|
250
615
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
251
|
-
case "
|
|
252
|
-
case "com.amazonaws.rum#
|
|
253
|
-
throw await
|
|
616
|
+
case "ResourceNotFoundException":
|
|
617
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
618
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
254
619
|
case "ThrottlingException":
|
|
255
620
|
case "com.amazonaws.rum#ThrottlingException":
|
|
256
621
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
@@ -267,9 +632,9 @@ const deserializeAws_restJson1CreateAppMonitorCommandError = async (output, cont
|
|
|
267
632
|
});
|
|
268
633
|
}
|
|
269
634
|
};
|
|
270
|
-
export const
|
|
635
|
+
export const deserializeAws_restJson1DeleteRumMetricsDestinationCommand = async (output, context) => {
|
|
271
636
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
272
|
-
return
|
|
637
|
+
return deserializeAws_restJson1DeleteRumMetricsDestinationCommandError(output, context);
|
|
273
638
|
}
|
|
274
639
|
const contents = map({
|
|
275
640
|
$metadata: deserializeMetadata(output),
|
|
@@ -277,7 +642,7 @@ export const deserializeAws_restJson1DeleteAppMonitorCommand = async (output, co
|
|
|
277
642
|
await collectBody(output.body, context);
|
|
278
643
|
return contents;
|
|
279
644
|
};
|
|
280
|
-
const
|
|
645
|
+
const deserializeAws_restJson1DeleteRumMetricsDestinationCommandError = async (output, context) => {
|
|
281
646
|
const parsedOutput = {
|
|
282
647
|
...output,
|
|
283
648
|
body: await parseErrorBody(output.body, context),
|
|
@@ -450,6 +815,51 @@ const deserializeAws_restJson1ListAppMonitorsCommandError = async (output, conte
|
|
|
450
815
|
});
|
|
451
816
|
}
|
|
452
817
|
};
|
|
818
|
+
export const deserializeAws_restJson1ListRumMetricsDestinationsCommand = async (output, context) => {
|
|
819
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
820
|
+
return deserializeAws_restJson1ListRumMetricsDestinationsCommandError(output, context);
|
|
821
|
+
}
|
|
822
|
+
const contents = map({
|
|
823
|
+
$metadata: deserializeMetadata(output),
|
|
824
|
+
});
|
|
825
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
826
|
+
if (data.Destinations != null) {
|
|
827
|
+
contents.Destinations = deserializeAws_restJson1MetricDestinationSummaryList(data.Destinations, context);
|
|
828
|
+
}
|
|
829
|
+
if (data.NextToken != null) {
|
|
830
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
831
|
+
}
|
|
832
|
+
return contents;
|
|
833
|
+
};
|
|
834
|
+
const deserializeAws_restJson1ListRumMetricsDestinationsCommandError = async (output, context) => {
|
|
835
|
+
const parsedOutput = {
|
|
836
|
+
...output,
|
|
837
|
+
body: await parseErrorBody(output.body, context),
|
|
838
|
+
};
|
|
839
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
840
|
+
switch (errorCode) {
|
|
841
|
+
case "AccessDeniedException":
|
|
842
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
843
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
844
|
+
case "InternalServerException":
|
|
845
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
846
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
847
|
+
case "ResourceNotFoundException":
|
|
848
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
849
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
850
|
+
case "ValidationException":
|
|
851
|
+
case "com.amazonaws.rum#ValidationException":
|
|
852
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
853
|
+
default:
|
|
854
|
+
const parsedBody = parsedOutput.body;
|
|
855
|
+
throwDefaultError({
|
|
856
|
+
output,
|
|
857
|
+
parsedBody,
|
|
858
|
+
exceptionCtor: __BaseException,
|
|
859
|
+
errorCode,
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
};
|
|
453
863
|
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
454
864
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
455
865
|
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
@@ -534,6 +944,51 @@ const deserializeAws_restJson1PutRumEventsCommandError = async (output, context)
|
|
|
534
944
|
});
|
|
535
945
|
}
|
|
536
946
|
};
|
|
947
|
+
export const deserializeAws_restJson1PutRumMetricsDestinationCommand = async (output, context) => {
|
|
948
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
949
|
+
return deserializeAws_restJson1PutRumMetricsDestinationCommandError(output, context);
|
|
950
|
+
}
|
|
951
|
+
const contents = map({
|
|
952
|
+
$metadata: deserializeMetadata(output),
|
|
953
|
+
});
|
|
954
|
+
await collectBody(output.body, context);
|
|
955
|
+
return contents;
|
|
956
|
+
};
|
|
957
|
+
const deserializeAws_restJson1PutRumMetricsDestinationCommandError = async (output, context) => {
|
|
958
|
+
const parsedOutput = {
|
|
959
|
+
...output,
|
|
960
|
+
body: await parseErrorBody(output.body, context),
|
|
961
|
+
};
|
|
962
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
963
|
+
switch (errorCode) {
|
|
964
|
+
case "AccessDeniedException":
|
|
965
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
966
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
967
|
+
case "ConflictException":
|
|
968
|
+
case "com.amazonaws.rum#ConflictException":
|
|
969
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
970
|
+
case "InternalServerException":
|
|
971
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
972
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
973
|
+
case "ResourceNotFoundException":
|
|
974
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
975
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
976
|
+
case "ThrottlingException":
|
|
977
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
978
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
979
|
+
case "ValidationException":
|
|
980
|
+
case "com.amazonaws.rum#ValidationException":
|
|
981
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
982
|
+
default:
|
|
983
|
+
const parsedBody = parsedOutput.body;
|
|
984
|
+
throwDefaultError({
|
|
985
|
+
output,
|
|
986
|
+
parsedBody,
|
|
987
|
+
exceptionCtor: __BaseException,
|
|
988
|
+
errorCode,
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
};
|
|
537
992
|
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
538
993
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
539
994
|
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
@@ -651,6 +1106,54 @@ const deserializeAws_restJson1UpdateAppMonitorCommandError = async (output, cont
|
|
|
651
1106
|
});
|
|
652
1107
|
}
|
|
653
1108
|
};
|
|
1109
|
+
export const deserializeAws_restJson1UpdateRumMetricDefinitionCommand = async (output, context) => {
|
|
1110
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1111
|
+
return deserializeAws_restJson1UpdateRumMetricDefinitionCommandError(output, context);
|
|
1112
|
+
}
|
|
1113
|
+
const contents = map({
|
|
1114
|
+
$metadata: deserializeMetadata(output),
|
|
1115
|
+
});
|
|
1116
|
+
await collectBody(output.body, context);
|
|
1117
|
+
return contents;
|
|
1118
|
+
};
|
|
1119
|
+
const deserializeAws_restJson1UpdateRumMetricDefinitionCommandError = async (output, context) => {
|
|
1120
|
+
const parsedOutput = {
|
|
1121
|
+
...output,
|
|
1122
|
+
body: await parseErrorBody(output.body, context),
|
|
1123
|
+
};
|
|
1124
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1125
|
+
switch (errorCode) {
|
|
1126
|
+
case "AccessDeniedException":
|
|
1127
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
1128
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1129
|
+
case "ConflictException":
|
|
1130
|
+
case "com.amazonaws.rum#ConflictException":
|
|
1131
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1132
|
+
case "InternalServerException":
|
|
1133
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
1134
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1135
|
+
case "ResourceNotFoundException":
|
|
1136
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
1137
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1138
|
+
case "ServiceQuotaExceededException":
|
|
1139
|
+
case "com.amazonaws.rum#ServiceQuotaExceededException":
|
|
1140
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
1141
|
+
case "ThrottlingException":
|
|
1142
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
1143
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1144
|
+
case "ValidationException":
|
|
1145
|
+
case "com.amazonaws.rum#ValidationException":
|
|
1146
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1147
|
+
default:
|
|
1148
|
+
const parsedBody = parsedOutput.body;
|
|
1149
|
+
throwDefaultError({
|
|
1150
|
+
output,
|
|
1151
|
+
parsedBody,
|
|
1152
|
+
exceptionCtor: __BaseException,
|
|
1153
|
+
errorCode,
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
654
1157
|
const map = __map;
|
|
655
1158
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
656
1159
|
const contents = map({});
|
|
@@ -786,6 +1289,17 @@ const serializeAws_restJson1AppMonitorDetails = (input, context) => {
|
|
|
786
1289
|
...(input.version != null && { version: input.version }),
|
|
787
1290
|
};
|
|
788
1291
|
};
|
|
1292
|
+
const serializeAws_restJson1DimensionKeysMap = (input, context) => {
|
|
1293
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1294
|
+
if (value === null) {
|
|
1295
|
+
return acc;
|
|
1296
|
+
}
|
|
1297
|
+
return {
|
|
1298
|
+
...acc,
|
|
1299
|
+
[key]: value,
|
|
1300
|
+
};
|
|
1301
|
+
}, {});
|
|
1302
|
+
};
|
|
789
1303
|
const serializeAws_restJson1FavoritePages = (input, context) => {
|
|
790
1304
|
return input
|
|
791
1305
|
.filter((e) => e != null)
|
|
@@ -793,6 +1307,24 @@ const serializeAws_restJson1FavoritePages = (input, context) => {
|
|
|
793
1307
|
return entry;
|
|
794
1308
|
});
|
|
795
1309
|
};
|
|
1310
|
+
const serializeAws_restJson1MetricDefinitionRequest = (input, context) => {
|
|
1311
|
+
return {
|
|
1312
|
+
...(input.DimensionKeys != null && {
|
|
1313
|
+
DimensionKeys: serializeAws_restJson1DimensionKeysMap(input.DimensionKeys, context),
|
|
1314
|
+
}),
|
|
1315
|
+
...(input.EventPattern != null && { EventPattern: input.EventPattern }),
|
|
1316
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1317
|
+
...(input.UnitLabel != null && { UnitLabel: input.UnitLabel }),
|
|
1318
|
+
...(input.ValueKey != null && { ValueKey: input.ValueKey }),
|
|
1319
|
+
};
|
|
1320
|
+
};
|
|
1321
|
+
const serializeAws_restJson1MetricDefinitionsRequest = (input, context) => {
|
|
1322
|
+
return input
|
|
1323
|
+
.filter((e) => e != null)
|
|
1324
|
+
.map((entry) => {
|
|
1325
|
+
return serializeAws_restJson1MetricDefinitionRequest(entry, context);
|
|
1326
|
+
});
|
|
1327
|
+
};
|
|
796
1328
|
const serializeAws_restJson1Pages = (input, context) => {
|
|
797
1329
|
return input
|
|
798
1330
|
.filter((e) => e != null)
|
|
@@ -914,6 +1446,44 @@ const deserializeAws_restJson1AppMonitorSummaryList = (output, context) => {
|
|
|
914
1446
|
});
|
|
915
1447
|
return retVal;
|
|
916
1448
|
};
|
|
1449
|
+
const deserializeAws_restJson1BatchCreateRumMetricDefinitionsError = (output, context) => {
|
|
1450
|
+
return {
|
|
1451
|
+
ErrorCode: __expectString(output.ErrorCode),
|
|
1452
|
+
ErrorMessage: __expectString(output.ErrorMessage),
|
|
1453
|
+
MetricDefinition: output.MetricDefinition != null
|
|
1454
|
+
? deserializeAws_restJson1MetricDefinitionRequest(output.MetricDefinition, context)
|
|
1455
|
+
: undefined,
|
|
1456
|
+
};
|
|
1457
|
+
};
|
|
1458
|
+
const deserializeAws_restJson1BatchCreateRumMetricDefinitionsErrors = (output, context) => {
|
|
1459
|
+
const retVal = (output || [])
|
|
1460
|
+
.filter((e) => e != null)
|
|
1461
|
+
.map((entry) => {
|
|
1462
|
+
if (entry === null) {
|
|
1463
|
+
return null;
|
|
1464
|
+
}
|
|
1465
|
+
return deserializeAws_restJson1BatchCreateRumMetricDefinitionsError(entry, context);
|
|
1466
|
+
});
|
|
1467
|
+
return retVal;
|
|
1468
|
+
};
|
|
1469
|
+
const deserializeAws_restJson1BatchDeleteRumMetricDefinitionsError = (output, context) => {
|
|
1470
|
+
return {
|
|
1471
|
+
ErrorCode: __expectString(output.ErrorCode),
|
|
1472
|
+
ErrorMessage: __expectString(output.ErrorMessage),
|
|
1473
|
+
MetricDefinitionId: __expectString(output.MetricDefinitionId),
|
|
1474
|
+
};
|
|
1475
|
+
};
|
|
1476
|
+
const deserializeAws_restJson1BatchDeleteRumMetricDefinitionsErrors = (output, context) => {
|
|
1477
|
+
const retVal = (output || [])
|
|
1478
|
+
.filter((e) => e != null)
|
|
1479
|
+
.map((entry) => {
|
|
1480
|
+
if (entry === null) {
|
|
1481
|
+
return null;
|
|
1482
|
+
}
|
|
1483
|
+
return deserializeAws_restJson1BatchDeleteRumMetricDefinitionsError(entry, context);
|
|
1484
|
+
});
|
|
1485
|
+
return retVal;
|
|
1486
|
+
};
|
|
917
1487
|
const deserializeAws_restJson1CwLog = (output, context) => {
|
|
918
1488
|
return {
|
|
919
1489
|
CwLogEnabled: __expectBoolean(output.CwLogEnabled),
|
|
@@ -925,6 +1495,17 @@ const deserializeAws_restJson1DataStorage = (output, context) => {
|
|
|
925
1495
|
CwLog: output.CwLog != null ? deserializeAws_restJson1CwLog(output.CwLog, context) : undefined,
|
|
926
1496
|
};
|
|
927
1497
|
};
|
|
1498
|
+
const deserializeAws_restJson1DimensionKeysMap = (output, context) => {
|
|
1499
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1500
|
+
if (value === null) {
|
|
1501
|
+
return acc;
|
|
1502
|
+
}
|
|
1503
|
+
return {
|
|
1504
|
+
...acc,
|
|
1505
|
+
[key]: __expectString(value),
|
|
1506
|
+
};
|
|
1507
|
+
}, {});
|
|
1508
|
+
};
|
|
928
1509
|
const deserializeAws_restJson1EventDataList = (output, context) => {
|
|
929
1510
|
const retVal = (output || [])
|
|
930
1511
|
.filter((e) => e != null)
|
|
@@ -947,6 +1528,69 @@ const deserializeAws_restJson1FavoritePages = (output, context) => {
|
|
|
947
1528
|
});
|
|
948
1529
|
return retVal;
|
|
949
1530
|
};
|
|
1531
|
+
const deserializeAws_restJson1MetricDefinition = (output, context) => {
|
|
1532
|
+
return {
|
|
1533
|
+
DimensionKeys: output.DimensionKeys != null
|
|
1534
|
+
? deserializeAws_restJson1DimensionKeysMap(output.DimensionKeys, context)
|
|
1535
|
+
: undefined,
|
|
1536
|
+
EventPattern: __expectString(output.EventPattern),
|
|
1537
|
+
MetricDefinitionId: __expectString(output.MetricDefinitionId),
|
|
1538
|
+
Name: __expectString(output.Name),
|
|
1539
|
+
UnitLabel: __expectString(output.UnitLabel),
|
|
1540
|
+
ValueKey: __expectString(output.ValueKey),
|
|
1541
|
+
};
|
|
1542
|
+
};
|
|
1543
|
+
const deserializeAws_restJson1MetricDefinitionIds = (output, context) => {
|
|
1544
|
+
const retVal = (output || [])
|
|
1545
|
+
.filter((e) => e != null)
|
|
1546
|
+
.map((entry) => {
|
|
1547
|
+
if (entry === null) {
|
|
1548
|
+
return null;
|
|
1549
|
+
}
|
|
1550
|
+
return __expectString(entry);
|
|
1551
|
+
});
|
|
1552
|
+
return retVal;
|
|
1553
|
+
};
|
|
1554
|
+
const deserializeAws_restJson1MetricDefinitionRequest = (output, context) => {
|
|
1555
|
+
return {
|
|
1556
|
+
DimensionKeys: output.DimensionKeys != null
|
|
1557
|
+
? deserializeAws_restJson1DimensionKeysMap(output.DimensionKeys, context)
|
|
1558
|
+
: undefined,
|
|
1559
|
+
EventPattern: __expectString(output.EventPattern),
|
|
1560
|
+
Name: __expectString(output.Name),
|
|
1561
|
+
UnitLabel: __expectString(output.UnitLabel),
|
|
1562
|
+
ValueKey: __expectString(output.ValueKey),
|
|
1563
|
+
};
|
|
1564
|
+
};
|
|
1565
|
+
const deserializeAws_restJson1MetricDefinitions = (output, context) => {
|
|
1566
|
+
const retVal = (output || [])
|
|
1567
|
+
.filter((e) => e != null)
|
|
1568
|
+
.map((entry) => {
|
|
1569
|
+
if (entry === null) {
|
|
1570
|
+
return null;
|
|
1571
|
+
}
|
|
1572
|
+
return deserializeAws_restJson1MetricDefinition(entry, context);
|
|
1573
|
+
});
|
|
1574
|
+
return retVal;
|
|
1575
|
+
};
|
|
1576
|
+
const deserializeAws_restJson1MetricDestinationSummary = (output, context) => {
|
|
1577
|
+
return {
|
|
1578
|
+
Destination: __expectString(output.Destination),
|
|
1579
|
+
DestinationArn: __expectString(output.DestinationArn),
|
|
1580
|
+
IamRoleArn: __expectString(output.IamRoleArn),
|
|
1581
|
+
};
|
|
1582
|
+
};
|
|
1583
|
+
const deserializeAws_restJson1MetricDestinationSummaryList = (output, context) => {
|
|
1584
|
+
const retVal = (output || [])
|
|
1585
|
+
.filter((e) => e != null)
|
|
1586
|
+
.map((entry) => {
|
|
1587
|
+
if (entry === null) {
|
|
1588
|
+
return null;
|
|
1589
|
+
}
|
|
1590
|
+
return deserializeAws_restJson1MetricDestinationSummary(entry, context);
|
|
1591
|
+
});
|
|
1592
|
+
return retVal;
|
|
1593
|
+
};
|
|
950
1594
|
const deserializeAws_restJson1Pages = (output, context) => {
|
|
951
1595
|
const retVal = (output || [])
|
|
952
1596
|
.filter((e) => e != null)
|