@aws-sdk/client-amp 3.186.0 → 3.190.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/Amp.js +86 -93
- package/dist-es/AmpClient.js +22 -28
- package/dist-es/commands/CreateAlertManagerDefinitionCommand.js +21 -28
- package/dist-es/commands/CreateLoggingConfigurationCommand.js +21 -28
- package/dist-es/commands/CreateRuleGroupsNamespaceCommand.js +21 -28
- package/dist-es/commands/CreateWorkspaceCommand.js +21 -28
- package/dist-es/commands/DeleteAlertManagerDefinitionCommand.js +22 -29
- package/dist-es/commands/DeleteLoggingConfigurationCommand.js +22 -29
- package/dist-es/commands/DeleteRuleGroupsNamespaceCommand.js +22 -29
- package/dist-es/commands/DeleteWorkspaceCommand.js +22 -29
- package/dist-es/commands/DescribeAlertManagerDefinitionCommand.js +21 -28
- package/dist-es/commands/DescribeLoggingConfigurationCommand.js +21 -28
- package/dist-es/commands/DescribeRuleGroupsNamespaceCommand.js +21 -28
- package/dist-es/commands/DescribeWorkspaceCommand.js +21 -28
- package/dist-es/commands/ListRuleGroupsNamespacesCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListWorkspacesCommand.js +21 -28
- package/dist-es/commands/PutAlertManagerDefinitionCommand.js +21 -28
- package/dist-es/commands/PutRuleGroupsNamespaceCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateLoggingConfigurationCommand.js +21 -28
- package/dist-es/commands/UpdateWorkspaceAliasCommand.js +22 -29
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/AmpServiceException.js +5 -10
- package/dist-es/models/models_0.js +237 -142
- package/dist-es/pagination/ListRuleGroupsNamespacesPaginator.js +25 -68
- package/dist-es/pagination/ListWorkspacesPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1569 -2255
- 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/dist-es/waiters/waitForWorkspaceActive.js +45 -65
- package/dist-es/waiters/waitForWorkspaceDeleted.js +30 -50
- package/package.json +34 -34
|
@@ -1,2244 +1,1575 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { AmpServiceException as __BaseException } from "../models/AmpServiceException";
|
|
6
5
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
path: resolvedPath,
|
|
29
|
-
body: body,
|
|
30
|
-
})];
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}); };
|
|
34
|
-
export var serializeAws_restJson1CreateLoggingConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
35
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
36
|
-
var _c;
|
|
37
|
-
return __generator(this, function (_d) {
|
|
38
|
-
switch (_d.label) {
|
|
39
|
-
case 0: return [4, context.endpoint()];
|
|
40
|
-
case 1:
|
|
41
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
42
|
-
headers = {
|
|
43
|
-
"content-type": "application/json",
|
|
44
|
-
};
|
|
45
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}/logging";
|
|
46
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
47
|
-
body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.logGroupArn != null && { logGroupArn: input.logGroupArn })));
|
|
48
|
-
return [2, new __HttpRequest({
|
|
49
|
-
protocol: protocol,
|
|
50
|
-
hostname: hostname,
|
|
51
|
-
port: port,
|
|
52
|
-
method: "POST",
|
|
53
|
-
headers: headers,
|
|
54
|
-
path: resolvedPath,
|
|
55
|
-
body: body,
|
|
56
|
-
})];
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}); };
|
|
60
|
-
export var serializeAws_restJson1CreateRuleGroupsNamespaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
61
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
62
|
-
var _c;
|
|
63
|
-
return __generator(this, function (_d) {
|
|
64
|
-
switch (_d.label) {
|
|
65
|
-
case 0: return [4, context.endpoint()];
|
|
66
|
-
case 1:
|
|
67
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
68
|
-
headers = {
|
|
69
|
-
"content-type": "application/json",
|
|
70
|
-
};
|
|
71
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
72
|
-
"/workspaces/{workspaceId}/rulegroupsnamespaces";
|
|
73
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
74
|
-
body = JSON.stringify(__assign(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.data != null && { data: context.base64Encoder(input.data) })), (input.name != null && { name: input.name })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
75
|
-
return [2, new __HttpRequest({
|
|
76
|
-
protocol: protocol,
|
|
77
|
-
hostname: hostname,
|
|
78
|
-
port: port,
|
|
79
|
-
method: "POST",
|
|
80
|
-
headers: headers,
|
|
81
|
-
path: resolvedPath,
|
|
82
|
-
body: body,
|
|
83
|
-
})];
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
}); };
|
|
87
|
-
export var serializeAws_restJson1CreateWorkspaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
88
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
89
|
-
var _c;
|
|
90
|
-
return __generator(this, function (_d) {
|
|
91
|
-
switch (_d.label) {
|
|
92
|
-
case 0: return [4, context.endpoint()];
|
|
93
|
-
case 1:
|
|
94
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
95
|
-
headers = {
|
|
96
|
-
"content-type": "application/json",
|
|
97
|
-
};
|
|
98
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces";
|
|
99
|
-
body = JSON.stringify(__assign(__assign(__assign({}, (input.alias != null && { alias: input.alias })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
100
|
-
return [2, new __HttpRequest({
|
|
101
|
-
protocol: protocol,
|
|
102
|
-
hostname: hostname,
|
|
103
|
-
port: port,
|
|
104
|
-
method: "POST",
|
|
105
|
-
headers: headers,
|
|
106
|
-
path: resolvedPath,
|
|
107
|
-
body: body,
|
|
108
|
-
})];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}); };
|
|
112
|
-
export var serializeAws_restJson1DeleteAlertManagerDefinitionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
113
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
114
|
-
return __generator(this, function (_c) {
|
|
115
|
-
switch (_c.label) {
|
|
116
|
-
case 0: return [4, context.endpoint()];
|
|
117
|
-
case 1:
|
|
118
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
119
|
-
headers = {};
|
|
120
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
121
|
-
"/workspaces/{workspaceId}/alertmanager/definition";
|
|
122
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
123
|
-
query = map({
|
|
124
|
-
clientToken: [, input.clientToken],
|
|
125
|
-
});
|
|
126
|
-
return [2, new __HttpRequest({
|
|
127
|
-
protocol: protocol,
|
|
128
|
-
hostname: hostname,
|
|
129
|
-
port: port,
|
|
130
|
-
method: "DELETE",
|
|
131
|
-
headers: headers,
|
|
132
|
-
path: resolvedPath,
|
|
133
|
-
query: query,
|
|
134
|
-
body: body,
|
|
135
|
-
})];
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
}); };
|
|
139
|
-
export var serializeAws_restJson1DeleteLoggingConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
140
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
141
|
-
return __generator(this, function (_c) {
|
|
142
|
-
switch (_c.label) {
|
|
143
|
-
case 0: return [4, context.endpoint()];
|
|
144
|
-
case 1:
|
|
145
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
146
|
-
headers = {};
|
|
147
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}/logging";
|
|
148
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
149
|
-
query = map({
|
|
150
|
-
clientToken: [, input.clientToken],
|
|
151
|
-
});
|
|
152
|
-
return [2, new __HttpRequest({
|
|
153
|
-
protocol: protocol,
|
|
154
|
-
hostname: hostname,
|
|
155
|
-
port: port,
|
|
156
|
-
method: "DELETE",
|
|
157
|
-
headers: headers,
|
|
158
|
-
path: resolvedPath,
|
|
159
|
-
query: query,
|
|
160
|
-
body: body,
|
|
161
|
-
})];
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}); };
|
|
165
|
-
export var serializeAws_restJson1DeleteRuleGroupsNamespaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
166
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
167
|
-
return __generator(this, function (_c) {
|
|
168
|
-
switch (_c.label) {
|
|
169
|
-
case 0: return [4, context.endpoint()];
|
|
170
|
-
case 1:
|
|
171
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
172
|
-
headers = {};
|
|
173
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
174
|
-
"/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
|
|
175
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
176
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "name", function () { return input.name; }, "{name}", false);
|
|
177
|
-
query = map({
|
|
178
|
-
clientToken: [, input.clientToken],
|
|
179
|
-
});
|
|
180
|
-
return [2, new __HttpRequest({
|
|
181
|
-
protocol: protocol,
|
|
182
|
-
hostname: hostname,
|
|
183
|
-
port: port,
|
|
184
|
-
method: "DELETE",
|
|
185
|
-
headers: headers,
|
|
186
|
-
path: resolvedPath,
|
|
187
|
-
query: query,
|
|
188
|
-
body: body,
|
|
189
|
-
})];
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}); };
|
|
193
|
-
export var serializeAws_restJson1DeleteWorkspaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
194
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
195
|
-
return __generator(this, function (_c) {
|
|
196
|
-
switch (_c.label) {
|
|
197
|
-
case 0: return [4, context.endpoint()];
|
|
198
|
-
case 1:
|
|
199
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
200
|
-
headers = {};
|
|
201
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}";
|
|
202
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
203
|
-
query = map({
|
|
204
|
-
clientToken: [, input.clientToken],
|
|
205
|
-
});
|
|
206
|
-
return [2, new __HttpRequest({
|
|
207
|
-
protocol: protocol,
|
|
208
|
-
hostname: hostname,
|
|
209
|
-
port: port,
|
|
210
|
-
method: "DELETE",
|
|
211
|
-
headers: headers,
|
|
212
|
-
path: resolvedPath,
|
|
213
|
-
query: query,
|
|
214
|
-
body: body,
|
|
215
|
-
})];
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
}); };
|
|
219
|
-
export var serializeAws_restJson1DescribeAlertManagerDefinitionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
220
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
221
|
-
return __generator(this, function (_c) {
|
|
222
|
-
switch (_c.label) {
|
|
223
|
-
case 0: return [4, context.endpoint()];
|
|
224
|
-
case 1:
|
|
225
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
226
|
-
headers = {};
|
|
227
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
228
|
-
"/workspaces/{workspaceId}/alertmanager/definition";
|
|
229
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
230
|
-
return [2, new __HttpRequest({
|
|
231
|
-
protocol: protocol,
|
|
232
|
-
hostname: hostname,
|
|
233
|
-
port: port,
|
|
234
|
-
method: "GET",
|
|
235
|
-
headers: headers,
|
|
236
|
-
path: resolvedPath,
|
|
237
|
-
body: body,
|
|
238
|
-
})];
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
}); };
|
|
242
|
-
export var serializeAws_restJson1DescribeLoggingConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
243
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
244
|
-
return __generator(this, function (_c) {
|
|
245
|
-
switch (_c.label) {
|
|
246
|
-
case 0: return [4, context.endpoint()];
|
|
247
|
-
case 1:
|
|
248
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
249
|
-
headers = {};
|
|
250
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}/logging";
|
|
251
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
252
|
-
return [2, new __HttpRequest({
|
|
253
|
-
protocol: protocol,
|
|
254
|
-
hostname: hostname,
|
|
255
|
-
port: port,
|
|
256
|
-
method: "GET",
|
|
257
|
-
headers: headers,
|
|
258
|
-
path: resolvedPath,
|
|
259
|
-
body: body,
|
|
260
|
-
})];
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
}); };
|
|
264
|
-
export var serializeAws_restJson1DescribeRuleGroupsNamespaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
265
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
266
|
-
return __generator(this, function (_c) {
|
|
267
|
-
switch (_c.label) {
|
|
268
|
-
case 0: return [4, context.endpoint()];
|
|
269
|
-
case 1:
|
|
270
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
271
|
-
headers = {};
|
|
272
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
273
|
-
"/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
|
|
274
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
275
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "name", function () { return input.name; }, "{name}", false);
|
|
276
|
-
return [2, new __HttpRequest({
|
|
277
|
-
protocol: protocol,
|
|
278
|
-
hostname: hostname,
|
|
279
|
-
port: port,
|
|
280
|
-
method: "GET",
|
|
281
|
-
headers: headers,
|
|
282
|
-
path: resolvedPath,
|
|
283
|
-
body: body,
|
|
284
|
-
})];
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
}); };
|
|
288
|
-
export var serializeAws_restJson1DescribeWorkspaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
289
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
290
|
-
return __generator(this, function (_c) {
|
|
291
|
-
switch (_c.label) {
|
|
292
|
-
case 0: return [4, context.endpoint()];
|
|
293
|
-
case 1:
|
|
294
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
295
|
-
headers = {};
|
|
296
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}";
|
|
297
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
298
|
-
return [2, new __HttpRequest({
|
|
299
|
-
protocol: protocol,
|
|
300
|
-
hostname: hostname,
|
|
301
|
-
port: port,
|
|
302
|
-
method: "GET",
|
|
303
|
-
headers: headers,
|
|
304
|
-
path: resolvedPath,
|
|
305
|
-
body: body,
|
|
306
|
-
})];
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
}); };
|
|
310
|
-
export var serializeAws_restJson1ListRuleGroupsNamespacesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
311
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
312
|
-
return __generator(this, function (_c) {
|
|
313
|
-
switch (_c.label) {
|
|
314
|
-
case 0: return [4, context.endpoint()];
|
|
315
|
-
case 1:
|
|
316
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
317
|
-
headers = {};
|
|
318
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
319
|
-
"/workspaces/{workspaceId}/rulegroupsnamespaces";
|
|
320
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
321
|
-
query = map({
|
|
322
|
-
name: [, input.name],
|
|
323
|
-
nextToken: [, input.nextToken],
|
|
324
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
325
|
-
});
|
|
326
|
-
return [2, new __HttpRequest({
|
|
327
|
-
protocol: protocol,
|
|
328
|
-
hostname: hostname,
|
|
329
|
-
port: port,
|
|
330
|
-
method: "GET",
|
|
331
|
-
headers: headers,
|
|
332
|
-
path: resolvedPath,
|
|
333
|
-
query: query,
|
|
334
|
-
body: body,
|
|
335
|
-
})];
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
}); };
|
|
339
|
-
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
340
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
341
|
-
return __generator(this, function (_c) {
|
|
342
|
-
switch (_c.label) {
|
|
343
|
-
case 0: return [4, context.endpoint()];
|
|
344
|
-
case 1:
|
|
345
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
346
|
-
headers = {};
|
|
347
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
348
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
349
|
-
return [2, new __HttpRequest({
|
|
350
|
-
protocol: protocol,
|
|
351
|
-
hostname: hostname,
|
|
352
|
-
port: port,
|
|
353
|
-
method: "GET",
|
|
354
|
-
headers: headers,
|
|
355
|
-
path: resolvedPath,
|
|
356
|
-
body: body,
|
|
357
|
-
})];
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
}); };
|
|
361
|
-
export var serializeAws_restJson1ListWorkspacesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
362
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
363
|
-
return __generator(this, function (_c) {
|
|
364
|
-
switch (_c.label) {
|
|
365
|
-
case 0: return [4, context.endpoint()];
|
|
366
|
-
case 1:
|
|
367
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
368
|
-
headers = {};
|
|
369
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces";
|
|
370
|
-
query = map({
|
|
371
|
-
nextToken: [, input.nextToken],
|
|
372
|
-
alias: [, input.alias],
|
|
373
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
374
|
-
});
|
|
375
|
-
return [2, new __HttpRequest({
|
|
376
|
-
protocol: protocol,
|
|
377
|
-
hostname: hostname,
|
|
378
|
-
port: port,
|
|
379
|
-
method: "GET",
|
|
380
|
-
headers: headers,
|
|
381
|
-
path: resolvedPath,
|
|
382
|
-
query: query,
|
|
383
|
-
body: body,
|
|
384
|
-
})];
|
|
385
|
-
}
|
|
6
|
+
export const serializeAws_restJson1CreateAlertManagerDefinitionCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {
|
|
9
|
+
"content-type": "application/json",
|
|
10
|
+
};
|
|
11
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
12
|
+
"/workspaces/{workspaceId}/alertmanager/definition";
|
|
13
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
14
|
+
let body;
|
|
15
|
+
body = JSON.stringify({
|
|
16
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
17
|
+
...(input.data != null && { data: context.base64Encoder(input.data) }),
|
|
18
|
+
});
|
|
19
|
+
return new __HttpRequest({
|
|
20
|
+
protocol,
|
|
21
|
+
hostname,
|
|
22
|
+
port,
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers,
|
|
25
|
+
path: resolvedPath,
|
|
26
|
+
body,
|
|
386
27
|
});
|
|
387
|
-
}
|
|
388
|
-
export
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
headers: headers,
|
|
409
|
-
path: resolvedPath,
|
|
410
|
-
body: body,
|
|
411
|
-
})];
|
|
412
|
-
}
|
|
28
|
+
};
|
|
29
|
+
export const serializeAws_restJson1CreateLoggingConfigurationCommand = async (input, context) => {
|
|
30
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
31
|
+
const headers = {
|
|
32
|
+
"content-type": "application/json",
|
|
33
|
+
};
|
|
34
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
|
|
35
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
36
|
+
let body;
|
|
37
|
+
body = JSON.stringify({
|
|
38
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
39
|
+
...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }),
|
|
40
|
+
});
|
|
41
|
+
return new __HttpRequest({
|
|
42
|
+
protocol,
|
|
43
|
+
hostname,
|
|
44
|
+
port,
|
|
45
|
+
method: "POST",
|
|
46
|
+
headers,
|
|
47
|
+
path: resolvedPath,
|
|
48
|
+
body,
|
|
413
49
|
});
|
|
414
|
-
}
|
|
415
|
-
export
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
body: body,
|
|
439
|
-
})];
|
|
440
|
-
}
|
|
50
|
+
};
|
|
51
|
+
export const serializeAws_restJson1CreateRuleGroupsNamespaceCommand = async (input, context) => {
|
|
52
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
53
|
+
const headers = {
|
|
54
|
+
"content-type": "application/json",
|
|
55
|
+
};
|
|
56
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
57
|
+
"/workspaces/{workspaceId}/rulegroupsnamespaces";
|
|
58
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
59
|
+
let body;
|
|
60
|
+
body = JSON.stringify({
|
|
61
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
62
|
+
...(input.data != null && { data: context.base64Encoder(input.data) }),
|
|
63
|
+
...(input.name != null && { name: input.name }),
|
|
64
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
65
|
+
});
|
|
66
|
+
return new __HttpRequest({
|
|
67
|
+
protocol,
|
|
68
|
+
hostname,
|
|
69
|
+
port,
|
|
70
|
+
method: "POST",
|
|
71
|
+
headers,
|
|
72
|
+
path: resolvedPath,
|
|
73
|
+
body,
|
|
441
74
|
});
|
|
442
|
-
}
|
|
443
|
-
export
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
body: body,
|
|
464
|
-
})];
|
|
465
|
-
}
|
|
75
|
+
};
|
|
76
|
+
export const serializeAws_restJson1CreateWorkspaceCommand = async (input, context) => {
|
|
77
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
78
|
+
const headers = {
|
|
79
|
+
"content-type": "application/json",
|
|
80
|
+
};
|
|
81
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
|
|
82
|
+
let body;
|
|
83
|
+
body = JSON.stringify({
|
|
84
|
+
...(input.alias != null && { alias: input.alias }),
|
|
85
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
86
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
87
|
+
});
|
|
88
|
+
return new __HttpRequest({
|
|
89
|
+
protocol,
|
|
90
|
+
hostname,
|
|
91
|
+
port,
|
|
92
|
+
method: "POST",
|
|
93
|
+
headers,
|
|
94
|
+
path: resolvedPath,
|
|
95
|
+
body,
|
|
466
96
|
});
|
|
467
|
-
}
|
|
468
|
-
export
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
path: resolvedPath,
|
|
488
|
-
query: query,
|
|
489
|
-
body: body,
|
|
490
|
-
})];
|
|
491
|
-
}
|
|
97
|
+
};
|
|
98
|
+
export const serializeAws_restJson1DeleteAlertManagerDefinitionCommand = async (input, context) => {
|
|
99
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
100
|
+
const headers = {};
|
|
101
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
102
|
+
"/workspaces/{workspaceId}/alertmanager/definition";
|
|
103
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
104
|
+
const query = map({
|
|
105
|
+
clientToken: [, input.clientToken],
|
|
106
|
+
});
|
|
107
|
+
let body;
|
|
108
|
+
return new __HttpRequest({
|
|
109
|
+
protocol,
|
|
110
|
+
hostname,
|
|
111
|
+
port,
|
|
112
|
+
method: "DELETE",
|
|
113
|
+
headers,
|
|
114
|
+
path: resolvedPath,
|
|
115
|
+
query,
|
|
116
|
+
body,
|
|
492
117
|
});
|
|
493
|
-
}
|
|
494
|
-
export
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
method: "PUT",
|
|
513
|
-
headers: headers,
|
|
514
|
-
path: resolvedPath,
|
|
515
|
-
body: body,
|
|
516
|
-
})];
|
|
517
|
-
}
|
|
118
|
+
};
|
|
119
|
+
export const serializeAws_restJson1DeleteLoggingConfigurationCommand = async (input, context) => {
|
|
120
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
121
|
+
const headers = {};
|
|
122
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
|
|
123
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
124
|
+
const query = map({
|
|
125
|
+
clientToken: [, input.clientToken],
|
|
126
|
+
});
|
|
127
|
+
let body;
|
|
128
|
+
return new __HttpRequest({
|
|
129
|
+
protocol,
|
|
130
|
+
hostname,
|
|
131
|
+
port,
|
|
132
|
+
method: "DELETE",
|
|
133
|
+
headers,
|
|
134
|
+
path: resolvedPath,
|
|
135
|
+
query,
|
|
136
|
+
body,
|
|
518
137
|
});
|
|
519
|
-
}
|
|
520
|
-
export
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
path: resolvedPath,
|
|
541
|
-
body: body,
|
|
542
|
-
})];
|
|
543
|
-
}
|
|
138
|
+
};
|
|
139
|
+
export const serializeAws_restJson1DeleteRuleGroupsNamespaceCommand = async (input, context) => {
|
|
140
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
141
|
+
const headers = {};
|
|
142
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
143
|
+
"/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
|
|
144
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
145
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
|
|
146
|
+
const query = map({
|
|
147
|
+
clientToken: [, input.clientToken],
|
|
148
|
+
});
|
|
149
|
+
let body;
|
|
150
|
+
return new __HttpRequest({
|
|
151
|
+
protocol,
|
|
152
|
+
hostname,
|
|
153
|
+
port,
|
|
154
|
+
method: "DELETE",
|
|
155
|
+
headers,
|
|
156
|
+
path: resolvedPath,
|
|
157
|
+
query,
|
|
158
|
+
body,
|
|
544
159
|
});
|
|
545
|
-
}
|
|
546
|
-
export
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
565
|
-
return [2, contents];
|
|
566
|
-
}
|
|
160
|
+
};
|
|
161
|
+
export const serializeAws_restJson1DeleteWorkspaceCommand = async (input, context) => {
|
|
162
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
163
|
+
const headers = {};
|
|
164
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
|
|
165
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
166
|
+
const query = map({
|
|
167
|
+
clientToken: [, input.clientToken],
|
|
168
|
+
});
|
|
169
|
+
let body;
|
|
170
|
+
return new __HttpRequest({
|
|
171
|
+
protocol,
|
|
172
|
+
hostname,
|
|
173
|
+
port,
|
|
174
|
+
method: "DELETE",
|
|
175
|
+
headers,
|
|
176
|
+
path: resolvedPath,
|
|
177
|
+
query,
|
|
178
|
+
body,
|
|
567
179
|
});
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
case "com.amazonaws.amp#AccessDeniedException": return [3, 2];
|
|
585
|
-
case "ConflictException": return [3, 4];
|
|
586
|
-
case "com.amazonaws.amp#ConflictException": return [3, 4];
|
|
587
|
-
case "InternalServerException": return [3, 6];
|
|
588
|
-
case "com.amazonaws.amp#InternalServerException": return [3, 6];
|
|
589
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
590
|
-
case "com.amazonaws.amp#ResourceNotFoundException": return [3, 8];
|
|
591
|
-
case "ServiceQuotaExceededException": return [3, 10];
|
|
592
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException": return [3, 10];
|
|
593
|
-
case "ThrottlingException": return [3, 12];
|
|
594
|
-
case "com.amazonaws.amp#ThrottlingException": return [3, 12];
|
|
595
|
-
case "ValidationException": return [3, 14];
|
|
596
|
-
case "com.amazonaws.amp#ValidationException": return [3, 14];
|
|
597
|
-
}
|
|
598
|
-
return [3, 16];
|
|
599
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
600
|
-
case 3: throw _d.sent();
|
|
601
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
602
|
-
case 5: throw _d.sent();
|
|
603
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
604
|
-
case 7: throw _d.sent();
|
|
605
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
606
|
-
case 9: throw _d.sent();
|
|
607
|
-
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
608
|
-
case 11: throw _d.sent();
|
|
609
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
610
|
-
case 13: throw _d.sent();
|
|
611
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
612
|
-
case 15: throw _d.sent();
|
|
613
|
-
case 16:
|
|
614
|
-
parsedBody = parsedOutput.body;
|
|
615
|
-
throwDefaultError({
|
|
616
|
-
output: output,
|
|
617
|
-
parsedBody: parsedBody,
|
|
618
|
-
exceptionCtor: __BaseException,
|
|
619
|
-
errorCode: errorCode,
|
|
620
|
-
});
|
|
621
|
-
_d.label = 17;
|
|
622
|
-
case 17: return [2];
|
|
623
|
-
}
|
|
180
|
+
};
|
|
181
|
+
export const serializeAws_restJson1DescribeAlertManagerDefinitionCommand = async (input, context) => {
|
|
182
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
183
|
+
const headers = {};
|
|
184
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
185
|
+
"/workspaces/{workspaceId}/alertmanager/definition";
|
|
186
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
187
|
+
let body;
|
|
188
|
+
return new __HttpRequest({
|
|
189
|
+
protocol,
|
|
190
|
+
hostname,
|
|
191
|
+
port,
|
|
192
|
+
method: "GET",
|
|
193
|
+
headers,
|
|
194
|
+
path: resolvedPath,
|
|
195
|
+
body,
|
|
624
196
|
});
|
|
625
|
-
}
|
|
626
|
-
export
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
case 1:
|
|
641
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
642
|
-
if (data.status != null) {
|
|
643
|
-
contents.status = deserializeAws_restJson1LoggingConfigurationStatus(data.status, context);
|
|
644
|
-
}
|
|
645
|
-
return [2, contents];
|
|
646
|
-
}
|
|
197
|
+
};
|
|
198
|
+
export const serializeAws_restJson1DescribeLoggingConfigurationCommand = async (input, context) => {
|
|
199
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
200
|
+
const headers = {};
|
|
201
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
|
|
202
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
203
|
+
let body;
|
|
204
|
+
return new __HttpRequest({
|
|
205
|
+
protocol,
|
|
206
|
+
hostname,
|
|
207
|
+
port,
|
|
208
|
+
method: "GET",
|
|
209
|
+
headers,
|
|
210
|
+
path: resolvedPath,
|
|
211
|
+
body,
|
|
647
212
|
});
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
case "InternalServerException": return [3, 4];
|
|
666
|
-
case "com.amazonaws.amp#InternalServerException": return [3, 4];
|
|
667
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
668
|
-
case "com.amazonaws.amp#ResourceNotFoundException": return [3, 6];
|
|
669
|
-
case "ValidationException": return [3, 8];
|
|
670
|
-
case "com.amazonaws.amp#ValidationException": return [3, 8];
|
|
671
|
-
}
|
|
672
|
-
return [3, 10];
|
|
673
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
674
|
-
case 3: throw _d.sent();
|
|
675
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
676
|
-
case 5: throw _d.sent();
|
|
677
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
678
|
-
case 7: throw _d.sent();
|
|
679
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
680
|
-
case 9: throw _d.sent();
|
|
681
|
-
case 10:
|
|
682
|
-
parsedBody = parsedOutput.body;
|
|
683
|
-
throwDefaultError({
|
|
684
|
-
output: output,
|
|
685
|
-
parsedBody: parsedBody,
|
|
686
|
-
exceptionCtor: __BaseException,
|
|
687
|
-
errorCode: errorCode,
|
|
688
|
-
});
|
|
689
|
-
_d.label = 11;
|
|
690
|
-
case 11: return [2];
|
|
691
|
-
}
|
|
213
|
+
};
|
|
214
|
+
export const serializeAws_restJson1DescribeRuleGroupsNamespaceCommand = async (input, context) => {
|
|
215
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
216
|
+
const headers = {};
|
|
217
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
218
|
+
"/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
|
|
219
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
220
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
|
|
221
|
+
let body;
|
|
222
|
+
return new __HttpRequest({
|
|
223
|
+
protocol,
|
|
224
|
+
hostname,
|
|
225
|
+
port,
|
|
226
|
+
method: "GET",
|
|
227
|
+
headers,
|
|
228
|
+
path: resolvedPath,
|
|
229
|
+
body,
|
|
692
230
|
});
|
|
693
|
-
}
|
|
694
|
-
export
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
case 1:
|
|
709
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
710
|
-
if (data.arn != null) {
|
|
711
|
-
contents.arn = __expectString(data.arn);
|
|
712
|
-
}
|
|
713
|
-
if (data.name != null) {
|
|
714
|
-
contents.name = __expectString(data.name);
|
|
715
|
-
}
|
|
716
|
-
if (data.status != null) {
|
|
717
|
-
contents.status = deserializeAws_restJson1RuleGroupsNamespaceStatus(data.status, context);
|
|
718
|
-
}
|
|
719
|
-
if (data.tags != null) {
|
|
720
|
-
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
721
|
-
}
|
|
722
|
-
return [2, contents];
|
|
723
|
-
}
|
|
231
|
+
};
|
|
232
|
+
export const serializeAws_restJson1DescribeWorkspaceCommand = async (input, context) => {
|
|
233
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
234
|
+
const headers = {};
|
|
235
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
|
|
236
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
237
|
+
let body;
|
|
238
|
+
return new __HttpRequest({
|
|
239
|
+
protocol,
|
|
240
|
+
hostname,
|
|
241
|
+
port,
|
|
242
|
+
method: "GET",
|
|
243
|
+
headers,
|
|
244
|
+
path: resolvedPath,
|
|
245
|
+
body,
|
|
724
246
|
});
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
case "com.amazonaws.amp#ResourceNotFoundException": return [3, 8];
|
|
748
|
-
case "ServiceQuotaExceededException": return [3, 10];
|
|
749
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException": return [3, 10];
|
|
750
|
-
case "ThrottlingException": return [3, 12];
|
|
751
|
-
case "com.amazonaws.amp#ThrottlingException": return [3, 12];
|
|
752
|
-
case "ValidationException": return [3, 14];
|
|
753
|
-
case "com.amazonaws.amp#ValidationException": return [3, 14];
|
|
754
|
-
}
|
|
755
|
-
return [3, 16];
|
|
756
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
757
|
-
case 3: throw _d.sent();
|
|
758
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
759
|
-
case 5: throw _d.sent();
|
|
760
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
761
|
-
case 7: throw _d.sent();
|
|
762
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
763
|
-
case 9: throw _d.sent();
|
|
764
|
-
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
765
|
-
case 11: throw _d.sent();
|
|
766
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
767
|
-
case 13: throw _d.sent();
|
|
768
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
769
|
-
case 15: throw _d.sent();
|
|
770
|
-
case 16:
|
|
771
|
-
parsedBody = parsedOutput.body;
|
|
772
|
-
throwDefaultError({
|
|
773
|
-
output: output,
|
|
774
|
-
parsedBody: parsedBody,
|
|
775
|
-
exceptionCtor: __BaseException,
|
|
776
|
-
errorCode: errorCode,
|
|
777
|
-
});
|
|
778
|
-
_d.label = 17;
|
|
779
|
-
case 17: return [2];
|
|
780
|
-
}
|
|
247
|
+
};
|
|
248
|
+
export const serializeAws_restJson1ListRuleGroupsNamespacesCommand = async (input, context) => {
|
|
249
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
250
|
+
const headers = {};
|
|
251
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
252
|
+
"/workspaces/{workspaceId}/rulegroupsnamespaces";
|
|
253
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
254
|
+
const query = map({
|
|
255
|
+
name: [, input.name],
|
|
256
|
+
nextToken: [, input.nextToken],
|
|
257
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
258
|
+
});
|
|
259
|
+
let body;
|
|
260
|
+
return new __HttpRequest({
|
|
261
|
+
protocol,
|
|
262
|
+
hostname,
|
|
263
|
+
port,
|
|
264
|
+
method: "GET",
|
|
265
|
+
headers,
|
|
266
|
+
path: resolvedPath,
|
|
267
|
+
query,
|
|
268
|
+
body,
|
|
781
269
|
});
|
|
782
|
-
}
|
|
783
|
-
export
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
case 1:
|
|
798
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
799
|
-
if (data.arn != null) {
|
|
800
|
-
contents.arn = __expectString(data.arn);
|
|
801
|
-
}
|
|
802
|
-
if (data.status != null) {
|
|
803
|
-
contents.status = deserializeAws_restJson1WorkspaceStatus(data.status, context);
|
|
804
|
-
}
|
|
805
|
-
if (data.tags != null) {
|
|
806
|
-
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
807
|
-
}
|
|
808
|
-
if (data.workspaceId != null) {
|
|
809
|
-
contents.workspaceId = __expectString(data.workspaceId);
|
|
810
|
-
}
|
|
811
|
-
return [2, contents];
|
|
812
|
-
}
|
|
270
|
+
};
|
|
271
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
272
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
273
|
+
const headers = {};
|
|
274
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
275
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
276
|
+
let body;
|
|
277
|
+
return new __HttpRequest({
|
|
278
|
+
protocol,
|
|
279
|
+
hostname,
|
|
280
|
+
port,
|
|
281
|
+
method: "GET",
|
|
282
|
+
headers,
|
|
283
|
+
path: resolvedPath,
|
|
284
|
+
body,
|
|
813
285
|
});
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
case "com.amazonaws.amp#InternalServerException": return [3, 6];
|
|
835
|
-
case "ServiceQuotaExceededException": return [3, 8];
|
|
836
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException": return [3, 8];
|
|
837
|
-
case "ThrottlingException": return [3, 10];
|
|
838
|
-
case "com.amazonaws.amp#ThrottlingException": return [3, 10];
|
|
839
|
-
case "ValidationException": return [3, 12];
|
|
840
|
-
case "com.amazonaws.amp#ValidationException": return [3, 12];
|
|
841
|
-
}
|
|
842
|
-
return [3, 14];
|
|
843
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
844
|
-
case 3: throw _d.sent();
|
|
845
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
846
|
-
case 5: throw _d.sent();
|
|
847
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
848
|
-
case 7: throw _d.sent();
|
|
849
|
-
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
850
|
-
case 9: throw _d.sent();
|
|
851
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
852
|
-
case 11: throw _d.sent();
|
|
853
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
854
|
-
case 13: throw _d.sent();
|
|
855
|
-
case 14:
|
|
856
|
-
parsedBody = parsedOutput.body;
|
|
857
|
-
throwDefaultError({
|
|
858
|
-
output: output,
|
|
859
|
-
parsedBody: parsedBody,
|
|
860
|
-
exceptionCtor: __BaseException,
|
|
861
|
-
errorCode: errorCode,
|
|
862
|
-
});
|
|
863
|
-
_d.label = 15;
|
|
864
|
-
case 15: return [2];
|
|
865
|
-
}
|
|
286
|
+
};
|
|
287
|
+
export const serializeAws_restJson1ListWorkspacesCommand = async (input, context) => {
|
|
288
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
289
|
+
const headers = {};
|
|
290
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
|
|
291
|
+
const query = map({
|
|
292
|
+
nextToken: [, input.nextToken],
|
|
293
|
+
alias: [, input.alias],
|
|
294
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
295
|
+
});
|
|
296
|
+
let body;
|
|
297
|
+
return new __HttpRequest({
|
|
298
|
+
protocol,
|
|
299
|
+
hostname,
|
|
300
|
+
port,
|
|
301
|
+
method: "GET",
|
|
302
|
+
headers,
|
|
303
|
+
path: resolvedPath,
|
|
304
|
+
query,
|
|
305
|
+
body,
|
|
866
306
|
});
|
|
867
|
-
}
|
|
868
|
-
export
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
307
|
+
};
|
|
308
|
+
export const serializeAws_restJson1PutAlertManagerDefinitionCommand = async (input, context) => {
|
|
309
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
310
|
+
const headers = {
|
|
311
|
+
"content-type": "application/json",
|
|
312
|
+
};
|
|
313
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
314
|
+
"/workspaces/{workspaceId}/alertmanager/definition";
|
|
315
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
316
|
+
let body;
|
|
317
|
+
body = JSON.stringify({
|
|
318
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
319
|
+
...(input.data != null && { data: context.base64Encoder(input.data) }),
|
|
320
|
+
});
|
|
321
|
+
return new __HttpRequest({
|
|
322
|
+
protocol,
|
|
323
|
+
hostname,
|
|
324
|
+
port,
|
|
325
|
+
method: "PUT",
|
|
326
|
+
headers,
|
|
327
|
+
path: resolvedPath,
|
|
328
|
+
body,
|
|
884
329
|
});
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
case "ThrottlingException": return [3, 10];
|
|
909
|
-
case "com.amazonaws.amp#ThrottlingException": return [3, 10];
|
|
910
|
-
case "ValidationException": return [3, 12];
|
|
911
|
-
case "com.amazonaws.amp#ValidationException": return [3, 12];
|
|
912
|
-
}
|
|
913
|
-
return [3, 14];
|
|
914
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
915
|
-
case 3: throw _d.sent();
|
|
916
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
917
|
-
case 5: throw _d.sent();
|
|
918
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
919
|
-
case 7: throw _d.sent();
|
|
920
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
921
|
-
case 9: throw _d.sent();
|
|
922
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
923
|
-
case 11: throw _d.sent();
|
|
924
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
925
|
-
case 13: throw _d.sent();
|
|
926
|
-
case 14:
|
|
927
|
-
parsedBody = parsedOutput.body;
|
|
928
|
-
throwDefaultError({
|
|
929
|
-
output: output,
|
|
930
|
-
parsedBody: parsedBody,
|
|
931
|
-
exceptionCtor: __BaseException,
|
|
932
|
-
errorCode: errorCode,
|
|
933
|
-
});
|
|
934
|
-
_d.label = 15;
|
|
935
|
-
case 15: return [2];
|
|
936
|
-
}
|
|
330
|
+
};
|
|
331
|
+
export const serializeAws_restJson1PutRuleGroupsNamespaceCommand = async (input, context) => {
|
|
332
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
333
|
+
const headers = {
|
|
334
|
+
"content-type": "application/json",
|
|
335
|
+
};
|
|
336
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
337
|
+
"/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
|
|
338
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
339
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
|
|
340
|
+
let body;
|
|
341
|
+
body = JSON.stringify({
|
|
342
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
343
|
+
...(input.data != null && { data: context.base64Encoder(input.data) }),
|
|
344
|
+
});
|
|
345
|
+
return new __HttpRequest({
|
|
346
|
+
protocol,
|
|
347
|
+
hostname,
|
|
348
|
+
port,
|
|
349
|
+
method: "PUT",
|
|
350
|
+
headers,
|
|
351
|
+
path: resolvedPath,
|
|
352
|
+
body,
|
|
937
353
|
});
|
|
938
|
-
}
|
|
939
|
-
export
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
354
|
+
};
|
|
355
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
356
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
357
|
+
const headers = {
|
|
358
|
+
"content-type": "application/json",
|
|
359
|
+
};
|
|
360
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
361
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
362
|
+
let body;
|
|
363
|
+
body = JSON.stringify({
|
|
364
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
365
|
+
});
|
|
366
|
+
return new __HttpRequest({
|
|
367
|
+
protocol,
|
|
368
|
+
hostname,
|
|
369
|
+
port,
|
|
370
|
+
method: "POST",
|
|
371
|
+
headers,
|
|
372
|
+
path: resolvedPath,
|
|
373
|
+
body,
|
|
955
374
|
});
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
case "InternalServerException": return [3, 6];
|
|
976
|
-
case "com.amazonaws.amp#InternalServerException": return [3, 6];
|
|
977
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
978
|
-
case "com.amazonaws.amp#ResourceNotFoundException": return [3, 8];
|
|
979
|
-
case "ValidationException": return [3, 10];
|
|
980
|
-
case "com.amazonaws.amp#ValidationException": return [3, 10];
|
|
981
|
-
}
|
|
982
|
-
return [3, 12];
|
|
983
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
984
|
-
case 3: throw _d.sent();
|
|
985
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
986
|
-
case 5: throw _d.sent();
|
|
987
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
988
|
-
case 7: throw _d.sent();
|
|
989
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
990
|
-
case 9: throw _d.sent();
|
|
991
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
992
|
-
case 11: throw _d.sent();
|
|
993
|
-
case 12:
|
|
994
|
-
parsedBody = parsedOutput.body;
|
|
995
|
-
throwDefaultError({
|
|
996
|
-
output: output,
|
|
997
|
-
parsedBody: parsedBody,
|
|
998
|
-
exceptionCtor: __BaseException,
|
|
999
|
-
errorCode: errorCode,
|
|
1000
|
-
});
|
|
1001
|
-
_d.label = 13;
|
|
1002
|
-
case 13: return [2];
|
|
1003
|
-
}
|
|
375
|
+
};
|
|
376
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
377
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
378
|
+
const headers = {};
|
|
379
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
380
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
381
|
+
const query = map({
|
|
382
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
383
|
+
});
|
|
384
|
+
let body;
|
|
385
|
+
return new __HttpRequest({
|
|
386
|
+
protocol,
|
|
387
|
+
hostname,
|
|
388
|
+
port,
|
|
389
|
+
method: "DELETE",
|
|
390
|
+
headers,
|
|
391
|
+
path: resolvedPath,
|
|
392
|
+
query,
|
|
393
|
+
body,
|
|
1004
394
|
});
|
|
1005
|
-
}
|
|
1006
|
-
export
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
395
|
+
};
|
|
396
|
+
export const serializeAws_restJson1UpdateLoggingConfigurationCommand = async (input, context) => {
|
|
397
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
398
|
+
const headers = {
|
|
399
|
+
"content-type": "application/json",
|
|
400
|
+
};
|
|
401
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
|
|
402
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
403
|
+
let body;
|
|
404
|
+
body = JSON.stringify({
|
|
405
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
406
|
+
...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }),
|
|
407
|
+
});
|
|
408
|
+
return new __HttpRequest({
|
|
409
|
+
protocol,
|
|
410
|
+
hostname,
|
|
411
|
+
port,
|
|
412
|
+
method: "PUT",
|
|
413
|
+
headers,
|
|
414
|
+
path: resolvedPath,
|
|
415
|
+
body,
|
|
1022
416
|
});
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
1045
|
-
case "com.amazonaws.amp#ResourceNotFoundException": return [3, 8];
|
|
1046
|
-
case "ThrottlingException": return [3, 10];
|
|
1047
|
-
case "com.amazonaws.amp#ThrottlingException": return [3, 10];
|
|
1048
|
-
case "ValidationException": return [3, 12];
|
|
1049
|
-
case "com.amazonaws.amp#ValidationException": return [3, 12];
|
|
1050
|
-
}
|
|
1051
|
-
return [3, 14];
|
|
1052
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1053
|
-
case 3: throw _d.sent();
|
|
1054
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1055
|
-
case 5: throw _d.sent();
|
|
1056
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1057
|
-
case 7: throw _d.sent();
|
|
1058
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1059
|
-
case 9: throw _d.sent();
|
|
1060
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1061
|
-
case 11: throw _d.sent();
|
|
1062
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1063
|
-
case 13: throw _d.sent();
|
|
1064
|
-
case 14:
|
|
1065
|
-
parsedBody = parsedOutput.body;
|
|
1066
|
-
throwDefaultError({
|
|
1067
|
-
output: output,
|
|
1068
|
-
parsedBody: parsedBody,
|
|
1069
|
-
exceptionCtor: __BaseException,
|
|
1070
|
-
errorCode: errorCode,
|
|
1071
|
-
});
|
|
1072
|
-
_d.label = 15;
|
|
1073
|
-
case 15: return [2];
|
|
1074
|
-
}
|
|
417
|
+
};
|
|
418
|
+
export const serializeAws_restJson1UpdateWorkspaceAliasCommand = async (input, context) => {
|
|
419
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
420
|
+
const headers = {
|
|
421
|
+
"content-type": "application/json",
|
|
422
|
+
};
|
|
423
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/alias";
|
|
424
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
425
|
+
let body;
|
|
426
|
+
body = JSON.stringify({
|
|
427
|
+
...(input.alias != null && { alias: input.alias }),
|
|
428
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
429
|
+
});
|
|
430
|
+
return new __HttpRequest({
|
|
431
|
+
protocol,
|
|
432
|
+
hostname,
|
|
433
|
+
port,
|
|
434
|
+
method: "POST",
|
|
435
|
+
headers,
|
|
436
|
+
path: resolvedPath,
|
|
437
|
+
body,
|
|
1075
438
|
});
|
|
1076
|
-
}
|
|
1077
|
-
export
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
return [2, deserializeAws_restJson1DeleteWorkspaceCommandError(output, context)];
|
|
1084
|
-
}
|
|
1085
|
-
contents = map({
|
|
1086
|
-
$metadata: deserializeMetadata(output),
|
|
1087
|
-
});
|
|
1088
|
-
return [4, collectBody(output.body, context)];
|
|
1089
|
-
case 1:
|
|
1090
|
-
_a.sent();
|
|
1091
|
-
return [2, contents];
|
|
1092
|
-
}
|
|
439
|
+
};
|
|
440
|
+
export const deserializeAws_restJson1CreateAlertManagerDefinitionCommand = async (output, context) => {
|
|
441
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
442
|
+
return deserializeAws_restJson1CreateAlertManagerDefinitionCommandError(output, context);
|
|
443
|
+
}
|
|
444
|
+
const contents = map({
|
|
445
|
+
$metadata: deserializeMetadata(output),
|
|
1093
446
|
});
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
return
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
case 15: return [2];
|
|
1145
|
-
}
|
|
447
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
448
|
+
if (data.status != null) {
|
|
449
|
+
contents.status = deserializeAws_restJson1AlertManagerDefinitionStatus(data.status, context);
|
|
450
|
+
}
|
|
451
|
+
return contents;
|
|
452
|
+
};
|
|
453
|
+
const deserializeAws_restJson1CreateAlertManagerDefinitionCommandError = async (output, context) => {
|
|
454
|
+
const parsedOutput = {
|
|
455
|
+
...output,
|
|
456
|
+
body: await parseErrorBody(output.body, context),
|
|
457
|
+
};
|
|
458
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
459
|
+
switch (errorCode) {
|
|
460
|
+
case "AccessDeniedException":
|
|
461
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
462
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
463
|
+
case "ConflictException":
|
|
464
|
+
case "com.amazonaws.amp#ConflictException":
|
|
465
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
466
|
+
case "InternalServerException":
|
|
467
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
468
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
469
|
+
case "ResourceNotFoundException":
|
|
470
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
471
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
472
|
+
case "ServiceQuotaExceededException":
|
|
473
|
+
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
474
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
475
|
+
case "ThrottlingException":
|
|
476
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
477
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
478
|
+
case "ValidationException":
|
|
479
|
+
case "com.amazonaws.amp#ValidationException":
|
|
480
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
481
|
+
default:
|
|
482
|
+
const parsedBody = parsedOutput.body;
|
|
483
|
+
throwDefaultError({
|
|
484
|
+
output,
|
|
485
|
+
parsedBody,
|
|
486
|
+
exceptionCtor: __BaseException,
|
|
487
|
+
errorCode,
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
export const deserializeAws_restJson1CreateLoggingConfigurationCommand = async (output, context) => {
|
|
492
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
493
|
+
return deserializeAws_restJson1CreateLoggingConfigurationCommandError(output, context);
|
|
494
|
+
}
|
|
495
|
+
const contents = map({
|
|
496
|
+
$metadata: deserializeMetadata(output),
|
|
1146
497
|
});
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
498
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
499
|
+
if (data.status != null) {
|
|
500
|
+
contents.status = deserializeAws_restJson1LoggingConfigurationStatus(data.status, context);
|
|
501
|
+
}
|
|
502
|
+
return contents;
|
|
503
|
+
};
|
|
504
|
+
const deserializeAws_restJson1CreateLoggingConfigurationCommandError = async (output, context) => {
|
|
505
|
+
const parsedOutput = {
|
|
506
|
+
...output,
|
|
507
|
+
body: await parseErrorBody(output.body, context),
|
|
508
|
+
};
|
|
509
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
510
|
+
switch (errorCode) {
|
|
511
|
+
case "AccessDeniedException":
|
|
512
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
513
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
514
|
+
case "InternalServerException":
|
|
515
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
516
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
517
|
+
case "ResourceNotFoundException":
|
|
518
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
519
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
520
|
+
case "ValidationException":
|
|
521
|
+
case "com.amazonaws.amp#ValidationException":
|
|
522
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
523
|
+
default:
|
|
524
|
+
const parsedBody = parsedOutput.body;
|
|
525
|
+
throwDefaultError({
|
|
526
|
+
output,
|
|
527
|
+
parsedBody,
|
|
528
|
+
exceptionCtor: __BaseException,
|
|
529
|
+
errorCode,
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
export const deserializeAws_restJson1CreateRuleGroupsNamespaceCommand = async (output, context) => {
|
|
534
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
535
|
+
return deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError(output, context);
|
|
536
|
+
}
|
|
537
|
+
const contents = map({
|
|
538
|
+
$metadata: deserializeMetadata(output),
|
|
1169
539
|
});
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
540
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
541
|
+
if (data.arn != null) {
|
|
542
|
+
contents.arn = __expectString(data.arn);
|
|
543
|
+
}
|
|
544
|
+
if (data.name != null) {
|
|
545
|
+
contents.name = __expectString(data.name);
|
|
546
|
+
}
|
|
547
|
+
if (data.status != null) {
|
|
548
|
+
contents.status = deserializeAws_restJson1RuleGroupsNamespaceStatus(data.status, context);
|
|
549
|
+
}
|
|
550
|
+
if (data.tags != null) {
|
|
551
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
552
|
+
}
|
|
553
|
+
return contents;
|
|
554
|
+
};
|
|
555
|
+
const deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
556
|
+
const parsedOutput = {
|
|
557
|
+
...output,
|
|
558
|
+
body: await parseErrorBody(output.body, context),
|
|
559
|
+
};
|
|
560
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
561
|
+
switch (errorCode) {
|
|
562
|
+
case "AccessDeniedException":
|
|
563
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
564
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
565
|
+
case "ConflictException":
|
|
566
|
+
case "com.amazonaws.amp#ConflictException":
|
|
567
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
568
|
+
case "InternalServerException":
|
|
569
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
570
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
571
|
+
case "ResourceNotFoundException":
|
|
572
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
573
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
574
|
+
case "ServiceQuotaExceededException":
|
|
575
|
+
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
576
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
577
|
+
case "ThrottlingException":
|
|
578
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
579
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
580
|
+
case "ValidationException":
|
|
581
|
+
case "com.amazonaws.amp#ValidationException":
|
|
582
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
583
|
+
default:
|
|
584
|
+
const parsedBody = parsedOutput.body;
|
|
585
|
+
throwDefaultError({
|
|
586
|
+
output,
|
|
587
|
+
parsedBody,
|
|
588
|
+
exceptionCtor: __BaseException,
|
|
589
|
+
errorCode,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
export const deserializeAws_restJson1CreateWorkspaceCommand = async (output, context) => {
|
|
594
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
595
|
+
return deserializeAws_restJson1CreateWorkspaceCommandError(output, context);
|
|
596
|
+
}
|
|
597
|
+
const contents = map({
|
|
598
|
+
$metadata: deserializeMetadata(output),
|
|
1218
599
|
});
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
600
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
601
|
+
if (data.arn != null) {
|
|
602
|
+
contents.arn = __expectString(data.arn);
|
|
603
|
+
}
|
|
604
|
+
if (data.status != null) {
|
|
605
|
+
contents.status = deserializeAws_restJson1WorkspaceStatus(data.status, context);
|
|
606
|
+
}
|
|
607
|
+
if (data.tags != null) {
|
|
608
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
609
|
+
}
|
|
610
|
+
if (data.workspaceId != null) {
|
|
611
|
+
contents.workspaceId = __expectString(data.workspaceId);
|
|
612
|
+
}
|
|
613
|
+
return contents;
|
|
614
|
+
};
|
|
615
|
+
const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, context) => {
|
|
616
|
+
const parsedOutput = {
|
|
617
|
+
...output,
|
|
618
|
+
body: await parseErrorBody(output.body, context),
|
|
619
|
+
};
|
|
620
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
621
|
+
switch (errorCode) {
|
|
622
|
+
case "AccessDeniedException":
|
|
623
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
624
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
625
|
+
case "ConflictException":
|
|
626
|
+
case "com.amazonaws.amp#ConflictException":
|
|
627
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
628
|
+
case "InternalServerException":
|
|
629
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
630
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
631
|
+
case "ServiceQuotaExceededException":
|
|
632
|
+
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
633
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
634
|
+
case "ThrottlingException":
|
|
635
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
636
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
637
|
+
case "ValidationException":
|
|
638
|
+
case "com.amazonaws.amp#ValidationException":
|
|
639
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
640
|
+
default:
|
|
641
|
+
const parsedBody = parsedOutput.body;
|
|
642
|
+
throwDefaultError({
|
|
643
|
+
output,
|
|
644
|
+
parsedBody,
|
|
645
|
+
exceptionCtor: __BaseException,
|
|
646
|
+
errorCode,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
export const deserializeAws_restJson1DeleteAlertManagerDefinitionCommand = async (output, context) => {
|
|
651
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
652
|
+
return deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError(output, context);
|
|
653
|
+
}
|
|
654
|
+
const contents = map({
|
|
655
|
+
$metadata: deserializeMetadata(output),
|
|
1241
656
|
});
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
657
|
+
await collectBody(output.body, context);
|
|
658
|
+
return contents;
|
|
659
|
+
};
|
|
660
|
+
const deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError = async (output, context) => {
|
|
661
|
+
const parsedOutput = {
|
|
662
|
+
...output,
|
|
663
|
+
body: await parseErrorBody(output.body, context),
|
|
664
|
+
};
|
|
665
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
666
|
+
switch (errorCode) {
|
|
667
|
+
case "AccessDeniedException":
|
|
668
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
669
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
670
|
+
case "ConflictException":
|
|
671
|
+
case "com.amazonaws.amp#ConflictException":
|
|
672
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
673
|
+
case "InternalServerException":
|
|
674
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
675
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
676
|
+
case "ResourceNotFoundException":
|
|
677
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
678
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
679
|
+
case "ThrottlingException":
|
|
680
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
681
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
682
|
+
case "ValidationException":
|
|
683
|
+
case "com.amazonaws.amp#ValidationException":
|
|
684
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
685
|
+
default:
|
|
686
|
+
const parsedBody = parsedOutput.body;
|
|
687
|
+
throwDefaultError({
|
|
688
|
+
output,
|
|
689
|
+
parsedBody,
|
|
690
|
+
exceptionCtor: __BaseException,
|
|
691
|
+
errorCode,
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
export const deserializeAws_restJson1DeleteLoggingConfigurationCommand = async (output, context) => {
|
|
696
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
697
|
+
return deserializeAws_restJson1DeleteLoggingConfigurationCommandError(output, context);
|
|
698
|
+
}
|
|
699
|
+
const contents = map({
|
|
700
|
+
$metadata: deserializeMetadata(output),
|
|
1286
701
|
});
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
702
|
+
await collectBody(output.body, context);
|
|
703
|
+
return contents;
|
|
704
|
+
};
|
|
705
|
+
const deserializeAws_restJson1DeleteLoggingConfigurationCommandError = async (output, context) => {
|
|
706
|
+
const parsedOutput = {
|
|
707
|
+
...output,
|
|
708
|
+
body: await parseErrorBody(output.body, context),
|
|
709
|
+
};
|
|
710
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
711
|
+
switch (errorCode) {
|
|
712
|
+
case "AccessDeniedException":
|
|
713
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
714
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
715
|
+
case "ConflictException":
|
|
716
|
+
case "com.amazonaws.amp#ConflictException":
|
|
717
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
718
|
+
case "InternalServerException":
|
|
719
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
720
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
721
|
+
case "ResourceNotFoundException":
|
|
722
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
723
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
724
|
+
case "ValidationException":
|
|
725
|
+
case "com.amazonaws.amp#ValidationException":
|
|
726
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
727
|
+
default:
|
|
728
|
+
const parsedBody = parsedOutput.body;
|
|
729
|
+
throwDefaultError({
|
|
730
|
+
output,
|
|
731
|
+
parsedBody,
|
|
732
|
+
exceptionCtor: __BaseException,
|
|
733
|
+
errorCode,
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
export const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand = async (output, context) => {
|
|
738
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
739
|
+
return deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError(output, context);
|
|
740
|
+
}
|
|
741
|
+
const contents = map({
|
|
742
|
+
$metadata: deserializeMetadata(output),
|
|
1309
743
|
});
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
});
|
|
1355
|
-
_d.label = 13;
|
|
1356
|
-
case 13: return [2];
|
|
1357
|
-
}
|
|
744
|
+
await collectBody(output.body, context);
|
|
745
|
+
return contents;
|
|
746
|
+
};
|
|
747
|
+
const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
748
|
+
const parsedOutput = {
|
|
749
|
+
...output,
|
|
750
|
+
body: await parseErrorBody(output.body, context),
|
|
751
|
+
};
|
|
752
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
753
|
+
switch (errorCode) {
|
|
754
|
+
case "AccessDeniedException":
|
|
755
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
756
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
757
|
+
case "ConflictException":
|
|
758
|
+
case "com.amazonaws.amp#ConflictException":
|
|
759
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
760
|
+
case "InternalServerException":
|
|
761
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
762
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
763
|
+
case "ResourceNotFoundException":
|
|
764
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
765
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
766
|
+
case "ThrottlingException":
|
|
767
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
768
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
769
|
+
case "ValidationException":
|
|
770
|
+
case "com.amazonaws.amp#ValidationException":
|
|
771
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
772
|
+
default:
|
|
773
|
+
const parsedBody = parsedOutput.body;
|
|
774
|
+
throwDefaultError({
|
|
775
|
+
output,
|
|
776
|
+
parsedBody,
|
|
777
|
+
exceptionCtor: __BaseException,
|
|
778
|
+
errorCode,
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
export const deserializeAws_restJson1DeleteWorkspaceCommand = async (output, context) => {
|
|
783
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
784
|
+
return deserializeAws_restJson1DeleteWorkspaceCommandError(output, context);
|
|
785
|
+
}
|
|
786
|
+
const contents = map({
|
|
787
|
+
$metadata: deserializeMetadata(output),
|
|
1358
788
|
});
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
789
|
+
await collectBody(output.body, context);
|
|
790
|
+
return contents;
|
|
791
|
+
};
|
|
792
|
+
const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, context) => {
|
|
793
|
+
const parsedOutput = {
|
|
794
|
+
...output,
|
|
795
|
+
body: await parseErrorBody(output.body, context),
|
|
796
|
+
};
|
|
797
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
798
|
+
switch (errorCode) {
|
|
799
|
+
case "AccessDeniedException":
|
|
800
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
801
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
802
|
+
case "ConflictException":
|
|
803
|
+
case "com.amazonaws.amp#ConflictException":
|
|
804
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
805
|
+
case "InternalServerException":
|
|
806
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
807
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
808
|
+
case "ResourceNotFoundException":
|
|
809
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
810
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
811
|
+
case "ThrottlingException":
|
|
812
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
813
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
814
|
+
case "ValidationException":
|
|
815
|
+
case "com.amazonaws.amp#ValidationException":
|
|
816
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
817
|
+
default:
|
|
818
|
+
const parsedBody = parsedOutput.body;
|
|
819
|
+
throwDefaultError({
|
|
820
|
+
output,
|
|
821
|
+
parsedBody,
|
|
822
|
+
exceptionCtor: __BaseException,
|
|
823
|
+
errorCode,
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
};
|
|
827
|
+
export const deserializeAws_restJson1DescribeAlertManagerDefinitionCommand = async (output, context) => {
|
|
828
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
829
|
+
return deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError(output, context);
|
|
830
|
+
}
|
|
831
|
+
const contents = map({
|
|
832
|
+
$metadata: deserializeMetadata(output),
|
|
1381
833
|
});
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
return
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
});
|
|
1427
|
-
_d.label = 13;
|
|
1428
|
-
case 13: return [2];
|
|
1429
|
-
}
|
|
834
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
835
|
+
if (data.alertManagerDefinition != null) {
|
|
836
|
+
contents.alertManagerDefinition = deserializeAws_restJson1AlertManagerDefinitionDescription(data.alertManagerDefinition, context);
|
|
837
|
+
}
|
|
838
|
+
return contents;
|
|
839
|
+
};
|
|
840
|
+
const deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError = async (output, context) => {
|
|
841
|
+
const parsedOutput = {
|
|
842
|
+
...output,
|
|
843
|
+
body: await parseErrorBody(output.body, context),
|
|
844
|
+
};
|
|
845
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
846
|
+
switch (errorCode) {
|
|
847
|
+
case "AccessDeniedException":
|
|
848
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
849
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
850
|
+
case "InternalServerException":
|
|
851
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
852
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
853
|
+
case "ResourceNotFoundException":
|
|
854
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
855
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
856
|
+
case "ThrottlingException":
|
|
857
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
858
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
859
|
+
case "ValidationException":
|
|
860
|
+
case "com.amazonaws.amp#ValidationException":
|
|
861
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
862
|
+
default:
|
|
863
|
+
const parsedBody = parsedOutput.body;
|
|
864
|
+
throwDefaultError({
|
|
865
|
+
output,
|
|
866
|
+
parsedBody,
|
|
867
|
+
exceptionCtor: __BaseException,
|
|
868
|
+
errorCode,
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
};
|
|
872
|
+
export const deserializeAws_restJson1DescribeLoggingConfigurationCommand = async (output, context) => {
|
|
873
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
874
|
+
return deserializeAws_restJson1DescribeLoggingConfigurationCommandError(output, context);
|
|
875
|
+
}
|
|
876
|
+
const contents = map({
|
|
877
|
+
$metadata: deserializeMetadata(output),
|
|
1430
878
|
});
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
879
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
880
|
+
if (data.loggingConfiguration != null) {
|
|
881
|
+
contents.loggingConfiguration = deserializeAws_restJson1LoggingConfigurationMetadata(data.loggingConfiguration, context);
|
|
882
|
+
}
|
|
883
|
+
return contents;
|
|
884
|
+
};
|
|
885
|
+
const deserializeAws_restJson1DescribeLoggingConfigurationCommandError = async (output, context) => {
|
|
886
|
+
const parsedOutput = {
|
|
887
|
+
...output,
|
|
888
|
+
body: await parseErrorBody(output.body, context),
|
|
889
|
+
};
|
|
890
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
891
|
+
switch (errorCode) {
|
|
892
|
+
case "AccessDeniedException":
|
|
893
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
894
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
895
|
+
case "InternalServerException":
|
|
896
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
897
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
898
|
+
case "ResourceNotFoundException":
|
|
899
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
900
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
901
|
+
case "ValidationException":
|
|
902
|
+
case "com.amazonaws.amp#ValidationException":
|
|
903
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
904
|
+
default:
|
|
905
|
+
const parsedBody = parsedOutput.body;
|
|
906
|
+
throwDefaultError({
|
|
907
|
+
output,
|
|
908
|
+
parsedBody,
|
|
909
|
+
exceptionCtor: __BaseException,
|
|
910
|
+
errorCode,
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
export const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand = async (output, context) => {
|
|
915
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
916
|
+
return deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError(output, context);
|
|
917
|
+
}
|
|
918
|
+
const contents = map({
|
|
919
|
+
$metadata: deserializeMetadata(output),
|
|
1456
920
|
});
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
return
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
});
|
|
1502
|
-
_d.label = 13;
|
|
1503
|
-
case 13: return [2];
|
|
1504
|
-
}
|
|
921
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
922
|
+
if (data.ruleGroupsNamespace != null) {
|
|
923
|
+
contents.ruleGroupsNamespace = deserializeAws_restJson1RuleGroupsNamespaceDescription(data.ruleGroupsNamespace, context);
|
|
924
|
+
}
|
|
925
|
+
return contents;
|
|
926
|
+
};
|
|
927
|
+
const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
928
|
+
const parsedOutput = {
|
|
929
|
+
...output,
|
|
930
|
+
body: await parseErrorBody(output.body, context),
|
|
931
|
+
};
|
|
932
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
933
|
+
switch (errorCode) {
|
|
934
|
+
case "AccessDeniedException":
|
|
935
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
936
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
937
|
+
case "InternalServerException":
|
|
938
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
939
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
940
|
+
case "ResourceNotFoundException":
|
|
941
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
942
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
943
|
+
case "ThrottlingException":
|
|
944
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
945
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
946
|
+
case "ValidationException":
|
|
947
|
+
case "com.amazonaws.amp#ValidationException":
|
|
948
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
949
|
+
default:
|
|
950
|
+
const parsedBody = parsedOutput.body;
|
|
951
|
+
throwDefaultError({
|
|
952
|
+
output,
|
|
953
|
+
parsedBody,
|
|
954
|
+
exceptionCtor: __BaseException,
|
|
955
|
+
errorCode,
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
export const deserializeAws_restJson1DescribeWorkspaceCommand = async (output, context) => {
|
|
960
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
961
|
+
return deserializeAws_restJson1DescribeWorkspaceCommandError(output, context);
|
|
962
|
+
}
|
|
963
|
+
const contents = map({
|
|
964
|
+
$metadata: deserializeMetadata(output),
|
|
1505
965
|
});
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
966
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
967
|
+
if (data.workspace != null) {
|
|
968
|
+
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
969
|
+
}
|
|
970
|
+
return contents;
|
|
971
|
+
};
|
|
972
|
+
const deserializeAws_restJson1DescribeWorkspaceCommandError = async (output, context) => {
|
|
973
|
+
const parsedOutput = {
|
|
974
|
+
...output,
|
|
975
|
+
body: await parseErrorBody(output.body, context),
|
|
976
|
+
};
|
|
977
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
978
|
+
switch (errorCode) {
|
|
979
|
+
case "AccessDeniedException":
|
|
980
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
981
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
982
|
+
case "InternalServerException":
|
|
983
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
984
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
985
|
+
case "ResourceNotFoundException":
|
|
986
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
987
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
988
|
+
case "ThrottlingException":
|
|
989
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
990
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
991
|
+
case "ValidationException":
|
|
992
|
+
case "com.amazonaws.amp#ValidationException":
|
|
993
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
994
|
+
default:
|
|
995
|
+
const parsedBody = parsedOutput.body;
|
|
996
|
+
throwDefaultError({
|
|
997
|
+
output,
|
|
998
|
+
parsedBody,
|
|
999
|
+
exceptionCtor: __BaseException,
|
|
1000
|
+
errorCode,
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
};
|
|
1004
|
+
export const deserializeAws_restJson1ListRuleGroupsNamespacesCommand = async (output, context) => {
|
|
1005
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1006
|
+
return deserializeAws_restJson1ListRuleGroupsNamespacesCommandError(output, context);
|
|
1007
|
+
}
|
|
1008
|
+
const contents = map({
|
|
1009
|
+
$metadata: deserializeMetadata(output),
|
|
1528
1010
|
});
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
}
|
|
1011
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1012
|
+
if (data.nextToken != null) {
|
|
1013
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
1014
|
+
}
|
|
1015
|
+
if (data.ruleGroupsNamespaces != null) {
|
|
1016
|
+
contents.ruleGroupsNamespaces = deserializeAws_restJson1RuleGroupsNamespaceSummaryList(data.ruleGroupsNamespaces, context);
|
|
1017
|
+
}
|
|
1018
|
+
return contents;
|
|
1019
|
+
};
|
|
1020
|
+
const deserializeAws_restJson1ListRuleGroupsNamespacesCommandError = async (output, context) => {
|
|
1021
|
+
const parsedOutput = {
|
|
1022
|
+
...output,
|
|
1023
|
+
body: await parseErrorBody(output.body, context),
|
|
1024
|
+
};
|
|
1025
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1026
|
+
switch (errorCode) {
|
|
1027
|
+
case "AccessDeniedException":
|
|
1028
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
1029
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1030
|
+
case "InternalServerException":
|
|
1031
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
1032
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1033
|
+
case "ResourceNotFoundException":
|
|
1034
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1035
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1036
|
+
case "ThrottlingException":
|
|
1037
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
1038
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1039
|
+
case "ValidationException":
|
|
1040
|
+
case "com.amazonaws.amp#ValidationException":
|
|
1041
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1042
|
+
default:
|
|
1043
|
+
const parsedBody = parsedOutput.body;
|
|
1044
|
+
throwDefaultError({
|
|
1045
|
+
output,
|
|
1046
|
+
parsedBody,
|
|
1047
|
+
exceptionCtor: __BaseException,
|
|
1048
|
+
errorCode,
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1052
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
1053
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1054
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
1055
|
+
}
|
|
1056
|
+
const contents = map({
|
|
1057
|
+
$metadata: deserializeMetadata(output),
|
|
1577
1058
|
});
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1059
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1060
|
+
if (data.tags != null) {
|
|
1061
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
1062
|
+
}
|
|
1063
|
+
return contents;
|
|
1064
|
+
};
|
|
1065
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
1066
|
+
const parsedOutput = {
|
|
1067
|
+
...output,
|
|
1068
|
+
body: await parseErrorBody(output.body, context),
|
|
1069
|
+
};
|
|
1070
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1071
|
+
switch (errorCode) {
|
|
1072
|
+
case "AccessDeniedException":
|
|
1073
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
1074
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1075
|
+
case "InternalServerException":
|
|
1076
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
1077
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1078
|
+
case "ResourceNotFoundException":
|
|
1079
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1080
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1081
|
+
case "ThrottlingException":
|
|
1082
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
1083
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1084
|
+
case "ValidationException":
|
|
1085
|
+
case "com.amazonaws.amp#ValidationException":
|
|
1086
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1087
|
+
default:
|
|
1088
|
+
const parsedBody = parsedOutput.body;
|
|
1089
|
+
throwDefaultError({
|
|
1090
|
+
output,
|
|
1091
|
+
parsedBody,
|
|
1092
|
+
exceptionCtor: __BaseException,
|
|
1093
|
+
errorCode,
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
};
|
|
1097
|
+
export const deserializeAws_restJson1ListWorkspacesCommand = async (output, context) => {
|
|
1098
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1099
|
+
return deserializeAws_restJson1ListWorkspacesCommandError(output, context);
|
|
1100
|
+
}
|
|
1101
|
+
const contents = map({
|
|
1102
|
+
$metadata: deserializeMetadata(output),
|
|
1603
1103
|
});
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1104
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1105
|
+
if (data.nextToken != null) {
|
|
1106
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
1107
|
+
}
|
|
1108
|
+
if (data.workspaces != null) {
|
|
1109
|
+
contents.workspaces = deserializeAws_restJson1WorkspaceSummaryList(data.workspaces, context);
|
|
1110
|
+
}
|
|
1111
|
+
return contents;
|
|
1112
|
+
};
|
|
1113
|
+
const deserializeAws_restJson1ListWorkspacesCommandError = async (output, context) => {
|
|
1114
|
+
const parsedOutput = {
|
|
1115
|
+
...output,
|
|
1116
|
+
body: await parseErrorBody(output.body, context),
|
|
1117
|
+
};
|
|
1118
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1119
|
+
switch (errorCode) {
|
|
1120
|
+
case "AccessDeniedException":
|
|
1121
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
1122
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1123
|
+
case "InternalServerException":
|
|
1124
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
1125
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1126
|
+
case "ThrottlingException":
|
|
1127
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
1128
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1129
|
+
case "ValidationException":
|
|
1130
|
+
case "com.amazonaws.amp#ValidationException":
|
|
1131
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1132
|
+
default:
|
|
1133
|
+
const parsedBody = parsedOutput.body;
|
|
1134
|
+
throwDefaultError({
|
|
1135
|
+
output,
|
|
1136
|
+
parsedBody,
|
|
1137
|
+
exceptionCtor: __BaseException,
|
|
1138
|
+
errorCode,
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
};
|
|
1142
|
+
export const deserializeAws_restJson1PutAlertManagerDefinitionCommand = async (output, context) => {
|
|
1143
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1144
|
+
return deserializeAws_restJson1PutAlertManagerDefinitionCommandError(output, context);
|
|
1145
|
+
}
|
|
1146
|
+
const contents = map({
|
|
1147
|
+
$metadata: deserializeMetadata(output),
|
|
1648
1148
|
});
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1149
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1150
|
+
if (data.status != null) {
|
|
1151
|
+
contents.status = deserializeAws_restJson1AlertManagerDefinitionStatus(data.status, context);
|
|
1152
|
+
}
|
|
1153
|
+
return contents;
|
|
1154
|
+
};
|
|
1155
|
+
const deserializeAws_restJson1PutAlertManagerDefinitionCommandError = async (output, context) => {
|
|
1156
|
+
const parsedOutput = {
|
|
1157
|
+
...output,
|
|
1158
|
+
body: await parseErrorBody(output.body, context),
|
|
1159
|
+
};
|
|
1160
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1161
|
+
switch (errorCode) {
|
|
1162
|
+
case "AccessDeniedException":
|
|
1163
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
1164
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1165
|
+
case "ConflictException":
|
|
1166
|
+
case "com.amazonaws.amp#ConflictException":
|
|
1167
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1168
|
+
case "InternalServerException":
|
|
1169
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
1170
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1171
|
+
case "ResourceNotFoundException":
|
|
1172
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1173
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1174
|
+
case "ServiceQuotaExceededException":
|
|
1175
|
+
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
1176
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
1177
|
+
case "ThrottlingException":
|
|
1178
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
1179
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1180
|
+
case "ValidationException":
|
|
1181
|
+
case "com.amazonaws.amp#ValidationException":
|
|
1182
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1183
|
+
default:
|
|
1184
|
+
const parsedBody = parsedOutput.body;
|
|
1185
|
+
throwDefaultError({
|
|
1186
|
+
output,
|
|
1187
|
+
parsedBody,
|
|
1188
|
+
exceptionCtor: __BaseException,
|
|
1189
|
+
errorCode,
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
};
|
|
1193
|
+
export const deserializeAws_restJson1PutRuleGroupsNamespaceCommand = async (output, context) => {
|
|
1194
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1195
|
+
return deserializeAws_restJson1PutRuleGroupsNamespaceCommandError(output, context);
|
|
1196
|
+
}
|
|
1197
|
+
const contents = map({
|
|
1198
|
+
$metadata: deserializeMetadata(output),
|
|
1671
1199
|
});
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1200
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1201
|
+
if (data.arn != null) {
|
|
1202
|
+
contents.arn = __expectString(data.arn);
|
|
1203
|
+
}
|
|
1204
|
+
if (data.name != null) {
|
|
1205
|
+
contents.name = __expectString(data.name);
|
|
1206
|
+
}
|
|
1207
|
+
if (data.status != null) {
|
|
1208
|
+
contents.status = deserializeAws_restJson1RuleGroupsNamespaceStatus(data.status, context);
|
|
1209
|
+
}
|
|
1210
|
+
if (data.tags != null) {
|
|
1211
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
1212
|
+
}
|
|
1213
|
+
return contents;
|
|
1214
|
+
};
|
|
1215
|
+
const deserializeAws_restJson1PutRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
1216
|
+
const parsedOutput = {
|
|
1217
|
+
...output,
|
|
1218
|
+
body: await parseErrorBody(output.body, context),
|
|
1219
|
+
};
|
|
1220
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1221
|
+
switch (errorCode) {
|
|
1222
|
+
case "AccessDeniedException":
|
|
1223
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
1224
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1225
|
+
case "ConflictException":
|
|
1226
|
+
case "com.amazonaws.amp#ConflictException":
|
|
1227
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1228
|
+
case "InternalServerException":
|
|
1229
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
1230
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1231
|
+
case "ResourceNotFoundException":
|
|
1232
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1233
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1234
|
+
case "ServiceQuotaExceededException":
|
|
1235
|
+
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
1236
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
1237
|
+
case "ThrottlingException":
|
|
1238
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
1239
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1240
|
+
case "ValidationException":
|
|
1241
|
+
case "com.amazonaws.amp#ValidationException":
|
|
1242
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1243
|
+
default:
|
|
1244
|
+
const parsedBody = parsedOutput.body;
|
|
1245
|
+
throwDefaultError({
|
|
1246
|
+
output,
|
|
1247
|
+
parsedBody,
|
|
1248
|
+
exceptionCtor: __BaseException,
|
|
1249
|
+
errorCode,
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
1254
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1255
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
1256
|
+
}
|
|
1257
|
+
const contents = map({
|
|
1258
|
+
$metadata: deserializeMetadata(output),
|
|
1728
1259
|
});
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1260
|
+
await collectBody(output.body, context);
|
|
1261
|
+
return contents;
|
|
1262
|
+
};
|
|
1263
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
1264
|
+
const parsedOutput = {
|
|
1265
|
+
...output,
|
|
1266
|
+
body: await parseErrorBody(output.body, context),
|
|
1267
|
+
};
|
|
1268
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1269
|
+
switch (errorCode) {
|
|
1270
|
+
case "AccessDeniedException":
|
|
1271
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
1272
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1273
|
+
case "InternalServerException":
|
|
1274
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
1275
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1276
|
+
case "ResourceNotFoundException":
|
|
1277
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1278
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1279
|
+
case "ThrottlingException":
|
|
1280
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
1281
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1282
|
+
case "ValidationException":
|
|
1283
|
+
case "com.amazonaws.amp#ValidationException":
|
|
1284
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1285
|
+
default:
|
|
1286
|
+
const parsedBody = parsedOutput.body;
|
|
1287
|
+
throwDefaultError({
|
|
1288
|
+
output,
|
|
1289
|
+
parsedBody,
|
|
1290
|
+
exceptionCtor: __BaseException,
|
|
1291
|
+
errorCode,
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
1296
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1297
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
1298
|
+
}
|
|
1299
|
+
const contents = map({
|
|
1300
|
+
$metadata: deserializeMetadata(output),
|
|
1760
1301
|
});
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1803
|
-
case 13: throw _d.sent();
|
|
1804
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1805
|
-
case 15: throw _d.sent();
|
|
1806
|
-
case 16:
|
|
1807
|
-
parsedBody = parsedOutput.body;
|
|
1808
|
-
throwDefaultError({
|
|
1809
|
-
output: output,
|
|
1810
|
-
parsedBody: parsedBody,
|
|
1811
|
-
exceptionCtor: __BaseException,
|
|
1812
|
-
errorCode: errorCode,
|
|
1813
|
-
});
|
|
1814
|
-
_d.label = 17;
|
|
1815
|
-
case 17: return [2];
|
|
1816
|
-
}
|
|
1302
|
+
await collectBody(output.body, context);
|
|
1303
|
+
return contents;
|
|
1304
|
+
};
|
|
1305
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
1306
|
+
const parsedOutput = {
|
|
1307
|
+
...output,
|
|
1308
|
+
body: await parseErrorBody(output.body, context),
|
|
1309
|
+
};
|
|
1310
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1311
|
+
switch (errorCode) {
|
|
1312
|
+
case "AccessDeniedException":
|
|
1313
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
1314
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1315
|
+
case "InternalServerException":
|
|
1316
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
1317
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1318
|
+
case "ResourceNotFoundException":
|
|
1319
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1320
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1321
|
+
case "ThrottlingException":
|
|
1322
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
1323
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1324
|
+
case "ValidationException":
|
|
1325
|
+
case "com.amazonaws.amp#ValidationException":
|
|
1326
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1327
|
+
default:
|
|
1328
|
+
const parsedBody = parsedOutput.body;
|
|
1329
|
+
throwDefaultError({
|
|
1330
|
+
output,
|
|
1331
|
+
parsedBody,
|
|
1332
|
+
exceptionCtor: __BaseException,
|
|
1333
|
+
errorCode,
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
};
|
|
1337
|
+
export const deserializeAws_restJson1UpdateLoggingConfigurationCommand = async (output, context) => {
|
|
1338
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1339
|
+
return deserializeAws_restJson1UpdateLoggingConfigurationCommandError(output, context);
|
|
1340
|
+
}
|
|
1341
|
+
const contents = map({
|
|
1342
|
+
$metadata: deserializeMetadata(output),
|
|
1817
1343
|
});
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1344
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1345
|
+
if (data.status != null) {
|
|
1346
|
+
contents.status = deserializeAws_restJson1LoggingConfigurationStatus(data.status, context);
|
|
1347
|
+
}
|
|
1348
|
+
return contents;
|
|
1349
|
+
};
|
|
1350
|
+
const deserializeAws_restJson1UpdateLoggingConfigurationCommandError = async (output, context) => {
|
|
1351
|
+
const parsedOutput = {
|
|
1352
|
+
...output,
|
|
1353
|
+
body: await parseErrorBody(output.body, context),
|
|
1354
|
+
};
|
|
1355
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1356
|
+
switch (errorCode) {
|
|
1357
|
+
case "AccessDeniedException":
|
|
1358
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
1359
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1360
|
+
case "ConflictException":
|
|
1361
|
+
case "com.amazonaws.amp#ConflictException":
|
|
1362
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1363
|
+
case "InternalServerException":
|
|
1364
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
1365
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1366
|
+
case "ResourceNotFoundException":
|
|
1367
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1368
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1369
|
+
case "ValidationException":
|
|
1370
|
+
case "com.amazonaws.amp#ValidationException":
|
|
1371
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1372
|
+
default:
|
|
1373
|
+
const parsedBody = parsedOutput.body;
|
|
1374
|
+
throwDefaultError({
|
|
1375
|
+
output,
|
|
1376
|
+
parsedBody,
|
|
1377
|
+
exceptionCtor: __BaseException,
|
|
1378
|
+
errorCode,
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
};
|
|
1382
|
+
export const deserializeAws_restJson1UpdateWorkspaceAliasCommand = async (output, context) => {
|
|
1383
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1384
|
+
return deserializeAws_restJson1UpdateWorkspaceAliasCommandError(output, context);
|
|
1385
|
+
}
|
|
1386
|
+
const contents = map({
|
|
1387
|
+
$metadata: deserializeMetadata(output),
|
|
1835
1388
|
});
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1389
|
+
await collectBody(output.body, context);
|
|
1390
|
+
return contents;
|
|
1391
|
+
};
|
|
1392
|
+
const deserializeAws_restJson1UpdateWorkspaceAliasCommandError = async (output, context) => {
|
|
1393
|
+
const parsedOutput = {
|
|
1394
|
+
...output,
|
|
1395
|
+
body: await parseErrorBody(output.body, context),
|
|
1396
|
+
};
|
|
1397
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1398
|
+
switch (errorCode) {
|
|
1399
|
+
case "AccessDeniedException":
|
|
1400
|
+
case "com.amazonaws.amp#AccessDeniedException":
|
|
1401
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1402
|
+
case "ConflictException":
|
|
1403
|
+
case "com.amazonaws.amp#ConflictException":
|
|
1404
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1405
|
+
case "InternalServerException":
|
|
1406
|
+
case "com.amazonaws.amp#InternalServerException":
|
|
1407
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1408
|
+
case "ResourceNotFoundException":
|
|
1409
|
+
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1410
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1411
|
+
case "ServiceQuotaExceededException":
|
|
1412
|
+
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
1413
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
1414
|
+
case "ThrottlingException":
|
|
1415
|
+
case "com.amazonaws.amp#ThrottlingException":
|
|
1416
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1417
|
+
case "ValidationException":
|
|
1418
|
+
case "com.amazonaws.amp#ValidationException":
|
|
1419
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1420
|
+
default:
|
|
1421
|
+
const parsedBody = parsedOutput.body;
|
|
1422
|
+
throwDefaultError({
|
|
1423
|
+
output,
|
|
1424
|
+
parsedBody,
|
|
1425
|
+
exceptionCtor: __BaseException,
|
|
1426
|
+
errorCode,
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1429
|
+
};
|
|
1430
|
+
const map = __map;
|
|
1431
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
1432
|
+
const contents = map({});
|
|
1433
|
+
const data = parsedOutput.body;
|
|
1434
|
+
if (data.message != null) {
|
|
1435
|
+
contents.message = __expectString(data.message);
|
|
1436
|
+
}
|
|
1437
|
+
const exception = new AccessDeniedException({
|
|
1438
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1439
|
+
...contents,
|
|
1884
1440
|
});
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1441
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1442
|
+
};
|
|
1443
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1444
|
+
const contents = map({});
|
|
1445
|
+
const data = parsedOutput.body;
|
|
1446
|
+
if (data.message != null) {
|
|
1447
|
+
contents.message = __expectString(data.message);
|
|
1448
|
+
}
|
|
1449
|
+
if (data.resourceId != null) {
|
|
1450
|
+
contents.resourceId = __expectString(data.resourceId);
|
|
1451
|
+
}
|
|
1452
|
+
if (data.resourceType != null) {
|
|
1453
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
1454
|
+
}
|
|
1455
|
+
const exception = new ConflictException({
|
|
1456
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1457
|
+
...contents,
|
|
1902
1458
|
});
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
case "com.amazonaws.amp#AccessDeniedException": return [3, 2];
|
|
1920
|
-
case "InternalServerException": return [3, 4];
|
|
1921
|
-
case "com.amazonaws.amp#InternalServerException": return [3, 4];
|
|
1922
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
1923
|
-
case "com.amazonaws.amp#ResourceNotFoundException": return [3, 6];
|
|
1924
|
-
case "ThrottlingException": return [3, 8];
|
|
1925
|
-
case "com.amazonaws.amp#ThrottlingException": return [3, 8];
|
|
1926
|
-
case "ValidationException": return [3, 10];
|
|
1927
|
-
case "com.amazonaws.amp#ValidationException": return [3, 10];
|
|
1928
|
-
}
|
|
1929
|
-
return [3, 12];
|
|
1930
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1931
|
-
case 3: throw _d.sent();
|
|
1932
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1933
|
-
case 5: throw _d.sent();
|
|
1934
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1935
|
-
case 7: throw _d.sent();
|
|
1936
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1937
|
-
case 9: throw _d.sent();
|
|
1938
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1939
|
-
case 11: throw _d.sent();
|
|
1940
|
-
case 12:
|
|
1941
|
-
parsedBody = parsedOutput.body;
|
|
1942
|
-
throwDefaultError({
|
|
1943
|
-
output: output,
|
|
1944
|
-
parsedBody: parsedBody,
|
|
1945
|
-
exceptionCtor: __BaseException,
|
|
1946
|
-
errorCode: errorCode,
|
|
1947
|
-
});
|
|
1948
|
-
_d.label = 13;
|
|
1949
|
-
case 13: return [2];
|
|
1950
|
-
}
|
|
1459
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1460
|
+
};
|
|
1461
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
1462
|
+
const contents = map({
|
|
1463
|
+
retryAfterSeconds: [
|
|
1464
|
+
() => void 0 !== parsedOutput.headers["retry-after"],
|
|
1465
|
+
() => __strictParseInt32(parsedOutput.headers["retry-after"]),
|
|
1466
|
+
],
|
|
1467
|
+
});
|
|
1468
|
+
const data = parsedOutput.body;
|
|
1469
|
+
if (data.message != null) {
|
|
1470
|
+
contents.message = __expectString(data.message);
|
|
1471
|
+
}
|
|
1472
|
+
const exception = new InternalServerException({
|
|
1473
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1474
|
+
...contents,
|
|
1951
1475
|
});
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
if (data.status != null) {
|
|
1970
|
-
contents.status = deserializeAws_restJson1LoggingConfigurationStatus(data.status, context);
|
|
1971
|
-
}
|
|
1972
|
-
return [2, contents];
|
|
1973
|
-
}
|
|
1476
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1477
|
+
};
|
|
1478
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1479
|
+
const contents = map({});
|
|
1480
|
+
const data = parsedOutput.body;
|
|
1481
|
+
if (data.message != null) {
|
|
1482
|
+
contents.message = __expectString(data.message);
|
|
1483
|
+
}
|
|
1484
|
+
if (data.resourceId != null) {
|
|
1485
|
+
contents.resourceId = __expectString(data.resourceId);
|
|
1486
|
+
}
|
|
1487
|
+
if (data.resourceType != null) {
|
|
1488
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
1489
|
+
}
|
|
1490
|
+
const exception = new ResourceNotFoundException({
|
|
1491
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1492
|
+
...contents,
|
|
1974
1493
|
});
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
case "ValidationException": return [3, 10];
|
|
1999
|
-
case "com.amazonaws.amp#ValidationException": return [3, 10];
|
|
2000
|
-
}
|
|
2001
|
-
return [3, 12];
|
|
2002
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2003
|
-
case 3: throw _d.sent();
|
|
2004
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2005
|
-
case 5: throw _d.sent();
|
|
2006
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2007
|
-
case 7: throw _d.sent();
|
|
2008
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2009
|
-
case 9: throw _d.sent();
|
|
2010
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2011
|
-
case 11: throw _d.sent();
|
|
2012
|
-
case 12:
|
|
2013
|
-
parsedBody = parsedOutput.body;
|
|
2014
|
-
throwDefaultError({
|
|
2015
|
-
output: output,
|
|
2016
|
-
parsedBody: parsedBody,
|
|
2017
|
-
exceptionCtor: __BaseException,
|
|
2018
|
-
errorCode: errorCode,
|
|
2019
|
-
});
|
|
2020
|
-
_d.label = 13;
|
|
2021
|
-
case 13: return [2];
|
|
2022
|
-
}
|
|
1494
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1495
|
+
};
|
|
1496
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1497
|
+
const contents = map({});
|
|
1498
|
+
const data = parsedOutput.body;
|
|
1499
|
+
if (data.message != null) {
|
|
1500
|
+
contents.message = __expectString(data.message);
|
|
1501
|
+
}
|
|
1502
|
+
if (data.quotaCode != null) {
|
|
1503
|
+
contents.quotaCode = __expectString(data.quotaCode);
|
|
1504
|
+
}
|
|
1505
|
+
if (data.resourceId != null) {
|
|
1506
|
+
contents.resourceId = __expectString(data.resourceId);
|
|
1507
|
+
}
|
|
1508
|
+
if (data.resourceType != null) {
|
|
1509
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
1510
|
+
}
|
|
1511
|
+
if (data.serviceCode != null) {
|
|
1512
|
+
contents.serviceCode = __expectString(data.serviceCode);
|
|
1513
|
+
}
|
|
1514
|
+
const exception = new ServiceQuotaExceededException({
|
|
1515
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1516
|
+
...contents,
|
|
2023
1517
|
});
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
1518
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1519
|
+
};
|
|
1520
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
1521
|
+
const contents = map({
|
|
1522
|
+
retryAfterSeconds: [
|
|
1523
|
+
() => void 0 !== parsedOutput.headers["retry-after"],
|
|
1524
|
+
() => __strictParseInt32(parsedOutput.headers["retry-after"]),
|
|
1525
|
+
],
|
|
1526
|
+
});
|
|
1527
|
+
const data = parsedOutput.body;
|
|
1528
|
+
if (data.message != null) {
|
|
1529
|
+
contents.message = __expectString(data.message);
|
|
1530
|
+
}
|
|
1531
|
+
if (data.quotaCode != null) {
|
|
1532
|
+
contents.quotaCode = __expectString(data.quotaCode);
|
|
1533
|
+
}
|
|
1534
|
+
if (data.serviceCode != null) {
|
|
1535
|
+
contents.serviceCode = __expectString(data.serviceCode);
|
|
1536
|
+
}
|
|
1537
|
+
const exception = new ThrottlingException({
|
|
1538
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1539
|
+
...contents,
|
|
2041
1540
|
});
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
case "ConflictException": return [3, 4];
|
|
2060
|
-
case "com.amazonaws.amp#ConflictException": return [3, 4];
|
|
2061
|
-
case "InternalServerException": return [3, 6];
|
|
2062
|
-
case "com.amazonaws.amp#InternalServerException": return [3, 6];
|
|
2063
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
2064
|
-
case "com.amazonaws.amp#ResourceNotFoundException": return [3, 8];
|
|
2065
|
-
case "ServiceQuotaExceededException": return [3, 10];
|
|
2066
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException": return [3, 10];
|
|
2067
|
-
case "ThrottlingException": return [3, 12];
|
|
2068
|
-
case "com.amazonaws.amp#ThrottlingException": return [3, 12];
|
|
2069
|
-
case "ValidationException": return [3, 14];
|
|
2070
|
-
case "com.amazonaws.amp#ValidationException": return [3, 14];
|
|
2071
|
-
}
|
|
2072
|
-
return [3, 16];
|
|
2073
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2074
|
-
case 3: throw _d.sent();
|
|
2075
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2076
|
-
case 5: throw _d.sent();
|
|
2077
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2078
|
-
case 7: throw _d.sent();
|
|
2079
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2080
|
-
case 9: throw _d.sent();
|
|
2081
|
-
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
2082
|
-
case 11: throw _d.sent();
|
|
2083
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2084
|
-
case 13: throw _d.sent();
|
|
2085
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2086
|
-
case 15: throw _d.sent();
|
|
2087
|
-
case 16:
|
|
2088
|
-
parsedBody = parsedOutput.body;
|
|
2089
|
-
throwDefaultError({
|
|
2090
|
-
output: output,
|
|
2091
|
-
parsedBody: parsedBody,
|
|
2092
|
-
exceptionCtor: __BaseException,
|
|
2093
|
-
errorCode: errorCode,
|
|
2094
|
-
});
|
|
2095
|
-
_d.label = 17;
|
|
2096
|
-
case 17: return [2];
|
|
2097
|
-
}
|
|
1541
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1542
|
+
};
|
|
1543
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1544
|
+
const contents = map({});
|
|
1545
|
+
const data = parsedOutput.body;
|
|
1546
|
+
if (data.fieldList != null) {
|
|
1547
|
+
contents.fieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context);
|
|
1548
|
+
}
|
|
1549
|
+
if (data.message != null) {
|
|
1550
|
+
contents.message = __expectString(data.message);
|
|
1551
|
+
}
|
|
1552
|
+
if (data.reason != null) {
|
|
1553
|
+
contents.reason = __expectString(data.reason);
|
|
1554
|
+
}
|
|
1555
|
+
const exception = new ValidationException({
|
|
1556
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1557
|
+
...contents,
|
|
2098
1558
|
});
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
return __generator(this, function (_a) {
|
|
2104
|
-
contents = map({});
|
|
2105
|
-
data = parsedOutput.body;
|
|
2106
|
-
if (data.message != null) {
|
|
2107
|
-
contents.message = __expectString(data.message);
|
|
2108
|
-
}
|
|
2109
|
-
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2110
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2111
|
-
});
|
|
2112
|
-
}); };
|
|
2113
|
-
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2114
|
-
var contents, data, exception;
|
|
2115
|
-
return __generator(this, function (_a) {
|
|
2116
|
-
contents = map({});
|
|
2117
|
-
data = parsedOutput.body;
|
|
2118
|
-
if (data.message != null) {
|
|
2119
|
-
contents.message = __expectString(data.message);
|
|
2120
|
-
}
|
|
2121
|
-
if (data.resourceId != null) {
|
|
2122
|
-
contents.resourceId = __expectString(data.resourceId);
|
|
2123
|
-
}
|
|
2124
|
-
if (data.resourceType != null) {
|
|
2125
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
2126
|
-
}
|
|
2127
|
-
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2128
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2129
|
-
});
|
|
2130
|
-
}); };
|
|
2131
|
-
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2132
|
-
var contents, data, exception;
|
|
2133
|
-
return __generator(this, function (_a) {
|
|
2134
|
-
contents = map({
|
|
2135
|
-
retryAfterSeconds: [
|
|
2136
|
-
function () { return void 0 !== parsedOutput.headers["retry-after"]; },
|
|
2137
|
-
function () { return __strictParseInt32(parsedOutput.headers["retry-after"]); },
|
|
2138
|
-
],
|
|
2139
|
-
});
|
|
2140
|
-
data = parsedOutput.body;
|
|
2141
|
-
if (data.message != null) {
|
|
2142
|
-
contents.message = __expectString(data.message);
|
|
2143
|
-
}
|
|
2144
|
-
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2145
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2146
|
-
});
|
|
2147
|
-
}); };
|
|
2148
|
-
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2149
|
-
var contents, data, exception;
|
|
2150
|
-
return __generator(this, function (_a) {
|
|
2151
|
-
contents = map({});
|
|
2152
|
-
data = parsedOutput.body;
|
|
2153
|
-
if (data.message != null) {
|
|
2154
|
-
contents.message = __expectString(data.message);
|
|
2155
|
-
}
|
|
2156
|
-
if (data.resourceId != null) {
|
|
2157
|
-
contents.resourceId = __expectString(data.resourceId);
|
|
2158
|
-
}
|
|
2159
|
-
if (data.resourceType != null) {
|
|
2160
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
2161
|
-
}
|
|
2162
|
-
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2163
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2164
|
-
});
|
|
2165
|
-
}); };
|
|
2166
|
-
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2167
|
-
var contents, data, exception;
|
|
2168
|
-
return __generator(this, function (_a) {
|
|
2169
|
-
contents = map({});
|
|
2170
|
-
data = parsedOutput.body;
|
|
2171
|
-
if (data.message != null) {
|
|
2172
|
-
contents.message = __expectString(data.message);
|
|
2173
|
-
}
|
|
2174
|
-
if (data.quotaCode != null) {
|
|
2175
|
-
contents.quotaCode = __expectString(data.quotaCode);
|
|
2176
|
-
}
|
|
2177
|
-
if (data.resourceId != null) {
|
|
2178
|
-
contents.resourceId = __expectString(data.resourceId);
|
|
2179
|
-
}
|
|
2180
|
-
if (data.resourceType != null) {
|
|
2181
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
2182
|
-
}
|
|
2183
|
-
if (data.serviceCode != null) {
|
|
2184
|
-
contents.serviceCode = __expectString(data.serviceCode);
|
|
2185
|
-
}
|
|
2186
|
-
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2187
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2188
|
-
});
|
|
2189
|
-
}); };
|
|
2190
|
-
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2191
|
-
var contents, data, exception;
|
|
2192
|
-
return __generator(this, function (_a) {
|
|
2193
|
-
contents = map({
|
|
2194
|
-
retryAfterSeconds: [
|
|
2195
|
-
function () { return void 0 !== parsedOutput.headers["retry-after"]; },
|
|
2196
|
-
function () { return __strictParseInt32(parsedOutput.headers["retry-after"]); },
|
|
2197
|
-
],
|
|
2198
|
-
});
|
|
2199
|
-
data = parsedOutput.body;
|
|
2200
|
-
if (data.message != null) {
|
|
2201
|
-
contents.message = __expectString(data.message);
|
|
2202
|
-
}
|
|
2203
|
-
if (data.quotaCode != null) {
|
|
2204
|
-
contents.quotaCode = __expectString(data.quotaCode);
|
|
2205
|
-
}
|
|
2206
|
-
if (data.serviceCode != null) {
|
|
2207
|
-
contents.serviceCode = __expectString(data.serviceCode);
|
|
2208
|
-
}
|
|
2209
|
-
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2210
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2211
|
-
});
|
|
2212
|
-
}); };
|
|
2213
|
-
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2214
|
-
var contents, data, exception;
|
|
2215
|
-
return __generator(this, function (_a) {
|
|
2216
|
-
contents = map({});
|
|
2217
|
-
data = parsedOutput.body;
|
|
2218
|
-
if (data.fieldList != null) {
|
|
2219
|
-
contents.fieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context);
|
|
2220
|
-
}
|
|
2221
|
-
if (data.message != null) {
|
|
2222
|
-
contents.message = __expectString(data.message);
|
|
2223
|
-
}
|
|
2224
|
-
if (data.reason != null) {
|
|
2225
|
-
contents.reason = __expectString(data.reason);
|
|
2226
|
-
}
|
|
2227
|
-
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2228
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2229
|
-
});
|
|
2230
|
-
}); };
|
|
2231
|
-
var serializeAws_restJson1TagMap = function (input, context) {
|
|
2232
|
-
return Object.entries(input).reduce(function (acc, _a) {
|
|
2233
|
-
var _b;
|
|
2234
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1559
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1560
|
+
};
|
|
1561
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1562
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2235
1563
|
if (value === null) {
|
|
2236
1564
|
return acc;
|
|
2237
1565
|
}
|
|
2238
|
-
return
|
|
1566
|
+
return {
|
|
1567
|
+
...acc,
|
|
1568
|
+
[key]: value,
|
|
1569
|
+
};
|
|
2239
1570
|
}, {});
|
|
2240
1571
|
};
|
|
2241
|
-
|
|
1572
|
+
const deserializeAws_restJson1AlertManagerDefinitionDescription = (output, context) => {
|
|
2242
1573
|
return {
|
|
2243
1574
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
2244
1575
|
data: output.data != null ? context.base64Decoder(output.data) : undefined,
|
|
@@ -2246,13 +1577,13 @@ var deserializeAws_restJson1AlertManagerDefinitionDescription = function (output
|
|
|
2246
1577
|
status: output.status != null ? deserializeAws_restJson1AlertManagerDefinitionStatus(output.status, context) : undefined,
|
|
2247
1578
|
};
|
|
2248
1579
|
};
|
|
2249
|
-
|
|
1580
|
+
const deserializeAws_restJson1AlertManagerDefinitionStatus = (output, context) => {
|
|
2250
1581
|
return {
|
|
2251
1582
|
statusCode: __expectString(output.statusCode),
|
|
2252
1583
|
statusReason: __expectString(output.statusReason),
|
|
2253
1584
|
};
|
|
2254
1585
|
};
|
|
2255
|
-
|
|
1586
|
+
const deserializeAws_restJson1LoggingConfigurationMetadata = (output, context) => {
|
|
2256
1587
|
return {
|
|
2257
1588
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
2258
1589
|
logGroupArn: __expectString(output.logGroupArn),
|
|
@@ -2261,13 +1592,13 @@ var deserializeAws_restJson1LoggingConfigurationMetadata = function (output, con
|
|
|
2261
1592
|
workspace: __expectString(output.workspace),
|
|
2262
1593
|
};
|
|
2263
1594
|
};
|
|
2264
|
-
|
|
1595
|
+
const deserializeAws_restJson1LoggingConfigurationStatus = (output, context) => {
|
|
2265
1596
|
return {
|
|
2266
1597
|
statusCode: __expectString(output.statusCode),
|
|
2267
1598
|
statusReason: __expectString(output.statusReason),
|
|
2268
1599
|
};
|
|
2269
1600
|
};
|
|
2270
|
-
|
|
1601
|
+
const deserializeAws_restJson1RuleGroupsNamespaceDescription = (output, context) => {
|
|
2271
1602
|
return {
|
|
2272
1603
|
arn: __expectString(output.arn),
|
|
2273
1604
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
@@ -2278,13 +1609,13 @@ var deserializeAws_restJson1RuleGroupsNamespaceDescription = function (output, c
|
|
|
2278
1609
|
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
2279
1610
|
};
|
|
2280
1611
|
};
|
|
2281
|
-
|
|
1612
|
+
const deserializeAws_restJson1RuleGroupsNamespaceStatus = (output, context) => {
|
|
2282
1613
|
return {
|
|
2283
1614
|
statusCode: __expectString(output.statusCode),
|
|
2284
1615
|
statusReason: __expectString(output.statusReason),
|
|
2285
1616
|
};
|
|
2286
1617
|
};
|
|
2287
|
-
|
|
1618
|
+
const deserializeAws_restJson1RuleGroupsNamespaceSummary = (output, context) => {
|
|
2288
1619
|
return {
|
|
2289
1620
|
arn: __expectString(output.arn),
|
|
2290
1621
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
@@ -2294,10 +1625,10 @@ var deserializeAws_restJson1RuleGroupsNamespaceSummary = function (output, conte
|
|
|
2294
1625
|
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
2295
1626
|
};
|
|
2296
1627
|
};
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
.filter(
|
|
2300
|
-
.map(
|
|
1628
|
+
const deserializeAws_restJson1RuleGroupsNamespaceSummaryList = (output, context) => {
|
|
1629
|
+
const retVal = (output || [])
|
|
1630
|
+
.filter((e) => e != null)
|
|
1631
|
+
.map((entry) => {
|
|
2301
1632
|
if (entry === null) {
|
|
2302
1633
|
return null;
|
|
2303
1634
|
}
|
|
@@ -2305,26 +1636,27 @@ var deserializeAws_restJson1RuleGroupsNamespaceSummaryList = function (output, c
|
|
|
2305
1636
|
});
|
|
2306
1637
|
return retVal;
|
|
2307
1638
|
};
|
|
2308
|
-
|
|
2309
|
-
return Object.entries(output).reduce(
|
|
2310
|
-
var _b;
|
|
2311
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1639
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1640
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2312
1641
|
if (value === null) {
|
|
2313
1642
|
return acc;
|
|
2314
1643
|
}
|
|
2315
|
-
return
|
|
1644
|
+
return {
|
|
1645
|
+
...acc,
|
|
1646
|
+
[key]: __expectString(value),
|
|
1647
|
+
};
|
|
2316
1648
|
}, {});
|
|
2317
1649
|
};
|
|
2318
|
-
|
|
1650
|
+
const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
|
|
2319
1651
|
return {
|
|
2320
1652
|
message: __expectString(output.message),
|
|
2321
1653
|
name: __expectString(output.name),
|
|
2322
1654
|
};
|
|
2323
1655
|
};
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
.filter(
|
|
2327
|
-
.map(
|
|
1656
|
+
const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) => {
|
|
1657
|
+
const retVal = (output || [])
|
|
1658
|
+
.filter((e) => e != null)
|
|
1659
|
+
.map((entry) => {
|
|
2328
1660
|
if (entry === null) {
|
|
2329
1661
|
return null;
|
|
2330
1662
|
}
|
|
@@ -2332,7 +1664,7 @@ var deserializeAws_restJson1ValidationExceptionFieldList = function (output, con
|
|
|
2332
1664
|
});
|
|
2333
1665
|
return retVal;
|
|
2334
1666
|
};
|
|
2335
|
-
|
|
1667
|
+
const deserializeAws_restJson1WorkspaceDescription = (output, context) => {
|
|
2336
1668
|
return {
|
|
2337
1669
|
alias: __expectString(output.alias),
|
|
2338
1670
|
arn: __expectString(output.arn),
|
|
@@ -2343,12 +1675,12 @@ var deserializeAws_restJson1WorkspaceDescription = function (output, context) {
|
|
|
2343
1675
|
workspaceId: __expectString(output.workspaceId),
|
|
2344
1676
|
};
|
|
2345
1677
|
};
|
|
2346
|
-
|
|
1678
|
+
const deserializeAws_restJson1WorkspaceStatus = (output, context) => {
|
|
2347
1679
|
return {
|
|
2348
1680
|
statusCode: __expectString(output.statusCode),
|
|
2349
1681
|
};
|
|
2350
1682
|
};
|
|
2351
|
-
|
|
1683
|
+
const deserializeAws_restJson1WorkspaceSummary = (output, context) => {
|
|
2352
1684
|
return {
|
|
2353
1685
|
alias: __expectString(output.alias),
|
|
2354
1686
|
arn: __expectString(output.arn),
|
|
@@ -2358,10 +1690,10 @@ var deserializeAws_restJson1WorkspaceSummary = function (output, context) {
|
|
|
2358
1690
|
workspaceId: __expectString(output.workspaceId),
|
|
2359
1691
|
};
|
|
2360
1692
|
};
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
.filter(
|
|
2364
|
-
.map(
|
|
1693
|
+
const deserializeAws_restJson1WorkspaceSummaryList = (output, context) => {
|
|
1694
|
+
const retVal = (output || [])
|
|
1695
|
+
.filter((e) => e != null)
|
|
1696
|
+
.map((entry) => {
|
|
2365
1697
|
if (entry === null) {
|
|
2366
1698
|
return null;
|
|
2367
1699
|
}
|
|
@@ -2369,57 +1701,39 @@ var deserializeAws_restJson1WorkspaceSummaryList = function (output, context) {
|
|
|
2369
1701
|
});
|
|
2370
1702
|
return retVal;
|
|
2371
1703
|
};
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
});
|
|
2380
|
-
};
|
|
2381
|
-
var collectBody = function (streamBody, context) {
|
|
2382
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1704
|
+
const deserializeMetadata = (output) => ({
|
|
1705
|
+
httpStatusCode: output.statusCode,
|
|
1706
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1707
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1708
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1709
|
+
});
|
|
1710
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
2383
1711
|
if (streamBody instanceof Uint8Array) {
|
|
2384
1712
|
return Promise.resolve(streamBody);
|
|
2385
1713
|
}
|
|
2386
1714
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2387
1715
|
};
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
1716
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1717
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1718
|
+
value !== null &&
|
|
1719
|
+
value !== "" &&
|
|
1720
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1721
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1722
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1723
|
+
if (encoded.length) {
|
|
1724
|
+
return JSON.parse(encoded);
|
|
1725
|
+
}
|
|
1726
|
+
return {};
|
|
1727
|
+
});
|
|
1728
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1729
|
+
const value = await parseBody(errorBody, context);
|
|
1730
|
+
value.message = value.message ?? value.Message;
|
|
1731
|
+
return value;
|
|
2397
1732
|
};
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
}
|
|
2403
|
-
return {};
|
|
2404
|
-
});
|
|
2405
|
-
};
|
|
2406
|
-
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2407
|
-
var value;
|
|
2408
|
-
var _a;
|
|
2409
|
-
return __generator(this, function (_b) {
|
|
2410
|
-
switch (_b.label) {
|
|
2411
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
2412
|
-
case 1:
|
|
2413
|
-
value = _b.sent();
|
|
2414
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2415
|
-
return [2, value];
|
|
2416
|
-
}
|
|
2417
|
-
});
|
|
2418
|
-
}); };
|
|
2419
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
2420
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2421
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
2422
|
-
var cleanValue = rawValue;
|
|
1733
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1734
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1735
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1736
|
+
let cleanValue = rawValue;
|
|
2423
1737
|
if (typeof cleanValue === "number") {
|
|
2424
1738
|
cleanValue = cleanValue.toString();
|
|
2425
1739
|
}
|
|
@@ -2434,7 +1748,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2434
1748
|
}
|
|
2435
1749
|
return cleanValue;
|
|
2436
1750
|
};
|
|
2437
|
-
|
|
1751
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2438
1752
|
if (headerKey !== undefined) {
|
|
2439
1753
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2440
1754
|
}
|