@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
|
@@ -1,10 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_restJson1UpdateAppMonitorCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutRumEventsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListAppMonitorsCommand = exports.deserializeAws_restJson1GetAppMonitorDataCommand = exports.deserializeAws_restJson1GetAppMonitorCommand = exports.deserializeAws_restJson1DeleteAppMonitorCommand = exports.deserializeAws_restJson1CreateAppMonitorCommand = exports.serializeAws_restJson1UpdateAppMonitorCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutRumEventsCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListAppMonitorsCommand = exports.serializeAws_restJson1GetAppMonitorDataCommand = exports.serializeAws_restJson1GetAppMonitorCommand = exports.serializeAws_restJson1DeleteAppMonitorCommand = exports.serializeAws_restJson1CreateAppMonitorCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1UpdateRumMetricDefinitionCommand = exports.deserializeAws_restJson1UpdateAppMonitorCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutRumMetricsDestinationCommand = exports.deserializeAws_restJson1PutRumEventsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRumMetricsDestinationsCommand = exports.deserializeAws_restJson1ListAppMonitorsCommand = exports.deserializeAws_restJson1GetAppMonitorDataCommand = exports.deserializeAws_restJson1GetAppMonitorCommand = exports.deserializeAws_restJson1DeleteRumMetricsDestinationCommand = exports.deserializeAws_restJson1DeleteAppMonitorCommand = exports.deserializeAws_restJson1CreateAppMonitorCommand = exports.deserializeAws_restJson1BatchGetRumMetricDefinitionsCommand = exports.deserializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand = exports.deserializeAws_restJson1BatchCreateRumMetricDefinitionsCommand = exports.serializeAws_restJson1UpdateRumMetricDefinitionCommand = exports.serializeAws_restJson1UpdateAppMonitorCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutRumMetricsDestinationCommand = exports.serializeAws_restJson1PutRumEventsCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRumMetricsDestinationsCommand = exports.serializeAws_restJson1ListAppMonitorsCommand = exports.serializeAws_restJson1GetAppMonitorDataCommand = exports.serializeAws_restJson1GetAppMonitorCommand = exports.serializeAws_restJson1DeleteRumMetricsDestinationCommand = exports.serializeAws_restJson1DeleteAppMonitorCommand = exports.serializeAws_restJson1CreateAppMonitorCommand = exports.serializeAws_restJson1BatchGetRumMetricDefinitionsCommand = exports.serializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand = exports.serializeAws_restJson1BatchCreateRumMetricDefinitionsCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const RUMServiceException_1 = require("../models/RUMServiceException");
|
|
8
|
+
const serializeAws_restJson1BatchCreateRumMetricDefinitionsCommand = async (input, context) => {
|
|
9
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
+
const headers = {
|
|
11
|
+
"content-type": "application/json",
|
|
12
|
+
};
|
|
13
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
|
|
14
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
15
|
+
let body;
|
|
16
|
+
body = JSON.stringify({
|
|
17
|
+
...(input.Destination != null && { Destination: input.Destination }),
|
|
18
|
+
...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }),
|
|
19
|
+
...(input.MetricDefinitions != null && {
|
|
20
|
+
MetricDefinitions: serializeAws_restJson1MetricDefinitionsRequest(input.MetricDefinitions, context),
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
return new protocol_http_1.HttpRequest({
|
|
24
|
+
protocol,
|
|
25
|
+
hostname,
|
|
26
|
+
port,
|
|
27
|
+
method: "POST",
|
|
28
|
+
headers,
|
|
29
|
+
path: resolvedPath,
|
|
30
|
+
body,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
exports.serializeAws_restJson1BatchCreateRumMetricDefinitionsCommand = serializeAws_restJson1BatchCreateRumMetricDefinitionsCommand;
|
|
34
|
+
const serializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand = async (input, context) => {
|
|
35
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
36
|
+
const headers = {};
|
|
37
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
|
|
38
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
39
|
+
const query = map({
|
|
40
|
+
destination: [, input.Destination],
|
|
41
|
+
destinationArn: [, input.DestinationArn],
|
|
42
|
+
metricDefinitionIds: [
|
|
43
|
+
() => input.MetricDefinitionIds !== void 0,
|
|
44
|
+
() => (input.MetricDefinitionIds || []).map((_entry) => _entry),
|
|
45
|
+
],
|
|
46
|
+
});
|
|
47
|
+
let body;
|
|
48
|
+
return new protocol_http_1.HttpRequest({
|
|
49
|
+
protocol,
|
|
50
|
+
hostname,
|
|
51
|
+
port,
|
|
52
|
+
method: "DELETE",
|
|
53
|
+
headers,
|
|
54
|
+
path: resolvedPath,
|
|
55
|
+
query,
|
|
56
|
+
body,
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
exports.serializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand = serializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand;
|
|
60
|
+
const serializeAws_restJson1BatchGetRumMetricDefinitionsCommand = async (input, context) => {
|
|
61
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
62
|
+
const headers = {};
|
|
63
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
|
|
64
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
65
|
+
const query = map({
|
|
66
|
+
destination: [, input.Destination],
|
|
67
|
+
destinationArn: [, input.DestinationArn],
|
|
68
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
69
|
+
nextToken: [, input.NextToken],
|
|
70
|
+
});
|
|
71
|
+
let body;
|
|
72
|
+
return new protocol_http_1.HttpRequest({
|
|
73
|
+
protocol,
|
|
74
|
+
hostname,
|
|
75
|
+
port,
|
|
76
|
+
method: "GET",
|
|
77
|
+
headers,
|
|
78
|
+
path: resolvedPath,
|
|
79
|
+
query,
|
|
80
|
+
body,
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
exports.serializeAws_restJson1BatchGetRumMetricDefinitionsCommand = serializeAws_restJson1BatchGetRumMetricDefinitionsCommand;
|
|
8
84
|
const serializeAws_restJson1CreateAppMonitorCommand = async (input, context) => {
|
|
9
85
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
86
|
const headers = {
|
|
@@ -49,6 +125,29 @@ const serializeAws_restJson1DeleteAppMonitorCommand = async (input, context) =>
|
|
|
49
125
|
});
|
|
50
126
|
};
|
|
51
127
|
exports.serializeAws_restJson1DeleteAppMonitorCommand = serializeAws_restJson1DeleteAppMonitorCommand;
|
|
128
|
+
const serializeAws_restJson1DeleteRumMetricsDestinationCommand = async (input, context) => {
|
|
129
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
130
|
+
const headers = {};
|
|
131
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
132
|
+
"/rummetrics/{AppMonitorName}/metricsdestination";
|
|
133
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
134
|
+
const query = map({
|
|
135
|
+
destination: [, input.Destination],
|
|
136
|
+
destinationArn: [, input.DestinationArn],
|
|
137
|
+
});
|
|
138
|
+
let body;
|
|
139
|
+
return new protocol_http_1.HttpRequest({
|
|
140
|
+
protocol,
|
|
141
|
+
hostname,
|
|
142
|
+
port,
|
|
143
|
+
method: "DELETE",
|
|
144
|
+
headers,
|
|
145
|
+
path: resolvedPath,
|
|
146
|
+
query,
|
|
147
|
+
body,
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
exports.serializeAws_restJson1DeleteRumMetricsDestinationCommand = serializeAws_restJson1DeleteRumMetricsDestinationCommand;
|
|
52
151
|
const serializeAws_restJson1GetAppMonitorCommand = async (input, context) => {
|
|
53
152
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
153
|
const headers = {};
|
|
@@ -112,6 +211,29 @@ const serializeAws_restJson1ListAppMonitorsCommand = async (input, context) => {
|
|
|
112
211
|
});
|
|
113
212
|
};
|
|
114
213
|
exports.serializeAws_restJson1ListAppMonitorsCommand = serializeAws_restJson1ListAppMonitorsCommand;
|
|
214
|
+
const serializeAws_restJson1ListRumMetricsDestinationsCommand = async (input, context) => {
|
|
215
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
216
|
+
const headers = {};
|
|
217
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
218
|
+
"/rummetrics/{AppMonitorName}/metricsdestination";
|
|
219
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
220
|
+
const query = map({
|
|
221
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
222
|
+
nextToken: [, input.NextToken],
|
|
223
|
+
});
|
|
224
|
+
let body;
|
|
225
|
+
return new protocol_http_1.HttpRequest({
|
|
226
|
+
protocol,
|
|
227
|
+
hostname,
|
|
228
|
+
port,
|
|
229
|
+
method: "GET",
|
|
230
|
+
headers,
|
|
231
|
+
path: resolvedPath,
|
|
232
|
+
query,
|
|
233
|
+
body,
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
exports.serializeAws_restJson1ListRumMetricsDestinationsCommand = serializeAws_restJson1ListRumMetricsDestinationsCommand;
|
|
115
237
|
const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
116
238
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
117
239
|
const headers = {};
|
|
@@ -163,6 +285,31 @@ const serializeAws_restJson1PutRumEventsCommand = async (input, context) => {
|
|
|
163
285
|
});
|
|
164
286
|
};
|
|
165
287
|
exports.serializeAws_restJson1PutRumEventsCommand = serializeAws_restJson1PutRumEventsCommand;
|
|
288
|
+
const serializeAws_restJson1PutRumMetricsDestinationCommand = async (input, context) => {
|
|
289
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
290
|
+
const headers = {
|
|
291
|
+
"content-type": "application/json",
|
|
292
|
+
};
|
|
293
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
294
|
+
"/rummetrics/{AppMonitorName}/metricsdestination";
|
|
295
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
296
|
+
let body;
|
|
297
|
+
body = JSON.stringify({
|
|
298
|
+
...(input.Destination != null && { Destination: input.Destination }),
|
|
299
|
+
...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }),
|
|
300
|
+
...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
|
|
301
|
+
});
|
|
302
|
+
return new protocol_http_1.HttpRequest({
|
|
303
|
+
protocol,
|
|
304
|
+
hostname,
|
|
305
|
+
port,
|
|
306
|
+
method: "POST",
|
|
307
|
+
headers,
|
|
308
|
+
path: resolvedPath,
|
|
309
|
+
body,
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
exports.serializeAws_restJson1PutRumMetricsDestinationCommand = serializeAws_restJson1PutRumMetricsDestinationCommand;
|
|
166
313
|
const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
167
314
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
168
315
|
const headers = {
|
|
@@ -231,22 +378,251 @@ const serializeAws_restJson1UpdateAppMonitorCommand = async (input, context) =>
|
|
|
231
378
|
body,
|
|
232
379
|
});
|
|
233
380
|
};
|
|
234
|
-
exports.serializeAws_restJson1UpdateAppMonitorCommand = serializeAws_restJson1UpdateAppMonitorCommand;
|
|
235
|
-
const
|
|
381
|
+
exports.serializeAws_restJson1UpdateAppMonitorCommand = serializeAws_restJson1UpdateAppMonitorCommand;
|
|
382
|
+
const serializeAws_restJson1UpdateRumMetricDefinitionCommand = async (input, context) => {
|
|
383
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
384
|
+
const headers = {
|
|
385
|
+
"content-type": "application/json",
|
|
386
|
+
};
|
|
387
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
|
|
388
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
|
|
389
|
+
let body;
|
|
390
|
+
body = JSON.stringify({
|
|
391
|
+
...(input.Destination != null && { Destination: input.Destination }),
|
|
392
|
+
...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }),
|
|
393
|
+
...(input.MetricDefinition != null && {
|
|
394
|
+
MetricDefinition: serializeAws_restJson1MetricDefinitionRequest(input.MetricDefinition, context),
|
|
395
|
+
}),
|
|
396
|
+
...(input.MetricDefinitionId != null && { MetricDefinitionId: input.MetricDefinitionId }),
|
|
397
|
+
});
|
|
398
|
+
return new protocol_http_1.HttpRequest({
|
|
399
|
+
protocol,
|
|
400
|
+
hostname,
|
|
401
|
+
port,
|
|
402
|
+
method: "PATCH",
|
|
403
|
+
headers,
|
|
404
|
+
path: resolvedPath,
|
|
405
|
+
body,
|
|
406
|
+
});
|
|
407
|
+
};
|
|
408
|
+
exports.serializeAws_restJson1UpdateRumMetricDefinitionCommand = serializeAws_restJson1UpdateRumMetricDefinitionCommand;
|
|
409
|
+
const deserializeAws_restJson1BatchCreateRumMetricDefinitionsCommand = async (output, context) => {
|
|
410
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
411
|
+
return deserializeAws_restJson1BatchCreateRumMetricDefinitionsCommandError(output, context);
|
|
412
|
+
}
|
|
413
|
+
const contents = map({
|
|
414
|
+
$metadata: deserializeMetadata(output),
|
|
415
|
+
});
|
|
416
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
417
|
+
if (data.Errors != null) {
|
|
418
|
+
contents.Errors = deserializeAws_restJson1BatchCreateRumMetricDefinitionsErrors(data.Errors, context);
|
|
419
|
+
}
|
|
420
|
+
if (data.MetricDefinitions != null) {
|
|
421
|
+
contents.MetricDefinitions = deserializeAws_restJson1MetricDefinitions(data.MetricDefinitions, context);
|
|
422
|
+
}
|
|
423
|
+
return contents;
|
|
424
|
+
};
|
|
425
|
+
exports.deserializeAws_restJson1BatchCreateRumMetricDefinitionsCommand = deserializeAws_restJson1BatchCreateRumMetricDefinitionsCommand;
|
|
426
|
+
const deserializeAws_restJson1BatchCreateRumMetricDefinitionsCommandError = async (output, context) => {
|
|
427
|
+
const parsedOutput = {
|
|
428
|
+
...output,
|
|
429
|
+
body: await parseErrorBody(output.body, context),
|
|
430
|
+
};
|
|
431
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
432
|
+
switch (errorCode) {
|
|
433
|
+
case "AccessDeniedException":
|
|
434
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
435
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
436
|
+
case "ConflictException":
|
|
437
|
+
case "com.amazonaws.rum#ConflictException":
|
|
438
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
439
|
+
case "InternalServerException":
|
|
440
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
441
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
442
|
+
case "ResourceNotFoundException":
|
|
443
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
444
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
445
|
+
case "ServiceQuotaExceededException":
|
|
446
|
+
case "com.amazonaws.rum#ServiceQuotaExceededException":
|
|
447
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
448
|
+
case "ThrottlingException":
|
|
449
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
450
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
451
|
+
case "ValidationException":
|
|
452
|
+
case "com.amazonaws.rum#ValidationException":
|
|
453
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
454
|
+
default:
|
|
455
|
+
const parsedBody = parsedOutput.body;
|
|
456
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
457
|
+
output,
|
|
458
|
+
parsedBody,
|
|
459
|
+
exceptionCtor: RUMServiceException_1.RUMServiceException,
|
|
460
|
+
errorCode,
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
const deserializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand = async (output, context) => {
|
|
465
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
466
|
+
return deserializeAws_restJson1BatchDeleteRumMetricDefinitionsCommandError(output, context);
|
|
467
|
+
}
|
|
468
|
+
const contents = map({
|
|
469
|
+
$metadata: deserializeMetadata(output),
|
|
470
|
+
});
|
|
471
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
472
|
+
if (data.Errors != null) {
|
|
473
|
+
contents.Errors = deserializeAws_restJson1BatchDeleteRumMetricDefinitionsErrors(data.Errors, context);
|
|
474
|
+
}
|
|
475
|
+
if (data.MetricDefinitionIds != null) {
|
|
476
|
+
contents.MetricDefinitionIds = deserializeAws_restJson1MetricDefinitionIds(data.MetricDefinitionIds, context);
|
|
477
|
+
}
|
|
478
|
+
return contents;
|
|
479
|
+
};
|
|
480
|
+
exports.deserializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand = deserializeAws_restJson1BatchDeleteRumMetricDefinitionsCommand;
|
|
481
|
+
const deserializeAws_restJson1BatchDeleteRumMetricDefinitionsCommandError = async (output, context) => {
|
|
482
|
+
const parsedOutput = {
|
|
483
|
+
...output,
|
|
484
|
+
body: await parseErrorBody(output.body, context),
|
|
485
|
+
};
|
|
486
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
487
|
+
switch (errorCode) {
|
|
488
|
+
case "AccessDeniedException":
|
|
489
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
490
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
491
|
+
case "ConflictException":
|
|
492
|
+
case "com.amazonaws.rum#ConflictException":
|
|
493
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
494
|
+
case "InternalServerException":
|
|
495
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
496
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
497
|
+
case "ResourceNotFoundException":
|
|
498
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
499
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
500
|
+
case "ThrottlingException":
|
|
501
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
502
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
503
|
+
case "ValidationException":
|
|
504
|
+
case "com.amazonaws.rum#ValidationException":
|
|
505
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
506
|
+
default:
|
|
507
|
+
const parsedBody = parsedOutput.body;
|
|
508
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
509
|
+
output,
|
|
510
|
+
parsedBody,
|
|
511
|
+
exceptionCtor: RUMServiceException_1.RUMServiceException,
|
|
512
|
+
errorCode,
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
const deserializeAws_restJson1BatchGetRumMetricDefinitionsCommand = async (output, context) => {
|
|
517
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
518
|
+
return deserializeAws_restJson1BatchGetRumMetricDefinitionsCommandError(output, context);
|
|
519
|
+
}
|
|
520
|
+
const contents = map({
|
|
521
|
+
$metadata: deserializeMetadata(output),
|
|
522
|
+
});
|
|
523
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
524
|
+
if (data.MetricDefinitions != null) {
|
|
525
|
+
contents.MetricDefinitions = deserializeAws_restJson1MetricDefinitions(data.MetricDefinitions, context);
|
|
526
|
+
}
|
|
527
|
+
if (data.NextToken != null) {
|
|
528
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
529
|
+
}
|
|
530
|
+
return contents;
|
|
531
|
+
};
|
|
532
|
+
exports.deserializeAws_restJson1BatchGetRumMetricDefinitionsCommand = deserializeAws_restJson1BatchGetRumMetricDefinitionsCommand;
|
|
533
|
+
const deserializeAws_restJson1BatchGetRumMetricDefinitionsCommandError = async (output, context) => {
|
|
534
|
+
const parsedOutput = {
|
|
535
|
+
...output,
|
|
536
|
+
body: await parseErrorBody(output.body, context),
|
|
537
|
+
};
|
|
538
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
539
|
+
switch (errorCode) {
|
|
540
|
+
case "AccessDeniedException":
|
|
541
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
542
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
543
|
+
case "InternalServerException":
|
|
544
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
545
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
546
|
+
case "ResourceNotFoundException":
|
|
547
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
548
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
549
|
+
case "ValidationException":
|
|
550
|
+
case "com.amazonaws.rum#ValidationException":
|
|
551
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
552
|
+
default:
|
|
553
|
+
const parsedBody = parsedOutput.body;
|
|
554
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
555
|
+
output,
|
|
556
|
+
parsedBody,
|
|
557
|
+
exceptionCtor: RUMServiceException_1.RUMServiceException,
|
|
558
|
+
errorCode,
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
const deserializeAws_restJson1CreateAppMonitorCommand = async (output, context) => {
|
|
563
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
564
|
+
return deserializeAws_restJson1CreateAppMonitorCommandError(output, context);
|
|
565
|
+
}
|
|
566
|
+
const contents = map({
|
|
567
|
+
$metadata: deserializeMetadata(output),
|
|
568
|
+
});
|
|
569
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
570
|
+
if (data.Id != null) {
|
|
571
|
+
contents.Id = (0, smithy_client_1.expectString)(data.Id);
|
|
572
|
+
}
|
|
573
|
+
return contents;
|
|
574
|
+
};
|
|
575
|
+
exports.deserializeAws_restJson1CreateAppMonitorCommand = deserializeAws_restJson1CreateAppMonitorCommand;
|
|
576
|
+
const deserializeAws_restJson1CreateAppMonitorCommandError = async (output, context) => {
|
|
577
|
+
const parsedOutput = {
|
|
578
|
+
...output,
|
|
579
|
+
body: await parseErrorBody(output.body, context),
|
|
580
|
+
};
|
|
581
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
582
|
+
switch (errorCode) {
|
|
583
|
+
case "AccessDeniedException":
|
|
584
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
585
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
586
|
+
case "ConflictException":
|
|
587
|
+
case "com.amazonaws.rum#ConflictException":
|
|
588
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
589
|
+
case "InternalServerException":
|
|
590
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
591
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
592
|
+
case "ResourceNotFoundException":
|
|
593
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
594
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
595
|
+
case "ServiceQuotaExceededException":
|
|
596
|
+
case "com.amazonaws.rum#ServiceQuotaExceededException":
|
|
597
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
598
|
+
case "ThrottlingException":
|
|
599
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
600
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
601
|
+
case "ValidationException":
|
|
602
|
+
case "com.amazonaws.rum#ValidationException":
|
|
603
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
604
|
+
default:
|
|
605
|
+
const parsedBody = parsedOutput.body;
|
|
606
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
607
|
+
output,
|
|
608
|
+
parsedBody,
|
|
609
|
+
exceptionCtor: RUMServiceException_1.RUMServiceException,
|
|
610
|
+
errorCode,
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
const deserializeAws_restJson1DeleteAppMonitorCommand = async (output, context) => {
|
|
236
615
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
237
|
-
return
|
|
616
|
+
return deserializeAws_restJson1DeleteAppMonitorCommandError(output, context);
|
|
238
617
|
}
|
|
239
618
|
const contents = map({
|
|
240
619
|
$metadata: deserializeMetadata(output),
|
|
241
620
|
});
|
|
242
|
-
|
|
243
|
-
if (data.Id != null) {
|
|
244
|
-
contents.Id = (0, smithy_client_1.expectString)(data.Id);
|
|
245
|
-
}
|
|
621
|
+
await collectBody(output.body, context);
|
|
246
622
|
return contents;
|
|
247
623
|
};
|
|
248
|
-
exports.
|
|
249
|
-
const
|
|
624
|
+
exports.deserializeAws_restJson1DeleteAppMonitorCommand = deserializeAws_restJson1DeleteAppMonitorCommand;
|
|
625
|
+
const deserializeAws_restJson1DeleteAppMonitorCommandError = async (output, context) => {
|
|
250
626
|
const parsedOutput = {
|
|
251
627
|
...output,
|
|
252
628
|
body: await parseErrorBody(output.body, context),
|
|
@@ -262,9 +638,9 @@ const deserializeAws_restJson1CreateAppMonitorCommandError = async (output, cont
|
|
|
262
638
|
case "InternalServerException":
|
|
263
639
|
case "com.amazonaws.rum#InternalServerException":
|
|
264
640
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
265
|
-
case "
|
|
266
|
-
case "com.amazonaws.rum#
|
|
267
|
-
throw await
|
|
641
|
+
case "ResourceNotFoundException":
|
|
642
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
643
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
268
644
|
case "ThrottlingException":
|
|
269
645
|
case "com.amazonaws.rum#ThrottlingException":
|
|
270
646
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
@@ -281,9 +657,9 @@ const deserializeAws_restJson1CreateAppMonitorCommandError = async (output, cont
|
|
|
281
657
|
});
|
|
282
658
|
}
|
|
283
659
|
};
|
|
284
|
-
const
|
|
660
|
+
const deserializeAws_restJson1DeleteRumMetricsDestinationCommand = async (output, context) => {
|
|
285
661
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
286
|
-
return
|
|
662
|
+
return deserializeAws_restJson1DeleteRumMetricsDestinationCommandError(output, context);
|
|
287
663
|
}
|
|
288
664
|
const contents = map({
|
|
289
665
|
$metadata: deserializeMetadata(output),
|
|
@@ -291,8 +667,8 @@ const deserializeAws_restJson1DeleteAppMonitorCommand = async (output, context)
|
|
|
291
667
|
await collectBody(output.body, context);
|
|
292
668
|
return contents;
|
|
293
669
|
};
|
|
294
|
-
exports.
|
|
295
|
-
const
|
|
670
|
+
exports.deserializeAws_restJson1DeleteRumMetricsDestinationCommand = deserializeAws_restJson1DeleteRumMetricsDestinationCommand;
|
|
671
|
+
const deserializeAws_restJson1DeleteRumMetricsDestinationCommandError = async (output, context) => {
|
|
296
672
|
const parsedOutput = {
|
|
297
673
|
...output,
|
|
298
674
|
body: await parseErrorBody(output.body, context),
|
|
@@ -468,6 +844,52 @@ const deserializeAws_restJson1ListAppMonitorsCommandError = async (output, conte
|
|
|
468
844
|
});
|
|
469
845
|
}
|
|
470
846
|
};
|
|
847
|
+
const deserializeAws_restJson1ListRumMetricsDestinationsCommand = async (output, context) => {
|
|
848
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
849
|
+
return deserializeAws_restJson1ListRumMetricsDestinationsCommandError(output, context);
|
|
850
|
+
}
|
|
851
|
+
const contents = map({
|
|
852
|
+
$metadata: deserializeMetadata(output),
|
|
853
|
+
});
|
|
854
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
855
|
+
if (data.Destinations != null) {
|
|
856
|
+
contents.Destinations = deserializeAws_restJson1MetricDestinationSummaryList(data.Destinations, context);
|
|
857
|
+
}
|
|
858
|
+
if (data.NextToken != null) {
|
|
859
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
860
|
+
}
|
|
861
|
+
return contents;
|
|
862
|
+
};
|
|
863
|
+
exports.deserializeAws_restJson1ListRumMetricsDestinationsCommand = deserializeAws_restJson1ListRumMetricsDestinationsCommand;
|
|
864
|
+
const deserializeAws_restJson1ListRumMetricsDestinationsCommandError = async (output, context) => {
|
|
865
|
+
const parsedOutput = {
|
|
866
|
+
...output,
|
|
867
|
+
body: await parseErrorBody(output.body, context),
|
|
868
|
+
};
|
|
869
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
870
|
+
switch (errorCode) {
|
|
871
|
+
case "AccessDeniedException":
|
|
872
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
873
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
874
|
+
case "InternalServerException":
|
|
875
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
876
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
877
|
+
case "ResourceNotFoundException":
|
|
878
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
879
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
880
|
+
case "ValidationException":
|
|
881
|
+
case "com.amazonaws.rum#ValidationException":
|
|
882
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
883
|
+
default:
|
|
884
|
+
const parsedBody = parsedOutput.body;
|
|
885
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
886
|
+
output,
|
|
887
|
+
parsedBody,
|
|
888
|
+
exceptionCtor: RUMServiceException_1.RUMServiceException,
|
|
889
|
+
errorCode,
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
};
|
|
471
893
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
472
894
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
473
895
|
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
@@ -554,6 +976,52 @@ const deserializeAws_restJson1PutRumEventsCommandError = async (output, context)
|
|
|
554
976
|
});
|
|
555
977
|
}
|
|
556
978
|
};
|
|
979
|
+
const deserializeAws_restJson1PutRumMetricsDestinationCommand = async (output, context) => {
|
|
980
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
981
|
+
return deserializeAws_restJson1PutRumMetricsDestinationCommandError(output, context);
|
|
982
|
+
}
|
|
983
|
+
const contents = map({
|
|
984
|
+
$metadata: deserializeMetadata(output),
|
|
985
|
+
});
|
|
986
|
+
await collectBody(output.body, context);
|
|
987
|
+
return contents;
|
|
988
|
+
};
|
|
989
|
+
exports.deserializeAws_restJson1PutRumMetricsDestinationCommand = deserializeAws_restJson1PutRumMetricsDestinationCommand;
|
|
990
|
+
const deserializeAws_restJson1PutRumMetricsDestinationCommandError = async (output, context) => {
|
|
991
|
+
const parsedOutput = {
|
|
992
|
+
...output,
|
|
993
|
+
body: await parseErrorBody(output.body, context),
|
|
994
|
+
};
|
|
995
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
996
|
+
switch (errorCode) {
|
|
997
|
+
case "AccessDeniedException":
|
|
998
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
999
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1000
|
+
case "ConflictException":
|
|
1001
|
+
case "com.amazonaws.rum#ConflictException":
|
|
1002
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1003
|
+
case "InternalServerException":
|
|
1004
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
1005
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1006
|
+
case "ResourceNotFoundException":
|
|
1007
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
1008
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1009
|
+
case "ThrottlingException":
|
|
1010
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
1011
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1012
|
+
case "ValidationException":
|
|
1013
|
+
case "com.amazonaws.rum#ValidationException":
|
|
1014
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1015
|
+
default:
|
|
1016
|
+
const parsedBody = parsedOutput.body;
|
|
1017
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1018
|
+
output,
|
|
1019
|
+
parsedBody,
|
|
1020
|
+
exceptionCtor: RUMServiceException_1.RUMServiceException,
|
|
1021
|
+
errorCode,
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
557
1025
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
558
1026
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
559
1027
|
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
@@ -674,6 +1142,55 @@ const deserializeAws_restJson1UpdateAppMonitorCommandError = async (output, cont
|
|
|
674
1142
|
});
|
|
675
1143
|
}
|
|
676
1144
|
};
|
|
1145
|
+
const deserializeAws_restJson1UpdateRumMetricDefinitionCommand = async (output, context) => {
|
|
1146
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1147
|
+
return deserializeAws_restJson1UpdateRumMetricDefinitionCommandError(output, context);
|
|
1148
|
+
}
|
|
1149
|
+
const contents = map({
|
|
1150
|
+
$metadata: deserializeMetadata(output),
|
|
1151
|
+
});
|
|
1152
|
+
await collectBody(output.body, context);
|
|
1153
|
+
return contents;
|
|
1154
|
+
};
|
|
1155
|
+
exports.deserializeAws_restJson1UpdateRumMetricDefinitionCommand = deserializeAws_restJson1UpdateRumMetricDefinitionCommand;
|
|
1156
|
+
const deserializeAws_restJson1UpdateRumMetricDefinitionCommandError = async (output, context) => {
|
|
1157
|
+
const parsedOutput = {
|
|
1158
|
+
...output,
|
|
1159
|
+
body: await parseErrorBody(output.body, context),
|
|
1160
|
+
};
|
|
1161
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1162
|
+
switch (errorCode) {
|
|
1163
|
+
case "AccessDeniedException":
|
|
1164
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
1165
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1166
|
+
case "ConflictException":
|
|
1167
|
+
case "com.amazonaws.rum#ConflictException":
|
|
1168
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1169
|
+
case "InternalServerException":
|
|
1170
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
1171
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1172
|
+
case "ResourceNotFoundException":
|
|
1173
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
1174
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1175
|
+
case "ServiceQuotaExceededException":
|
|
1176
|
+
case "com.amazonaws.rum#ServiceQuotaExceededException":
|
|
1177
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
1178
|
+
case "ThrottlingException":
|
|
1179
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
1180
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1181
|
+
case "ValidationException":
|
|
1182
|
+
case "com.amazonaws.rum#ValidationException":
|
|
1183
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1184
|
+
default:
|
|
1185
|
+
const parsedBody = parsedOutput.body;
|
|
1186
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1187
|
+
output,
|
|
1188
|
+
parsedBody,
|
|
1189
|
+
exceptionCtor: RUMServiceException_1.RUMServiceException,
|
|
1190
|
+
errorCode,
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
677
1194
|
const map = smithy_client_1.map;
|
|
678
1195
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
679
1196
|
const contents = map({});
|
|
@@ -809,6 +1326,17 @@ const serializeAws_restJson1AppMonitorDetails = (input, context) => {
|
|
|
809
1326
|
...(input.version != null && { version: input.version }),
|
|
810
1327
|
};
|
|
811
1328
|
};
|
|
1329
|
+
const serializeAws_restJson1DimensionKeysMap = (input, context) => {
|
|
1330
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1331
|
+
if (value === null) {
|
|
1332
|
+
return acc;
|
|
1333
|
+
}
|
|
1334
|
+
return {
|
|
1335
|
+
...acc,
|
|
1336
|
+
[key]: value,
|
|
1337
|
+
};
|
|
1338
|
+
}, {});
|
|
1339
|
+
};
|
|
812
1340
|
const serializeAws_restJson1FavoritePages = (input, context) => {
|
|
813
1341
|
return input
|
|
814
1342
|
.filter((e) => e != null)
|
|
@@ -816,6 +1344,24 @@ const serializeAws_restJson1FavoritePages = (input, context) => {
|
|
|
816
1344
|
return entry;
|
|
817
1345
|
});
|
|
818
1346
|
};
|
|
1347
|
+
const serializeAws_restJson1MetricDefinitionRequest = (input, context) => {
|
|
1348
|
+
return {
|
|
1349
|
+
...(input.DimensionKeys != null && {
|
|
1350
|
+
DimensionKeys: serializeAws_restJson1DimensionKeysMap(input.DimensionKeys, context),
|
|
1351
|
+
}),
|
|
1352
|
+
...(input.EventPattern != null && { EventPattern: input.EventPattern }),
|
|
1353
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1354
|
+
...(input.UnitLabel != null && { UnitLabel: input.UnitLabel }),
|
|
1355
|
+
...(input.ValueKey != null && { ValueKey: input.ValueKey }),
|
|
1356
|
+
};
|
|
1357
|
+
};
|
|
1358
|
+
const serializeAws_restJson1MetricDefinitionsRequest = (input, context) => {
|
|
1359
|
+
return input
|
|
1360
|
+
.filter((e) => e != null)
|
|
1361
|
+
.map((entry) => {
|
|
1362
|
+
return serializeAws_restJson1MetricDefinitionRequest(entry, context);
|
|
1363
|
+
});
|
|
1364
|
+
};
|
|
819
1365
|
const serializeAws_restJson1Pages = (input, context) => {
|
|
820
1366
|
return input
|
|
821
1367
|
.filter((e) => e != null)
|
|
@@ -937,6 +1483,44 @@ const deserializeAws_restJson1AppMonitorSummaryList = (output, context) => {
|
|
|
937
1483
|
});
|
|
938
1484
|
return retVal;
|
|
939
1485
|
};
|
|
1486
|
+
const deserializeAws_restJson1BatchCreateRumMetricDefinitionsError = (output, context) => {
|
|
1487
|
+
return {
|
|
1488
|
+
ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
|
|
1489
|
+
ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
|
|
1490
|
+
MetricDefinition: output.MetricDefinition != null
|
|
1491
|
+
? deserializeAws_restJson1MetricDefinitionRequest(output.MetricDefinition, context)
|
|
1492
|
+
: undefined,
|
|
1493
|
+
};
|
|
1494
|
+
};
|
|
1495
|
+
const deserializeAws_restJson1BatchCreateRumMetricDefinitionsErrors = (output, context) => {
|
|
1496
|
+
const retVal = (output || [])
|
|
1497
|
+
.filter((e) => e != null)
|
|
1498
|
+
.map((entry) => {
|
|
1499
|
+
if (entry === null) {
|
|
1500
|
+
return null;
|
|
1501
|
+
}
|
|
1502
|
+
return deserializeAws_restJson1BatchCreateRumMetricDefinitionsError(entry, context);
|
|
1503
|
+
});
|
|
1504
|
+
return retVal;
|
|
1505
|
+
};
|
|
1506
|
+
const deserializeAws_restJson1BatchDeleteRumMetricDefinitionsError = (output, context) => {
|
|
1507
|
+
return {
|
|
1508
|
+
ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
|
|
1509
|
+
ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
|
|
1510
|
+
MetricDefinitionId: (0, smithy_client_1.expectString)(output.MetricDefinitionId),
|
|
1511
|
+
};
|
|
1512
|
+
};
|
|
1513
|
+
const deserializeAws_restJson1BatchDeleteRumMetricDefinitionsErrors = (output, context) => {
|
|
1514
|
+
const retVal = (output || [])
|
|
1515
|
+
.filter((e) => e != null)
|
|
1516
|
+
.map((entry) => {
|
|
1517
|
+
if (entry === null) {
|
|
1518
|
+
return null;
|
|
1519
|
+
}
|
|
1520
|
+
return deserializeAws_restJson1BatchDeleteRumMetricDefinitionsError(entry, context);
|
|
1521
|
+
});
|
|
1522
|
+
return retVal;
|
|
1523
|
+
};
|
|
940
1524
|
const deserializeAws_restJson1CwLog = (output, context) => {
|
|
941
1525
|
return {
|
|
942
1526
|
CwLogEnabled: (0, smithy_client_1.expectBoolean)(output.CwLogEnabled),
|
|
@@ -948,6 +1532,17 @@ const deserializeAws_restJson1DataStorage = (output, context) => {
|
|
|
948
1532
|
CwLog: output.CwLog != null ? deserializeAws_restJson1CwLog(output.CwLog, context) : undefined,
|
|
949
1533
|
};
|
|
950
1534
|
};
|
|
1535
|
+
const deserializeAws_restJson1DimensionKeysMap = (output, context) => {
|
|
1536
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1537
|
+
if (value === null) {
|
|
1538
|
+
return acc;
|
|
1539
|
+
}
|
|
1540
|
+
return {
|
|
1541
|
+
...acc,
|
|
1542
|
+
[key]: (0, smithy_client_1.expectString)(value),
|
|
1543
|
+
};
|
|
1544
|
+
}, {});
|
|
1545
|
+
};
|
|
951
1546
|
const deserializeAws_restJson1EventDataList = (output, context) => {
|
|
952
1547
|
const retVal = (output || [])
|
|
953
1548
|
.filter((e) => e != null)
|
|
@@ -970,6 +1565,69 @@ const deserializeAws_restJson1FavoritePages = (output, context) => {
|
|
|
970
1565
|
});
|
|
971
1566
|
return retVal;
|
|
972
1567
|
};
|
|
1568
|
+
const deserializeAws_restJson1MetricDefinition = (output, context) => {
|
|
1569
|
+
return {
|
|
1570
|
+
DimensionKeys: output.DimensionKeys != null
|
|
1571
|
+
? deserializeAws_restJson1DimensionKeysMap(output.DimensionKeys, context)
|
|
1572
|
+
: undefined,
|
|
1573
|
+
EventPattern: (0, smithy_client_1.expectString)(output.EventPattern),
|
|
1574
|
+
MetricDefinitionId: (0, smithy_client_1.expectString)(output.MetricDefinitionId),
|
|
1575
|
+
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1576
|
+
UnitLabel: (0, smithy_client_1.expectString)(output.UnitLabel),
|
|
1577
|
+
ValueKey: (0, smithy_client_1.expectString)(output.ValueKey),
|
|
1578
|
+
};
|
|
1579
|
+
};
|
|
1580
|
+
const deserializeAws_restJson1MetricDefinitionIds = (output, context) => {
|
|
1581
|
+
const retVal = (output || [])
|
|
1582
|
+
.filter((e) => e != null)
|
|
1583
|
+
.map((entry) => {
|
|
1584
|
+
if (entry === null) {
|
|
1585
|
+
return null;
|
|
1586
|
+
}
|
|
1587
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
1588
|
+
});
|
|
1589
|
+
return retVal;
|
|
1590
|
+
};
|
|
1591
|
+
const deserializeAws_restJson1MetricDefinitionRequest = (output, context) => {
|
|
1592
|
+
return {
|
|
1593
|
+
DimensionKeys: output.DimensionKeys != null
|
|
1594
|
+
? deserializeAws_restJson1DimensionKeysMap(output.DimensionKeys, context)
|
|
1595
|
+
: undefined,
|
|
1596
|
+
EventPattern: (0, smithy_client_1.expectString)(output.EventPattern),
|
|
1597
|
+
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1598
|
+
UnitLabel: (0, smithy_client_1.expectString)(output.UnitLabel),
|
|
1599
|
+
ValueKey: (0, smithy_client_1.expectString)(output.ValueKey),
|
|
1600
|
+
};
|
|
1601
|
+
};
|
|
1602
|
+
const deserializeAws_restJson1MetricDefinitions = (output, context) => {
|
|
1603
|
+
const retVal = (output || [])
|
|
1604
|
+
.filter((e) => e != null)
|
|
1605
|
+
.map((entry) => {
|
|
1606
|
+
if (entry === null) {
|
|
1607
|
+
return null;
|
|
1608
|
+
}
|
|
1609
|
+
return deserializeAws_restJson1MetricDefinition(entry, context);
|
|
1610
|
+
});
|
|
1611
|
+
return retVal;
|
|
1612
|
+
};
|
|
1613
|
+
const deserializeAws_restJson1MetricDestinationSummary = (output, context) => {
|
|
1614
|
+
return {
|
|
1615
|
+
Destination: (0, smithy_client_1.expectString)(output.Destination),
|
|
1616
|
+
DestinationArn: (0, smithy_client_1.expectString)(output.DestinationArn),
|
|
1617
|
+
IamRoleArn: (0, smithy_client_1.expectString)(output.IamRoleArn),
|
|
1618
|
+
};
|
|
1619
|
+
};
|
|
1620
|
+
const deserializeAws_restJson1MetricDestinationSummaryList = (output, context) => {
|
|
1621
|
+
const retVal = (output || [])
|
|
1622
|
+
.filter((e) => e != null)
|
|
1623
|
+
.map((entry) => {
|
|
1624
|
+
if (entry === null) {
|
|
1625
|
+
return null;
|
|
1626
|
+
}
|
|
1627
|
+
return deserializeAws_restJson1MetricDestinationSummary(entry, context);
|
|
1628
|
+
});
|
|
1629
|
+
return retVal;
|
|
1630
|
+
};
|
|
973
1631
|
const deserializeAws_restJson1Pages = (output, context) => {
|
|
974
1632
|
const retVal = (output || [])
|
|
975
1633
|
.filter((e) => e != null)
|