@aws-sdk/client-rum 3.185.0 → 3.188.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 +16 -0
- package/dist-es/RUM.js +42 -49
- package/dist-es/RUMClient.js +22 -28
- package/dist-es/commands/CreateAppMonitorCommand.js +21 -28
- package/dist-es/commands/DeleteAppMonitorCommand.js +21 -28
- package/dist-es/commands/GetAppMonitorCommand.js +21 -28
- package/dist-es/commands/GetAppMonitorDataCommand.js +21 -28
- package/dist-es/commands/ListAppMonitorsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/PutRumEventsCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateAppMonitorCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/RUMServiceException.js +5 -10
- package/dist-es/models/models_0.js +177 -118
- package/dist-es/pagination/GetAppMonitorDataPaginator.js +25 -68
- package/dist-es/pagination/ListAppMonitorsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +851 -1135
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1139 +1,872 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http";
|
|
3
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";
|
|
4
3
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
5
4
|
import { RUMServiceException as __BaseException } from "../models/RUMServiceException";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
protocol: protocol,
|
|
22
|
-
hostname: hostname,
|
|
23
|
-
port: port,
|
|
24
|
-
method: "POST",
|
|
25
|
-
headers: headers,
|
|
26
|
-
path: resolvedPath,
|
|
27
|
-
body: body,
|
|
28
|
-
})];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}); };
|
|
32
|
-
export var serializeAws_restJson1DeleteAppMonitorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
33
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
34
|
-
return __generator(this, function (_c) {
|
|
35
|
-
switch (_c.label) {
|
|
36
|
-
case 0: return [4, context.endpoint()];
|
|
37
|
-
case 1:
|
|
38
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
39
|
-
headers = {};
|
|
40
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitor/{Name}";
|
|
41
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
42
|
-
return [2, new __HttpRequest({
|
|
43
|
-
protocol: protocol,
|
|
44
|
-
hostname: hostname,
|
|
45
|
-
port: port,
|
|
46
|
-
method: "DELETE",
|
|
47
|
-
headers: headers,
|
|
48
|
-
path: resolvedPath,
|
|
49
|
-
body: body,
|
|
50
|
-
})];
|
|
51
|
-
}
|
|
5
|
+
export const serializeAws_restJson1CreateAppMonitorCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.AppMonitorConfiguration != null && {
|
|
14
|
+
AppMonitorConfiguration: serializeAws_restJson1AppMonitorConfiguration(input.AppMonitorConfiguration, context),
|
|
15
|
+
}),
|
|
16
|
+
...(input.CwLogEnabled != null && { CwLogEnabled: input.CwLogEnabled }),
|
|
17
|
+
...(input.Domain != null && { Domain: input.Domain }),
|
|
18
|
+
...(input.Name != null && { Name: input.Name }),
|
|
19
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
52
20
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
headers = {};
|
|
62
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitor/{Name}";
|
|
63
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
64
|
-
return [2, new __HttpRequest({
|
|
65
|
-
protocol: protocol,
|
|
66
|
-
hostname: hostname,
|
|
67
|
-
port: port,
|
|
68
|
-
method: "GET",
|
|
69
|
-
headers: headers,
|
|
70
|
-
path: resolvedPath,
|
|
71
|
-
body: body,
|
|
72
|
-
})];
|
|
73
|
-
}
|
|
21
|
+
return new __HttpRequest({
|
|
22
|
+
protocol,
|
|
23
|
+
hostname,
|
|
24
|
+
port,
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers,
|
|
27
|
+
path: resolvedPath,
|
|
28
|
+
body,
|
|
74
29
|
});
|
|
75
|
-
}
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
protocol: protocol,
|
|
91
|
-
hostname: hostname,
|
|
92
|
-
port: port,
|
|
93
|
-
method: "POST",
|
|
94
|
-
headers: headers,
|
|
95
|
-
path: resolvedPath,
|
|
96
|
-
body: body,
|
|
97
|
-
})];
|
|
98
|
-
}
|
|
30
|
+
};
|
|
31
|
+
export const serializeAws_restJson1DeleteAppMonitorCommand = async (input, context) => {
|
|
32
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
33
|
+
const headers = {};
|
|
34
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}";
|
|
35
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
36
|
+
let body;
|
|
37
|
+
return new __HttpRequest({
|
|
38
|
+
protocol,
|
|
39
|
+
hostname,
|
|
40
|
+
port,
|
|
41
|
+
method: "DELETE",
|
|
42
|
+
headers,
|
|
43
|
+
path: resolvedPath,
|
|
44
|
+
body,
|
|
99
45
|
});
|
|
100
|
-
}
|
|
101
|
-
export
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
protocol: protocol,
|
|
116
|
-
hostname: hostname,
|
|
117
|
-
port: port,
|
|
118
|
-
method: "POST",
|
|
119
|
-
headers: headers,
|
|
120
|
-
path: resolvedPath,
|
|
121
|
-
query: query,
|
|
122
|
-
body: body,
|
|
123
|
-
})];
|
|
124
|
-
}
|
|
46
|
+
};
|
|
47
|
+
export const serializeAws_restJson1GetAppMonitorCommand = async (input, context) => {
|
|
48
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
49
|
+
const headers = {};
|
|
50
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}";
|
|
51
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
52
|
+
let body;
|
|
53
|
+
return new __HttpRequest({
|
|
54
|
+
protocol,
|
|
55
|
+
hostname,
|
|
56
|
+
port,
|
|
57
|
+
method: "GET",
|
|
58
|
+
headers,
|
|
59
|
+
path: resolvedPath,
|
|
60
|
+
body,
|
|
125
61
|
});
|
|
126
|
-
}
|
|
127
|
-
export
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
port: port,
|
|
141
|
-
method: "GET",
|
|
142
|
-
headers: headers,
|
|
143
|
-
path: resolvedPath,
|
|
144
|
-
body: body,
|
|
145
|
-
})];
|
|
146
|
-
}
|
|
62
|
+
};
|
|
63
|
+
export const serializeAws_restJson1GetAppMonitorDataCommand = async (input, context) => {
|
|
64
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
65
|
+
const headers = {
|
|
66
|
+
"content-type": "application/json",
|
|
67
|
+
};
|
|
68
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}/data";
|
|
69
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
70
|
+
let body;
|
|
71
|
+
body = JSON.stringify({
|
|
72
|
+
...(input.Filters != null && { Filters: serializeAws_restJson1QueryFilters(input.Filters, context) }),
|
|
73
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
74
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
75
|
+
...(input.TimeRange != null && { TimeRange: serializeAws_restJson1TimeRange(input.TimeRange, context) }),
|
|
147
76
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
headers = {
|
|
157
|
-
"content-type": "application/json",
|
|
158
|
-
};
|
|
159
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitors/{Id}";
|
|
160
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
|
|
161
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.AppMonitorDetails != null && {
|
|
162
|
-
AppMonitorDetails: serializeAws_restJson1AppMonitorDetails(input.AppMonitorDetails, context),
|
|
163
|
-
})), (input.BatchId != null && { BatchId: input.BatchId })), (input.RumEvents != null && { RumEvents: serializeAws_restJson1RumEventList(input.RumEvents, context) })), (input.UserDetails != null && { UserDetails: serializeAws_restJson1UserDetails(input.UserDetails, context) })));
|
|
164
|
-
return [4, context.endpoint()];
|
|
165
|
-
case 2:
|
|
166
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
167
|
-
if (context.disableHostPrefix !== true) {
|
|
168
|
-
resolvedHostname = "dataplane." + resolvedHostname;
|
|
169
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
170
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return [2, new __HttpRequest({
|
|
174
|
-
protocol: protocol,
|
|
175
|
-
hostname: resolvedHostname,
|
|
176
|
-
port: port,
|
|
177
|
-
method: "POST",
|
|
178
|
-
headers: headers,
|
|
179
|
-
path: resolvedPath,
|
|
180
|
-
body: body,
|
|
181
|
-
})];
|
|
182
|
-
}
|
|
77
|
+
return new __HttpRequest({
|
|
78
|
+
protocol,
|
|
79
|
+
hostname,
|
|
80
|
+
port,
|
|
81
|
+
method: "POST",
|
|
82
|
+
headers,
|
|
83
|
+
path: resolvedPath,
|
|
84
|
+
body,
|
|
183
85
|
});
|
|
184
|
-
}
|
|
185
|
-
export
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
headers = {
|
|
193
|
-
"content-type": "application/json",
|
|
194
|
-
};
|
|
195
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
196
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
197
|
-
body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
198
|
-
return [2, new __HttpRequest({
|
|
199
|
-
protocol: protocol,
|
|
200
|
-
hostname: hostname,
|
|
201
|
-
port: port,
|
|
202
|
-
method: "POST",
|
|
203
|
-
headers: headers,
|
|
204
|
-
path: resolvedPath,
|
|
205
|
-
body: body,
|
|
206
|
-
})];
|
|
207
|
-
}
|
|
86
|
+
};
|
|
87
|
+
export const serializeAws_restJson1ListAppMonitorsCommand = async (input, context) => {
|
|
88
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
89
|
+
const headers = {};
|
|
90
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitors";
|
|
91
|
+
const query = map({
|
|
92
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
93
|
+
nextToken: [, input.NextToken],
|
|
208
94
|
});
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
220
|
-
query = map({
|
|
221
|
-
tagKeys: [function () { return input.TagKeys !== void 0; }, function () { return (input.TagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
222
|
-
});
|
|
223
|
-
return [2, new __HttpRequest({
|
|
224
|
-
protocol: protocol,
|
|
225
|
-
hostname: hostname,
|
|
226
|
-
port: port,
|
|
227
|
-
method: "DELETE",
|
|
228
|
-
headers: headers,
|
|
229
|
-
path: resolvedPath,
|
|
230
|
-
query: query,
|
|
231
|
-
body: body,
|
|
232
|
-
})];
|
|
233
|
-
}
|
|
95
|
+
let body;
|
|
96
|
+
return new __HttpRequest({
|
|
97
|
+
protocol,
|
|
98
|
+
hostname,
|
|
99
|
+
port,
|
|
100
|
+
method: "POST",
|
|
101
|
+
headers,
|
|
102
|
+
path: resolvedPath,
|
|
103
|
+
query,
|
|
104
|
+
body,
|
|
234
105
|
});
|
|
235
|
-
}
|
|
236
|
-
export
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
})), (input.CwLogEnabled != null && { CwLogEnabled: input.CwLogEnabled })), (input.Domain != null && { Domain: input.Domain })));
|
|
251
|
-
return [2, new __HttpRequest({
|
|
252
|
-
protocol: protocol,
|
|
253
|
-
hostname: hostname,
|
|
254
|
-
port: port,
|
|
255
|
-
method: "PATCH",
|
|
256
|
-
headers: headers,
|
|
257
|
-
path: resolvedPath,
|
|
258
|
-
body: body,
|
|
259
|
-
})];
|
|
260
|
-
}
|
|
106
|
+
};
|
|
107
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
108
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
109
|
+
const headers = {};
|
|
110
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
111
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
112
|
+
let body;
|
|
113
|
+
return new __HttpRequest({
|
|
114
|
+
protocol,
|
|
115
|
+
hostname,
|
|
116
|
+
port,
|
|
117
|
+
method: "GET",
|
|
118
|
+
headers,
|
|
119
|
+
path: resolvedPath,
|
|
120
|
+
body,
|
|
261
121
|
});
|
|
262
|
-
}
|
|
263
|
-
export
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
279
|
-
if (data.Id != null) {
|
|
280
|
-
contents.Id = __expectString(data.Id);
|
|
281
|
-
}
|
|
282
|
-
return [2, contents];
|
|
283
|
-
}
|
|
122
|
+
};
|
|
123
|
+
export const serializeAws_restJson1PutRumEventsCommand = async (input, context) => {
|
|
124
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
125
|
+
const headers = {
|
|
126
|
+
"content-type": "application/json",
|
|
127
|
+
};
|
|
128
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitors/{Id}";
|
|
129
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
|
|
130
|
+
let body;
|
|
131
|
+
body = JSON.stringify({
|
|
132
|
+
...(input.AppMonitorDetails != null && {
|
|
133
|
+
AppMonitorDetails: serializeAws_restJson1AppMonitorDetails(input.AppMonitorDetails, context),
|
|
134
|
+
}),
|
|
135
|
+
...(input.BatchId != null && { BatchId: input.BatchId }),
|
|
136
|
+
...(input.RumEvents != null && { RumEvents: serializeAws_restJson1RumEventList(input.RumEvents, context) }),
|
|
137
|
+
...(input.UserDetails != null && { UserDetails: serializeAws_restJson1UserDetails(input.UserDetails, context) }),
|
|
284
138
|
});
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
switch (_d.label) {
|
|
291
|
-
case 0:
|
|
292
|
-
_a = [__assign({}, output)];
|
|
293
|
-
_c = {};
|
|
294
|
-
return [4, parseErrorBody(output.body, context)];
|
|
295
|
-
case 1:
|
|
296
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
297
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
298
|
-
_b = errorCode;
|
|
299
|
-
switch (_b) {
|
|
300
|
-
case "AccessDeniedException": return [3, 2];
|
|
301
|
-
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
302
|
-
case "ConflictException": return [3, 4];
|
|
303
|
-
case "com.amazonaws.rum#ConflictException": return [3, 4];
|
|
304
|
-
case "InternalServerException": return [3, 6];
|
|
305
|
-
case "com.amazonaws.rum#InternalServerException": return [3, 6];
|
|
306
|
-
case "ServiceQuotaExceededException": return [3, 8];
|
|
307
|
-
case "com.amazonaws.rum#ServiceQuotaExceededException": return [3, 8];
|
|
308
|
-
case "ThrottlingException": return [3, 10];
|
|
309
|
-
case "com.amazonaws.rum#ThrottlingException": return [3, 10];
|
|
310
|
-
case "ValidationException": return [3, 12];
|
|
311
|
-
case "com.amazonaws.rum#ValidationException": return [3, 12];
|
|
312
|
-
}
|
|
313
|
-
return [3, 14];
|
|
314
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
315
|
-
case 3: throw _d.sent();
|
|
316
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
317
|
-
case 5: throw _d.sent();
|
|
318
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
319
|
-
case 7: throw _d.sent();
|
|
320
|
-
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
321
|
-
case 9: throw _d.sent();
|
|
322
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
323
|
-
case 11: throw _d.sent();
|
|
324
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
325
|
-
case 13: throw _d.sent();
|
|
326
|
-
case 14:
|
|
327
|
-
parsedBody = parsedOutput.body;
|
|
328
|
-
throwDefaultError({
|
|
329
|
-
output: output,
|
|
330
|
-
parsedBody: parsedBody,
|
|
331
|
-
exceptionCtor: __BaseException,
|
|
332
|
-
errorCode: errorCode,
|
|
333
|
-
});
|
|
334
|
-
_d.label = 15;
|
|
335
|
-
case 15: return [2];
|
|
139
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
140
|
+
if (context.disableHostPrefix !== true) {
|
|
141
|
+
resolvedHostname = "dataplane." + resolvedHostname;
|
|
142
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
143
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
336
144
|
}
|
|
145
|
+
}
|
|
146
|
+
return new __HttpRequest({
|
|
147
|
+
protocol,
|
|
148
|
+
hostname: resolvedHostname,
|
|
149
|
+
port,
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers,
|
|
152
|
+
path: resolvedPath,
|
|
153
|
+
body,
|
|
337
154
|
});
|
|
338
|
-
}
|
|
339
|
-
export
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
});
|
|
350
|
-
return [4, collectBody(output.body, context)];
|
|
351
|
-
case 1:
|
|
352
|
-
_a.sent();
|
|
353
|
-
return [2, contents];
|
|
354
|
-
}
|
|
155
|
+
};
|
|
156
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
157
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
158
|
+
const headers = {
|
|
159
|
+
"content-type": "application/json",
|
|
160
|
+
};
|
|
161
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
162
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
163
|
+
let body;
|
|
164
|
+
body = JSON.stringify({
|
|
165
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
355
166
|
});
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
_c = {};
|
|
365
|
-
return [4, parseErrorBody(output.body, context)];
|
|
366
|
-
case 1:
|
|
367
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
368
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
369
|
-
_b = errorCode;
|
|
370
|
-
switch (_b) {
|
|
371
|
-
case "AccessDeniedException": return [3, 2];
|
|
372
|
-
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
373
|
-
case "ConflictException": return [3, 4];
|
|
374
|
-
case "com.amazonaws.rum#ConflictException": return [3, 4];
|
|
375
|
-
case "InternalServerException": return [3, 6];
|
|
376
|
-
case "com.amazonaws.rum#InternalServerException": return [3, 6];
|
|
377
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
378
|
-
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 8];
|
|
379
|
-
case "ThrottlingException": return [3, 10];
|
|
380
|
-
case "com.amazonaws.rum#ThrottlingException": return [3, 10];
|
|
381
|
-
case "ValidationException": return [3, 12];
|
|
382
|
-
case "com.amazonaws.rum#ValidationException": return [3, 12];
|
|
383
|
-
}
|
|
384
|
-
return [3, 14];
|
|
385
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
386
|
-
case 3: throw _d.sent();
|
|
387
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
388
|
-
case 5: throw _d.sent();
|
|
389
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
390
|
-
case 7: throw _d.sent();
|
|
391
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
392
|
-
case 9: throw _d.sent();
|
|
393
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
394
|
-
case 11: throw _d.sent();
|
|
395
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
396
|
-
case 13: throw _d.sent();
|
|
397
|
-
case 14:
|
|
398
|
-
parsedBody = parsedOutput.body;
|
|
399
|
-
throwDefaultError({
|
|
400
|
-
output: output,
|
|
401
|
-
parsedBody: parsedBody,
|
|
402
|
-
exceptionCtor: __BaseException,
|
|
403
|
-
errorCode: errorCode,
|
|
404
|
-
});
|
|
405
|
-
_d.label = 15;
|
|
406
|
-
case 15: return [2];
|
|
407
|
-
}
|
|
167
|
+
return new __HttpRequest({
|
|
168
|
+
protocol,
|
|
169
|
+
hostname,
|
|
170
|
+
port,
|
|
171
|
+
method: "POST",
|
|
172
|
+
headers,
|
|
173
|
+
path: resolvedPath,
|
|
174
|
+
body,
|
|
408
175
|
});
|
|
409
|
-
}
|
|
410
|
-
export
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
}
|
|
418
|
-
contents = map({
|
|
419
|
-
$metadata: deserializeMetadata(output),
|
|
420
|
-
});
|
|
421
|
-
_a = __expectNonNull;
|
|
422
|
-
_b = __expectObject;
|
|
423
|
-
return [4, parseBody(output.body, context)];
|
|
424
|
-
case 1:
|
|
425
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
426
|
-
if (data.AppMonitor != null) {
|
|
427
|
-
contents.AppMonitor = deserializeAws_restJson1AppMonitor(data.AppMonitor, context);
|
|
428
|
-
}
|
|
429
|
-
return [2, contents];
|
|
430
|
-
}
|
|
176
|
+
};
|
|
177
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
178
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
179
|
+
const headers = {};
|
|
180
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
181
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
182
|
+
const query = map({
|
|
183
|
+
tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],
|
|
431
184
|
});
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
case 1:
|
|
443
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
444
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
445
|
-
_b = errorCode;
|
|
446
|
-
switch (_b) {
|
|
447
|
-
case "AccessDeniedException": return [3, 2];
|
|
448
|
-
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
449
|
-
case "InternalServerException": return [3, 4];
|
|
450
|
-
case "com.amazonaws.rum#InternalServerException": return [3, 4];
|
|
451
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
452
|
-
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 6];
|
|
453
|
-
case "ThrottlingException": return [3, 8];
|
|
454
|
-
case "com.amazonaws.rum#ThrottlingException": return [3, 8];
|
|
455
|
-
case "ValidationException": return [3, 10];
|
|
456
|
-
case "com.amazonaws.rum#ValidationException": return [3, 10];
|
|
457
|
-
}
|
|
458
|
-
return [3, 12];
|
|
459
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
460
|
-
case 3: throw _d.sent();
|
|
461
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
462
|
-
case 5: throw _d.sent();
|
|
463
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
464
|
-
case 7: throw _d.sent();
|
|
465
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
466
|
-
case 9: throw _d.sent();
|
|
467
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
468
|
-
case 11: throw _d.sent();
|
|
469
|
-
case 12:
|
|
470
|
-
parsedBody = parsedOutput.body;
|
|
471
|
-
throwDefaultError({
|
|
472
|
-
output: output,
|
|
473
|
-
parsedBody: parsedBody,
|
|
474
|
-
exceptionCtor: __BaseException,
|
|
475
|
-
errorCode: errorCode,
|
|
476
|
-
});
|
|
477
|
-
_d.label = 13;
|
|
478
|
-
case 13: return [2];
|
|
479
|
-
}
|
|
185
|
+
let body;
|
|
186
|
+
return new __HttpRequest({
|
|
187
|
+
protocol,
|
|
188
|
+
hostname,
|
|
189
|
+
port,
|
|
190
|
+
method: "DELETE",
|
|
191
|
+
headers,
|
|
192
|
+
path: resolvedPath,
|
|
193
|
+
query,
|
|
194
|
+
body,
|
|
480
195
|
});
|
|
481
|
-
}
|
|
482
|
-
export
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
case 1:
|
|
497
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
498
|
-
if (data.Events != null) {
|
|
499
|
-
contents.Events = deserializeAws_restJson1EventDataList(data.Events, context);
|
|
500
|
-
}
|
|
501
|
-
if (data.NextToken != null) {
|
|
502
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
503
|
-
}
|
|
504
|
-
return [2, contents];
|
|
505
|
-
}
|
|
196
|
+
};
|
|
197
|
+
export const serializeAws_restJson1UpdateAppMonitorCommand = async (input, context) => {
|
|
198
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
199
|
+
const headers = {
|
|
200
|
+
"content-type": "application/json",
|
|
201
|
+
};
|
|
202
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}";
|
|
203
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
204
|
+
let body;
|
|
205
|
+
body = JSON.stringify({
|
|
206
|
+
...(input.AppMonitorConfiguration != null && {
|
|
207
|
+
AppMonitorConfiguration: serializeAws_restJson1AppMonitorConfiguration(input.AppMonitorConfiguration, context),
|
|
208
|
+
}),
|
|
209
|
+
...(input.CwLogEnabled != null && { CwLogEnabled: input.CwLogEnabled }),
|
|
210
|
+
...(input.Domain != null && { Domain: input.Domain }),
|
|
506
211
|
});
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
_c = {};
|
|
516
|
-
return [4, parseErrorBody(output.body, context)];
|
|
517
|
-
case 1:
|
|
518
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
519
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
520
|
-
_b = errorCode;
|
|
521
|
-
switch (_b) {
|
|
522
|
-
case "AccessDeniedException": return [3, 2];
|
|
523
|
-
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
524
|
-
case "InternalServerException": return [3, 4];
|
|
525
|
-
case "com.amazonaws.rum#InternalServerException": return [3, 4];
|
|
526
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
527
|
-
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 6];
|
|
528
|
-
case "ThrottlingException": return [3, 8];
|
|
529
|
-
case "com.amazonaws.rum#ThrottlingException": return [3, 8];
|
|
530
|
-
case "ValidationException": return [3, 10];
|
|
531
|
-
case "com.amazonaws.rum#ValidationException": return [3, 10];
|
|
532
|
-
}
|
|
533
|
-
return [3, 12];
|
|
534
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
535
|
-
case 3: throw _d.sent();
|
|
536
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
537
|
-
case 5: throw _d.sent();
|
|
538
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
539
|
-
case 7: throw _d.sent();
|
|
540
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
541
|
-
case 9: throw _d.sent();
|
|
542
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
543
|
-
case 11: throw _d.sent();
|
|
544
|
-
case 12:
|
|
545
|
-
parsedBody = parsedOutput.body;
|
|
546
|
-
throwDefaultError({
|
|
547
|
-
output: output,
|
|
548
|
-
parsedBody: parsedBody,
|
|
549
|
-
exceptionCtor: __BaseException,
|
|
550
|
-
errorCode: errorCode,
|
|
551
|
-
});
|
|
552
|
-
_d.label = 13;
|
|
553
|
-
case 13: return [2];
|
|
554
|
-
}
|
|
212
|
+
return new __HttpRequest({
|
|
213
|
+
protocol,
|
|
214
|
+
hostname,
|
|
215
|
+
port,
|
|
216
|
+
method: "PATCH",
|
|
217
|
+
headers,
|
|
218
|
+
path: resolvedPath,
|
|
219
|
+
body,
|
|
555
220
|
});
|
|
556
|
-
}
|
|
557
|
-
export
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
return [2, deserializeAws_restJson1ListAppMonitorsCommandError(output, context)];
|
|
564
|
-
}
|
|
565
|
-
contents = map({
|
|
566
|
-
$metadata: deserializeMetadata(output),
|
|
567
|
-
});
|
|
568
|
-
_a = __expectNonNull;
|
|
569
|
-
_b = __expectObject;
|
|
570
|
-
return [4, parseBody(output.body, context)];
|
|
571
|
-
case 1:
|
|
572
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
573
|
-
if (data.AppMonitorSummaries != null) {
|
|
574
|
-
contents.AppMonitorSummaries = deserializeAws_restJson1AppMonitorSummaryList(data.AppMonitorSummaries, context);
|
|
575
|
-
}
|
|
576
|
-
if (data.NextToken != null) {
|
|
577
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
578
|
-
}
|
|
579
|
-
return [2, contents];
|
|
580
|
-
}
|
|
221
|
+
};
|
|
222
|
+
export const deserializeAws_restJson1CreateAppMonitorCommand = async (output, context) => {
|
|
223
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
224
|
+
return deserializeAws_restJson1CreateAppMonitorCommandError(output, context);
|
|
225
|
+
}
|
|
226
|
+
const contents = map({
|
|
227
|
+
$metadata: deserializeMetadata(output),
|
|
581
228
|
});
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
return
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
229
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
230
|
+
if (data.Id != null) {
|
|
231
|
+
contents.Id = __expectString(data.Id);
|
|
232
|
+
}
|
|
233
|
+
return contents;
|
|
234
|
+
};
|
|
235
|
+
const deserializeAws_restJson1CreateAppMonitorCommandError = async (output, context) => {
|
|
236
|
+
const parsedOutput = {
|
|
237
|
+
...output,
|
|
238
|
+
body: await parseErrorBody(output.body, context),
|
|
239
|
+
};
|
|
240
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
241
|
+
switch (errorCode) {
|
|
242
|
+
case "AccessDeniedException":
|
|
243
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
244
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
245
|
+
case "ConflictException":
|
|
246
|
+
case "com.amazonaws.rum#ConflictException":
|
|
247
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
248
|
+
case "InternalServerException":
|
|
249
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
250
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
251
|
+
case "ServiceQuotaExceededException":
|
|
252
|
+
case "com.amazonaws.rum#ServiceQuotaExceededException":
|
|
253
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
254
|
+
case "ThrottlingException":
|
|
255
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
256
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
257
|
+
case "ValidationException":
|
|
258
|
+
case "com.amazonaws.rum#ValidationException":
|
|
259
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
260
|
+
default:
|
|
261
|
+
const parsedBody = parsedOutput.body;
|
|
262
|
+
throwDefaultError({
|
|
263
|
+
output,
|
|
264
|
+
parsedBody,
|
|
265
|
+
exceptionCtor: __BaseException,
|
|
266
|
+
errorCode,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
export const deserializeAws_restJson1DeleteAppMonitorCommand = async (output, context) => {
|
|
271
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
272
|
+
return deserializeAws_restJson1DeleteAppMonitorCommandError(output, context);
|
|
273
|
+
}
|
|
274
|
+
const contents = map({
|
|
275
|
+
$metadata: deserializeMetadata(output),
|
|
626
276
|
});
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
277
|
+
await collectBody(output.body, context);
|
|
278
|
+
return contents;
|
|
279
|
+
};
|
|
280
|
+
const deserializeAws_restJson1DeleteAppMonitorCommandError = async (output, context) => {
|
|
281
|
+
const parsedOutput = {
|
|
282
|
+
...output,
|
|
283
|
+
body: await parseErrorBody(output.body, context),
|
|
284
|
+
};
|
|
285
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
286
|
+
switch (errorCode) {
|
|
287
|
+
case "AccessDeniedException":
|
|
288
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
289
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
290
|
+
case "ConflictException":
|
|
291
|
+
case "com.amazonaws.rum#ConflictException":
|
|
292
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
293
|
+
case "InternalServerException":
|
|
294
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
295
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
296
|
+
case "ResourceNotFoundException":
|
|
297
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
298
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
299
|
+
case "ThrottlingException":
|
|
300
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
301
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
302
|
+
case "ValidationException":
|
|
303
|
+
case "com.amazonaws.rum#ValidationException":
|
|
304
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
305
|
+
default:
|
|
306
|
+
const parsedBody = parsedOutput.body;
|
|
307
|
+
throwDefaultError({
|
|
308
|
+
output,
|
|
309
|
+
parsedBody,
|
|
310
|
+
exceptionCtor: __BaseException,
|
|
311
|
+
errorCode,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
export const deserializeAws_restJson1GetAppMonitorCommand = async (output, context) => {
|
|
316
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
317
|
+
return deserializeAws_restJson1GetAppMonitorCommandError(output, context);
|
|
318
|
+
}
|
|
319
|
+
const contents = map({
|
|
320
|
+
$metadata: deserializeMetadata(output),
|
|
652
321
|
});
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
return
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
322
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
323
|
+
if (data.AppMonitor != null) {
|
|
324
|
+
contents.AppMonitor = deserializeAws_restJson1AppMonitor(data.AppMonitor, context);
|
|
325
|
+
}
|
|
326
|
+
return contents;
|
|
327
|
+
};
|
|
328
|
+
const deserializeAws_restJson1GetAppMonitorCommandError = async (output, context) => {
|
|
329
|
+
const parsedOutput = {
|
|
330
|
+
...output,
|
|
331
|
+
body: await parseErrorBody(output.body, context),
|
|
332
|
+
};
|
|
333
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
334
|
+
switch (errorCode) {
|
|
335
|
+
case "AccessDeniedException":
|
|
336
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
337
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
338
|
+
case "InternalServerException":
|
|
339
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
340
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
341
|
+
case "ResourceNotFoundException":
|
|
342
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
343
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
344
|
+
case "ThrottlingException":
|
|
345
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
346
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
347
|
+
case "ValidationException":
|
|
348
|
+
case "com.amazonaws.rum#ValidationException":
|
|
349
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
350
|
+
default:
|
|
351
|
+
const parsedBody = parsedOutput.body;
|
|
352
|
+
throwDefaultError({
|
|
353
|
+
output,
|
|
354
|
+
parsedBody,
|
|
355
|
+
exceptionCtor: __BaseException,
|
|
356
|
+
errorCode,
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
export const deserializeAws_restJson1GetAppMonitorDataCommand = async (output, context) => {
|
|
361
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
362
|
+
return deserializeAws_restJson1GetAppMonitorDataCommandError(output, context);
|
|
363
|
+
}
|
|
364
|
+
const contents = map({
|
|
365
|
+
$metadata: deserializeMetadata(output),
|
|
693
366
|
});
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
367
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
368
|
+
if (data.Events != null) {
|
|
369
|
+
contents.Events = deserializeAws_restJson1EventDataList(data.Events, context);
|
|
370
|
+
}
|
|
371
|
+
if (data.NextToken != null) {
|
|
372
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
373
|
+
}
|
|
374
|
+
return contents;
|
|
375
|
+
};
|
|
376
|
+
const deserializeAws_restJson1GetAppMonitorDataCommandError = async (output, context) => {
|
|
377
|
+
const parsedOutput = {
|
|
378
|
+
...output,
|
|
379
|
+
body: await parseErrorBody(output.body, context),
|
|
380
|
+
};
|
|
381
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
382
|
+
switch (errorCode) {
|
|
383
|
+
case "AccessDeniedException":
|
|
384
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
385
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
386
|
+
case "InternalServerException":
|
|
387
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
388
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
389
|
+
case "ResourceNotFoundException":
|
|
390
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
391
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
392
|
+
case "ThrottlingException":
|
|
393
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
394
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
395
|
+
case "ValidationException":
|
|
396
|
+
case "com.amazonaws.rum#ValidationException":
|
|
397
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
398
|
+
default:
|
|
399
|
+
const parsedBody = parsedOutput.body;
|
|
400
|
+
throwDefaultError({
|
|
401
|
+
output,
|
|
402
|
+
parsedBody,
|
|
403
|
+
exceptionCtor: __BaseException,
|
|
404
|
+
errorCode,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
export const deserializeAws_restJson1ListAppMonitorsCommand = async (output, context) => {
|
|
409
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
410
|
+
return deserializeAws_restJson1ListAppMonitorsCommandError(output, context);
|
|
411
|
+
}
|
|
412
|
+
const contents = map({
|
|
413
|
+
$metadata: deserializeMetadata(output),
|
|
711
414
|
});
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
});
|
|
757
|
-
_d.label = 13;
|
|
758
|
-
case 13: return [2];
|
|
759
|
-
}
|
|
415
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
416
|
+
if (data.AppMonitorSummaries != null) {
|
|
417
|
+
contents.AppMonitorSummaries = deserializeAws_restJson1AppMonitorSummaryList(data.AppMonitorSummaries, context);
|
|
418
|
+
}
|
|
419
|
+
if (data.NextToken != null) {
|
|
420
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
421
|
+
}
|
|
422
|
+
return contents;
|
|
423
|
+
};
|
|
424
|
+
const deserializeAws_restJson1ListAppMonitorsCommandError = async (output, context) => {
|
|
425
|
+
const parsedOutput = {
|
|
426
|
+
...output,
|
|
427
|
+
body: await parseErrorBody(output.body, context),
|
|
428
|
+
};
|
|
429
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
430
|
+
switch (errorCode) {
|
|
431
|
+
case "AccessDeniedException":
|
|
432
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
433
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
434
|
+
case "InternalServerException":
|
|
435
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
436
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
437
|
+
case "ThrottlingException":
|
|
438
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
439
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
440
|
+
case "ValidationException":
|
|
441
|
+
case "com.amazonaws.rum#ValidationException":
|
|
442
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
443
|
+
default:
|
|
444
|
+
const parsedBody = parsedOutput.body;
|
|
445
|
+
throwDefaultError({
|
|
446
|
+
output,
|
|
447
|
+
parsedBody,
|
|
448
|
+
exceptionCtor: __BaseException,
|
|
449
|
+
errorCode,
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
454
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
455
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
456
|
+
}
|
|
457
|
+
const contents = map({
|
|
458
|
+
$metadata: deserializeMetadata(output),
|
|
760
459
|
});
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
460
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
461
|
+
if (data.ResourceArn != null) {
|
|
462
|
+
contents.ResourceArn = __expectString(data.ResourceArn);
|
|
463
|
+
}
|
|
464
|
+
if (data.Tags != null) {
|
|
465
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
466
|
+
}
|
|
467
|
+
return contents;
|
|
468
|
+
};
|
|
469
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
470
|
+
const parsedOutput = {
|
|
471
|
+
...output,
|
|
472
|
+
body: await parseErrorBody(output.body, context),
|
|
473
|
+
};
|
|
474
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
475
|
+
switch (errorCode) {
|
|
476
|
+
case "InternalServerException":
|
|
477
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
478
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
479
|
+
case "ResourceNotFoundException":
|
|
480
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
481
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
482
|
+
case "ValidationException":
|
|
483
|
+
case "com.amazonaws.rum#ValidationException":
|
|
484
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
485
|
+
default:
|
|
486
|
+
const parsedBody = parsedOutput.body;
|
|
487
|
+
throwDefaultError({
|
|
488
|
+
output,
|
|
489
|
+
parsedBody,
|
|
490
|
+
exceptionCtor: __BaseException,
|
|
491
|
+
errorCode,
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
export const deserializeAws_restJson1PutRumEventsCommand = async (output, context) => {
|
|
496
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
497
|
+
return deserializeAws_restJson1PutRumEventsCommandError(output, context);
|
|
498
|
+
}
|
|
499
|
+
const contents = map({
|
|
500
|
+
$metadata: deserializeMetadata(output),
|
|
778
501
|
});
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
502
|
+
await collectBody(output.body, context);
|
|
503
|
+
return contents;
|
|
504
|
+
};
|
|
505
|
+
const deserializeAws_restJson1PutRumEventsCommandError = async (output, context) => {
|
|
506
|
+
const parsedOutput = {
|
|
507
|
+
...output,
|
|
508
|
+
body: await parseErrorBody(output.body, context),
|
|
509
|
+
};
|
|
510
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
511
|
+
switch (errorCode) {
|
|
512
|
+
case "AccessDeniedException":
|
|
513
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
514
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
515
|
+
case "InternalServerException":
|
|
516
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
517
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
518
|
+
case "ResourceNotFoundException":
|
|
519
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
520
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
521
|
+
case "ThrottlingException":
|
|
522
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
523
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
524
|
+
case "ValidationException":
|
|
525
|
+
case "com.amazonaws.rum#ValidationException":
|
|
526
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
527
|
+
default:
|
|
528
|
+
const parsedBody = parsedOutput.body;
|
|
529
|
+
throwDefaultError({
|
|
530
|
+
output,
|
|
531
|
+
parsedBody,
|
|
532
|
+
exceptionCtor: __BaseException,
|
|
533
|
+
errorCode,
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
538
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
539
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
540
|
+
}
|
|
541
|
+
const contents = map({
|
|
542
|
+
$metadata: deserializeMetadata(output),
|
|
819
543
|
});
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
544
|
+
await collectBody(output.body, context);
|
|
545
|
+
return contents;
|
|
546
|
+
};
|
|
547
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
548
|
+
const parsedOutput = {
|
|
549
|
+
...output,
|
|
550
|
+
body: await parseErrorBody(output.body, context),
|
|
551
|
+
};
|
|
552
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
553
|
+
switch (errorCode) {
|
|
554
|
+
case "InternalServerException":
|
|
555
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
556
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
557
|
+
case "ResourceNotFoundException":
|
|
558
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
559
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
560
|
+
case "ValidationException":
|
|
561
|
+
case "com.amazonaws.rum#ValidationException":
|
|
562
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
563
|
+
default:
|
|
564
|
+
const parsedBody = parsedOutput.body;
|
|
565
|
+
throwDefaultError({
|
|
566
|
+
output,
|
|
567
|
+
parsedBody,
|
|
568
|
+
exceptionCtor: __BaseException,
|
|
569
|
+
errorCode,
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
574
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
575
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
576
|
+
}
|
|
577
|
+
const contents = map({
|
|
578
|
+
$metadata: deserializeMetadata(output),
|
|
837
579
|
});
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
errorCode: errorCode,
|
|
874
|
-
});
|
|
875
|
-
_d.label = 9;
|
|
876
|
-
case 9: return [2];
|
|
877
|
-
}
|
|
580
|
+
await collectBody(output.body, context);
|
|
581
|
+
return contents;
|
|
582
|
+
};
|
|
583
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
584
|
+
const parsedOutput = {
|
|
585
|
+
...output,
|
|
586
|
+
body: await parseErrorBody(output.body, context),
|
|
587
|
+
};
|
|
588
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
589
|
+
switch (errorCode) {
|
|
590
|
+
case "InternalServerException":
|
|
591
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
592
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
593
|
+
case "ResourceNotFoundException":
|
|
594
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
595
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
596
|
+
case "ValidationException":
|
|
597
|
+
case "com.amazonaws.rum#ValidationException":
|
|
598
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
599
|
+
default:
|
|
600
|
+
const parsedBody = parsedOutput.body;
|
|
601
|
+
throwDefaultError({
|
|
602
|
+
output,
|
|
603
|
+
parsedBody,
|
|
604
|
+
exceptionCtor: __BaseException,
|
|
605
|
+
errorCode,
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
};
|
|
609
|
+
export const deserializeAws_restJson1UpdateAppMonitorCommand = async (output, context) => {
|
|
610
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
611
|
+
return deserializeAws_restJson1UpdateAppMonitorCommandError(output, context);
|
|
612
|
+
}
|
|
613
|
+
const contents = map({
|
|
614
|
+
$metadata: deserializeMetadata(output),
|
|
878
615
|
});
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
616
|
+
await collectBody(output.body, context);
|
|
617
|
+
return contents;
|
|
618
|
+
};
|
|
619
|
+
const deserializeAws_restJson1UpdateAppMonitorCommandError = async (output, context) => {
|
|
620
|
+
const parsedOutput = {
|
|
621
|
+
...output,
|
|
622
|
+
body: await parseErrorBody(output.body, context),
|
|
623
|
+
};
|
|
624
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
625
|
+
switch (errorCode) {
|
|
626
|
+
case "AccessDeniedException":
|
|
627
|
+
case "com.amazonaws.rum#AccessDeniedException":
|
|
628
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
629
|
+
case "ConflictException":
|
|
630
|
+
case "com.amazonaws.rum#ConflictException":
|
|
631
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
632
|
+
case "InternalServerException":
|
|
633
|
+
case "com.amazonaws.rum#InternalServerException":
|
|
634
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
635
|
+
case "ResourceNotFoundException":
|
|
636
|
+
case "com.amazonaws.rum#ResourceNotFoundException":
|
|
637
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
638
|
+
case "ThrottlingException":
|
|
639
|
+
case "com.amazonaws.rum#ThrottlingException":
|
|
640
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
641
|
+
case "ValidationException":
|
|
642
|
+
case "com.amazonaws.rum#ValidationException":
|
|
643
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
644
|
+
default:
|
|
645
|
+
const parsedBody = parsedOutput.body;
|
|
646
|
+
throwDefaultError({
|
|
647
|
+
output,
|
|
648
|
+
parsedBody,
|
|
649
|
+
exceptionCtor: __BaseException,
|
|
650
|
+
errorCode,
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
const map = __map;
|
|
655
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
656
|
+
const contents = map({});
|
|
657
|
+
const data = parsedOutput.body;
|
|
658
|
+
if (data.message != null) {
|
|
659
|
+
contents.message = __expectString(data.message);
|
|
660
|
+
}
|
|
661
|
+
const exception = new AccessDeniedException({
|
|
662
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
663
|
+
...contents,
|
|
896
664
|
});
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
case "ConflictException": return [3, 4];
|
|
915
|
-
case "com.amazonaws.rum#ConflictException": return [3, 4];
|
|
916
|
-
case "InternalServerException": return [3, 6];
|
|
917
|
-
case "com.amazonaws.rum#InternalServerException": return [3, 6];
|
|
918
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
919
|
-
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 8];
|
|
920
|
-
case "ThrottlingException": return [3, 10];
|
|
921
|
-
case "com.amazonaws.rum#ThrottlingException": return [3, 10];
|
|
922
|
-
case "ValidationException": return [3, 12];
|
|
923
|
-
case "com.amazonaws.rum#ValidationException": return [3, 12];
|
|
924
|
-
}
|
|
925
|
-
return [3, 14];
|
|
926
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
927
|
-
case 3: throw _d.sent();
|
|
928
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
929
|
-
case 5: throw _d.sent();
|
|
930
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
931
|
-
case 7: throw _d.sent();
|
|
932
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
933
|
-
case 9: throw _d.sent();
|
|
934
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
935
|
-
case 11: throw _d.sent();
|
|
936
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
937
|
-
case 13: throw _d.sent();
|
|
938
|
-
case 14:
|
|
939
|
-
parsedBody = parsedOutput.body;
|
|
940
|
-
throwDefaultError({
|
|
941
|
-
output: output,
|
|
942
|
-
parsedBody: parsedBody,
|
|
943
|
-
exceptionCtor: __BaseException,
|
|
944
|
-
errorCode: errorCode,
|
|
945
|
-
});
|
|
946
|
-
_d.label = 15;
|
|
947
|
-
case 15: return [2];
|
|
948
|
-
}
|
|
665
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
666
|
+
};
|
|
667
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
668
|
+
const contents = map({});
|
|
669
|
+
const data = parsedOutput.body;
|
|
670
|
+
if (data.message != null) {
|
|
671
|
+
contents.message = __expectString(data.message);
|
|
672
|
+
}
|
|
673
|
+
if (data.resourceName != null) {
|
|
674
|
+
contents.resourceName = __expectString(data.resourceName);
|
|
675
|
+
}
|
|
676
|
+
if (data.resourceType != null) {
|
|
677
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
678
|
+
}
|
|
679
|
+
const exception = new ConflictException({
|
|
680
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
681
|
+
...contents,
|
|
949
682
|
});
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
contents.message = __expectString(data.message);
|
|
959
|
-
}
|
|
960
|
-
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
961
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
683
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
684
|
+
};
|
|
685
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
686
|
+
const contents = map({
|
|
687
|
+
retryAfterSeconds: [
|
|
688
|
+
() => void 0 !== parsedOutput.headers["retry-after"],
|
|
689
|
+
() => __strictParseInt32(parsedOutput.headers["retry-after"]),
|
|
690
|
+
],
|
|
962
691
|
});
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
contents.message = __expectString(data.message);
|
|
971
|
-
}
|
|
972
|
-
if (data.resourceName != null) {
|
|
973
|
-
contents.resourceName = __expectString(data.resourceName);
|
|
974
|
-
}
|
|
975
|
-
if (data.resourceType != null) {
|
|
976
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
977
|
-
}
|
|
978
|
-
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
979
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
692
|
+
const data = parsedOutput.body;
|
|
693
|
+
if (data.message != null) {
|
|
694
|
+
contents.message = __expectString(data.message);
|
|
695
|
+
}
|
|
696
|
+
const exception = new InternalServerException({
|
|
697
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
698
|
+
...contents,
|
|
980
699
|
});
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
700
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
701
|
+
};
|
|
702
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
703
|
+
const contents = map({});
|
|
704
|
+
const data = parsedOutput.body;
|
|
705
|
+
if (data.message != null) {
|
|
706
|
+
contents.message = __expectString(data.message);
|
|
707
|
+
}
|
|
708
|
+
if (data.resourceName != null) {
|
|
709
|
+
contents.resourceName = __expectString(data.resourceName);
|
|
710
|
+
}
|
|
711
|
+
if (data.resourceType != null) {
|
|
712
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
713
|
+
}
|
|
714
|
+
const exception = new ResourceNotFoundException({
|
|
715
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
716
|
+
...contents,
|
|
997
717
|
});
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
}
|
|
1010
|
-
if (data.resourceType != null) {
|
|
1011
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
1012
|
-
}
|
|
1013
|
-
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1014
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
718
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
719
|
+
};
|
|
720
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
721
|
+
const contents = map({});
|
|
722
|
+
const data = parsedOutput.body;
|
|
723
|
+
if (data.message != null) {
|
|
724
|
+
contents.message = __expectString(data.message);
|
|
725
|
+
}
|
|
726
|
+
const exception = new ServiceQuotaExceededException({
|
|
727
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
728
|
+
...contents,
|
|
1015
729
|
});
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
}
|
|
1025
|
-
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1026
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
730
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
731
|
+
};
|
|
732
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
733
|
+
const contents = map({
|
|
734
|
+
retryAfterSeconds: [
|
|
735
|
+
() => void 0 !== parsedOutput.headers["retry-after"],
|
|
736
|
+
() => __strictParseInt32(parsedOutput.headers["retry-after"]),
|
|
737
|
+
],
|
|
1027
738
|
});
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
}
|
|
1042
|
-
if (data.quotaCode != null) {
|
|
1043
|
-
contents.quotaCode = __expectString(data.quotaCode);
|
|
1044
|
-
}
|
|
1045
|
-
if (data.serviceCode != null) {
|
|
1046
|
-
contents.serviceCode = __expectString(data.serviceCode);
|
|
1047
|
-
}
|
|
1048
|
-
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1049
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
739
|
+
const data = parsedOutput.body;
|
|
740
|
+
if (data.message != null) {
|
|
741
|
+
contents.message = __expectString(data.message);
|
|
742
|
+
}
|
|
743
|
+
if (data.quotaCode != null) {
|
|
744
|
+
contents.quotaCode = __expectString(data.quotaCode);
|
|
745
|
+
}
|
|
746
|
+
if (data.serviceCode != null) {
|
|
747
|
+
contents.serviceCode = __expectString(data.serviceCode);
|
|
748
|
+
}
|
|
749
|
+
const exception = new ThrottlingException({
|
|
750
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
751
|
+
...contents,
|
|
1050
752
|
});
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
753
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
754
|
+
};
|
|
755
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
756
|
+
const contents = map({});
|
|
757
|
+
const data = parsedOutput.body;
|
|
758
|
+
if (data.message != null) {
|
|
759
|
+
contents.message = __expectString(data.message);
|
|
760
|
+
}
|
|
761
|
+
const exception = new ValidationException({
|
|
762
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
763
|
+
...contents,
|
|
1062
764
|
});
|
|
1063
|
-
|
|
1064
|
-
var serializeAws_restJson1AppMonitorConfiguration = function (input, context) {
|
|
1065
|
-
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AllowCookies != null && { AllowCookies: input.AllowCookies })), (input.EnableXRay != null && { EnableXRay: input.EnableXRay })), (input.ExcludedPages != null && { ExcludedPages: serializeAws_restJson1Pages(input.ExcludedPages, context) })), (input.FavoritePages != null && {
|
|
1066
|
-
FavoritePages: serializeAws_restJson1FavoritePages(input.FavoritePages, context),
|
|
1067
|
-
})), (input.GuestRoleArn != null && { GuestRoleArn: input.GuestRoleArn })), (input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId })), (input.IncludedPages != null && { IncludedPages: serializeAws_restJson1Pages(input.IncludedPages, context) })), (input.SessionSampleRate != null && { SessionSampleRate: __serializeFloat(input.SessionSampleRate) })), (input.Telemetries != null && { Telemetries: serializeAws_restJson1Telemetries(input.Telemetries, context) }));
|
|
765
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1068
766
|
};
|
|
1069
|
-
|
|
1070
|
-
return
|
|
767
|
+
const serializeAws_restJson1AppMonitorConfiguration = (input, context) => {
|
|
768
|
+
return {
|
|
769
|
+
...(input.AllowCookies != null && { AllowCookies: input.AllowCookies }),
|
|
770
|
+
...(input.EnableXRay != null && { EnableXRay: input.EnableXRay }),
|
|
771
|
+
...(input.ExcludedPages != null && { ExcludedPages: serializeAws_restJson1Pages(input.ExcludedPages, context) }),
|
|
772
|
+
...(input.FavoritePages != null && {
|
|
773
|
+
FavoritePages: serializeAws_restJson1FavoritePages(input.FavoritePages, context),
|
|
774
|
+
}),
|
|
775
|
+
...(input.GuestRoleArn != null && { GuestRoleArn: input.GuestRoleArn }),
|
|
776
|
+
...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
|
|
777
|
+
...(input.IncludedPages != null && { IncludedPages: serializeAws_restJson1Pages(input.IncludedPages, context) }),
|
|
778
|
+
...(input.SessionSampleRate != null && { SessionSampleRate: __serializeFloat(input.SessionSampleRate) }),
|
|
779
|
+
...(input.Telemetries != null && { Telemetries: serializeAws_restJson1Telemetries(input.Telemetries, context) }),
|
|
780
|
+
};
|
|
1071
781
|
};
|
|
1072
|
-
|
|
782
|
+
const serializeAws_restJson1AppMonitorDetails = (input, context) => {
|
|
783
|
+
return {
|
|
784
|
+
...(input.id != null && { id: input.id }),
|
|
785
|
+
...(input.name != null && { name: input.name }),
|
|
786
|
+
...(input.version != null && { version: input.version }),
|
|
787
|
+
};
|
|
788
|
+
};
|
|
789
|
+
const serializeAws_restJson1FavoritePages = (input, context) => {
|
|
1073
790
|
return input
|
|
1074
|
-
.filter(
|
|
1075
|
-
.map(
|
|
791
|
+
.filter((e) => e != null)
|
|
792
|
+
.map((entry) => {
|
|
1076
793
|
return entry;
|
|
1077
794
|
});
|
|
1078
795
|
};
|
|
1079
|
-
|
|
796
|
+
const serializeAws_restJson1Pages = (input, context) => {
|
|
1080
797
|
return input
|
|
1081
|
-
.filter(
|
|
1082
|
-
.map(
|
|
798
|
+
.filter((e) => e != null)
|
|
799
|
+
.map((entry) => {
|
|
1083
800
|
return entry;
|
|
1084
801
|
});
|
|
1085
802
|
};
|
|
1086
|
-
|
|
1087
|
-
return
|
|
803
|
+
const serializeAws_restJson1QueryFilter = (input, context) => {
|
|
804
|
+
return {
|
|
805
|
+
...(input.Name != null && { Name: input.Name }),
|
|
806
|
+
...(input.Values != null && { Values: serializeAws_restJson1QueryFilterValueList(input.Values, context) }),
|
|
807
|
+
};
|
|
1088
808
|
};
|
|
1089
|
-
|
|
809
|
+
const serializeAws_restJson1QueryFilters = (input, context) => {
|
|
1090
810
|
return input
|
|
1091
|
-
.filter(
|
|
1092
|
-
.map(
|
|
811
|
+
.filter((e) => e != null)
|
|
812
|
+
.map((entry) => {
|
|
1093
813
|
return serializeAws_restJson1QueryFilter(entry, context);
|
|
1094
814
|
});
|
|
1095
815
|
};
|
|
1096
|
-
|
|
816
|
+
const serializeAws_restJson1QueryFilterValueList = (input, context) => {
|
|
1097
817
|
return input
|
|
1098
|
-
.filter(
|
|
1099
|
-
.map(
|
|
818
|
+
.filter((e) => e != null)
|
|
819
|
+
.map((entry) => {
|
|
1100
820
|
return entry;
|
|
1101
821
|
});
|
|
1102
822
|
};
|
|
1103
|
-
|
|
1104
|
-
return
|
|
823
|
+
const serializeAws_restJson1RumEvent = (input, context) => {
|
|
824
|
+
return {
|
|
825
|
+
...(input.details != null && { details: __LazyJsonString.fromObject(input.details) }),
|
|
826
|
+
...(input.id != null && { id: input.id }),
|
|
827
|
+
...(input.metadata != null && { metadata: __LazyJsonString.fromObject(input.metadata) }),
|
|
828
|
+
...(input.timestamp != null && { timestamp: Math.round(input.timestamp.getTime() / 1000) }),
|
|
829
|
+
...(input.type != null && { type: input.type }),
|
|
830
|
+
};
|
|
1105
831
|
};
|
|
1106
|
-
|
|
832
|
+
const serializeAws_restJson1RumEventList = (input, context) => {
|
|
1107
833
|
return input
|
|
1108
|
-
.filter(
|
|
1109
|
-
.map(
|
|
834
|
+
.filter((e) => e != null)
|
|
835
|
+
.map((entry) => {
|
|
1110
836
|
return serializeAws_restJson1RumEvent(entry, context);
|
|
1111
837
|
});
|
|
1112
838
|
};
|
|
1113
|
-
|
|
1114
|
-
return Object.entries(input).reduce(
|
|
1115
|
-
var _b;
|
|
1116
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
839
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
840
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1117
841
|
if (value === null) {
|
|
1118
842
|
return acc;
|
|
1119
843
|
}
|
|
1120
|
-
return
|
|
844
|
+
return {
|
|
845
|
+
...acc,
|
|
846
|
+
[key]: value,
|
|
847
|
+
};
|
|
1121
848
|
}, {});
|
|
1122
849
|
};
|
|
1123
|
-
|
|
850
|
+
const serializeAws_restJson1Telemetries = (input, context) => {
|
|
1124
851
|
return input
|
|
1125
|
-
.filter(
|
|
1126
|
-
.map(
|
|
852
|
+
.filter((e) => e != null)
|
|
853
|
+
.map((entry) => {
|
|
1127
854
|
return entry;
|
|
1128
855
|
});
|
|
1129
856
|
};
|
|
1130
|
-
|
|
1131
|
-
return
|
|
857
|
+
const serializeAws_restJson1TimeRange = (input, context) => {
|
|
858
|
+
return {
|
|
859
|
+
...(input.After != null && { After: input.After }),
|
|
860
|
+
...(input.Before != null && { Before: input.Before }),
|
|
861
|
+
};
|
|
1132
862
|
};
|
|
1133
|
-
|
|
1134
|
-
return
|
|
863
|
+
const serializeAws_restJson1UserDetails = (input, context) => {
|
|
864
|
+
return {
|
|
865
|
+
...(input.sessionId != null && { sessionId: input.sessionId }),
|
|
866
|
+
...(input.userId != null && { userId: input.userId }),
|
|
867
|
+
};
|
|
1135
868
|
};
|
|
1136
|
-
|
|
869
|
+
const deserializeAws_restJson1AppMonitor = (output, context) => {
|
|
1137
870
|
return {
|
|
1138
871
|
AppMonitorConfiguration: output.AppMonitorConfiguration != null
|
|
1139
872
|
? deserializeAws_restJson1AppMonitorConfiguration(output.AppMonitorConfiguration, context)
|
|
@@ -1148,7 +881,7 @@ var deserializeAws_restJson1AppMonitor = function (output, context) {
|
|
|
1148
881
|
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1149
882
|
};
|
|
1150
883
|
};
|
|
1151
|
-
|
|
884
|
+
const deserializeAws_restJson1AppMonitorConfiguration = (output, context) => {
|
|
1152
885
|
return {
|
|
1153
886
|
AllowCookies: __expectBoolean(output.AllowCookies),
|
|
1154
887
|
EnableXRay: __expectBoolean(output.EnableXRay),
|
|
@@ -1161,7 +894,7 @@ var deserializeAws_restJson1AppMonitorConfiguration = function (output, context)
|
|
|
1161
894
|
Telemetries: output.Telemetries != null ? deserializeAws_restJson1Telemetries(output.Telemetries, context) : undefined,
|
|
1162
895
|
};
|
|
1163
896
|
};
|
|
1164
|
-
|
|
897
|
+
const deserializeAws_restJson1AppMonitorSummary = (output, context) => {
|
|
1165
898
|
return {
|
|
1166
899
|
Created: __expectString(output.Created),
|
|
1167
900
|
Id: __expectString(output.Id),
|
|
@@ -1170,10 +903,10 @@ var deserializeAws_restJson1AppMonitorSummary = function (output, context) {
|
|
|
1170
903
|
State: __expectString(output.State),
|
|
1171
904
|
};
|
|
1172
905
|
};
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
.filter(
|
|
1176
|
-
.map(
|
|
906
|
+
const deserializeAws_restJson1AppMonitorSummaryList = (output, context) => {
|
|
907
|
+
const retVal = (output || [])
|
|
908
|
+
.filter((e) => e != null)
|
|
909
|
+
.map((entry) => {
|
|
1177
910
|
if (entry === null) {
|
|
1178
911
|
return null;
|
|
1179
912
|
}
|
|
@@ -1181,21 +914,21 @@ var deserializeAws_restJson1AppMonitorSummaryList = function (output, context) {
|
|
|
1181
914
|
});
|
|
1182
915
|
return retVal;
|
|
1183
916
|
};
|
|
1184
|
-
|
|
917
|
+
const deserializeAws_restJson1CwLog = (output, context) => {
|
|
1185
918
|
return {
|
|
1186
919
|
CwLogEnabled: __expectBoolean(output.CwLogEnabled),
|
|
1187
920
|
CwLogGroup: __expectString(output.CwLogGroup),
|
|
1188
921
|
};
|
|
1189
922
|
};
|
|
1190
|
-
|
|
923
|
+
const deserializeAws_restJson1DataStorage = (output, context) => {
|
|
1191
924
|
return {
|
|
1192
925
|
CwLog: output.CwLog != null ? deserializeAws_restJson1CwLog(output.CwLog, context) : undefined,
|
|
1193
926
|
};
|
|
1194
927
|
};
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
.filter(
|
|
1198
|
-
.map(
|
|
928
|
+
const deserializeAws_restJson1EventDataList = (output, context) => {
|
|
929
|
+
const retVal = (output || [])
|
|
930
|
+
.filter((e) => e != null)
|
|
931
|
+
.map((entry) => {
|
|
1199
932
|
if (entry === null) {
|
|
1200
933
|
return null;
|
|
1201
934
|
}
|
|
@@ -1203,10 +936,10 @@ var deserializeAws_restJson1EventDataList = function (output, context) {
|
|
|
1203
936
|
});
|
|
1204
937
|
return retVal;
|
|
1205
938
|
};
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
.filter(
|
|
1209
|
-
.map(
|
|
939
|
+
const deserializeAws_restJson1FavoritePages = (output, context) => {
|
|
940
|
+
const retVal = (output || [])
|
|
941
|
+
.filter((e) => e != null)
|
|
942
|
+
.map((entry) => {
|
|
1210
943
|
if (entry === null) {
|
|
1211
944
|
return null;
|
|
1212
945
|
}
|
|
@@ -1214,10 +947,10 @@ var deserializeAws_restJson1FavoritePages = function (output, context) {
|
|
|
1214
947
|
});
|
|
1215
948
|
return retVal;
|
|
1216
949
|
};
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
.filter(
|
|
1220
|
-
.map(
|
|
950
|
+
const deserializeAws_restJson1Pages = (output, context) => {
|
|
951
|
+
const retVal = (output || [])
|
|
952
|
+
.filter((e) => e != null)
|
|
953
|
+
.map((entry) => {
|
|
1221
954
|
if (entry === null) {
|
|
1222
955
|
return null;
|
|
1223
956
|
}
|
|
@@ -1225,20 +958,21 @@ var deserializeAws_restJson1Pages = function (output, context) {
|
|
|
1225
958
|
});
|
|
1226
959
|
return retVal;
|
|
1227
960
|
};
|
|
1228
|
-
|
|
1229
|
-
return Object.entries(output).reduce(
|
|
1230
|
-
var _b;
|
|
1231
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
961
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
962
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1232
963
|
if (value === null) {
|
|
1233
964
|
return acc;
|
|
1234
965
|
}
|
|
1235
|
-
return
|
|
966
|
+
return {
|
|
967
|
+
...acc,
|
|
968
|
+
[key]: __expectString(value),
|
|
969
|
+
};
|
|
1236
970
|
}, {});
|
|
1237
971
|
};
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
.filter(
|
|
1241
|
-
.map(
|
|
972
|
+
const deserializeAws_restJson1Telemetries = (output, context) => {
|
|
973
|
+
const retVal = (output || [])
|
|
974
|
+
.filter((e) => e != null)
|
|
975
|
+
.map((entry) => {
|
|
1242
976
|
if (entry === null) {
|
|
1243
977
|
return null;
|
|
1244
978
|
}
|
|
@@ -1246,57 +980,39 @@ var deserializeAws_restJson1Telemetries = function (output, context) {
|
|
|
1246
980
|
});
|
|
1247
981
|
return retVal;
|
|
1248
982
|
};
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
});
|
|
1257
|
-
};
|
|
1258
|
-
var collectBody = function (streamBody, context) {
|
|
1259
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
983
|
+
const deserializeMetadata = (output) => ({
|
|
984
|
+
httpStatusCode: output.statusCode,
|
|
985
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
986
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
987
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
988
|
+
});
|
|
989
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1260
990
|
if (streamBody instanceof Uint8Array) {
|
|
1261
991
|
return Promise.resolve(streamBody);
|
|
1262
992
|
}
|
|
1263
993
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1264
994
|
};
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
});
|
|
995
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
996
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
997
|
+
value !== null &&
|
|
998
|
+
value !== "" &&
|
|
999
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1000
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1001
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1002
|
+
if (encoded.length) {
|
|
1003
|
+
return JSON.parse(encoded);
|
|
1004
|
+
}
|
|
1005
|
+
return {};
|
|
1006
|
+
});
|
|
1007
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1008
|
+
const value = await parseBody(errorBody, context);
|
|
1009
|
+
value.message = value.message ?? value.Message;
|
|
1010
|
+
return value;
|
|
1282
1011
|
};
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
switch (_b.label) {
|
|
1288
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
1289
|
-
case 1:
|
|
1290
|
-
value = _b.sent();
|
|
1291
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1292
|
-
return [2, value];
|
|
1293
|
-
}
|
|
1294
|
-
});
|
|
1295
|
-
}); };
|
|
1296
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
1297
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1298
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1299
|
-
var cleanValue = rawValue;
|
|
1012
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1013
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1014
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1015
|
+
let cleanValue = rawValue;
|
|
1300
1016
|
if (typeof cleanValue === "number") {
|
|
1301
1017
|
cleanValue = cleanValue.toString();
|
|
1302
1018
|
}
|
|
@@ -1311,7 +1027,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1311
1027
|
}
|
|
1312
1028
|
return cleanValue;
|
|
1313
1029
|
};
|
|
1314
|
-
|
|
1030
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1315
1031
|
if (headerKey !== undefined) {
|
|
1316
1032
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1317
1033
|
}
|