@aws-sdk/client-resource-groups 3.489.0 → 3.495.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/dist-cjs/ResourceGroups.js +1 -47
- package/dist-cjs/ResourceGroupsClient.js +1 -43
- package/dist-cjs/commands/CreateGroupCommand.js +1 -28
- package/dist-cjs/commands/DeleteGroupCommand.js +1 -28
- package/dist-cjs/commands/GetAccountSettingsCommand.js +1 -28
- package/dist-cjs/commands/GetGroupCommand.js +1 -28
- package/dist-cjs/commands/GetGroupConfigurationCommand.js +1 -28
- package/dist-cjs/commands/GetGroupQueryCommand.js +1 -28
- package/dist-cjs/commands/GetTagsCommand.js +1 -28
- package/dist-cjs/commands/GroupResourcesCommand.js +1 -28
- package/dist-cjs/commands/ListGroupResourcesCommand.js +1 -28
- package/dist-cjs/commands/ListGroupsCommand.js +1 -28
- package/dist-cjs/commands/PutGroupConfigurationCommand.js +1 -28
- package/dist-cjs/commands/SearchResourcesCommand.js +1 -28
- package/dist-cjs/commands/TagCommand.js +1 -28
- package/dist-cjs/commands/UngroupResourcesCommand.js +1 -28
- package/dist-cjs/commands/UntagCommand.js +1 -28
- package/dist-cjs/commands/UpdateAccountSettingsCommand.js +1 -28
- package/dist-cjs/commands/UpdateGroupCommand.js +1 -28
- package/dist-cjs/commands/UpdateGroupQueryCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -21
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2024 -11
- package/dist-cjs/models/ResourceGroupsServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -136
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListGroupResourcesPaginator.js +1 -7
- package/dist-cjs/pagination/ListGroupsPaginator.js +1 -7
- package/dist-cjs/pagination/SearchResourcesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1313
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1313 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateGroupQueryCommand = exports.de_UpdateGroupCommand = exports.de_UpdateAccountSettingsCommand = exports.de_UntagCommand = exports.de_UngroupResourcesCommand = exports.de_TagCommand = exports.de_SearchResourcesCommand = exports.de_PutGroupConfigurationCommand = exports.de_ListGroupsCommand = exports.de_ListGroupResourcesCommand = exports.de_GroupResourcesCommand = exports.de_GetTagsCommand = exports.de_GetGroupQueryCommand = exports.de_GetGroupConfigurationCommand = exports.de_GetGroupCommand = exports.de_GetAccountSettingsCommand = exports.de_DeleteGroupCommand = exports.de_CreateGroupCommand = exports.se_UpdateGroupQueryCommand = exports.se_UpdateGroupCommand = exports.se_UpdateAccountSettingsCommand = exports.se_UntagCommand = exports.se_UngroupResourcesCommand = exports.se_TagCommand = exports.se_SearchResourcesCommand = exports.se_PutGroupConfigurationCommand = exports.se_ListGroupsCommand = exports.se_ListGroupResourcesCommand = exports.se_GroupResourcesCommand = exports.se_GetTagsCommand = exports.se_GetGroupQueryCommand = exports.se_GetGroupConfigurationCommand = exports.se_GetGroupCommand = exports.se_GetAccountSettingsCommand = exports.se_DeleteGroupCommand = exports.se_CreateGroupCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const models_0_1 = require("../models/models_0");
|
|
7
|
-
const ResourceGroupsServiceException_1 = require("../models/ResourceGroupsServiceException");
|
|
8
|
-
const se_CreateGroupCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/groups");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
Configuration: (_) => (0, smithy_client_1._json)(_),
|
|
17
|
-
Description: [],
|
|
18
|
-
Name: [],
|
|
19
|
-
ResourceQuery: (_) => (0, smithy_client_1._json)(_),
|
|
20
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
21
|
-
}));
|
|
22
|
-
b.m("POST").h(headers).b(body);
|
|
23
|
-
return b.build();
|
|
24
|
-
};
|
|
25
|
-
exports.se_CreateGroupCommand = se_CreateGroupCommand;
|
|
26
|
-
const se_DeleteGroupCommand = async (input, context) => {
|
|
27
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
28
|
-
const headers = {
|
|
29
|
-
"content-type": "application/json",
|
|
30
|
-
};
|
|
31
|
-
b.bp("/delete-group");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
34
|
-
Group: [],
|
|
35
|
-
GroupName: [],
|
|
36
|
-
}));
|
|
37
|
-
b.m("POST").h(headers).b(body);
|
|
38
|
-
return b.build();
|
|
39
|
-
};
|
|
40
|
-
exports.se_DeleteGroupCommand = se_DeleteGroupCommand;
|
|
41
|
-
const se_GetAccountSettingsCommand = async (input, context) => {
|
|
42
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
43
|
-
const headers = {
|
|
44
|
-
"content-type": "application/json",
|
|
45
|
-
};
|
|
46
|
-
b.bp("/get-account-settings");
|
|
47
|
-
let body;
|
|
48
|
-
body = "";
|
|
49
|
-
b.m("POST").h(headers).b(body);
|
|
50
|
-
return b.build();
|
|
51
|
-
};
|
|
52
|
-
exports.se_GetAccountSettingsCommand = se_GetAccountSettingsCommand;
|
|
53
|
-
const se_GetGroupCommand = async (input, context) => {
|
|
54
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
55
|
-
const headers = {
|
|
56
|
-
"content-type": "application/json",
|
|
57
|
-
};
|
|
58
|
-
b.bp("/get-group");
|
|
59
|
-
let body;
|
|
60
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
61
|
-
Group: [],
|
|
62
|
-
GroupName: [],
|
|
63
|
-
}));
|
|
64
|
-
b.m("POST").h(headers).b(body);
|
|
65
|
-
return b.build();
|
|
66
|
-
};
|
|
67
|
-
exports.se_GetGroupCommand = se_GetGroupCommand;
|
|
68
|
-
const se_GetGroupConfigurationCommand = async (input, context) => {
|
|
69
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
70
|
-
const headers = {
|
|
71
|
-
"content-type": "application/json",
|
|
72
|
-
};
|
|
73
|
-
b.bp("/get-group-configuration");
|
|
74
|
-
let body;
|
|
75
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
76
|
-
Group: [],
|
|
77
|
-
}));
|
|
78
|
-
b.m("POST").h(headers).b(body);
|
|
79
|
-
return b.build();
|
|
80
|
-
};
|
|
81
|
-
exports.se_GetGroupConfigurationCommand = se_GetGroupConfigurationCommand;
|
|
82
|
-
const se_GetGroupQueryCommand = async (input, context) => {
|
|
83
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
84
|
-
const headers = {
|
|
85
|
-
"content-type": "application/json",
|
|
86
|
-
};
|
|
87
|
-
b.bp("/get-group-query");
|
|
88
|
-
let body;
|
|
89
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
90
|
-
Group: [],
|
|
91
|
-
GroupName: [],
|
|
92
|
-
}));
|
|
93
|
-
b.m("POST").h(headers).b(body);
|
|
94
|
-
return b.build();
|
|
95
|
-
};
|
|
96
|
-
exports.se_GetGroupQueryCommand = se_GetGroupQueryCommand;
|
|
97
|
-
const se_GetTagsCommand = async (input, context) => {
|
|
98
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
99
|
-
const headers = {};
|
|
100
|
-
b.bp("/resources/{Arn}/tags");
|
|
101
|
-
b.p("Arn", () => input.Arn, "{Arn}", false);
|
|
102
|
-
let body;
|
|
103
|
-
b.m("GET").h(headers).b(body);
|
|
104
|
-
return b.build();
|
|
105
|
-
};
|
|
106
|
-
exports.se_GetTagsCommand = se_GetTagsCommand;
|
|
107
|
-
const se_GroupResourcesCommand = async (input, context) => {
|
|
108
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
109
|
-
const headers = {
|
|
110
|
-
"content-type": "application/json",
|
|
111
|
-
};
|
|
112
|
-
b.bp("/group-resources");
|
|
113
|
-
let body;
|
|
114
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
115
|
-
Group: [],
|
|
116
|
-
ResourceArns: (_) => (0, smithy_client_1._json)(_),
|
|
117
|
-
}));
|
|
118
|
-
b.m("POST").h(headers).b(body);
|
|
119
|
-
return b.build();
|
|
120
|
-
};
|
|
121
|
-
exports.se_GroupResourcesCommand = se_GroupResourcesCommand;
|
|
122
|
-
const se_ListGroupResourcesCommand = async (input, context) => {
|
|
123
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
124
|
-
const headers = {
|
|
125
|
-
"content-type": "application/json",
|
|
126
|
-
};
|
|
127
|
-
b.bp("/list-group-resources");
|
|
128
|
-
let body;
|
|
129
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
130
|
-
Filters: (_) => (0, smithy_client_1._json)(_),
|
|
131
|
-
Group: [],
|
|
132
|
-
GroupName: [],
|
|
133
|
-
MaxResults: [],
|
|
134
|
-
NextToken: [],
|
|
135
|
-
}));
|
|
136
|
-
b.m("POST").h(headers).b(body);
|
|
137
|
-
return b.build();
|
|
138
|
-
};
|
|
139
|
-
exports.se_ListGroupResourcesCommand = se_ListGroupResourcesCommand;
|
|
140
|
-
const se_ListGroupsCommand = async (input, context) => {
|
|
141
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
142
|
-
const headers = {
|
|
143
|
-
"content-type": "application/json",
|
|
144
|
-
};
|
|
145
|
-
b.bp("/groups-list");
|
|
146
|
-
const query = (0, smithy_client_1.map)({
|
|
147
|
-
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
148
|
-
[_nT]: [, input[_NT]],
|
|
149
|
-
});
|
|
150
|
-
let body;
|
|
151
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
152
|
-
Filters: (_) => (0, smithy_client_1._json)(_),
|
|
153
|
-
}));
|
|
154
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
155
|
-
return b.build();
|
|
156
|
-
};
|
|
157
|
-
exports.se_ListGroupsCommand = se_ListGroupsCommand;
|
|
158
|
-
const se_PutGroupConfigurationCommand = async (input, context) => {
|
|
159
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
160
|
-
const headers = {
|
|
161
|
-
"content-type": "application/json",
|
|
162
|
-
};
|
|
163
|
-
b.bp("/put-group-configuration");
|
|
164
|
-
let body;
|
|
165
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
166
|
-
Configuration: (_) => (0, smithy_client_1._json)(_),
|
|
167
|
-
Group: [],
|
|
168
|
-
}));
|
|
169
|
-
b.m("POST").h(headers).b(body);
|
|
170
|
-
return b.build();
|
|
171
|
-
};
|
|
172
|
-
exports.se_PutGroupConfigurationCommand = se_PutGroupConfigurationCommand;
|
|
173
|
-
const se_SearchResourcesCommand = async (input, context) => {
|
|
174
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
175
|
-
const headers = {
|
|
176
|
-
"content-type": "application/json",
|
|
177
|
-
};
|
|
178
|
-
b.bp("/resources/search");
|
|
179
|
-
let body;
|
|
180
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
181
|
-
MaxResults: [],
|
|
182
|
-
NextToken: [],
|
|
183
|
-
ResourceQuery: (_) => (0, smithy_client_1._json)(_),
|
|
184
|
-
}));
|
|
185
|
-
b.m("POST").h(headers).b(body);
|
|
186
|
-
return b.build();
|
|
187
|
-
};
|
|
188
|
-
exports.se_SearchResourcesCommand = se_SearchResourcesCommand;
|
|
189
|
-
const se_TagCommand = async (input, context) => {
|
|
190
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
191
|
-
const headers = {
|
|
192
|
-
"content-type": "application/json",
|
|
193
|
-
};
|
|
194
|
-
b.bp("/resources/{Arn}/tags");
|
|
195
|
-
b.p("Arn", () => input.Arn, "{Arn}", false);
|
|
196
|
-
let body;
|
|
197
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
198
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
199
|
-
}));
|
|
200
|
-
b.m("PUT").h(headers).b(body);
|
|
201
|
-
return b.build();
|
|
202
|
-
};
|
|
203
|
-
exports.se_TagCommand = se_TagCommand;
|
|
204
|
-
const se_UngroupResourcesCommand = async (input, context) => {
|
|
205
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
206
|
-
const headers = {
|
|
207
|
-
"content-type": "application/json",
|
|
208
|
-
};
|
|
209
|
-
b.bp("/ungroup-resources");
|
|
210
|
-
let body;
|
|
211
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
212
|
-
Group: [],
|
|
213
|
-
ResourceArns: (_) => (0, smithy_client_1._json)(_),
|
|
214
|
-
}));
|
|
215
|
-
b.m("POST").h(headers).b(body);
|
|
216
|
-
return b.build();
|
|
217
|
-
};
|
|
218
|
-
exports.se_UngroupResourcesCommand = se_UngroupResourcesCommand;
|
|
219
|
-
const se_UntagCommand = async (input, context) => {
|
|
220
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
221
|
-
const headers = {
|
|
222
|
-
"content-type": "application/json",
|
|
223
|
-
};
|
|
224
|
-
b.bp("/resources/{Arn}/tags");
|
|
225
|
-
b.p("Arn", () => input.Arn, "{Arn}", false);
|
|
226
|
-
let body;
|
|
227
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
228
|
-
Keys: (_) => (0, smithy_client_1._json)(_),
|
|
229
|
-
}));
|
|
230
|
-
b.m("PATCH").h(headers).b(body);
|
|
231
|
-
return b.build();
|
|
232
|
-
};
|
|
233
|
-
exports.se_UntagCommand = se_UntagCommand;
|
|
234
|
-
const se_UpdateAccountSettingsCommand = async (input, context) => {
|
|
235
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
236
|
-
const headers = {
|
|
237
|
-
"content-type": "application/json",
|
|
238
|
-
};
|
|
239
|
-
b.bp("/update-account-settings");
|
|
240
|
-
let body;
|
|
241
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
242
|
-
GroupLifecycleEventsDesiredStatus: [],
|
|
243
|
-
}));
|
|
244
|
-
b.m("POST").h(headers).b(body);
|
|
245
|
-
return b.build();
|
|
246
|
-
};
|
|
247
|
-
exports.se_UpdateAccountSettingsCommand = se_UpdateAccountSettingsCommand;
|
|
248
|
-
const se_UpdateGroupCommand = async (input, context) => {
|
|
249
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
250
|
-
const headers = {
|
|
251
|
-
"content-type": "application/json",
|
|
252
|
-
};
|
|
253
|
-
b.bp("/update-group");
|
|
254
|
-
let body;
|
|
255
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
256
|
-
Description: [],
|
|
257
|
-
Group: [],
|
|
258
|
-
GroupName: [],
|
|
259
|
-
}));
|
|
260
|
-
b.m("POST").h(headers).b(body);
|
|
261
|
-
return b.build();
|
|
262
|
-
};
|
|
263
|
-
exports.se_UpdateGroupCommand = se_UpdateGroupCommand;
|
|
264
|
-
const se_UpdateGroupQueryCommand = async (input, context) => {
|
|
265
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
266
|
-
const headers = {
|
|
267
|
-
"content-type": "application/json",
|
|
268
|
-
};
|
|
269
|
-
b.bp("/update-group-query");
|
|
270
|
-
let body;
|
|
271
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
272
|
-
Group: [],
|
|
273
|
-
GroupName: [],
|
|
274
|
-
ResourceQuery: (_) => (0, smithy_client_1._json)(_),
|
|
275
|
-
}));
|
|
276
|
-
b.m("POST").h(headers).b(body);
|
|
277
|
-
return b.build();
|
|
278
|
-
};
|
|
279
|
-
exports.se_UpdateGroupQueryCommand = se_UpdateGroupQueryCommand;
|
|
280
|
-
const de_CreateGroupCommand = async (output, context) => {
|
|
281
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
282
|
-
return de_CreateGroupCommandError(output, context);
|
|
283
|
-
}
|
|
284
|
-
const contents = (0, smithy_client_1.map)({
|
|
285
|
-
$metadata: deserializeMetadata(output),
|
|
286
|
-
});
|
|
287
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
288
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
289
|
-
Group: smithy_client_1._json,
|
|
290
|
-
GroupConfiguration: smithy_client_1._json,
|
|
291
|
-
ResourceQuery: smithy_client_1._json,
|
|
292
|
-
Tags: smithy_client_1._json,
|
|
293
|
-
});
|
|
294
|
-
Object.assign(contents, doc);
|
|
295
|
-
return contents;
|
|
296
|
-
};
|
|
297
|
-
exports.de_CreateGroupCommand = de_CreateGroupCommand;
|
|
298
|
-
const de_CreateGroupCommandError = async (output, context) => {
|
|
299
|
-
const parsedOutput = {
|
|
300
|
-
...output,
|
|
301
|
-
body: await parseErrorBody(output.body, context),
|
|
302
|
-
};
|
|
303
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
304
|
-
switch (errorCode) {
|
|
305
|
-
case "BadRequestException":
|
|
306
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
307
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
308
|
-
case "ForbiddenException":
|
|
309
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
310
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
311
|
-
case "InternalServerErrorException":
|
|
312
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
313
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
314
|
-
case "MethodNotAllowedException":
|
|
315
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
316
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
317
|
-
case "TooManyRequestsException":
|
|
318
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
319
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
320
|
-
default:
|
|
321
|
-
const parsedBody = parsedOutput.body;
|
|
322
|
-
return throwDefaultError({
|
|
323
|
-
output,
|
|
324
|
-
parsedBody,
|
|
325
|
-
errorCode,
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
};
|
|
329
|
-
const de_DeleteGroupCommand = async (output, context) => {
|
|
330
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
331
|
-
return de_DeleteGroupCommandError(output, context);
|
|
332
|
-
}
|
|
333
|
-
const contents = (0, smithy_client_1.map)({
|
|
334
|
-
$metadata: deserializeMetadata(output),
|
|
335
|
-
});
|
|
336
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
337
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
338
|
-
Group: smithy_client_1._json,
|
|
339
|
-
});
|
|
340
|
-
Object.assign(contents, doc);
|
|
341
|
-
return contents;
|
|
342
|
-
};
|
|
343
|
-
exports.de_DeleteGroupCommand = de_DeleteGroupCommand;
|
|
344
|
-
const de_DeleteGroupCommandError = async (output, context) => {
|
|
345
|
-
const parsedOutput = {
|
|
346
|
-
...output,
|
|
347
|
-
body: await parseErrorBody(output.body, context),
|
|
348
|
-
};
|
|
349
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
350
|
-
switch (errorCode) {
|
|
351
|
-
case "BadRequestException":
|
|
352
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
353
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
354
|
-
case "ForbiddenException":
|
|
355
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
356
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
357
|
-
case "InternalServerErrorException":
|
|
358
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
359
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
360
|
-
case "MethodNotAllowedException":
|
|
361
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
362
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
363
|
-
case "NotFoundException":
|
|
364
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
365
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
366
|
-
case "TooManyRequestsException":
|
|
367
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
368
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
369
|
-
default:
|
|
370
|
-
const parsedBody = parsedOutput.body;
|
|
371
|
-
return throwDefaultError({
|
|
372
|
-
output,
|
|
373
|
-
parsedBody,
|
|
374
|
-
errorCode,
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
const de_GetAccountSettingsCommand = async (output, context) => {
|
|
379
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
380
|
-
return de_GetAccountSettingsCommandError(output, context);
|
|
381
|
-
}
|
|
382
|
-
const contents = (0, smithy_client_1.map)({
|
|
383
|
-
$metadata: deserializeMetadata(output),
|
|
384
|
-
});
|
|
385
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
386
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
387
|
-
AccountSettings: smithy_client_1._json,
|
|
388
|
-
});
|
|
389
|
-
Object.assign(contents, doc);
|
|
390
|
-
return contents;
|
|
391
|
-
};
|
|
392
|
-
exports.de_GetAccountSettingsCommand = de_GetAccountSettingsCommand;
|
|
393
|
-
const de_GetAccountSettingsCommandError = async (output, context) => {
|
|
394
|
-
const parsedOutput = {
|
|
395
|
-
...output,
|
|
396
|
-
body: await parseErrorBody(output.body, context),
|
|
397
|
-
};
|
|
398
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
399
|
-
switch (errorCode) {
|
|
400
|
-
case "BadRequestException":
|
|
401
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
402
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
403
|
-
case "ForbiddenException":
|
|
404
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
405
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
406
|
-
case "InternalServerErrorException":
|
|
407
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
408
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
409
|
-
case "MethodNotAllowedException":
|
|
410
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
411
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
412
|
-
case "TooManyRequestsException":
|
|
413
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
414
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
415
|
-
default:
|
|
416
|
-
const parsedBody = parsedOutput.body;
|
|
417
|
-
return throwDefaultError({
|
|
418
|
-
output,
|
|
419
|
-
parsedBody,
|
|
420
|
-
errorCode,
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
const de_GetGroupCommand = async (output, context) => {
|
|
425
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
426
|
-
return de_GetGroupCommandError(output, context);
|
|
427
|
-
}
|
|
428
|
-
const contents = (0, smithy_client_1.map)({
|
|
429
|
-
$metadata: deserializeMetadata(output),
|
|
430
|
-
});
|
|
431
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
432
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
433
|
-
Group: smithy_client_1._json,
|
|
434
|
-
});
|
|
435
|
-
Object.assign(contents, doc);
|
|
436
|
-
return contents;
|
|
437
|
-
};
|
|
438
|
-
exports.de_GetGroupCommand = de_GetGroupCommand;
|
|
439
|
-
const de_GetGroupCommandError = async (output, context) => {
|
|
440
|
-
const parsedOutput = {
|
|
441
|
-
...output,
|
|
442
|
-
body: await parseErrorBody(output.body, context),
|
|
443
|
-
};
|
|
444
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
445
|
-
switch (errorCode) {
|
|
446
|
-
case "BadRequestException":
|
|
447
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
448
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
449
|
-
case "ForbiddenException":
|
|
450
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
451
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
452
|
-
case "InternalServerErrorException":
|
|
453
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
454
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
455
|
-
case "MethodNotAllowedException":
|
|
456
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
457
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
458
|
-
case "NotFoundException":
|
|
459
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
460
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
461
|
-
case "TooManyRequestsException":
|
|
462
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
463
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
464
|
-
default:
|
|
465
|
-
const parsedBody = parsedOutput.body;
|
|
466
|
-
return throwDefaultError({
|
|
467
|
-
output,
|
|
468
|
-
parsedBody,
|
|
469
|
-
errorCode,
|
|
470
|
-
});
|
|
471
|
-
}
|
|
472
|
-
};
|
|
473
|
-
const de_GetGroupConfigurationCommand = async (output, context) => {
|
|
474
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
475
|
-
return de_GetGroupConfigurationCommandError(output, context);
|
|
476
|
-
}
|
|
477
|
-
const contents = (0, smithy_client_1.map)({
|
|
478
|
-
$metadata: deserializeMetadata(output),
|
|
479
|
-
});
|
|
480
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
481
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
482
|
-
GroupConfiguration: smithy_client_1._json,
|
|
483
|
-
});
|
|
484
|
-
Object.assign(contents, doc);
|
|
485
|
-
return contents;
|
|
486
|
-
};
|
|
487
|
-
exports.de_GetGroupConfigurationCommand = de_GetGroupConfigurationCommand;
|
|
488
|
-
const de_GetGroupConfigurationCommandError = async (output, context) => {
|
|
489
|
-
const parsedOutput = {
|
|
490
|
-
...output,
|
|
491
|
-
body: await parseErrorBody(output.body, context),
|
|
492
|
-
};
|
|
493
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
494
|
-
switch (errorCode) {
|
|
495
|
-
case "BadRequestException":
|
|
496
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
497
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
498
|
-
case "ForbiddenException":
|
|
499
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
500
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
501
|
-
case "InternalServerErrorException":
|
|
502
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
503
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
504
|
-
case "MethodNotAllowedException":
|
|
505
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
506
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
507
|
-
case "NotFoundException":
|
|
508
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
509
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
510
|
-
case "TooManyRequestsException":
|
|
511
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
512
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
513
|
-
default:
|
|
514
|
-
const parsedBody = parsedOutput.body;
|
|
515
|
-
return throwDefaultError({
|
|
516
|
-
output,
|
|
517
|
-
parsedBody,
|
|
518
|
-
errorCode,
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
};
|
|
522
|
-
const de_GetGroupQueryCommand = async (output, context) => {
|
|
523
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
524
|
-
return de_GetGroupQueryCommandError(output, context);
|
|
525
|
-
}
|
|
526
|
-
const contents = (0, smithy_client_1.map)({
|
|
527
|
-
$metadata: deserializeMetadata(output),
|
|
528
|
-
});
|
|
529
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
530
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
531
|
-
GroupQuery: smithy_client_1._json,
|
|
532
|
-
});
|
|
533
|
-
Object.assign(contents, doc);
|
|
534
|
-
return contents;
|
|
535
|
-
};
|
|
536
|
-
exports.de_GetGroupQueryCommand = de_GetGroupQueryCommand;
|
|
537
|
-
const de_GetGroupQueryCommandError = async (output, context) => {
|
|
538
|
-
const parsedOutput = {
|
|
539
|
-
...output,
|
|
540
|
-
body: await parseErrorBody(output.body, context),
|
|
541
|
-
};
|
|
542
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
543
|
-
switch (errorCode) {
|
|
544
|
-
case "BadRequestException":
|
|
545
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
546
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
547
|
-
case "ForbiddenException":
|
|
548
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
549
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
550
|
-
case "InternalServerErrorException":
|
|
551
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
552
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
553
|
-
case "MethodNotAllowedException":
|
|
554
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
555
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
556
|
-
case "NotFoundException":
|
|
557
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
558
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
559
|
-
case "TooManyRequestsException":
|
|
560
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
561
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
562
|
-
default:
|
|
563
|
-
const parsedBody = parsedOutput.body;
|
|
564
|
-
return throwDefaultError({
|
|
565
|
-
output,
|
|
566
|
-
parsedBody,
|
|
567
|
-
errorCode,
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
const de_GetTagsCommand = async (output, context) => {
|
|
572
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
573
|
-
return de_GetTagsCommandError(output, context);
|
|
574
|
-
}
|
|
575
|
-
const contents = (0, smithy_client_1.map)({
|
|
576
|
-
$metadata: deserializeMetadata(output),
|
|
577
|
-
});
|
|
578
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
579
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
580
|
-
Arn: smithy_client_1.expectString,
|
|
581
|
-
Tags: smithy_client_1._json,
|
|
582
|
-
});
|
|
583
|
-
Object.assign(contents, doc);
|
|
584
|
-
return contents;
|
|
585
|
-
};
|
|
586
|
-
exports.de_GetTagsCommand = de_GetTagsCommand;
|
|
587
|
-
const de_GetTagsCommandError = async (output, context) => {
|
|
588
|
-
const parsedOutput = {
|
|
589
|
-
...output,
|
|
590
|
-
body: await parseErrorBody(output.body, context),
|
|
591
|
-
};
|
|
592
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
593
|
-
switch (errorCode) {
|
|
594
|
-
case "BadRequestException":
|
|
595
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
596
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
597
|
-
case "ForbiddenException":
|
|
598
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
599
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
600
|
-
case "InternalServerErrorException":
|
|
601
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
602
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
603
|
-
case "MethodNotAllowedException":
|
|
604
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
605
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
606
|
-
case "NotFoundException":
|
|
607
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
608
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
609
|
-
case "TooManyRequestsException":
|
|
610
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
611
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
612
|
-
default:
|
|
613
|
-
const parsedBody = parsedOutput.body;
|
|
614
|
-
return throwDefaultError({
|
|
615
|
-
output,
|
|
616
|
-
parsedBody,
|
|
617
|
-
errorCode,
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
};
|
|
621
|
-
const de_GroupResourcesCommand = async (output, context) => {
|
|
622
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
623
|
-
return de_GroupResourcesCommandError(output, context);
|
|
624
|
-
}
|
|
625
|
-
const contents = (0, smithy_client_1.map)({
|
|
626
|
-
$metadata: deserializeMetadata(output),
|
|
627
|
-
});
|
|
628
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
629
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
630
|
-
Failed: smithy_client_1._json,
|
|
631
|
-
Pending: smithy_client_1._json,
|
|
632
|
-
Succeeded: smithy_client_1._json,
|
|
633
|
-
});
|
|
634
|
-
Object.assign(contents, doc);
|
|
635
|
-
return contents;
|
|
636
|
-
};
|
|
637
|
-
exports.de_GroupResourcesCommand = de_GroupResourcesCommand;
|
|
638
|
-
const de_GroupResourcesCommandError = async (output, context) => {
|
|
639
|
-
const parsedOutput = {
|
|
640
|
-
...output,
|
|
641
|
-
body: await parseErrorBody(output.body, context),
|
|
642
|
-
};
|
|
643
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
644
|
-
switch (errorCode) {
|
|
645
|
-
case "BadRequestException":
|
|
646
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
647
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
648
|
-
case "ForbiddenException":
|
|
649
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
650
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
651
|
-
case "InternalServerErrorException":
|
|
652
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
653
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
654
|
-
case "MethodNotAllowedException":
|
|
655
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
656
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
657
|
-
case "NotFoundException":
|
|
658
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
659
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
660
|
-
case "TooManyRequestsException":
|
|
661
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
662
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
663
|
-
default:
|
|
664
|
-
const parsedBody = parsedOutput.body;
|
|
665
|
-
return throwDefaultError({
|
|
666
|
-
output,
|
|
667
|
-
parsedBody,
|
|
668
|
-
errorCode,
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
};
|
|
672
|
-
const de_ListGroupResourcesCommand = async (output, context) => {
|
|
673
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
674
|
-
return de_ListGroupResourcesCommandError(output, context);
|
|
675
|
-
}
|
|
676
|
-
const contents = (0, smithy_client_1.map)({
|
|
677
|
-
$metadata: deserializeMetadata(output),
|
|
678
|
-
});
|
|
679
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
680
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
681
|
-
NextToken: smithy_client_1.expectString,
|
|
682
|
-
QueryErrors: smithy_client_1._json,
|
|
683
|
-
ResourceIdentifiers: smithy_client_1._json,
|
|
684
|
-
Resources: smithy_client_1._json,
|
|
685
|
-
});
|
|
686
|
-
Object.assign(contents, doc);
|
|
687
|
-
return contents;
|
|
688
|
-
};
|
|
689
|
-
exports.de_ListGroupResourcesCommand = de_ListGroupResourcesCommand;
|
|
690
|
-
const de_ListGroupResourcesCommandError = async (output, context) => {
|
|
691
|
-
const parsedOutput = {
|
|
692
|
-
...output,
|
|
693
|
-
body: await parseErrorBody(output.body, context),
|
|
694
|
-
};
|
|
695
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
696
|
-
switch (errorCode) {
|
|
697
|
-
case "BadRequestException":
|
|
698
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
699
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
700
|
-
case "ForbiddenException":
|
|
701
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
702
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
703
|
-
case "InternalServerErrorException":
|
|
704
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
705
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
706
|
-
case "MethodNotAllowedException":
|
|
707
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
708
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
709
|
-
case "NotFoundException":
|
|
710
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
711
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
712
|
-
case "TooManyRequestsException":
|
|
713
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
714
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
715
|
-
case "UnauthorizedException":
|
|
716
|
-
case "com.amazonaws.resourcegroups#UnauthorizedException":
|
|
717
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
718
|
-
default:
|
|
719
|
-
const parsedBody = parsedOutput.body;
|
|
720
|
-
return throwDefaultError({
|
|
721
|
-
output,
|
|
722
|
-
parsedBody,
|
|
723
|
-
errorCode,
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
|
-
};
|
|
727
|
-
const de_ListGroupsCommand = async (output, context) => {
|
|
728
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
729
|
-
return de_ListGroupsCommandError(output, context);
|
|
730
|
-
}
|
|
731
|
-
const contents = (0, smithy_client_1.map)({
|
|
732
|
-
$metadata: deserializeMetadata(output),
|
|
733
|
-
});
|
|
734
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
735
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
736
|
-
GroupIdentifiers: smithy_client_1._json,
|
|
737
|
-
Groups: smithy_client_1._json,
|
|
738
|
-
NextToken: smithy_client_1.expectString,
|
|
739
|
-
});
|
|
740
|
-
Object.assign(contents, doc);
|
|
741
|
-
return contents;
|
|
742
|
-
};
|
|
743
|
-
exports.de_ListGroupsCommand = de_ListGroupsCommand;
|
|
744
|
-
const de_ListGroupsCommandError = async (output, context) => {
|
|
745
|
-
const parsedOutput = {
|
|
746
|
-
...output,
|
|
747
|
-
body: await parseErrorBody(output.body, context),
|
|
748
|
-
};
|
|
749
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
750
|
-
switch (errorCode) {
|
|
751
|
-
case "BadRequestException":
|
|
752
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
753
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
754
|
-
case "ForbiddenException":
|
|
755
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
756
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
757
|
-
case "InternalServerErrorException":
|
|
758
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
759
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
760
|
-
case "MethodNotAllowedException":
|
|
761
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
762
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
763
|
-
case "TooManyRequestsException":
|
|
764
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
765
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
766
|
-
default:
|
|
767
|
-
const parsedBody = parsedOutput.body;
|
|
768
|
-
return throwDefaultError({
|
|
769
|
-
output,
|
|
770
|
-
parsedBody,
|
|
771
|
-
errorCode,
|
|
772
|
-
});
|
|
773
|
-
}
|
|
774
|
-
};
|
|
775
|
-
const de_PutGroupConfigurationCommand = async (output, context) => {
|
|
776
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
777
|
-
return de_PutGroupConfigurationCommandError(output, context);
|
|
778
|
-
}
|
|
779
|
-
const contents = (0, smithy_client_1.map)({
|
|
780
|
-
$metadata: deserializeMetadata(output),
|
|
781
|
-
});
|
|
782
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
783
|
-
return contents;
|
|
784
|
-
};
|
|
785
|
-
exports.de_PutGroupConfigurationCommand = de_PutGroupConfigurationCommand;
|
|
786
|
-
const de_PutGroupConfigurationCommandError = async (output, context) => {
|
|
787
|
-
const parsedOutput = {
|
|
788
|
-
...output,
|
|
789
|
-
body: await parseErrorBody(output.body, context),
|
|
790
|
-
};
|
|
791
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
792
|
-
switch (errorCode) {
|
|
793
|
-
case "BadRequestException":
|
|
794
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
795
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
796
|
-
case "ForbiddenException":
|
|
797
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
798
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
799
|
-
case "InternalServerErrorException":
|
|
800
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
801
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
802
|
-
case "MethodNotAllowedException":
|
|
803
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
804
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
805
|
-
case "NotFoundException":
|
|
806
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
807
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
808
|
-
case "TooManyRequestsException":
|
|
809
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
810
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
811
|
-
default:
|
|
812
|
-
const parsedBody = parsedOutput.body;
|
|
813
|
-
return throwDefaultError({
|
|
814
|
-
output,
|
|
815
|
-
parsedBody,
|
|
816
|
-
errorCode,
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
const de_SearchResourcesCommand = async (output, context) => {
|
|
821
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
822
|
-
return de_SearchResourcesCommandError(output, context);
|
|
823
|
-
}
|
|
824
|
-
const contents = (0, smithy_client_1.map)({
|
|
825
|
-
$metadata: deserializeMetadata(output),
|
|
826
|
-
});
|
|
827
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
828
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
829
|
-
NextToken: smithy_client_1.expectString,
|
|
830
|
-
QueryErrors: smithy_client_1._json,
|
|
831
|
-
ResourceIdentifiers: smithy_client_1._json,
|
|
832
|
-
});
|
|
833
|
-
Object.assign(contents, doc);
|
|
834
|
-
return contents;
|
|
835
|
-
};
|
|
836
|
-
exports.de_SearchResourcesCommand = de_SearchResourcesCommand;
|
|
837
|
-
const de_SearchResourcesCommandError = async (output, context) => {
|
|
838
|
-
const parsedOutput = {
|
|
839
|
-
...output,
|
|
840
|
-
body: await parseErrorBody(output.body, context),
|
|
841
|
-
};
|
|
842
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
843
|
-
switch (errorCode) {
|
|
844
|
-
case "BadRequestException":
|
|
845
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
846
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
847
|
-
case "ForbiddenException":
|
|
848
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
849
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
850
|
-
case "InternalServerErrorException":
|
|
851
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
852
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
853
|
-
case "MethodNotAllowedException":
|
|
854
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
855
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
856
|
-
case "TooManyRequestsException":
|
|
857
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
858
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
859
|
-
case "UnauthorizedException":
|
|
860
|
-
case "com.amazonaws.resourcegroups#UnauthorizedException":
|
|
861
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
862
|
-
default:
|
|
863
|
-
const parsedBody = parsedOutput.body;
|
|
864
|
-
return throwDefaultError({
|
|
865
|
-
output,
|
|
866
|
-
parsedBody,
|
|
867
|
-
errorCode,
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
};
|
|
871
|
-
const de_TagCommand = async (output, context) => {
|
|
872
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
873
|
-
return de_TagCommandError(output, context);
|
|
874
|
-
}
|
|
875
|
-
const contents = (0, smithy_client_1.map)({
|
|
876
|
-
$metadata: deserializeMetadata(output),
|
|
877
|
-
});
|
|
878
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
879
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
880
|
-
Arn: smithy_client_1.expectString,
|
|
881
|
-
Tags: smithy_client_1._json,
|
|
882
|
-
});
|
|
883
|
-
Object.assign(contents, doc);
|
|
884
|
-
return contents;
|
|
885
|
-
};
|
|
886
|
-
exports.de_TagCommand = de_TagCommand;
|
|
887
|
-
const de_TagCommandError = async (output, context) => {
|
|
888
|
-
const parsedOutput = {
|
|
889
|
-
...output,
|
|
890
|
-
body: await parseErrorBody(output.body, context),
|
|
891
|
-
};
|
|
892
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
893
|
-
switch (errorCode) {
|
|
894
|
-
case "BadRequestException":
|
|
895
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
896
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
897
|
-
case "ForbiddenException":
|
|
898
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
899
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
900
|
-
case "InternalServerErrorException":
|
|
901
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
902
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
903
|
-
case "MethodNotAllowedException":
|
|
904
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
905
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
906
|
-
case "NotFoundException":
|
|
907
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
908
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
909
|
-
case "TooManyRequestsException":
|
|
910
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
911
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
912
|
-
default:
|
|
913
|
-
const parsedBody = parsedOutput.body;
|
|
914
|
-
return throwDefaultError({
|
|
915
|
-
output,
|
|
916
|
-
parsedBody,
|
|
917
|
-
errorCode,
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
|
-
const de_UngroupResourcesCommand = async (output, context) => {
|
|
922
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
923
|
-
return de_UngroupResourcesCommandError(output, context);
|
|
924
|
-
}
|
|
925
|
-
const contents = (0, smithy_client_1.map)({
|
|
926
|
-
$metadata: deserializeMetadata(output),
|
|
927
|
-
});
|
|
928
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
929
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
930
|
-
Failed: smithy_client_1._json,
|
|
931
|
-
Pending: smithy_client_1._json,
|
|
932
|
-
Succeeded: smithy_client_1._json,
|
|
933
|
-
});
|
|
934
|
-
Object.assign(contents, doc);
|
|
935
|
-
return contents;
|
|
936
|
-
};
|
|
937
|
-
exports.de_UngroupResourcesCommand = de_UngroupResourcesCommand;
|
|
938
|
-
const de_UngroupResourcesCommandError = async (output, context) => {
|
|
939
|
-
const parsedOutput = {
|
|
940
|
-
...output,
|
|
941
|
-
body: await parseErrorBody(output.body, context),
|
|
942
|
-
};
|
|
943
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
944
|
-
switch (errorCode) {
|
|
945
|
-
case "BadRequestException":
|
|
946
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
947
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
948
|
-
case "ForbiddenException":
|
|
949
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
950
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
951
|
-
case "InternalServerErrorException":
|
|
952
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
953
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
954
|
-
case "MethodNotAllowedException":
|
|
955
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
956
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
957
|
-
case "NotFoundException":
|
|
958
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
959
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
960
|
-
case "TooManyRequestsException":
|
|
961
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
962
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
963
|
-
default:
|
|
964
|
-
const parsedBody = parsedOutput.body;
|
|
965
|
-
return throwDefaultError({
|
|
966
|
-
output,
|
|
967
|
-
parsedBody,
|
|
968
|
-
errorCode,
|
|
969
|
-
});
|
|
970
|
-
}
|
|
971
|
-
};
|
|
972
|
-
const de_UntagCommand = async (output, context) => {
|
|
973
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
974
|
-
return de_UntagCommandError(output, context);
|
|
975
|
-
}
|
|
976
|
-
const contents = (0, smithy_client_1.map)({
|
|
977
|
-
$metadata: deserializeMetadata(output),
|
|
978
|
-
});
|
|
979
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
980
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
981
|
-
Arn: smithy_client_1.expectString,
|
|
982
|
-
Keys: smithy_client_1._json,
|
|
983
|
-
});
|
|
984
|
-
Object.assign(contents, doc);
|
|
985
|
-
return contents;
|
|
986
|
-
};
|
|
987
|
-
exports.de_UntagCommand = de_UntagCommand;
|
|
988
|
-
const de_UntagCommandError = async (output, context) => {
|
|
989
|
-
const parsedOutput = {
|
|
990
|
-
...output,
|
|
991
|
-
body: await parseErrorBody(output.body, context),
|
|
992
|
-
};
|
|
993
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
994
|
-
switch (errorCode) {
|
|
995
|
-
case "BadRequestException":
|
|
996
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
997
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
998
|
-
case "ForbiddenException":
|
|
999
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
1000
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1001
|
-
case "InternalServerErrorException":
|
|
1002
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
1003
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
1004
|
-
case "MethodNotAllowedException":
|
|
1005
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
1006
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
1007
|
-
case "NotFoundException":
|
|
1008
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
1009
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1010
|
-
case "TooManyRequestsException":
|
|
1011
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
1012
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1013
|
-
default:
|
|
1014
|
-
const parsedBody = parsedOutput.body;
|
|
1015
|
-
return throwDefaultError({
|
|
1016
|
-
output,
|
|
1017
|
-
parsedBody,
|
|
1018
|
-
errorCode,
|
|
1019
|
-
});
|
|
1020
|
-
}
|
|
1021
|
-
};
|
|
1022
|
-
const de_UpdateAccountSettingsCommand = async (output, context) => {
|
|
1023
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1024
|
-
return de_UpdateAccountSettingsCommandError(output, context);
|
|
1025
|
-
}
|
|
1026
|
-
const contents = (0, smithy_client_1.map)({
|
|
1027
|
-
$metadata: deserializeMetadata(output),
|
|
1028
|
-
});
|
|
1029
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1030
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1031
|
-
AccountSettings: smithy_client_1._json,
|
|
1032
|
-
});
|
|
1033
|
-
Object.assign(contents, doc);
|
|
1034
|
-
return contents;
|
|
1035
|
-
};
|
|
1036
|
-
exports.de_UpdateAccountSettingsCommand = de_UpdateAccountSettingsCommand;
|
|
1037
|
-
const de_UpdateAccountSettingsCommandError = async (output, context) => {
|
|
1038
|
-
const parsedOutput = {
|
|
1039
|
-
...output,
|
|
1040
|
-
body: await parseErrorBody(output.body, context),
|
|
1041
|
-
};
|
|
1042
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1043
|
-
switch (errorCode) {
|
|
1044
|
-
case "BadRequestException":
|
|
1045
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
1046
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
1047
|
-
case "ForbiddenException":
|
|
1048
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
1049
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1050
|
-
case "InternalServerErrorException":
|
|
1051
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
1052
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
1053
|
-
case "MethodNotAllowedException":
|
|
1054
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
1055
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
1056
|
-
case "TooManyRequestsException":
|
|
1057
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
1058
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1059
|
-
default:
|
|
1060
|
-
const parsedBody = parsedOutput.body;
|
|
1061
|
-
return throwDefaultError({
|
|
1062
|
-
output,
|
|
1063
|
-
parsedBody,
|
|
1064
|
-
errorCode,
|
|
1065
|
-
});
|
|
1066
|
-
}
|
|
1067
|
-
};
|
|
1068
|
-
const de_UpdateGroupCommand = async (output, context) => {
|
|
1069
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1070
|
-
return de_UpdateGroupCommandError(output, context);
|
|
1071
|
-
}
|
|
1072
|
-
const contents = (0, smithy_client_1.map)({
|
|
1073
|
-
$metadata: deserializeMetadata(output),
|
|
1074
|
-
});
|
|
1075
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1076
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1077
|
-
Group: smithy_client_1._json,
|
|
1078
|
-
});
|
|
1079
|
-
Object.assign(contents, doc);
|
|
1080
|
-
return contents;
|
|
1081
|
-
};
|
|
1082
|
-
exports.de_UpdateGroupCommand = de_UpdateGroupCommand;
|
|
1083
|
-
const de_UpdateGroupCommandError = async (output, context) => {
|
|
1084
|
-
const parsedOutput = {
|
|
1085
|
-
...output,
|
|
1086
|
-
body: await parseErrorBody(output.body, context),
|
|
1087
|
-
};
|
|
1088
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1089
|
-
switch (errorCode) {
|
|
1090
|
-
case "BadRequestException":
|
|
1091
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
1092
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
1093
|
-
case "ForbiddenException":
|
|
1094
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
1095
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1096
|
-
case "InternalServerErrorException":
|
|
1097
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
1098
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
1099
|
-
case "MethodNotAllowedException":
|
|
1100
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
1101
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
1102
|
-
case "NotFoundException":
|
|
1103
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
1104
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1105
|
-
case "TooManyRequestsException":
|
|
1106
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
1107
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1108
|
-
default:
|
|
1109
|
-
const parsedBody = parsedOutput.body;
|
|
1110
|
-
return throwDefaultError({
|
|
1111
|
-
output,
|
|
1112
|
-
parsedBody,
|
|
1113
|
-
errorCode,
|
|
1114
|
-
});
|
|
1115
|
-
}
|
|
1116
|
-
};
|
|
1117
|
-
const de_UpdateGroupQueryCommand = async (output, context) => {
|
|
1118
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1119
|
-
return de_UpdateGroupQueryCommandError(output, context);
|
|
1120
|
-
}
|
|
1121
|
-
const contents = (0, smithy_client_1.map)({
|
|
1122
|
-
$metadata: deserializeMetadata(output),
|
|
1123
|
-
});
|
|
1124
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1125
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1126
|
-
GroupQuery: smithy_client_1._json,
|
|
1127
|
-
});
|
|
1128
|
-
Object.assign(contents, doc);
|
|
1129
|
-
return contents;
|
|
1130
|
-
};
|
|
1131
|
-
exports.de_UpdateGroupQueryCommand = de_UpdateGroupQueryCommand;
|
|
1132
|
-
const de_UpdateGroupQueryCommandError = async (output, context) => {
|
|
1133
|
-
const parsedOutput = {
|
|
1134
|
-
...output,
|
|
1135
|
-
body: await parseErrorBody(output.body, context),
|
|
1136
|
-
};
|
|
1137
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1138
|
-
switch (errorCode) {
|
|
1139
|
-
case "BadRequestException":
|
|
1140
|
-
case "com.amazonaws.resourcegroups#BadRequestException":
|
|
1141
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
1142
|
-
case "ForbiddenException":
|
|
1143
|
-
case "com.amazonaws.resourcegroups#ForbiddenException":
|
|
1144
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1145
|
-
case "InternalServerErrorException":
|
|
1146
|
-
case "com.amazonaws.resourcegroups#InternalServerErrorException":
|
|
1147
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
1148
|
-
case "MethodNotAllowedException":
|
|
1149
|
-
case "com.amazonaws.resourcegroups#MethodNotAllowedException":
|
|
1150
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
1151
|
-
case "NotFoundException":
|
|
1152
|
-
case "com.amazonaws.resourcegroups#NotFoundException":
|
|
1153
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1154
|
-
case "TooManyRequestsException":
|
|
1155
|
-
case "com.amazonaws.resourcegroups#TooManyRequestsException":
|
|
1156
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1157
|
-
default:
|
|
1158
|
-
const parsedBody = parsedOutput.body;
|
|
1159
|
-
return throwDefaultError({
|
|
1160
|
-
output,
|
|
1161
|
-
parsedBody,
|
|
1162
|
-
errorCode,
|
|
1163
|
-
});
|
|
1164
|
-
}
|
|
1165
|
-
};
|
|
1166
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(ResourceGroupsServiceException_1.ResourceGroupsServiceException);
|
|
1167
|
-
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
1168
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1169
|
-
const data = parsedOutput.body;
|
|
1170
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1171
|
-
Message: smithy_client_1.expectString,
|
|
1172
|
-
});
|
|
1173
|
-
Object.assign(contents, doc);
|
|
1174
|
-
const exception = new models_0_1.BadRequestException({
|
|
1175
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1176
|
-
...contents,
|
|
1177
|
-
});
|
|
1178
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1179
|
-
};
|
|
1180
|
-
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
1181
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1182
|
-
const data = parsedOutput.body;
|
|
1183
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1184
|
-
Message: smithy_client_1.expectString,
|
|
1185
|
-
});
|
|
1186
|
-
Object.assign(contents, doc);
|
|
1187
|
-
const exception = new models_0_1.ForbiddenException({
|
|
1188
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1189
|
-
...contents,
|
|
1190
|
-
});
|
|
1191
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1192
|
-
};
|
|
1193
|
-
const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
|
|
1194
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1195
|
-
const data = parsedOutput.body;
|
|
1196
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1197
|
-
Message: smithy_client_1.expectString,
|
|
1198
|
-
});
|
|
1199
|
-
Object.assign(contents, doc);
|
|
1200
|
-
const exception = new models_0_1.InternalServerErrorException({
|
|
1201
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1202
|
-
...contents,
|
|
1203
|
-
});
|
|
1204
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1205
|
-
};
|
|
1206
|
-
const de_MethodNotAllowedExceptionRes = async (parsedOutput, context) => {
|
|
1207
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1208
|
-
const data = parsedOutput.body;
|
|
1209
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1210
|
-
Message: smithy_client_1.expectString,
|
|
1211
|
-
});
|
|
1212
|
-
Object.assign(contents, doc);
|
|
1213
|
-
const exception = new models_0_1.MethodNotAllowedException({
|
|
1214
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1215
|
-
...contents,
|
|
1216
|
-
});
|
|
1217
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1218
|
-
};
|
|
1219
|
-
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1220
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1221
|
-
const data = parsedOutput.body;
|
|
1222
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1223
|
-
Message: smithy_client_1.expectString,
|
|
1224
|
-
});
|
|
1225
|
-
Object.assign(contents, doc);
|
|
1226
|
-
const exception = new models_0_1.NotFoundException({
|
|
1227
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1228
|
-
...contents,
|
|
1229
|
-
});
|
|
1230
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1231
|
-
};
|
|
1232
|
-
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
1233
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1234
|
-
const data = parsedOutput.body;
|
|
1235
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1236
|
-
Message: smithy_client_1.expectString,
|
|
1237
|
-
});
|
|
1238
|
-
Object.assign(contents, doc);
|
|
1239
|
-
const exception = new models_0_1.TooManyRequestsException({
|
|
1240
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1241
|
-
...contents,
|
|
1242
|
-
});
|
|
1243
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1244
|
-
};
|
|
1245
|
-
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
1246
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1247
|
-
const data = parsedOutput.body;
|
|
1248
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1249
|
-
Message: smithy_client_1.expectString,
|
|
1250
|
-
});
|
|
1251
|
-
Object.assign(contents, doc);
|
|
1252
|
-
const exception = new models_0_1.UnauthorizedException({
|
|
1253
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1254
|
-
...contents,
|
|
1255
|
-
});
|
|
1256
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1257
|
-
};
|
|
1258
|
-
const deserializeMetadata = (output) => ({
|
|
1259
|
-
httpStatusCode: output.statusCode,
|
|
1260
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1261
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1262
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1263
|
-
});
|
|
1264
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1265
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1266
|
-
value !== null &&
|
|
1267
|
-
value !== "" &&
|
|
1268
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1269
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1270
|
-
const _MR = "MaxResults";
|
|
1271
|
-
const _NT = "NextToken";
|
|
1272
|
-
const _mR = "maxResults";
|
|
1273
|
-
const _nT = "nextToken";
|
|
1274
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1275
|
-
if (encoded.length) {
|
|
1276
|
-
return JSON.parse(encoded);
|
|
1277
|
-
}
|
|
1278
|
-
return {};
|
|
1279
|
-
});
|
|
1280
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1281
|
-
const value = await parseBody(errorBody, context);
|
|
1282
|
-
value.message = value.message ?? value.Message;
|
|
1283
|
-
return value;
|
|
1284
|
-
};
|
|
1285
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1286
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1287
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1288
|
-
let cleanValue = rawValue;
|
|
1289
|
-
if (typeof cleanValue === "number") {
|
|
1290
|
-
cleanValue = cleanValue.toString();
|
|
1291
|
-
}
|
|
1292
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1293
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1294
|
-
}
|
|
1295
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1296
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1297
|
-
}
|
|
1298
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1299
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1300
|
-
}
|
|
1301
|
-
return cleanValue;
|
|
1302
|
-
};
|
|
1303
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1304
|
-
if (headerKey !== undefined) {
|
|
1305
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1306
|
-
}
|
|
1307
|
-
if (data.code !== undefined) {
|
|
1308
|
-
return sanitizeErrorCode(data.code);
|
|
1309
|
-
}
|
|
1310
|
-
if (data["__type"] !== undefined) {
|
|
1311
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1312
|
-
}
|
|
1313
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|