@aws-sdk/client-resource-groups 3.181.0 → 3.183.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 +8 -0
- package/dist-es/ResourceGroups.js +66 -73
- package/dist-es/ResourceGroupsClient.js +22 -28
- package/dist-es/commands/CreateGroupCommand.js +21 -28
- package/dist-es/commands/DeleteGroupCommand.js +21 -28
- package/dist-es/commands/GetGroupCommand.js +21 -28
- package/dist-es/commands/GetGroupConfigurationCommand.js +21 -28
- package/dist-es/commands/GetGroupQueryCommand.js +21 -28
- package/dist-es/commands/GetTagsCommand.js +21 -28
- package/dist-es/commands/GroupResourcesCommand.js +21 -28
- package/dist-es/commands/ListGroupResourcesCommand.js +21 -28
- package/dist-es/commands/ListGroupsCommand.js +21 -28
- package/dist-es/commands/PutGroupConfigurationCommand.js +21 -28
- package/dist-es/commands/SearchResourcesCommand.js +21 -28
- package/dist-es/commands/TagCommand.js +21 -28
- package/dist-es/commands/UngroupResourcesCommand.js +21 -28
- package/dist-es/commands/UntagCommand.js +21 -28
- package/dist-es/commands/UpdateGroupCommand.js +21 -28
- package/dist-es/commands/UpdateGroupQueryCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ResourceGroupsServiceException.js +5 -10
- package/dist-es/models/models_0.js +225 -132
- package/dist-es/pagination/ListGroupResourcesPaginator.js +25 -68
- package/dist-es/pagination/ListGroupsPaginator.js +25 -68
- package/dist-es/pagination/SearchResourcesPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1373 -1866
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1857 +1,1381 @@
|
|
|
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, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { BadRequestException, ForbiddenException, InternalServerErrorException, MethodNotAllowedException, NotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
|
|
5
4
|
import { ResourceGroupsServiceException as __BaseException } from "../models/ResourceGroupsServiceException";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
33
|
-
}); };
|
|
34
|
-
export var serializeAws_restJson1DeleteGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
35
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
36
|
-
return __generator(this, function (_c) {
|
|
37
|
-
switch (_c.label) {
|
|
38
|
-
case 0: return [4, context.endpoint()];
|
|
39
|
-
case 1:
|
|
40
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
41
|
-
headers = {
|
|
42
|
-
"content-type": "application/json",
|
|
43
|
-
};
|
|
44
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/delete-group";
|
|
45
|
-
body = JSON.stringify(__assign(__assign({}, (input.Group != null && { Group: input.Group })), (input.GroupName != null && { GroupName: input.GroupName })));
|
|
46
|
-
return [2, new __HttpRequest({
|
|
47
|
-
protocol: protocol,
|
|
48
|
-
hostname: hostname,
|
|
49
|
-
port: port,
|
|
50
|
-
method: "POST",
|
|
51
|
-
headers: headers,
|
|
52
|
-
path: resolvedPath,
|
|
53
|
-
body: body,
|
|
54
|
-
})];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}); };
|
|
58
|
-
export var serializeAws_restJson1GetGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
60
|
-
return __generator(this, function (_c) {
|
|
61
|
-
switch (_c.label) {
|
|
62
|
-
case 0: return [4, context.endpoint()];
|
|
63
|
-
case 1:
|
|
64
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
65
|
-
headers = {
|
|
66
|
-
"content-type": "application/json",
|
|
67
|
-
};
|
|
68
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-group";
|
|
69
|
-
body = JSON.stringify(__assign(__assign({}, (input.Group != null && { Group: input.Group })), (input.GroupName != null && { GroupName: input.GroupName })));
|
|
70
|
-
return [2, new __HttpRequest({
|
|
71
|
-
protocol: protocol,
|
|
72
|
-
hostname: hostname,
|
|
73
|
-
port: port,
|
|
74
|
-
method: "POST",
|
|
75
|
-
headers: headers,
|
|
76
|
-
path: resolvedPath,
|
|
77
|
-
body: body,
|
|
78
|
-
})];
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}); };
|
|
82
|
-
export var serializeAws_restJson1GetGroupConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
83
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
84
|
-
return __generator(this, function (_c) {
|
|
85
|
-
switch (_c.label) {
|
|
86
|
-
case 0: return [4, context.endpoint()];
|
|
87
|
-
case 1:
|
|
88
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
89
|
-
headers = {
|
|
90
|
-
"content-type": "application/json",
|
|
91
|
-
};
|
|
92
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-group-configuration";
|
|
93
|
-
body = JSON.stringify(__assign({}, (input.Group != null && { Group: input.Group })));
|
|
94
|
-
return [2, new __HttpRequest({
|
|
95
|
-
protocol: protocol,
|
|
96
|
-
hostname: hostname,
|
|
97
|
-
port: port,
|
|
98
|
-
method: "POST",
|
|
99
|
-
headers: headers,
|
|
100
|
-
path: resolvedPath,
|
|
101
|
-
body: body,
|
|
102
|
-
})];
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}); };
|
|
106
|
-
export var serializeAws_restJson1GetGroupQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
107
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
108
|
-
return __generator(this, function (_c) {
|
|
109
|
-
switch (_c.label) {
|
|
110
|
-
case 0: return [4, context.endpoint()];
|
|
111
|
-
case 1:
|
|
112
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
113
|
-
headers = {
|
|
114
|
-
"content-type": "application/json",
|
|
115
|
-
};
|
|
116
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-group-query";
|
|
117
|
-
body = JSON.stringify(__assign(__assign({}, (input.Group != null && { Group: input.Group })), (input.GroupName != null && { GroupName: input.GroupName })));
|
|
118
|
-
return [2, new __HttpRequest({
|
|
119
|
-
protocol: protocol,
|
|
120
|
-
hostname: hostname,
|
|
121
|
-
port: port,
|
|
122
|
-
method: "POST",
|
|
123
|
-
headers: headers,
|
|
124
|
-
path: resolvedPath,
|
|
125
|
-
body: body,
|
|
126
|
-
})];
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}); };
|
|
130
|
-
export var serializeAws_restJson1GetTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
131
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
132
|
-
return __generator(this, function (_c) {
|
|
133
|
-
switch (_c.label) {
|
|
134
|
-
case 0: return [4, context.endpoint()];
|
|
135
|
-
case 1:
|
|
136
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
137
|
-
headers = {};
|
|
138
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/resources/{Arn}/tags";
|
|
139
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "Arn", function () { return input.Arn; }, "{Arn}", false);
|
|
140
|
-
return [2, new __HttpRequest({
|
|
141
|
-
protocol: protocol,
|
|
142
|
-
hostname: hostname,
|
|
143
|
-
port: port,
|
|
144
|
-
method: "GET",
|
|
145
|
-
headers: headers,
|
|
146
|
-
path: resolvedPath,
|
|
147
|
-
body: body,
|
|
148
|
-
})];
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}); };
|
|
152
|
-
export var serializeAws_restJson1GroupResourcesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
153
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
154
|
-
return __generator(this, function (_c) {
|
|
155
|
-
switch (_c.label) {
|
|
156
|
-
case 0: return [4, context.endpoint()];
|
|
157
|
-
case 1:
|
|
158
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
159
|
-
headers = {
|
|
160
|
-
"content-type": "application/json",
|
|
161
|
-
};
|
|
162
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/group-resources";
|
|
163
|
-
body = JSON.stringify(__assign(__assign({}, (input.Group != null && { Group: input.Group })), (input.ResourceArns != null && {
|
|
164
|
-
ResourceArns: serializeAws_restJson1ResourceArnList(input.ResourceArns, context),
|
|
165
|
-
})));
|
|
166
|
-
return [2, new __HttpRequest({
|
|
167
|
-
protocol: protocol,
|
|
168
|
-
hostname: hostname,
|
|
169
|
-
port: port,
|
|
170
|
-
method: "POST",
|
|
171
|
-
headers: headers,
|
|
172
|
-
path: resolvedPath,
|
|
173
|
-
body: body,
|
|
174
|
-
})];
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}); };
|
|
178
|
-
export var serializeAws_restJson1ListGroupResourcesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
179
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
180
|
-
return __generator(this, function (_c) {
|
|
181
|
-
switch (_c.label) {
|
|
182
|
-
case 0: return [4, context.endpoint()];
|
|
183
|
-
case 1:
|
|
184
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
185
|
-
headers = {
|
|
186
|
-
"content-type": "application/json",
|
|
187
|
-
};
|
|
188
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-group-resources";
|
|
189
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.Filters != null && { Filters: serializeAws_restJson1ResourceFilterList(input.Filters, context) })), (input.Group != null && { Group: input.Group })), (input.GroupName != null && { GroupName: input.GroupName })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })));
|
|
190
|
-
return [2, new __HttpRequest({
|
|
191
|
-
protocol: protocol,
|
|
192
|
-
hostname: hostname,
|
|
193
|
-
port: port,
|
|
194
|
-
method: "POST",
|
|
195
|
-
headers: headers,
|
|
196
|
-
path: resolvedPath,
|
|
197
|
-
body: body,
|
|
198
|
-
})];
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
}); };
|
|
202
|
-
export var serializeAws_restJson1ListGroupsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
203
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
204
|
-
return __generator(this, function (_c) {
|
|
205
|
-
switch (_c.label) {
|
|
206
|
-
case 0: return [4, context.endpoint()];
|
|
207
|
-
case 1:
|
|
208
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
209
|
-
headers = {
|
|
210
|
-
"content-type": "application/json",
|
|
211
|
-
};
|
|
212
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/groups-list";
|
|
213
|
-
query = map({
|
|
214
|
-
maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
215
|
-
nextToken: [, input.NextToken],
|
|
216
|
-
});
|
|
217
|
-
body = JSON.stringify(__assign({}, (input.Filters != null && { Filters: serializeAws_restJson1GroupFilterList(input.Filters, context) })));
|
|
218
|
-
return [2, new __HttpRequest({
|
|
219
|
-
protocol: protocol,
|
|
220
|
-
hostname: hostname,
|
|
221
|
-
port: port,
|
|
222
|
-
method: "POST",
|
|
223
|
-
headers: headers,
|
|
224
|
-
path: resolvedPath,
|
|
225
|
-
query: query,
|
|
226
|
-
body: body,
|
|
227
|
-
})];
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
}); };
|
|
231
|
-
export var serializeAws_restJson1PutGroupConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
232
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
233
|
-
return __generator(this, function (_c) {
|
|
234
|
-
switch (_c.label) {
|
|
235
|
-
case 0: return [4, context.endpoint()];
|
|
236
|
-
case 1:
|
|
237
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
238
|
-
headers = {
|
|
239
|
-
"content-type": "application/json",
|
|
240
|
-
};
|
|
241
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/put-group-configuration";
|
|
242
|
-
body = JSON.stringify(__assign(__assign({}, (input.Configuration != null && {
|
|
243
|
-
Configuration: serializeAws_restJson1GroupConfigurationList(input.Configuration, context),
|
|
244
|
-
})), (input.Group != null && { Group: input.Group })));
|
|
245
|
-
return [2, new __HttpRequest({
|
|
246
|
-
protocol: protocol,
|
|
247
|
-
hostname: hostname,
|
|
248
|
-
port: port,
|
|
249
|
-
method: "POST",
|
|
250
|
-
headers: headers,
|
|
251
|
-
path: resolvedPath,
|
|
252
|
-
body: body,
|
|
253
|
-
})];
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
}); };
|
|
257
|
-
export var serializeAws_restJson1SearchResourcesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
258
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
259
|
-
return __generator(this, function (_c) {
|
|
260
|
-
switch (_c.label) {
|
|
261
|
-
case 0: return [4, context.endpoint()];
|
|
262
|
-
case 1:
|
|
263
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
264
|
-
headers = {
|
|
265
|
-
"content-type": "application/json",
|
|
266
|
-
};
|
|
267
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/resources/search";
|
|
268
|
-
body = JSON.stringify(__assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceQuery != null && {
|
|
269
|
-
ResourceQuery: serializeAws_restJson1ResourceQuery(input.ResourceQuery, context),
|
|
270
|
-
})));
|
|
271
|
-
return [2, new __HttpRequest({
|
|
272
|
-
protocol: protocol,
|
|
273
|
-
hostname: hostname,
|
|
274
|
-
port: port,
|
|
275
|
-
method: "POST",
|
|
276
|
-
headers: headers,
|
|
277
|
-
path: resolvedPath,
|
|
278
|
-
body: body,
|
|
279
|
-
})];
|
|
280
|
-
}
|
|
5
|
+
export const serializeAws_restJson1CreateGroupCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.Configuration != null && {
|
|
14
|
+
Configuration: serializeAws_restJson1GroupConfigurationList(input.Configuration, context),
|
|
15
|
+
}),
|
|
16
|
+
...(input.Description != null && { Description: input.Description }),
|
|
17
|
+
...(input.Name != null && { Name: input.Name }),
|
|
18
|
+
...(input.ResourceQuery != null && {
|
|
19
|
+
ResourceQuery: serializeAws_restJson1ResourceQuery(input.ResourceQuery, context),
|
|
20
|
+
}),
|
|
21
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
22
|
+
});
|
|
23
|
+
return new __HttpRequest({
|
|
24
|
+
protocol,
|
|
25
|
+
hostname,
|
|
26
|
+
port,
|
|
27
|
+
method: "POST",
|
|
28
|
+
headers,
|
|
29
|
+
path: resolvedPath,
|
|
30
|
+
body,
|
|
281
31
|
});
|
|
282
|
-
}
|
|
283
|
-
export
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
path: resolvedPath,
|
|
303
|
-
body: body,
|
|
304
|
-
})];
|
|
305
|
-
}
|
|
32
|
+
};
|
|
33
|
+
export const serializeAws_restJson1DeleteGroupCommand = async (input, context) => {
|
|
34
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
35
|
+
const headers = {
|
|
36
|
+
"content-type": "application/json",
|
|
37
|
+
};
|
|
38
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-group";
|
|
39
|
+
let body;
|
|
40
|
+
body = JSON.stringify({
|
|
41
|
+
...(input.Group != null && { Group: input.Group }),
|
|
42
|
+
...(input.GroupName != null && { GroupName: input.GroupName }),
|
|
43
|
+
});
|
|
44
|
+
return new __HttpRequest({
|
|
45
|
+
protocol,
|
|
46
|
+
hostname,
|
|
47
|
+
port,
|
|
48
|
+
method: "POST",
|
|
49
|
+
headers,
|
|
50
|
+
path: resolvedPath,
|
|
51
|
+
body,
|
|
306
52
|
});
|
|
307
|
-
}
|
|
308
|
-
export
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
headers: headers,
|
|
328
|
-
path: resolvedPath,
|
|
329
|
-
body: body,
|
|
330
|
-
})];
|
|
331
|
-
}
|
|
53
|
+
};
|
|
54
|
+
export const serializeAws_restJson1GetGroupCommand = async (input, context) => {
|
|
55
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
56
|
+
const headers = {
|
|
57
|
+
"content-type": "application/json",
|
|
58
|
+
};
|
|
59
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group";
|
|
60
|
+
let body;
|
|
61
|
+
body = JSON.stringify({
|
|
62
|
+
...(input.Group != null && { Group: input.Group }),
|
|
63
|
+
...(input.GroupName != null && { GroupName: input.GroupName }),
|
|
64
|
+
});
|
|
65
|
+
return new __HttpRequest({
|
|
66
|
+
protocol,
|
|
67
|
+
hostname,
|
|
68
|
+
port,
|
|
69
|
+
method: "POST",
|
|
70
|
+
headers,
|
|
71
|
+
path: resolvedPath,
|
|
72
|
+
body,
|
|
332
73
|
});
|
|
333
|
-
}
|
|
334
|
-
export
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
headers: headers,
|
|
353
|
-
path: resolvedPath,
|
|
354
|
-
body: body,
|
|
355
|
-
})];
|
|
356
|
-
}
|
|
74
|
+
};
|
|
75
|
+
export const serializeAws_restJson1GetGroupConfigurationCommand = async (input, context) => {
|
|
76
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
77
|
+
const headers = {
|
|
78
|
+
"content-type": "application/json",
|
|
79
|
+
};
|
|
80
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-configuration";
|
|
81
|
+
let body;
|
|
82
|
+
body = JSON.stringify({
|
|
83
|
+
...(input.Group != null && { Group: input.Group }),
|
|
84
|
+
});
|
|
85
|
+
return new __HttpRequest({
|
|
86
|
+
protocol,
|
|
87
|
+
hostname,
|
|
88
|
+
port,
|
|
89
|
+
method: "POST",
|
|
90
|
+
headers,
|
|
91
|
+
path: resolvedPath,
|
|
92
|
+
body,
|
|
357
93
|
});
|
|
358
|
-
}
|
|
359
|
-
export
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
body: body,
|
|
379
|
-
})];
|
|
380
|
-
}
|
|
94
|
+
};
|
|
95
|
+
export const serializeAws_restJson1GetGroupQueryCommand = async (input, context) => {
|
|
96
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
97
|
+
const headers = {
|
|
98
|
+
"content-type": "application/json",
|
|
99
|
+
};
|
|
100
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-query";
|
|
101
|
+
let body;
|
|
102
|
+
body = JSON.stringify({
|
|
103
|
+
...(input.Group != null && { Group: input.Group }),
|
|
104
|
+
...(input.GroupName != null && { GroupName: input.GroupName }),
|
|
105
|
+
});
|
|
106
|
+
return new __HttpRequest({
|
|
107
|
+
protocol,
|
|
108
|
+
hostname,
|
|
109
|
+
port,
|
|
110
|
+
method: "POST",
|
|
111
|
+
headers,
|
|
112
|
+
path: resolvedPath,
|
|
113
|
+
body,
|
|
381
114
|
});
|
|
382
|
-
}
|
|
383
|
-
export
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
return [2, new __HttpRequest({
|
|
398
|
-
protocol: protocol,
|
|
399
|
-
hostname: hostname,
|
|
400
|
-
port: port,
|
|
401
|
-
method: "POST",
|
|
402
|
-
headers: headers,
|
|
403
|
-
path: resolvedPath,
|
|
404
|
-
body: body,
|
|
405
|
-
})];
|
|
406
|
-
}
|
|
115
|
+
};
|
|
116
|
+
export const serializeAws_restJson1GetTagsCommand = async (input, context) => {
|
|
117
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
118
|
+
const headers = {};
|
|
119
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
|
|
120
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
|
|
121
|
+
let body;
|
|
122
|
+
return new __HttpRequest({
|
|
123
|
+
protocol,
|
|
124
|
+
hostname,
|
|
125
|
+
port,
|
|
126
|
+
method: "GET",
|
|
127
|
+
headers,
|
|
128
|
+
path: resolvedPath,
|
|
129
|
+
body,
|
|
407
130
|
});
|
|
408
|
-
}
|
|
409
|
-
export
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
if (data.ResourceQuery != null) {
|
|
432
|
-
contents.ResourceQuery = deserializeAws_restJson1ResourceQuery(data.ResourceQuery, context);
|
|
433
|
-
}
|
|
434
|
-
if (data.Tags != null) {
|
|
435
|
-
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
436
|
-
}
|
|
437
|
-
return [2, contents];
|
|
438
|
-
}
|
|
131
|
+
};
|
|
132
|
+
export const serializeAws_restJson1GroupResourcesCommand = async (input, context) => {
|
|
133
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
134
|
+
const headers = {
|
|
135
|
+
"content-type": "application/json",
|
|
136
|
+
};
|
|
137
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group-resources";
|
|
138
|
+
let body;
|
|
139
|
+
body = JSON.stringify({
|
|
140
|
+
...(input.Group != null && { Group: input.Group }),
|
|
141
|
+
...(input.ResourceArns != null && {
|
|
142
|
+
ResourceArns: serializeAws_restJson1ResourceArnList(input.ResourceArns, context),
|
|
143
|
+
}),
|
|
144
|
+
});
|
|
145
|
+
return new __HttpRequest({
|
|
146
|
+
protocol,
|
|
147
|
+
hostname,
|
|
148
|
+
port,
|
|
149
|
+
method: "POST",
|
|
150
|
+
headers,
|
|
151
|
+
path: resolvedPath,
|
|
152
|
+
body,
|
|
439
153
|
});
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
case "TooManyRequestsException": return [3, 10];
|
|
464
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException": return [3, 10];
|
|
465
|
-
}
|
|
466
|
-
return [3, 12];
|
|
467
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
468
|
-
case 3: throw _d.sent();
|
|
469
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
470
|
-
case 5: throw _d.sent();
|
|
471
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
472
|
-
case 7: throw _d.sent();
|
|
473
|
-
case 8: return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
474
|
-
case 9: throw _d.sent();
|
|
475
|
-
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
476
|
-
case 11: throw _d.sent();
|
|
477
|
-
case 12:
|
|
478
|
-
parsedBody = parsedOutput.body;
|
|
479
|
-
throwDefaultError({
|
|
480
|
-
output: output,
|
|
481
|
-
parsedBody: parsedBody,
|
|
482
|
-
exceptionCtor: __BaseException,
|
|
483
|
-
errorCode: errorCode,
|
|
484
|
-
});
|
|
485
|
-
_d.label = 13;
|
|
486
|
-
case 13: return [2];
|
|
487
|
-
}
|
|
154
|
+
};
|
|
155
|
+
export const serializeAws_restJson1ListGroupResourcesCommand = async (input, context) => {
|
|
156
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
157
|
+
const headers = {
|
|
158
|
+
"content-type": "application/json",
|
|
159
|
+
};
|
|
160
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-group-resources";
|
|
161
|
+
let body;
|
|
162
|
+
body = JSON.stringify({
|
|
163
|
+
...(input.Filters != null && { Filters: serializeAws_restJson1ResourceFilterList(input.Filters, context) }),
|
|
164
|
+
...(input.Group != null && { Group: input.Group }),
|
|
165
|
+
...(input.GroupName != null && { GroupName: input.GroupName }),
|
|
166
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
167
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
168
|
+
});
|
|
169
|
+
return new __HttpRequest({
|
|
170
|
+
protocol,
|
|
171
|
+
hostname,
|
|
172
|
+
port,
|
|
173
|
+
method: "POST",
|
|
174
|
+
headers,
|
|
175
|
+
path: resolvedPath,
|
|
176
|
+
body,
|
|
488
177
|
});
|
|
489
|
-
}
|
|
490
|
-
export
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
178
|
+
};
|
|
179
|
+
export const serializeAws_restJson1ListGroupsCommand = async (input, context) => {
|
|
180
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
181
|
+
const headers = {
|
|
182
|
+
"content-type": "application/json",
|
|
183
|
+
};
|
|
184
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups-list";
|
|
185
|
+
const query = map({
|
|
186
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
187
|
+
nextToken: [, input.NextToken],
|
|
188
|
+
});
|
|
189
|
+
let body;
|
|
190
|
+
body = JSON.stringify({
|
|
191
|
+
...(input.Filters != null && { Filters: serializeAws_restJson1GroupFilterList(input.Filters, context) }),
|
|
192
|
+
});
|
|
193
|
+
return new __HttpRequest({
|
|
194
|
+
protocol,
|
|
195
|
+
hostname,
|
|
196
|
+
port,
|
|
197
|
+
method: "POST",
|
|
198
|
+
headers,
|
|
199
|
+
path: resolvedPath,
|
|
200
|
+
query,
|
|
201
|
+
body,
|
|
511
202
|
});
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException": return [3, 8];
|
|
535
|
-
case "NotFoundException": return [3, 10];
|
|
536
|
-
case "com.amazonaws.resourcegroups#NotFoundException": return [3, 10];
|
|
537
|
-
case "TooManyRequestsException": return [3, 12];
|
|
538
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException": return [3, 12];
|
|
539
|
-
}
|
|
540
|
-
return [3, 14];
|
|
541
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
542
|
-
case 3: throw _d.sent();
|
|
543
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
544
|
-
case 5: throw _d.sent();
|
|
545
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
546
|
-
case 7: throw _d.sent();
|
|
547
|
-
case 8: return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
548
|
-
case 9: throw _d.sent();
|
|
549
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
550
|
-
case 11: throw _d.sent();
|
|
551
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
552
|
-
case 13: throw _d.sent();
|
|
553
|
-
case 14:
|
|
554
|
-
parsedBody = parsedOutput.body;
|
|
555
|
-
throwDefaultError({
|
|
556
|
-
output: output,
|
|
557
|
-
parsedBody: parsedBody,
|
|
558
|
-
exceptionCtor: __BaseException,
|
|
559
|
-
errorCode: errorCode,
|
|
560
|
-
});
|
|
561
|
-
_d.label = 15;
|
|
562
|
-
case 15: return [2];
|
|
563
|
-
}
|
|
203
|
+
};
|
|
204
|
+
export const serializeAws_restJson1PutGroupConfigurationCommand = async (input, context) => {
|
|
205
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
206
|
+
const headers = {
|
|
207
|
+
"content-type": "application/json",
|
|
208
|
+
};
|
|
209
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-group-configuration";
|
|
210
|
+
let body;
|
|
211
|
+
body = JSON.stringify({
|
|
212
|
+
...(input.Configuration != null && {
|
|
213
|
+
Configuration: serializeAws_restJson1GroupConfigurationList(input.Configuration, context),
|
|
214
|
+
}),
|
|
215
|
+
...(input.Group != null && { Group: input.Group }),
|
|
216
|
+
});
|
|
217
|
+
return new __HttpRequest({
|
|
218
|
+
protocol,
|
|
219
|
+
hostname,
|
|
220
|
+
port,
|
|
221
|
+
method: "POST",
|
|
222
|
+
headers,
|
|
223
|
+
path: resolvedPath,
|
|
224
|
+
body,
|
|
564
225
|
});
|
|
565
|
-
}
|
|
566
|
-
export
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
226
|
+
};
|
|
227
|
+
export const serializeAws_restJson1SearchResourcesCommand = async (input, context) => {
|
|
228
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
229
|
+
const headers = {
|
|
230
|
+
"content-type": "application/json",
|
|
231
|
+
};
|
|
232
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/search";
|
|
233
|
+
let body;
|
|
234
|
+
body = JSON.stringify({
|
|
235
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
236
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
237
|
+
...(input.ResourceQuery != null && {
|
|
238
|
+
ResourceQuery: serializeAws_restJson1ResourceQuery(input.ResourceQuery, context),
|
|
239
|
+
}),
|
|
240
|
+
});
|
|
241
|
+
return new __HttpRequest({
|
|
242
|
+
protocol,
|
|
243
|
+
hostname,
|
|
244
|
+
port,
|
|
245
|
+
method: "POST",
|
|
246
|
+
headers,
|
|
247
|
+
path: resolvedPath,
|
|
248
|
+
body,
|
|
587
249
|
});
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException": return [3, 6];
|
|
609
|
-
case "MethodNotAllowedException": return [3, 8];
|
|
610
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException": return [3, 8];
|
|
611
|
-
case "NotFoundException": return [3, 10];
|
|
612
|
-
case "com.amazonaws.resourcegroups#NotFoundException": return [3, 10];
|
|
613
|
-
case "TooManyRequestsException": return [3, 12];
|
|
614
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException": return [3, 12];
|
|
615
|
-
}
|
|
616
|
-
return [3, 14];
|
|
617
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
618
|
-
case 3: throw _d.sent();
|
|
619
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
620
|
-
case 5: throw _d.sent();
|
|
621
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
622
|
-
case 7: throw _d.sent();
|
|
623
|
-
case 8: return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
624
|
-
case 9: throw _d.sent();
|
|
625
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
626
|
-
case 11: throw _d.sent();
|
|
627
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
628
|
-
case 13: throw _d.sent();
|
|
629
|
-
case 14:
|
|
630
|
-
parsedBody = parsedOutput.body;
|
|
631
|
-
throwDefaultError({
|
|
632
|
-
output: output,
|
|
633
|
-
parsedBody: parsedBody,
|
|
634
|
-
exceptionCtor: __BaseException,
|
|
635
|
-
errorCode: errorCode,
|
|
636
|
-
});
|
|
637
|
-
_d.label = 15;
|
|
638
|
-
case 15: return [2];
|
|
639
|
-
}
|
|
250
|
+
};
|
|
251
|
+
export const serializeAws_restJson1TagCommand = async (input, context) => {
|
|
252
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
253
|
+
const headers = {
|
|
254
|
+
"content-type": "application/json",
|
|
255
|
+
};
|
|
256
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
|
|
257
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
|
|
258
|
+
let body;
|
|
259
|
+
body = JSON.stringify({
|
|
260
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
261
|
+
});
|
|
262
|
+
return new __HttpRequest({
|
|
263
|
+
protocol,
|
|
264
|
+
hostname,
|
|
265
|
+
port,
|
|
266
|
+
method: "PUT",
|
|
267
|
+
headers,
|
|
268
|
+
path: resolvedPath,
|
|
269
|
+
body,
|
|
640
270
|
});
|
|
641
|
-
}
|
|
642
|
-
export
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
271
|
+
};
|
|
272
|
+
export const serializeAws_restJson1UngroupResourcesCommand = async (input, context) => {
|
|
273
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
274
|
+
const headers = {
|
|
275
|
+
"content-type": "application/json",
|
|
276
|
+
};
|
|
277
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ungroup-resources";
|
|
278
|
+
let body;
|
|
279
|
+
body = JSON.stringify({
|
|
280
|
+
...(input.Group != null && { Group: input.Group }),
|
|
281
|
+
...(input.ResourceArns != null && {
|
|
282
|
+
ResourceArns: serializeAws_restJson1ResourceArnList(input.ResourceArns, context),
|
|
283
|
+
}),
|
|
284
|
+
});
|
|
285
|
+
return new __HttpRequest({
|
|
286
|
+
protocol,
|
|
287
|
+
hostname,
|
|
288
|
+
port,
|
|
289
|
+
method: "POST",
|
|
290
|
+
headers,
|
|
291
|
+
path: resolvedPath,
|
|
292
|
+
body,
|
|
663
293
|
});
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException": return [3, 6];
|
|
685
|
-
case "MethodNotAllowedException": return [3, 8];
|
|
686
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException": return [3, 8];
|
|
687
|
-
case "NotFoundException": return [3, 10];
|
|
688
|
-
case "com.amazonaws.resourcegroups#NotFoundException": return [3, 10];
|
|
689
|
-
case "TooManyRequestsException": return [3, 12];
|
|
690
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException": return [3, 12];
|
|
691
|
-
}
|
|
692
|
-
return [3, 14];
|
|
693
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
694
|
-
case 3: throw _d.sent();
|
|
695
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
696
|
-
case 5: throw _d.sent();
|
|
697
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
698
|
-
case 7: throw _d.sent();
|
|
699
|
-
case 8: return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
700
|
-
case 9: throw _d.sent();
|
|
701
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
702
|
-
case 11: throw _d.sent();
|
|
703
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
704
|
-
case 13: throw _d.sent();
|
|
705
|
-
case 14:
|
|
706
|
-
parsedBody = parsedOutput.body;
|
|
707
|
-
throwDefaultError({
|
|
708
|
-
output: output,
|
|
709
|
-
parsedBody: parsedBody,
|
|
710
|
-
exceptionCtor: __BaseException,
|
|
711
|
-
errorCode: errorCode,
|
|
712
|
-
});
|
|
713
|
-
_d.label = 15;
|
|
714
|
-
case 15: return [2];
|
|
715
|
-
}
|
|
294
|
+
};
|
|
295
|
+
export const serializeAws_restJson1UntagCommand = async (input, context) => {
|
|
296
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
297
|
+
const headers = {
|
|
298
|
+
"content-type": "application/json",
|
|
299
|
+
};
|
|
300
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
|
|
301
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
|
|
302
|
+
let body;
|
|
303
|
+
body = JSON.stringify({
|
|
304
|
+
...(input.Keys != null && { Keys: serializeAws_restJson1TagKeyList(input.Keys, context) }),
|
|
305
|
+
});
|
|
306
|
+
return new __HttpRequest({
|
|
307
|
+
protocol,
|
|
308
|
+
hostname,
|
|
309
|
+
port,
|
|
310
|
+
method: "PATCH",
|
|
311
|
+
headers,
|
|
312
|
+
path: resolvedPath,
|
|
313
|
+
body,
|
|
716
314
|
});
|
|
717
|
-
}
|
|
718
|
-
export
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
}
|
|
315
|
+
};
|
|
316
|
+
export const serializeAws_restJson1UpdateGroupCommand = async (input, context) => {
|
|
317
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
318
|
+
const headers = {
|
|
319
|
+
"content-type": "application/json",
|
|
320
|
+
};
|
|
321
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group";
|
|
322
|
+
let body;
|
|
323
|
+
body = JSON.stringify({
|
|
324
|
+
...(input.Description != null && { Description: input.Description }),
|
|
325
|
+
...(input.Group != null && { Group: input.Group }),
|
|
326
|
+
...(input.GroupName != null && { GroupName: input.GroupName }),
|
|
327
|
+
});
|
|
328
|
+
return new __HttpRequest({
|
|
329
|
+
protocol,
|
|
330
|
+
hostname,
|
|
331
|
+
port,
|
|
332
|
+
method: "POST",
|
|
333
|
+
headers,
|
|
334
|
+
path: resolvedPath,
|
|
335
|
+
body,
|
|
739
336
|
});
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
case "NotFoundException": return [3, 10];
|
|
764
|
-
case "com.amazonaws.resourcegroups#NotFoundException": return [3, 10];
|
|
765
|
-
case "TooManyRequestsException": return [3, 12];
|
|
766
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException": return [3, 12];
|
|
767
|
-
}
|
|
768
|
-
return [3, 14];
|
|
769
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
770
|
-
case 3: throw _d.sent();
|
|
771
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
772
|
-
case 5: throw _d.sent();
|
|
773
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
774
|
-
case 7: throw _d.sent();
|
|
775
|
-
case 8: return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
776
|
-
case 9: throw _d.sent();
|
|
777
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
778
|
-
case 11: throw _d.sent();
|
|
779
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
780
|
-
case 13: throw _d.sent();
|
|
781
|
-
case 14:
|
|
782
|
-
parsedBody = parsedOutput.body;
|
|
783
|
-
throwDefaultError({
|
|
784
|
-
output: output,
|
|
785
|
-
parsedBody: parsedBody,
|
|
786
|
-
exceptionCtor: __BaseException,
|
|
787
|
-
errorCode: errorCode,
|
|
788
|
-
});
|
|
789
|
-
_d.label = 15;
|
|
790
|
-
case 15: return [2];
|
|
791
|
-
}
|
|
337
|
+
};
|
|
338
|
+
export const serializeAws_restJson1UpdateGroupQueryCommand = async (input, context) => {
|
|
339
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
340
|
+
const headers = {
|
|
341
|
+
"content-type": "application/json",
|
|
342
|
+
};
|
|
343
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group-query";
|
|
344
|
+
let body;
|
|
345
|
+
body = JSON.stringify({
|
|
346
|
+
...(input.Group != null && { Group: input.Group }),
|
|
347
|
+
...(input.GroupName != null && { GroupName: input.GroupName }),
|
|
348
|
+
...(input.ResourceQuery != null && {
|
|
349
|
+
ResourceQuery: serializeAws_restJson1ResourceQuery(input.ResourceQuery, context),
|
|
350
|
+
}),
|
|
351
|
+
});
|
|
352
|
+
return new __HttpRequest({
|
|
353
|
+
protocol,
|
|
354
|
+
hostname,
|
|
355
|
+
port,
|
|
356
|
+
method: "POST",
|
|
357
|
+
headers,
|
|
358
|
+
path: resolvedPath,
|
|
359
|
+
body,
|
|
792
360
|
});
|
|
793
|
-
}
|
|
794
|
-
export
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
return [2, deserializeAws_restJson1GetTagsCommandError(output, context)];
|
|
801
|
-
}
|
|
802
|
-
contents = map({
|
|
803
|
-
$metadata: deserializeMetadata(output),
|
|
804
|
-
});
|
|
805
|
-
_a = __expectNonNull;
|
|
806
|
-
_b = __expectObject;
|
|
807
|
-
return [4, parseBody(output.body, context)];
|
|
808
|
-
case 1:
|
|
809
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
810
|
-
if (data.Arn != null) {
|
|
811
|
-
contents.Arn = __expectString(data.Arn);
|
|
812
|
-
}
|
|
813
|
-
if (data.Tags != null) {
|
|
814
|
-
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
815
|
-
}
|
|
816
|
-
return [2, contents];
|
|
817
|
-
}
|
|
361
|
+
};
|
|
362
|
+
export const deserializeAws_restJson1CreateGroupCommand = async (output, context) => {
|
|
363
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
364
|
+
return deserializeAws_restJson1CreateGroupCommandError(output, context);
|
|
365
|
+
}
|
|
366
|
+
const contents = map({
|
|
367
|
+
$metadata: deserializeMetadata(output),
|
|
818
368
|
});
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
369
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
370
|
+
if (data.Group != null) {
|
|
371
|
+
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
372
|
+
}
|
|
373
|
+
if (data.GroupConfiguration != null) {
|
|
374
|
+
contents.GroupConfiguration = deserializeAws_restJson1GroupConfiguration(data.GroupConfiguration, context);
|
|
375
|
+
}
|
|
376
|
+
if (data.ResourceQuery != null) {
|
|
377
|
+
contents.ResourceQuery = deserializeAws_restJson1ResourceQuery(data.ResourceQuery, context);
|
|
378
|
+
}
|
|
379
|
+
if (data.Tags != null) {
|
|
380
|
+
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
381
|
+
}
|
|
382
|
+
return contents;
|
|
383
|
+
};
|
|
384
|
+
const deserializeAws_restJson1CreateGroupCommandError = async (output, context) => {
|
|
385
|
+
const parsedOutput = {
|
|
386
|
+
...output,
|
|
387
|
+
body: await parseErrorBody(output.body, context),
|
|
388
|
+
};
|
|
389
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
390
|
+
switch (errorCode) {
|
|
391
|
+
case "BadRequestException":
|
|
392
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
393
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
394
|
+
case "ForbiddenException":
|
|
395
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
396
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
397
|
+
case "InternalServerErrorException":
|
|
398
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
399
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
400
|
+
case "MethodNotAllowedException":
|
|
401
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
402
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
403
|
+
case "TooManyRequestsException":
|
|
404
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
405
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
406
|
+
default:
|
|
407
|
+
const parsedBody = parsedOutput.body;
|
|
408
|
+
throwDefaultError({
|
|
409
|
+
output,
|
|
410
|
+
parsedBody,
|
|
411
|
+
exceptionCtor: __BaseException,
|
|
412
|
+
errorCode,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
export const deserializeAws_restJson1DeleteGroupCommand = async (output, context) => {
|
|
417
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
418
|
+
return deserializeAws_restJson1DeleteGroupCommandError(output, context);
|
|
419
|
+
}
|
|
420
|
+
const contents = map({
|
|
421
|
+
$metadata: deserializeMetadata(output),
|
|
871
422
|
});
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
423
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
424
|
+
if (data.Group != null) {
|
|
425
|
+
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
426
|
+
}
|
|
427
|
+
return contents;
|
|
428
|
+
};
|
|
429
|
+
const deserializeAws_restJson1DeleteGroupCommandError = async (output, context) => {
|
|
430
|
+
const parsedOutput = {
|
|
431
|
+
...output,
|
|
432
|
+
body: await parseErrorBody(output.body, context),
|
|
433
|
+
};
|
|
434
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
435
|
+
switch (errorCode) {
|
|
436
|
+
case "BadRequestException":
|
|
437
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
438
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
439
|
+
case "ForbiddenException":
|
|
440
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
441
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
442
|
+
case "InternalServerErrorException":
|
|
443
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
444
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
445
|
+
case "MethodNotAllowedException":
|
|
446
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
447
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
448
|
+
case "NotFoundException":
|
|
449
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
450
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
451
|
+
case "TooManyRequestsException":
|
|
452
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
453
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
454
|
+
default:
|
|
455
|
+
const parsedBody = parsedOutput.body;
|
|
456
|
+
throwDefaultError({
|
|
457
|
+
output,
|
|
458
|
+
parsedBody,
|
|
459
|
+
exceptionCtor: __BaseException,
|
|
460
|
+
errorCode,
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
export const deserializeAws_restJson1GetGroupCommand = async (output, context) => {
|
|
465
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
466
|
+
return deserializeAws_restJson1GetGroupCommandError(output, context);
|
|
467
|
+
}
|
|
468
|
+
const contents = map({
|
|
469
|
+
$metadata: deserializeMetadata(output),
|
|
900
470
|
});
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
return
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
errorCode: errorCode,
|
|
949
|
-
});
|
|
950
|
-
_d.label = 15;
|
|
951
|
-
case 15: return [2];
|
|
952
|
-
}
|
|
471
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
472
|
+
if (data.Group != null) {
|
|
473
|
+
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
474
|
+
}
|
|
475
|
+
return contents;
|
|
476
|
+
};
|
|
477
|
+
const deserializeAws_restJson1GetGroupCommandError = async (output, context) => {
|
|
478
|
+
const parsedOutput = {
|
|
479
|
+
...output,
|
|
480
|
+
body: await parseErrorBody(output.body, context),
|
|
481
|
+
};
|
|
482
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
483
|
+
switch (errorCode) {
|
|
484
|
+
case "BadRequestException":
|
|
485
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
486
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
487
|
+
case "ForbiddenException":
|
|
488
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
489
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
490
|
+
case "InternalServerErrorException":
|
|
491
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
492
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
493
|
+
case "MethodNotAllowedException":
|
|
494
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
495
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
496
|
+
case "NotFoundException":
|
|
497
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
498
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
499
|
+
case "TooManyRequestsException":
|
|
500
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
501
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
502
|
+
default:
|
|
503
|
+
const parsedBody = parsedOutput.body;
|
|
504
|
+
throwDefaultError({
|
|
505
|
+
output,
|
|
506
|
+
parsedBody,
|
|
507
|
+
exceptionCtor: __BaseException,
|
|
508
|
+
errorCode,
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
export const deserializeAws_restJson1GetGroupConfigurationCommand = async (output, context) => {
|
|
513
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
514
|
+
return deserializeAws_restJson1GetGroupConfigurationCommandError(output, context);
|
|
515
|
+
}
|
|
516
|
+
const contents = map({
|
|
517
|
+
$metadata: deserializeMetadata(output),
|
|
953
518
|
});
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
519
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
520
|
+
if (data.GroupConfiguration != null) {
|
|
521
|
+
contents.GroupConfiguration = deserializeAws_restJson1GroupConfiguration(data.GroupConfiguration, context);
|
|
522
|
+
}
|
|
523
|
+
return contents;
|
|
524
|
+
};
|
|
525
|
+
const deserializeAws_restJson1GetGroupConfigurationCommandError = async (output, context) => {
|
|
526
|
+
const parsedOutput = {
|
|
527
|
+
...output,
|
|
528
|
+
body: await parseErrorBody(output.body, context),
|
|
529
|
+
};
|
|
530
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
531
|
+
switch (errorCode) {
|
|
532
|
+
case "BadRequestException":
|
|
533
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
534
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
535
|
+
case "ForbiddenException":
|
|
536
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
537
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
538
|
+
case "InternalServerErrorException":
|
|
539
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
540
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
541
|
+
case "MethodNotAllowedException":
|
|
542
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
543
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
544
|
+
case "NotFoundException":
|
|
545
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
546
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
547
|
+
case "TooManyRequestsException":
|
|
548
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
549
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
550
|
+
default:
|
|
551
|
+
const parsedBody = parsedOutput.body;
|
|
552
|
+
throwDefaultError({
|
|
553
|
+
output,
|
|
554
|
+
parsedBody,
|
|
555
|
+
exceptionCtor: __BaseException,
|
|
556
|
+
errorCode,
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
export const deserializeAws_restJson1GetGroupQueryCommand = async (output, context) => {
|
|
561
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
562
|
+
return deserializeAws_restJson1GetGroupQueryCommandError(output, context);
|
|
563
|
+
}
|
|
564
|
+
const contents = map({
|
|
565
|
+
$metadata: deserializeMetadata(output),
|
|
985
566
|
});
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
return
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
throwDefaultError({
|
|
1034
|
-
output: output,
|
|
1035
|
-
parsedBody: parsedBody,
|
|
1036
|
-
exceptionCtor: __BaseException,
|
|
1037
|
-
errorCode: errorCode,
|
|
1038
|
-
});
|
|
1039
|
-
_d.label = 17;
|
|
1040
|
-
case 17: return [2];
|
|
1041
|
-
}
|
|
567
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
568
|
+
if (data.GroupQuery != null) {
|
|
569
|
+
contents.GroupQuery = deserializeAws_restJson1GroupQuery(data.GroupQuery, context);
|
|
570
|
+
}
|
|
571
|
+
return contents;
|
|
572
|
+
};
|
|
573
|
+
const deserializeAws_restJson1GetGroupQueryCommandError = async (output, context) => {
|
|
574
|
+
const parsedOutput = {
|
|
575
|
+
...output,
|
|
576
|
+
body: await parseErrorBody(output.body, context),
|
|
577
|
+
};
|
|
578
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
579
|
+
switch (errorCode) {
|
|
580
|
+
case "BadRequestException":
|
|
581
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
582
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
583
|
+
case "ForbiddenException":
|
|
584
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
585
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
586
|
+
case "InternalServerErrorException":
|
|
587
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
588
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
589
|
+
case "MethodNotAllowedException":
|
|
590
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
591
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
592
|
+
case "NotFoundException":
|
|
593
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
594
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
595
|
+
case "TooManyRequestsException":
|
|
596
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
597
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
598
|
+
default:
|
|
599
|
+
const parsedBody = parsedOutput.body;
|
|
600
|
+
throwDefaultError({
|
|
601
|
+
output,
|
|
602
|
+
parsedBody,
|
|
603
|
+
exceptionCtor: __BaseException,
|
|
604
|
+
errorCode,
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
export const deserializeAws_restJson1GetTagsCommand = async (output, context) => {
|
|
609
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
610
|
+
return deserializeAws_restJson1GetTagsCommandError(output, context);
|
|
611
|
+
}
|
|
612
|
+
const contents = map({
|
|
613
|
+
$metadata: deserializeMetadata(output),
|
|
1042
614
|
});
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
615
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
616
|
+
if (data.Arn != null) {
|
|
617
|
+
contents.Arn = __expectString(data.Arn);
|
|
618
|
+
}
|
|
619
|
+
if (data.Tags != null) {
|
|
620
|
+
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
621
|
+
}
|
|
622
|
+
return contents;
|
|
623
|
+
};
|
|
624
|
+
const deserializeAws_restJson1GetTagsCommandError = async (output, context) => {
|
|
625
|
+
const parsedOutput = {
|
|
626
|
+
...output,
|
|
627
|
+
body: await parseErrorBody(output.body, context),
|
|
628
|
+
};
|
|
629
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
630
|
+
switch (errorCode) {
|
|
631
|
+
case "BadRequestException":
|
|
632
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
633
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
634
|
+
case "ForbiddenException":
|
|
635
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
636
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
637
|
+
case "InternalServerErrorException":
|
|
638
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
639
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
640
|
+
case "MethodNotAllowedException":
|
|
641
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
642
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
643
|
+
case "NotFoundException":
|
|
644
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
645
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
646
|
+
case "TooManyRequestsException":
|
|
647
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
648
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
649
|
+
default:
|
|
650
|
+
const parsedBody = parsedOutput.body;
|
|
651
|
+
throwDefaultError({
|
|
652
|
+
output,
|
|
653
|
+
parsedBody,
|
|
654
|
+
exceptionCtor: __BaseException,
|
|
655
|
+
errorCode,
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
export const deserializeAws_restJson1GroupResourcesCommand = async (output, context) => {
|
|
660
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
661
|
+
return deserializeAws_restJson1GroupResourcesCommandError(output, context);
|
|
662
|
+
}
|
|
663
|
+
const contents = map({
|
|
664
|
+
$metadata: deserializeMetadata(output),
|
|
1071
665
|
});
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
666
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
667
|
+
if (data.Failed != null) {
|
|
668
|
+
contents.Failed = deserializeAws_restJson1FailedResourceList(data.Failed, context);
|
|
669
|
+
}
|
|
670
|
+
if (data.Pending != null) {
|
|
671
|
+
contents.Pending = deserializeAws_restJson1PendingResourceList(data.Pending, context);
|
|
672
|
+
}
|
|
673
|
+
if (data.Succeeded != null) {
|
|
674
|
+
contents.Succeeded = deserializeAws_restJson1ResourceArnList(data.Succeeded, context);
|
|
675
|
+
}
|
|
676
|
+
return contents;
|
|
677
|
+
};
|
|
678
|
+
const deserializeAws_restJson1GroupResourcesCommandError = async (output, context) => {
|
|
679
|
+
const parsedOutput = {
|
|
680
|
+
...output,
|
|
681
|
+
body: await parseErrorBody(output.body, context),
|
|
682
|
+
};
|
|
683
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
684
|
+
switch (errorCode) {
|
|
685
|
+
case "BadRequestException":
|
|
686
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
687
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
688
|
+
case "ForbiddenException":
|
|
689
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
690
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
691
|
+
case "InternalServerErrorException":
|
|
692
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
693
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
694
|
+
case "MethodNotAllowedException":
|
|
695
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
696
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
697
|
+
case "NotFoundException":
|
|
698
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
699
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
700
|
+
case "TooManyRequestsException":
|
|
701
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
702
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
703
|
+
default:
|
|
704
|
+
const parsedBody = parsedOutput.body;
|
|
705
|
+
throwDefaultError({
|
|
706
|
+
output,
|
|
707
|
+
parsedBody,
|
|
708
|
+
exceptionCtor: __BaseException,
|
|
709
|
+
errorCode,
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
export const deserializeAws_restJson1ListGroupResourcesCommand = async (output, context) => {
|
|
714
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
715
|
+
return deserializeAws_restJson1ListGroupResourcesCommandError(output, context);
|
|
716
|
+
}
|
|
717
|
+
const contents = map({
|
|
718
|
+
$metadata: deserializeMetadata(output),
|
|
1120
719
|
});
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
720
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
721
|
+
if (data.NextToken != null) {
|
|
722
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
723
|
+
}
|
|
724
|
+
if (data.QueryErrors != null) {
|
|
725
|
+
contents.QueryErrors = deserializeAws_restJson1QueryErrorList(data.QueryErrors, context);
|
|
726
|
+
}
|
|
727
|
+
if (data.ResourceIdentifiers != null) {
|
|
728
|
+
contents.ResourceIdentifiers = deserializeAws_restJson1ResourceIdentifierList(data.ResourceIdentifiers, context);
|
|
729
|
+
}
|
|
730
|
+
if (data.Resources != null) {
|
|
731
|
+
contents.Resources = deserializeAws_restJson1ListGroupResourcesItemList(data.Resources, context);
|
|
732
|
+
}
|
|
733
|
+
return contents;
|
|
734
|
+
};
|
|
735
|
+
const deserializeAws_restJson1ListGroupResourcesCommandError = async (output, context) => {
|
|
736
|
+
const parsedOutput = {
|
|
737
|
+
...output,
|
|
738
|
+
body: await parseErrorBody(output.body, context),
|
|
739
|
+
};
|
|
740
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
741
|
+
switch (errorCode) {
|
|
742
|
+
case "BadRequestException":
|
|
743
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
744
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
745
|
+
case "ForbiddenException":
|
|
746
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
747
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
748
|
+
case "InternalServerErrorException":
|
|
749
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
750
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
751
|
+
case "MethodNotAllowedException":
|
|
752
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
753
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
754
|
+
case "NotFoundException":
|
|
755
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
756
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
757
|
+
case "TooManyRequestsException":
|
|
758
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
759
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
760
|
+
case "UnauthorizedException":
|
|
761
|
+
case "com.amazonaws.resourcegroups#UnauthorizedException":
|
|
762
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
763
|
+
default:
|
|
764
|
+
const parsedBody = parsedOutput.body;
|
|
765
|
+
throwDefaultError({
|
|
766
|
+
output,
|
|
767
|
+
parsedBody,
|
|
768
|
+
exceptionCtor: __BaseException,
|
|
769
|
+
errorCode,
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
export const deserializeAws_restJson1ListGroupsCommand = async (output, context) => {
|
|
774
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
775
|
+
return deserializeAws_restJson1ListGroupsCommandError(output, context);
|
|
776
|
+
}
|
|
777
|
+
const contents = map({
|
|
778
|
+
$metadata: deserializeMetadata(output),
|
|
1138
779
|
});
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
case 15: return [2];
|
|
1190
|
-
}
|
|
780
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
781
|
+
if (data.GroupIdentifiers != null) {
|
|
782
|
+
contents.GroupIdentifiers = deserializeAws_restJson1GroupIdentifierList(data.GroupIdentifiers, context);
|
|
783
|
+
}
|
|
784
|
+
if (data.Groups != null) {
|
|
785
|
+
contents.Groups = deserializeAws_restJson1GroupList(data.Groups, context);
|
|
786
|
+
}
|
|
787
|
+
if (data.NextToken != null) {
|
|
788
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
789
|
+
}
|
|
790
|
+
return contents;
|
|
791
|
+
};
|
|
792
|
+
const deserializeAws_restJson1ListGroupsCommandError = 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 "BadRequestException":
|
|
800
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
801
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
802
|
+
case "ForbiddenException":
|
|
803
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
804
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
805
|
+
case "InternalServerErrorException":
|
|
806
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
807
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
808
|
+
case "MethodNotAllowedException":
|
|
809
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
810
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
811
|
+
case "TooManyRequestsException":
|
|
812
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
813
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
814
|
+
default:
|
|
815
|
+
const parsedBody = parsedOutput.body;
|
|
816
|
+
throwDefaultError({
|
|
817
|
+
output,
|
|
818
|
+
parsedBody,
|
|
819
|
+
exceptionCtor: __BaseException,
|
|
820
|
+
errorCode,
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
export const deserializeAws_restJson1PutGroupConfigurationCommand = async (output, context) => {
|
|
825
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
826
|
+
return deserializeAws_restJson1PutGroupConfigurationCommandError(output, context);
|
|
827
|
+
}
|
|
828
|
+
const contents = map({
|
|
829
|
+
$metadata: deserializeMetadata(output),
|
|
1191
830
|
});
|
|
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
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
831
|
+
await collectBody(output.body, context);
|
|
832
|
+
return contents;
|
|
833
|
+
};
|
|
834
|
+
const deserializeAws_restJson1PutGroupConfigurationCommandError = async (output, context) => {
|
|
835
|
+
const parsedOutput = {
|
|
836
|
+
...output,
|
|
837
|
+
body: await parseErrorBody(output.body, context),
|
|
838
|
+
};
|
|
839
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
840
|
+
switch (errorCode) {
|
|
841
|
+
case "BadRequestException":
|
|
842
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
843
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
844
|
+
case "ForbiddenException":
|
|
845
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
846
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
847
|
+
case "InternalServerErrorException":
|
|
848
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
849
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
850
|
+
case "MethodNotAllowedException":
|
|
851
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
852
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
853
|
+
case "NotFoundException":
|
|
854
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
855
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
856
|
+
case "TooManyRequestsException":
|
|
857
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
858
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
859
|
+
default:
|
|
860
|
+
const parsedBody = parsedOutput.body;
|
|
861
|
+
throwDefaultError({
|
|
862
|
+
output,
|
|
863
|
+
parsedBody,
|
|
864
|
+
exceptionCtor: __BaseException,
|
|
865
|
+
errorCode,
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
export const deserializeAws_restJson1SearchResourcesCommand = async (output, context) => {
|
|
870
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
871
|
+
return deserializeAws_restJson1SearchResourcesCommandError(output, context);
|
|
872
|
+
}
|
|
873
|
+
const contents = map({
|
|
874
|
+
$metadata: deserializeMetadata(output),
|
|
1220
875
|
});
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
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
|
-
|
|
876
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
877
|
+
if (data.NextToken != null) {
|
|
878
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
879
|
+
}
|
|
880
|
+
if (data.QueryErrors != null) {
|
|
881
|
+
contents.QueryErrors = deserializeAws_restJson1QueryErrorList(data.QueryErrors, context);
|
|
882
|
+
}
|
|
883
|
+
if (data.ResourceIdentifiers != null) {
|
|
884
|
+
contents.ResourceIdentifiers = deserializeAws_restJson1ResourceIdentifierList(data.ResourceIdentifiers, context);
|
|
885
|
+
}
|
|
886
|
+
return contents;
|
|
887
|
+
};
|
|
888
|
+
const deserializeAws_restJson1SearchResourcesCommandError = async (output, context) => {
|
|
889
|
+
const parsedOutput = {
|
|
890
|
+
...output,
|
|
891
|
+
body: await parseErrorBody(output.body, context),
|
|
892
|
+
};
|
|
893
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
894
|
+
switch (errorCode) {
|
|
895
|
+
case "BadRequestException":
|
|
896
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
897
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
898
|
+
case "ForbiddenException":
|
|
899
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
900
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
901
|
+
case "InternalServerErrorException":
|
|
902
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
903
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
904
|
+
case "MethodNotAllowedException":
|
|
905
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
906
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
907
|
+
case "TooManyRequestsException":
|
|
908
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
909
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
910
|
+
case "UnauthorizedException":
|
|
911
|
+
case "com.amazonaws.resourcegroups#UnauthorizedException":
|
|
912
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
913
|
+
default:
|
|
914
|
+
const parsedBody = parsedOutput.body;
|
|
915
|
+
throwDefaultError({
|
|
916
|
+
output,
|
|
917
|
+
parsedBody,
|
|
918
|
+
exceptionCtor: __BaseException,
|
|
919
|
+
errorCode,
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
export const deserializeAws_restJson1TagCommand = async (output, context) => {
|
|
924
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
925
|
+
return deserializeAws_restJson1TagCommandError(output, context);
|
|
926
|
+
}
|
|
927
|
+
const contents = map({
|
|
928
|
+
$metadata: deserializeMetadata(output),
|
|
1273
929
|
});
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
930
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
931
|
+
if (data.Arn != null) {
|
|
932
|
+
contents.Arn = __expectString(data.Arn);
|
|
933
|
+
}
|
|
934
|
+
if (data.Tags != null) {
|
|
935
|
+
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
936
|
+
}
|
|
937
|
+
return contents;
|
|
938
|
+
};
|
|
939
|
+
const deserializeAws_restJson1TagCommandError = async (output, context) => {
|
|
940
|
+
const parsedOutput = {
|
|
941
|
+
...output,
|
|
942
|
+
body: await parseErrorBody(output.body, context),
|
|
943
|
+
};
|
|
944
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
945
|
+
switch (errorCode) {
|
|
946
|
+
case "BadRequestException":
|
|
947
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
948
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
949
|
+
case "ForbiddenException":
|
|
950
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
951
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
952
|
+
case "InternalServerErrorException":
|
|
953
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
954
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
955
|
+
case "MethodNotAllowedException":
|
|
956
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
957
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
958
|
+
case "NotFoundException":
|
|
959
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
960
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
961
|
+
case "TooManyRequestsException":
|
|
962
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
963
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
964
|
+
default:
|
|
965
|
+
const parsedBody = parsedOutput.body;
|
|
966
|
+
throwDefaultError({
|
|
967
|
+
output,
|
|
968
|
+
parsedBody,
|
|
969
|
+
exceptionCtor: __BaseException,
|
|
970
|
+
errorCode,
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
export const deserializeAws_restJson1UngroupResourcesCommand = async (output, context) => {
|
|
975
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
976
|
+
return deserializeAws_restJson1UngroupResourcesCommandError(output, context);
|
|
977
|
+
}
|
|
978
|
+
const contents = map({
|
|
979
|
+
$metadata: deserializeMetadata(output),
|
|
1299
980
|
});
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
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
|
-
|
|
981
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
982
|
+
if (data.Failed != null) {
|
|
983
|
+
contents.Failed = deserializeAws_restJson1FailedResourceList(data.Failed, context);
|
|
984
|
+
}
|
|
985
|
+
if (data.Pending != null) {
|
|
986
|
+
contents.Pending = deserializeAws_restJson1PendingResourceList(data.Pending, context);
|
|
987
|
+
}
|
|
988
|
+
if (data.Succeeded != null) {
|
|
989
|
+
contents.Succeeded = deserializeAws_restJson1ResourceArnList(data.Succeeded, context);
|
|
990
|
+
}
|
|
991
|
+
return contents;
|
|
992
|
+
};
|
|
993
|
+
const deserializeAws_restJson1UngroupResourcesCommandError = async (output, context) => {
|
|
994
|
+
const parsedOutput = {
|
|
995
|
+
...output,
|
|
996
|
+
body: await parseErrorBody(output.body, context),
|
|
997
|
+
};
|
|
998
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
999
|
+
switch (errorCode) {
|
|
1000
|
+
case "BadRequestException":
|
|
1001
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
1002
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1003
|
+
case "ForbiddenException":
|
|
1004
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
1005
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1006
|
+
case "InternalServerErrorException":
|
|
1007
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
1008
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1009
|
+
case "MethodNotAllowedException":
|
|
1010
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
1011
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
1012
|
+
case "NotFoundException":
|
|
1013
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
1014
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1015
|
+
case "TooManyRequestsException":
|
|
1016
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
1017
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1018
|
+
default:
|
|
1019
|
+
const parsedBody = parsedOutput.body;
|
|
1020
|
+
throwDefaultError({
|
|
1021
|
+
output,
|
|
1022
|
+
parsedBody,
|
|
1023
|
+
exceptionCtor: __BaseException,
|
|
1024
|
+
errorCode,
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
export const deserializeAws_restJson1UntagCommand = async (output, context) => {
|
|
1029
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1030
|
+
return deserializeAws_restJson1UntagCommandError(output, context);
|
|
1031
|
+
}
|
|
1032
|
+
const contents = map({
|
|
1033
|
+
$metadata: deserializeMetadata(output),
|
|
1352
1034
|
});
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1035
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1036
|
+
if (data.Arn != null) {
|
|
1037
|
+
contents.Arn = __expectString(data.Arn);
|
|
1038
|
+
}
|
|
1039
|
+
if (data.Keys != null) {
|
|
1040
|
+
contents.Keys = deserializeAws_restJson1TagKeyList(data.Keys, context);
|
|
1041
|
+
}
|
|
1042
|
+
return contents;
|
|
1043
|
+
};
|
|
1044
|
+
const deserializeAws_restJson1UntagCommandError = async (output, context) => {
|
|
1045
|
+
const parsedOutput = {
|
|
1046
|
+
...output,
|
|
1047
|
+
body: await parseErrorBody(output.body, context),
|
|
1048
|
+
};
|
|
1049
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1050
|
+
switch (errorCode) {
|
|
1051
|
+
case "BadRequestException":
|
|
1052
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
1053
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1054
|
+
case "ForbiddenException":
|
|
1055
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
1056
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1057
|
+
case "InternalServerErrorException":
|
|
1058
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
1059
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1060
|
+
case "MethodNotAllowedException":
|
|
1061
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
1062
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
1063
|
+
case "NotFoundException":
|
|
1064
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
1065
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1066
|
+
case "TooManyRequestsException":
|
|
1067
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
1068
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1069
|
+
default:
|
|
1070
|
+
const parsedBody = parsedOutput.body;
|
|
1071
|
+
throwDefaultError({
|
|
1072
|
+
output,
|
|
1073
|
+
parsedBody,
|
|
1074
|
+
exceptionCtor: __BaseException,
|
|
1075
|
+
errorCode,
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
export const deserializeAws_restJson1UpdateGroupCommand = async (output, context) => {
|
|
1080
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1081
|
+
return deserializeAws_restJson1UpdateGroupCommandError(output, context);
|
|
1082
|
+
}
|
|
1083
|
+
const contents = map({
|
|
1084
|
+
$metadata: deserializeMetadata(output),
|
|
1381
1085
|
});
|
|
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
|
-
|
|
1428
|
-
|
|
1429
|
-
errorCode: errorCode,
|
|
1430
|
-
});
|
|
1431
|
-
_d.label = 15;
|
|
1432
|
-
case 15: return [2];
|
|
1433
|
-
}
|
|
1086
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1087
|
+
if (data.Group != null) {
|
|
1088
|
+
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
1089
|
+
}
|
|
1090
|
+
return contents;
|
|
1091
|
+
};
|
|
1092
|
+
const deserializeAws_restJson1UpdateGroupCommandError = async (output, context) => {
|
|
1093
|
+
const parsedOutput = {
|
|
1094
|
+
...output,
|
|
1095
|
+
body: await parseErrorBody(output.body, context),
|
|
1096
|
+
};
|
|
1097
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1098
|
+
switch (errorCode) {
|
|
1099
|
+
case "BadRequestException":
|
|
1100
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
1101
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1102
|
+
case "ForbiddenException":
|
|
1103
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
1104
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1105
|
+
case "InternalServerErrorException":
|
|
1106
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
1107
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1108
|
+
case "MethodNotAllowedException":
|
|
1109
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
1110
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
1111
|
+
case "NotFoundException":
|
|
1112
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
1113
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1114
|
+
case "TooManyRequestsException":
|
|
1115
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
1116
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1117
|
+
default:
|
|
1118
|
+
const parsedBody = parsedOutput.body;
|
|
1119
|
+
throwDefaultError({
|
|
1120
|
+
output,
|
|
1121
|
+
parsedBody,
|
|
1122
|
+
exceptionCtor: __BaseException,
|
|
1123
|
+
errorCode,
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
export const deserializeAws_restJson1UpdateGroupQueryCommand = async (output, context) => {
|
|
1128
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1129
|
+
return deserializeAws_restJson1UpdateGroupQueryCommandError(output, context);
|
|
1130
|
+
}
|
|
1131
|
+
const contents = map({
|
|
1132
|
+
$metadata: deserializeMetadata(output),
|
|
1434
1133
|
});
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1134
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1135
|
+
if (data.GroupQuery != null) {
|
|
1136
|
+
contents.GroupQuery = deserializeAws_restJson1GroupQuery(data.GroupQuery, context);
|
|
1137
|
+
}
|
|
1138
|
+
return contents;
|
|
1139
|
+
};
|
|
1140
|
+
const deserializeAws_restJson1UpdateGroupQueryCommandError = async (output, context) => {
|
|
1141
|
+
const parsedOutput = {
|
|
1142
|
+
...output,
|
|
1143
|
+
body: await parseErrorBody(output.body, context),
|
|
1144
|
+
};
|
|
1145
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1146
|
+
switch (errorCode) {
|
|
1147
|
+
case "BadRequestException":
|
|
1148
|
+
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
1149
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1150
|
+
case "ForbiddenException":
|
|
1151
|
+
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
1152
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1153
|
+
case "InternalServerErrorException":
|
|
1154
|
+
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
1155
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1156
|
+
case "MethodNotAllowedException":
|
|
1157
|
+
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
1158
|
+
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
1159
|
+
case "NotFoundException":
|
|
1160
|
+
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
1161
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1162
|
+
case "TooManyRequestsException":
|
|
1163
|
+
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
1164
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1165
|
+
default:
|
|
1166
|
+
const parsedBody = parsedOutput.body;
|
|
1167
|
+
throwDefaultError({
|
|
1168
|
+
output,
|
|
1169
|
+
parsedBody,
|
|
1170
|
+
exceptionCtor: __BaseException,
|
|
1171
|
+
errorCode,
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
};
|
|
1175
|
+
const map = __map;
|
|
1176
|
+
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
1177
|
+
const contents = map({});
|
|
1178
|
+
const data = parsedOutput.body;
|
|
1179
|
+
if (data.Message != null) {
|
|
1180
|
+
contents.Message = __expectString(data.Message);
|
|
1181
|
+
}
|
|
1182
|
+
const exception = new BadRequestException({
|
|
1183
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1184
|
+
...contents,
|
|
1460
1185
|
});
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1473
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1474
|
-
_b = errorCode;
|
|
1475
|
-
switch (_b) {
|
|
1476
|
-
case "BadRequestException": return [3, 2];
|
|
1477
|
-
case "com.amazonaws.resourcegroups#BadRequestException": return [3, 2];
|
|
1478
|
-
case "ForbiddenException": return [3, 4];
|
|
1479
|
-
case "com.amazonaws.resourcegroups#ForbiddenException": return [3, 4];
|
|
1480
|
-
case "InternalServerErrorException": return [3, 6];
|
|
1481
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException": return [3, 6];
|
|
1482
|
-
case "MethodNotAllowedException": return [3, 8];
|
|
1483
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException": return [3, 8];
|
|
1484
|
-
case "NotFoundException": return [3, 10];
|
|
1485
|
-
case "com.amazonaws.resourcegroups#NotFoundException": return [3, 10];
|
|
1486
|
-
case "TooManyRequestsException": return [3, 12];
|
|
1487
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException": return [3, 12];
|
|
1488
|
-
}
|
|
1489
|
-
return [3, 14];
|
|
1490
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1491
|
-
case 3: throw _d.sent();
|
|
1492
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1493
|
-
case 5: throw _d.sent();
|
|
1494
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1495
|
-
case 7: throw _d.sent();
|
|
1496
|
-
case 8: return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
1497
|
-
case 9: throw _d.sent();
|
|
1498
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1499
|
-
case 11: throw _d.sent();
|
|
1500
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1501
|
-
case 13: throw _d.sent();
|
|
1502
|
-
case 14:
|
|
1503
|
-
parsedBody = parsedOutput.body;
|
|
1504
|
-
throwDefaultError({
|
|
1505
|
-
output: output,
|
|
1506
|
-
parsedBody: parsedBody,
|
|
1507
|
-
exceptionCtor: __BaseException,
|
|
1508
|
-
errorCode: errorCode,
|
|
1509
|
-
});
|
|
1510
|
-
_d.label = 15;
|
|
1511
|
-
case 15: return [2];
|
|
1512
|
-
}
|
|
1186
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1187
|
+
};
|
|
1188
|
+
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
1189
|
+
const contents = map({});
|
|
1190
|
+
const data = parsedOutput.body;
|
|
1191
|
+
if (data.Message != null) {
|
|
1192
|
+
contents.Message = __expectString(data.Message);
|
|
1193
|
+
}
|
|
1194
|
+
const exception = new ForbiddenException({
|
|
1195
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1196
|
+
...contents,
|
|
1513
1197
|
});
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
});
|
|
1526
|
-
_a = __expectNonNull;
|
|
1527
|
-
_b = __expectObject;
|
|
1528
|
-
return [4, parseBody(output.body, context)];
|
|
1529
|
-
case 1:
|
|
1530
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1531
|
-
if (data.Group != null) {
|
|
1532
|
-
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
1533
|
-
}
|
|
1534
|
-
return [2, contents];
|
|
1535
|
-
}
|
|
1198
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1199
|
+
};
|
|
1200
|
+
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
|
|
1201
|
+
const contents = map({});
|
|
1202
|
+
const data = parsedOutput.body;
|
|
1203
|
+
if (data.Message != null) {
|
|
1204
|
+
contents.Message = __expectString(data.Message);
|
|
1205
|
+
}
|
|
1206
|
+
const exception = new InternalServerErrorException({
|
|
1207
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1208
|
+
...contents,
|
|
1536
1209
|
});
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1549
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1550
|
-
_b = errorCode;
|
|
1551
|
-
switch (_b) {
|
|
1552
|
-
case "BadRequestException": return [3, 2];
|
|
1553
|
-
case "com.amazonaws.resourcegroups#BadRequestException": return [3, 2];
|
|
1554
|
-
case "ForbiddenException": return [3, 4];
|
|
1555
|
-
case "com.amazonaws.resourcegroups#ForbiddenException": return [3, 4];
|
|
1556
|
-
case "InternalServerErrorException": return [3, 6];
|
|
1557
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException": return [3, 6];
|
|
1558
|
-
case "MethodNotAllowedException": return [3, 8];
|
|
1559
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException": return [3, 8];
|
|
1560
|
-
case "NotFoundException": return [3, 10];
|
|
1561
|
-
case "com.amazonaws.resourcegroups#NotFoundException": return [3, 10];
|
|
1562
|
-
case "TooManyRequestsException": return [3, 12];
|
|
1563
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException": return [3, 12];
|
|
1564
|
-
}
|
|
1565
|
-
return [3, 14];
|
|
1566
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1567
|
-
case 3: throw _d.sent();
|
|
1568
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1569
|
-
case 5: throw _d.sent();
|
|
1570
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1571
|
-
case 7: throw _d.sent();
|
|
1572
|
-
case 8: return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
1573
|
-
case 9: throw _d.sent();
|
|
1574
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1575
|
-
case 11: throw _d.sent();
|
|
1576
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1577
|
-
case 13: throw _d.sent();
|
|
1578
|
-
case 14:
|
|
1579
|
-
parsedBody = parsedOutput.body;
|
|
1580
|
-
throwDefaultError({
|
|
1581
|
-
output: output,
|
|
1582
|
-
parsedBody: parsedBody,
|
|
1583
|
-
exceptionCtor: __BaseException,
|
|
1584
|
-
errorCode: errorCode,
|
|
1585
|
-
});
|
|
1586
|
-
_d.label = 15;
|
|
1587
|
-
case 15: return [2];
|
|
1588
|
-
}
|
|
1210
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1211
|
+
};
|
|
1212
|
+
const deserializeAws_restJson1MethodNotAllowedExceptionResponse = async (parsedOutput, context) => {
|
|
1213
|
+
const contents = map({});
|
|
1214
|
+
const data = parsedOutput.body;
|
|
1215
|
+
if (data.Message != null) {
|
|
1216
|
+
contents.Message = __expectString(data.Message);
|
|
1217
|
+
}
|
|
1218
|
+
const exception = new MethodNotAllowedException({
|
|
1219
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1220
|
+
...contents,
|
|
1589
1221
|
});
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
});
|
|
1602
|
-
_a = __expectNonNull;
|
|
1603
|
-
_b = __expectObject;
|
|
1604
|
-
return [4, parseBody(output.body, context)];
|
|
1605
|
-
case 1:
|
|
1606
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1607
|
-
if (data.GroupQuery != null) {
|
|
1608
|
-
contents.GroupQuery = deserializeAws_restJson1GroupQuery(data.GroupQuery, context);
|
|
1609
|
-
}
|
|
1610
|
-
return [2, contents];
|
|
1611
|
-
}
|
|
1222
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1223
|
+
};
|
|
1224
|
+
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1225
|
+
const contents = map({});
|
|
1226
|
+
const data = parsedOutput.body;
|
|
1227
|
+
if (data.Message != null) {
|
|
1228
|
+
contents.Message = __expectString(data.Message);
|
|
1229
|
+
}
|
|
1230
|
+
const exception = new NotFoundException({
|
|
1231
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1232
|
+
...contents,
|
|
1612
1233
|
});
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1625
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1626
|
-
_b = errorCode;
|
|
1627
|
-
switch (_b) {
|
|
1628
|
-
case "BadRequestException": return [3, 2];
|
|
1629
|
-
case "com.amazonaws.resourcegroups#BadRequestException": return [3, 2];
|
|
1630
|
-
case "ForbiddenException": return [3, 4];
|
|
1631
|
-
case "com.amazonaws.resourcegroups#ForbiddenException": return [3, 4];
|
|
1632
|
-
case "InternalServerErrorException": return [3, 6];
|
|
1633
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException": return [3, 6];
|
|
1634
|
-
case "MethodNotAllowedException": return [3, 8];
|
|
1635
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException": return [3, 8];
|
|
1636
|
-
case "NotFoundException": return [3, 10];
|
|
1637
|
-
case "com.amazonaws.resourcegroups#NotFoundException": return [3, 10];
|
|
1638
|
-
case "TooManyRequestsException": return [3, 12];
|
|
1639
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException": return [3, 12];
|
|
1640
|
-
}
|
|
1641
|
-
return [3, 14];
|
|
1642
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1643
|
-
case 3: throw _d.sent();
|
|
1644
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1645
|
-
case 5: throw _d.sent();
|
|
1646
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1647
|
-
case 7: throw _d.sent();
|
|
1648
|
-
case 8: return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
1649
|
-
case 9: throw _d.sent();
|
|
1650
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1651
|
-
case 11: throw _d.sent();
|
|
1652
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1653
|
-
case 13: throw _d.sent();
|
|
1654
|
-
case 14:
|
|
1655
|
-
parsedBody = parsedOutput.body;
|
|
1656
|
-
throwDefaultError({
|
|
1657
|
-
output: output,
|
|
1658
|
-
parsedBody: parsedBody,
|
|
1659
|
-
exceptionCtor: __BaseException,
|
|
1660
|
-
errorCode: errorCode,
|
|
1661
|
-
});
|
|
1662
|
-
_d.label = 15;
|
|
1663
|
-
case 15: return [2];
|
|
1664
|
-
}
|
|
1234
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1235
|
+
};
|
|
1236
|
+
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
1237
|
+
const contents = map({});
|
|
1238
|
+
const data = parsedOutput.body;
|
|
1239
|
+
if (data.Message != null) {
|
|
1240
|
+
contents.Message = __expectString(data.Message);
|
|
1241
|
+
}
|
|
1242
|
+
const exception = new TooManyRequestsException({
|
|
1243
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1244
|
+
...contents,
|
|
1665
1245
|
});
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1678
|
-
});
|
|
1679
|
-
}); };
|
|
1680
|
-
var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1681
|
-
var contents, data, exception;
|
|
1682
|
-
return __generator(this, function (_a) {
|
|
1683
|
-
contents = map({});
|
|
1684
|
-
data = parsedOutput.body;
|
|
1685
|
-
if (data.Message != null) {
|
|
1686
|
-
contents.Message = __expectString(data.Message);
|
|
1687
|
-
}
|
|
1688
|
-
exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1689
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1690
|
-
});
|
|
1691
|
-
}); };
|
|
1692
|
-
var deserializeAws_restJson1InternalServerErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1693
|
-
var contents, data, exception;
|
|
1694
|
-
return __generator(this, function (_a) {
|
|
1695
|
-
contents = map({});
|
|
1696
|
-
data = parsedOutput.body;
|
|
1697
|
-
if (data.Message != null) {
|
|
1698
|
-
contents.Message = __expectString(data.Message);
|
|
1699
|
-
}
|
|
1700
|
-
exception = new InternalServerErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1701
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1702
|
-
});
|
|
1703
|
-
}); };
|
|
1704
|
-
var deserializeAws_restJson1MethodNotAllowedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1705
|
-
var contents, data, exception;
|
|
1706
|
-
return __generator(this, function (_a) {
|
|
1707
|
-
contents = map({});
|
|
1708
|
-
data = parsedOutput.body;
|
|
1709
|
-
if (data.Message != null) {
|
|
1710
|
-
contents.Message = __expectString(data.Message);
|
|
1711
|
-
}
|
|
1712
|
-
exception = new MethodNotAllowedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1713
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1714
|
-
});
|
|
1715
|
-
}); };
|
|
1716
|
-
var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1717
|
-
var contents, data, exception;
|
|
1718
|
-
return __generator(this, function (_a) {
|
|
1719
|
-
contents = map({});
|
|
1720
|
-
data = parsedOutput.body;
|
|
1721
|
-
if (data.Message != null) {
|
|
1722
|
-
contents.Message = __expectString(data.Message);
|
|
1723
|
-
}
|
|
1724
|
-
exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1725
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1726
|
-
});
|
|
1727
|
-
}); };
|
|
1728
|
-
var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1729
|
-
var contents, data, exception;
|
|
1730
|
-
return __generator(this, function (_a) {
|
|
1731
|
-
contents = map({});
|
|
1732
|
-
data = parsedOutput.body;
|
|
1733
|
-
if (data.Message != null) {
|
|
1734
|
-
contents.Message = __expectString(data.Message);
|
|
1735
|
-
}
|
|
1736
|
-
exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1737
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1738
|
-
});
|
|
1739
|
-
}); };
|
|
1740
|
-
var deserializeAws_restJson1UnauthorizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1741
|
-
var contents, data, exception;
|
|
1742
|
-
return __generator(this, function (_a) {
|
|
1743
|
-
contents = map({});
|
|
1744
|
-
data = parsedOutput.body;
|
|
1745
|
-
if (data.Message != null) {
|
|
1746
|
-
contents.Message = __expectString(data.Message);
|
|
1747
|
-
}
|
|
1748
|
-
exception = new UnauthorizedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1749
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1246
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1247
|
+
};
|
|
1248
|
+
const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
1249
|
+
const contents = map({});
|
|
1250
|
+
const data = parsedOutput.body;
|
|
1251
|
+
if (data.Message != null) {
|
|
1252
|
+
contents.Message = __expectString(data.Message);
|
|
1253
|
+
}
|
|
1254
|
+
const exception = new UnauthorizedException({
|
|
1255
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1256
|
+
...contents,
|
|
1750
1257
|
});
|
|
1751
|
-
|
|
1752
|
-
var serializeAws_restJson1GroupConfigurationItem = function (input, context) {
|
|
1753
|
-
return __assign(__assign({}, (input.Parameters != null && {
|
|
1754
|
-
Parameters: serializeAws_restJson1GroupParameterList(input.Parameters, context),
|
|
1755
|
-
})), (input.Type != null && { Type: input.Type }));
|
|
1258
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1756
1259
|
};
|
|
1757
|
-
|
|
1260
|
+
const serializeAws_restJson1GroupConfigurationItem = (input, context) => {
|
|
1261
|
+
return {
|
|
1262
|
+
...(input.Parameters != null && {
|
|
1263
|
+
Parameters: serializeAws_restJson1GroupParameterList(input.Parameters, context),
|
|
1264
|
+
}),
|
|
1265
|
+
...(input.Type != null && { Type: input.Type }),
|
|
1266
|
+
};
|
|
1267
|
+
};
|
|
1268
|
+
const serializeAws_restJson1GroupConfigurationList = (input, context) => {
|
|
1758
1269
|
return input
|
|
1759
|
-
.filter(
|
|
1760
|
-
.map(
|
|
1270
|
+
.filter((e) => e != null)
|
|
1271
|
+
.map((entry) => {
|
|
1761
1272
|
return serializeAws_restJson1GroupConfigurationItem(entry, context);
|
|
1762
1273
|
});
|
|
1763
1274
|
};
|
|
1764
|
-
|
|
1765
|
-
return
|
|
1766
|
-
|
|
1767
|
-
|
|
1275
|
+
const serializeAws_restJson1GroupConfigurationParameter = (input, context) => {
|
|
1276
|
+
return {
|
|
1277
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1278
|
+
...(input.Values != null && {
|
|
1279
|
+
Values: serializeAws_restJson1GroupConfigurationParameterValueList(input.Values, context),
|
|
1280
|
+
}),
|
|
1281
|
+
};
|
|
1768
1282
|
};
|
|
1769
|
-
|
|
1283
|
+
const serializeAws_restJson1GroupConfigurationParameterValueList = (input, context) => {
|
|
1770
1284
|
return input
|
|
1771
|
-
.filter(
|
|
1772
|
-
.map(
|
|
1285
|
+
.filter((e) => e != null)
|
|
1286
|
+
.map((entry) => {
|
|
1773
1287
|
return entry;
|
|
1774
1288
|
});
|
|
1775
1289
|
};
|
|
1776
|
-
|
|
1777
|
-
return
|
|
1290
|
+
const serializeAws_restJson1GroupFilter = (input, context) => {
|
|
1291
|
+
return {
|
|
1292
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1293
|
+
...(input.Values != null && { Values: serializeAws_restJson1GroupFilterValues(input.Values, context) }),
|
|
1294
|
+
};
|
|
1778
1295
|
};
|
|
1779
|
-
|
|
1296
|
+
const serializeAws_restJson1GroupFilterList = (input, context) => {
|
|
1780
1297
|
return input
|
|
1781
|
-
.filter(
|
|
1782
|
-
.map(
|
|
1298
|
+
.filter((e) => e != null)
|
|
1299
|
+
.map((entry) => {
|
|
1783
1300
|
return serializeAws_restJson1GroupFilter(entry, context);
|
|
1784
1301
|
});
|
|
1785
1302
|
};
|
|
1786
|
-
|
|
1303
|
+
const serializeAws_restJson1GroupFilterValues = (input, context) => {
|
|
1787
1304
|
return input
|
|
1788
|
-
.filter(
|
|
1789
|
-
.map(
|
|
1305
|
+
.filter((e) => e != null)
|
|
1306
|
+
.map((entry) => {
|
|
1790
1307
|
return entry;
|
|
1791
1308
|
});
|
|
1792
1309
|
};
|
|
1793
|
-
|
|
1310
|
+
const serializeAws_restJson1GroupParameterList = (input, context) => {
|
|
1794
1311
|
return input
|
|
1795
|
-
.filter(
|
|
1796
|
-
.map(
|
|
1312
|
+
.filter((e) => e != null)
|
|
1313
|
+
.map((entry) => {
|
|
1797
1314
|
return serializeAws_restJson1GroupConfigurationParameter(entry, context);
|
|
1798
1315
|
});
|
|
1799
1316
|
};
|
|
1800
|
-
|
|
1317
|
+
const serializeAws_restJson1ResourceArnList = (input, context) => {
|
|
1801
1318
|
return input
|
|
1802
|
-
.filter(
|
|
1803
|
-
.map(
|
|
1319
|
+
.filter((e) => e != null)
|
|
1320
|
+
.map((entry) => {
|
|
1804
1321
|
return entry;
|
|
1805
1322
|
});
|
|
1806
1323
|
};
|
|
1807
|
-
|
|
1808
|
-
return
|
|
1324
|
+
const serializeAws_restJson1ResourceFilter = (input, context) => {
|
|
1325
|
+
return {
|
|
1326
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1327
|
+
...(input.Values != null && { Values: serializeAws_restJson1ResourceFilterValues(input.Values, context) }),
|
|
1328
|
+
};
|
|
1809
1329
|
};
|
|
1810
|
-
|
|
1330
|
+
const serializeAws_restJson1ResourceFilterList = (input, context) => {
|
|
1811
1331
|
return input
|
|
1812
|
-
.filter(
|
|
1813
|
-
.map(
|
|
1332
|
+
.filter((e) => e != null)
|
|
1333
|
+
.map((entry) => {
|
|
1814
1334
|
return serializeAws_restJson1ResourceFilter(entry, context);
|
|
1815
1335
|
});
|
|
1816
1336
|
};
|
|
1817
|
-
|
|
1337
|
+
const serializeAws_restJson1ResourceFilterValues = (input, context) => {
|
|
1818
1338
|
return input
|
|
1819
|
-
.filter(
|
|
1820
|
-
.map(
|
|
1339
|
+
.filter((e) => e != null)
|
|
1340
|
+
.map((entry) => {
|
|
1821
1341
|
return entry;
|
|
1822
1342
|
});
|
|
1823
1343
|
};
|
|
1824
|
-
|
|
1825
|
-
return
|
|
1344
|
+
const serializeAws_restJson1ResourceQuery = (input, context) => {
|
|
1345
|
+
return {
|
|
1346
|
+
...(input.Query != null && { Query: input.Query }),
|
|
1347
|
+
...(input.Type != null && { Type: input.Type }),
|
|
1348
|
+
};
|
|
1826
1349
|
};
|
|
1827
|
-
|
|
1350
|
+
const serializeAws_restJson1TagKeyList = (input, context) => {
|
|
1828
1351
|
return input
|
|
1829
|
-
.filter(
|
|
1830
|
-
.map(
|
|
1352
|
+
.filter((e) => e != null)
|
|
1353
|
+
.map((entry) => {
|
|
1831
1354
|
return entry;
|
|
1832
1355
|
});
|
|
1833
1356
|
};
|
|
1834
|
-
|
|
1835
|
-
return Object.entries(input).reduce(
|
|
1836
|
-
var _b;
|
|
1837
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1357
|
+
const serializeAws_restJson1Tags = (input, context) => {
|
|
1358
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1838
1359
|
if (value === null) {
|
|
1839
1360
|
return acc;
|
|
1840
1361
|
}
|
|
1841
|
-
return
|
|
1362
|
+
return {
|
|
1363
|
+
...acc,
|
|
1364
|
+
[key]: value,
|
|
1365
|
+
};
|
|
1842
1366
|
}, {});
|
|
1843
1367
|
};
|
|
1844
|
-
|
|
1368
|
+
const deserializeAws_restJson1FailedResource = (output, context) => {
|
|
1845
1369
|
return {
|
|
1846
1370
|
ErrorCode: __expectString(output.ErrorCode),
|
|
1847
1371
|
ErrorMessage: __expectString(output.ErrorMessage),
|
|
1848
1372
|
ResourceArn: __expectString(output.ResourceArn),
|
|
1849
1373
|
};
|
|
1850
1374
|
};
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
.filter(
|
|
1854
|
-
.map(
|
|
1375
|
+
const deserializeAws_restJson1FailedResourceList = (output, context) => {
|
|
1376
|
+
const retVal = (output || [])
|
|
1377
|
+
.filter((e) => e != null)
|
|
1378
|
+
.map((entry) => {
|
|
1855
1379
|
if (entry === null) {
|
|
1856
1380
|
return null;
|
|
1857
1381
|
}
|
|
@@ -1859,14 +1383,14 @@ var deserializeAws_restJson1FailedResourceList = function (output, context) {
|
|
|
1859
1383
|
});
|
|
1860
1384
|
return retVal;
|
|
1861
1385
|
};
|
|
1862
|
-
|
|
1386
|
+
const deserializeAws_restJson1Group = (output, context) => {
|
|
1863
1387
|
return {
|
|
1864
1388
|
Description: __expectString(output.Description),
|
|
1865
1389
|
GroupArn: __expectString(output.GroupArn),
|
|
1866
1390
|
Name: __expectString(output.Name),
|
|
1867
1391
|
};
|
|
1868
1392
|
};
|
|
1869
|
-
|
|
1393
|
+
const deserializeAws_restJson1GroupConfiguration = (output, context) => {
|
|
1870
1394
|
return {
|
|
1871
1395
|
Configuration: output.Configuration != null
|
|
1872
1396
|
? deserializeAws_restJson1GroupConfigurationList(output.Configuration, context)
|
|
@@ -1878,16 +1402,16 @@ var deserializeAws_restJson1GroupConfiguration = function (output, context) {
|
|
|
1878
1402
|
Status: __expectString(output.Status),
|
|
1879
1403
|
};
|
|
1880
1404
|
};
|
|
1881
|
-
|
|
1405
|
+
const deserializeAws_restJson1GroupConfigurationItem = (output, context) => {
|
|
1882
1406
|
return {
|
|
1883
1407
|
Parameters: output.Parameters != null ? deserializeAws_restJson1GroupParameterList(output.Parameters, context) : undefined,
|
|
1884
1408
|
Type: __expectString(output.Type),
|
|
1885
1409
|
};
|
|
1886
1410
|
};
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
.filter(
|
|
1890
|
-
.map(
|
|
1411
|
+
const deserializeAws_restJson1GroupConfigurationList = (output, context) => {
|
|
1412
|
+
const retVal = (output || [])
|
|
1413
|
+
.filter((e) => e != null)
|
|
1414
|
+
.map((entry) => {
|
|
1891
1415
|
if (entry === null) {
|
|
1892
1416
|
return null;
|
|
1893
1417
|
}
|
|
@@ -1895,7 +1419,7 @@ var deserializeAws_restJson1GroupConfigurationList = function (output, context)
|
|
|
1895
1419
|
});
|
|
1896
1420
|
return retVal;
|
|
1897
1421
|
};
|
|
1898
|
-
|
|
1422
|
+
const deserializeAws_restJson1GroupConfigurationParameter = (output, context) => {
|
|
1899
1423
|
return {
|
|
1900
1424
|
Name: __expectString(output.Name),
|
|
1901
1425
|
Values: output.Values != null
|
|
@@ -1903,10 +1427,10 @@ var deserializeAws_restJson1GroupConfigurationParameter = function (output, cont
|
|
|
1903
1427
|
: undefined,
|
|
1904
1428
|
};
|
|
1905
1429
|
};
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
.filter(
|
|
1909
|
-
.map(
|
|
1430
|
+
const deserializeAws_restJson1GroupConfigurationParameterValueList = (output, context) => {
|
|
1431
|
+
const retVal = (output || [])
|
|
1432
|
+
.filter((e) => e != null)
|
|
1433
|
+
.map((entry) => {
|
|
1910
1434
|
if (entry === null) {
|
|
1911
1435
|
return null;
|
|
1912
1436
|
}
|
|
@@ -1914,16 +1438,16 @@ var deserializeAws_restJson1GroupConfigurationParameterValueList = function (out
|
|
|
1914
1438
|
});
|
|
1915
1439
|
return retVal;
|
|
1916
1440
|
};
|
|
1917
|
-
|
|
1441
|
+
const deserializeAws_restJson1GroupIdentifier = (output, context) => {
|
|
1918
1442
|
return {
|
|
1919
1443
|
GroupArn: __expectString(output.GroupArn),
|
|
1920
1444
|
GroupName: __expectString(output.GroupName),
|
|
1921
1445
|
};
|
|
1922
1446
|
};
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
.filter(
|
|
1926
|
-
.map(
|
|
1447
|
+
const deserializeAws_restJson1GroupIdentifierList = (output, context) => {
|
|
1448
|
+
const retVal = (output || [])
|
|
1449
|
+
.filter((e) => e != null)
|
|
1450
|
+
.map((entry) => {
|
|
1927
1451
|
if (entry === null) {
|
|
1928
1452
|
return null;
|
|
1929
1453
|
}
|
|
@@ -1931,10 +1455,10 @@ var deserializeAws_restJson1GroupIdentifierList = function (output, context) {
|
|
|
1931
1455
|
});
|
|
1932
1456
|
return retVal;
|
|
1933
1457
|
};
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
.filter(
|
|
1937
|
-
.map(
|
|
1458
|
+
const deserializeAws_restJson1GroupList = (output, context) => {
|
|
1459
|
+
const retVal = (output || [])
|
|
1460
|
+
.filter((e) => e != null)
|
|
1461
|
+
.map((entry) => {
|
|
1938
1462
|
if (entry === null) {
|
|
1939
1463
|
return null;
|
|
1940
1464
|
}
|
|
@@ -1942,10 +1466,10 @@ var deserializeAws_restJson1GroupList = function (output, context) {
|
|
|
1942
1466
|
});
|
|
1943
1467
|
return retVal;
|
|
1944
1468
|
};
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
.filter(
|
|
1948
|
-
.map(
|
|
1469
|
+
const deserializeAws_restJson1GroupParameterList = (output, context) => {
|
|
1470
|
+
const retVal = (output || [])
|
|
1471
|
+
.filter((e) => e != null)
|
|
1472
|
+
.map((entry) => {
|
|
1949
1473
|
if (entry === null) {
|
|
1950
1474
|
return null;
|
|
1951
1475
|
}
|
|
@@ -1953,22 +1477,22 @@ var deserializeAws_restJson1GroupParameterList = function (output, context) {
|
|
|
1953
1477
|
});
|
|
1954
1478
|
return retVal;
|
|
1955
1479
|
};
|
|
1956
|
-
|
|
1480
|
+
const deserializeAws_restJson1GroupQuery = (output, context) => {
|
|
1957
1481
|
return {
|
|
1958
1482
|
GroupName: __expectString(output.GroupName),
|
|
1959
1483
|
ResourceQuery: output.ResourceQuery != null ? deserializeAws_restJson1ResourceQuery(output.ResourceQuery, context) : undefined,
|
|
1960
1484
|
};
|
|
1961
1485
|
};
|
|
1962
|
-
|
|
1486
|
+
const deserializeAws_restJson1ListGroupResourcesItem = (output, context) => {
|
|
1963
1487
|
return {
|
|
1964
1488
|
Identifier: output.Identifier != null ? deserializeAws_restJson1ResourceIdentifier(output.Identifier, context) : undefined,
|
|
1965
1489
|
Status: output.Status != null ? deserializeAws_restJson1ResourceStatus(output.Status, context) : undefined,
|
|
1966
1490
|
};
|
|
1967
1491
|
};
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
.filter(
|
|
1971
|
-
.map(
|
|
1492
|
+
const deserializeAws_restJson1ListGroupResourcesItemList = (output, context) => {
|
|
1493
|
+
const retVal = (output || [])
|
|
1494
|
+
.filter((e) => e != null)
|
|
1495
|
+
.map((entry) => {
|
|
1972
1496
|
if (entry === null) {
|
|
1973
1497
|
return null;
|
|
1974
1498
|
}
|
|
@@ -1976,15 +1500,15 @@ var deserializeAws_restJson1ListGroupResourcesItemList = function (output, conte
|
|
|
1976
1500
|
});
|
|
1977
1501
|
return retVal;
|
|
1978
1502
|
};
|
|
1979
|
-
|
|
1503
|
+
const deserializeAws_restJson1PendingResource = (output, context) => {
|
|
1980
1504
|
return {
|
|
1981
1505
|
ResourceArn: __expectString(output.ResourceArn),
|
|
1982
1506
|
};
|
|
1983
1507
|
};
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
.filter(
|
|
1987
|
-
.map(
|
|
1508
|
+
const deserializeAws_restJson1PendingResourceList = (output, context) => {
|
|
1509
|
+
const retVal = (output || [])
|
|
1510
|
+
.filter((e) => e != null)
|
|
1511
|
+
.map((entry) => {
|
|
1988
1512
|
if (entry === null) {
|
|
1989
1513
|
return null;
|
|
1990
1514
|
}
|
|
@@ -1992,16 +1516,16 @@ var deserializeAws_restJson1PendingResourceList = function (output, context) {
|
|
|
1992
1516
|
});
|
|
1993
1517
|
return retVal;
|
|
1994
1518
|
};
|
|
1995
|
-
|
|
1519
|
+
const deserializeAws_restJson1QueryError = (output, context) => {
|
|
1996
1520
|
return {
|
|
1997
1521
|
ErrorCode: __expectString(output.ErrorCode),
|
|
1998
1522
|
Message: __expectString(output.Message),
|
|
1999
1523
|
};
|
|
2000
1524
|
};
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
.filter(
|
|
2004
|
-
.map(
|
|
1525
|
+
const deserializeAws_restJson1QueryErrorList = (output, context) => {
|
|
1526
|
+
const retVal = (output || [])
|
|
1527
|
+
.filter((e) => e != null)
|
|
1528
|
+
.map((entry) => {
|
|
2005
1529
|
if (entry === null) {
|
|
2006
1530
|
return null;
|
|
2007
1531
|
}
|
|
@@ -2009,10 +1533,10 @@ var deserializeAws_restJson1QueryErrorList = function (output, context) {
|
|
|
2009
1533
|
});
|
|
2010
1534
|
return retVal;
|
|
2011
1535
|
};
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
.filter(
|
|
2015
|
-
.map(
|
|
1536
|
+
const deserializeAws_restJson1ResourceArnList = (output, context) => {
|
|
1537
|
+
const retVal = (output || [])
|
|
1538
|
+
.filter((e) => e != null)
|
|
1539
|
+
.map((entry) => {
|
|
2016
1540
|
if (entry === null) {
|
|
2017
1541
|
return null;
|
|
2018
1542
|
}
|
|
@@ -2020,16 +1544,16 @@ var deserializeAws_restJson1ResourceArnList = function (output, context) {
|
|
|
2020
1544
|
});
|
|
2021
1545
|
return retVal;
|
|
2022
1546
|
};
|
|
2023
|
-
|
|
1547
|
+
const deserializeAws_restJson1ResourceIdentifier = (output, context) => {
|
|
2024
1548
|
return {
|
|
2025
1549
|
ResourceArn: __expectString(output.ResourceArn),
|
|
2026
1550
|
ResourceType: __expectString(output.ResourceType),
|
|
2027
1551
|
};
|
|
2028
1552
|
};
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
.filter(
|
|
2032
|
-
.map(
|
|
1553
|
+
const deserializeAws_restJson1ResourceIdentifierList = (output, context) => {
|
|
1554
|
+
const retVal = (output || [])
|
|
1555
|
+
.filter((e) => e != null)
|
|
1556
|
+
.map((entry) => {
|
|
2033
1557
|
if (entry === null) {
|
|
2034
1558
|
return null;
|
|
2035
1559
|
}
|
|
@@ -2037,21 +1561,21 @@ var deserializeAws_restJson1ResourceIdentifierList = function (output, context)
|
|
|
2037
1561
|
});
|
|
2038
1562
|
return retVal;
|
|
2039
1563
|
};
|
|
2040
|
-
|
|
1564
|
+
const deserializeAws_restJson1ResourceQuery = (output, context) => {
|
|
2041
1565
|
return {
|
|
2042
1566
|
Query: __expectString(output.Query),
|
|
2043
1567
|
Type: __expectString(output.Type),
|
|
2044
1568
|
};
|
|
2045
1569
|
};
|
|
2046
|
-
|
|
1570
|
+
const deserializeAws_restJson1ResourceStatus = (output, context) => {
|
|
2047
1571
|
return {
|
|
2048
1572
|
Name: __expectString(output.Name),
|
|
2049
1573
|
};
|
|
2050
1574
|
};
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
.filter(
|
|
2054
|
-
.map(
|
|
1575
|
+
const deserializeAws_restJson1TagKeyList = (output, context) => {
|
|
1576
|
+
const retVal = (output || [])
|
|
1577
|
+
.filter((e) => e != null)
|
|
1578
|
+
.map((entry) => {
|
|
2055
1579
|
if (entry === null) {
|
|
2056
1580
|
return null;
|
|
2057
1581
|
}
|
|
@@ -2059,67 +1583,50 @@ var deserializeAws_restJson1TagKeyList = function (output, context) {
|
|
|
2059
1583
|
});
|
|
2060
1584
|
return retVal;
|
|
2061
1585
|
};
|
|
2062
|
-
|
|
2063
|
-
return Object.entries(output).reduce(
|
|
2064
|
-
var _b;
|
|
2065
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1586
|
+
const deserializeAws_restJson1Tags = (output, context) => {
|
|
1587
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2066
1588
|
if (value === null) {
|
|
2067
1589
|
return acc;
|
|
2068
1590
|
}
|
|
2069
|
-
return
|
|
1591
|
+
return {
|
|
1592
|
+
...acc,
|
|
1593
|
+
[key]: __expectString(value),
|
|
1594
|
+
};
|
|
2070
1595
|
}, {});
|
|
2071
1596
|
};
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
});
|
|
2080
|
-
};
|
|
2081
|
-
var collectBody = function (streamBody, context) {
|
|
2082
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1597
|
+
const deserializeMetadata = (output) => ({
|
|
1598
|
+
httpStatusCode: output.statusCode,
|
|
1599
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1600
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1601
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1602
|
+
});
|
|
1603
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
2083
1604
|
if (streamBody instanceof Uint8Array) {
|
|
2084
1605
|
return Promise.resolve(streamBody);
|
|
2085
1606
|
}
|
|
2086
1607
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2087
1608
|
};
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
1609
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1610
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1611
|
+
value !== null &&
|
|
1612
|
+
value !== "" &&
|
|
1613
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1614
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1615
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1616
|
+
if (encoded.length) {
|
|
1617
|
+
return JSON.parse(encoded);
|
|
1618
|
+
}
|
|
1619
|
+
return {};
|
|
1620
|
+
});
|
|
1621
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1622
|
+
const value = await parseBody(errorBody, context);
|
|
1623
|
+
value.message = value.message ?? value.Message;
|
|
1624
|
+
return value;
|
|
2097
1625
|
};
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
}
|
|
2103
|
-
return {};
|
|
2104
|
-
});
|
|
2105
|
-
};
|
|
2106
|
-
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2107
|
-
var value;
|
|
2108
|
-
var _a;
|
|
2109
|
-
return __generator(this, function (_b) {
|
|
2110
|
-
switch (_b.label) {
|
|
2111
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
2112
|
-
case 1:
|
|
2113
|
-
value = _b.sent();
|
|
2114
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2115
|
-
return [2, value];
|
|
2116
|
-
}
|
|
2117
|
-
});
|
|
2118
|
-
}); };
|
|
2119
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
2120
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2121
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
2122
|
-
var cleanValue = rawValue;
|
|
1626
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1627
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1628
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1629
|
+
let cleanValue = rawValue;
|
|
2123
1630
|
if (typeof cleanValue === "number") {
|
|
2124
1631
|
cleanValue = cleanValue.toString();
|
|
2125
1632
|
}
|
|
@@ -2134,7 +1641,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2134
1641
|
}
|
|
2135
1642
|
return cleanValue;
|
|
2136
1643
|
};
|
|
2137
|
-
|
|
1644
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2138
1645
|
if (headerKey !== undefined) {
|
|
2139
1646
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2140
1647
|
}
|