@aws-sdk/client-resource-explorer-2 3.490.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/ResourceExplorer2.js +1 -53
- package/dist-cjs/ResourceExplorer2Client.js +1 -43
- package/dist-cjs/commands/AssociateDefaultViewCommand.js +1 -28
- package/dist-cjs/commands/BatchGetViewCommand.js +1 -29
- package/dist-cjs/commands/CreateIndexCommand.js +1 -29
- package/dist-cjs/commands/CreateViewCommand.js +1 -29
- package/dist-cjs/commands/DeleteIndexCommand.js +1 -28
- package/dist-cjs/commands/DeleteViewCommand.js +1 -28
- package/dist-cjs/commands/DisassociateDefaultViewCommand.js +1 -28
- package/dist-cjs/commands/GetAccountLevelServiceConfigurationCommand.js +1 -28
- package/dist-cjs/commands/GetDefaultViewCommand.js +1 -28
- package/dist-cjs/commands/GetIndexCommand.js +1 -29
- package/dist-cjs/commands/GetViewCommand.js +1 -29
- package/dist-cjs/commands/ListIndexesCommand.js +1 -28
- package/dist-cjs/commands/ListIndexesForMembersCommand.js +1 -28
- package/dist-cjs/commands/ListSupportedResourceTypesCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -29
- package/dist-cjs/commands/ListViewsCommand.js +1 -28
- package/dist-cjs/commands/SearchCommand.js +1 -29
- package/dist-cjs/commands/TagResourceCommand.js +1 -29
- package/dist-cjs/commands/UntagResourceCommand.js +1 -29
- package/dist-cjs/commands/UpdateIndexTypeCommand.js +1 -28
- package/dist-cjs/commands/UpdateViewCommand.js +1 -29
- package/dist-cjs/commands/index.js +1 -24
- package/dist-cjs/endpoint/EndpointParameters.js +1 -16
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2393 -11
- package/dist-cjs/models/ResourceExplorer2ServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -206
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListIndexesForMembersPaginator.js +1 -7
- package/dist-cjs/pagination/ListIndexesPaginator.js +1 -7
- package/dist-cjs/pagination/ListSupportedResourceTypesPaginator.js +1 -7
- package/dist-cjs/pagination/ListViewsPaginator.js +1 -7
- package/dist-cjs/pagination/SearchPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -9
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1523
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1523 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateViewCommand = exports.de_UpdateIndexTypeCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SearchCommand = exports.de_ListViewsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSupportedResourceTypesCommand = exports.de_ListIndexesForMembersCommand = exports.de_ListIndexesCommand = exports.de_GetViewCommand = exports.de_GetIndexCommand = exports.de_GetDefaultViewCommand = exports.de_GetAccountLevelServiceConfigurationCommand = exports.de_DisassociateDefaultViewCommand = exports.de_DeleteViewCommand = exports.de_DeleteIndexCommand = exports.de_CreateViewCommand = exports.de_CreateIndexCommand = exports.de_BatchGetViewCommand = exports.de_AssociateDefaultViewCommand = exports.se_UpdateViewCommand = exports.se_UpdateIndexTypeCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SearchCommand = exports.se_ListViewsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSupportedResourceTypesCommand = exports.se_ListIndexesForMembersCommand = exports.se_ListIndexesCommand = exports.se_GetViewCommand = exports.se_GetIndexCommand = exports.se_GetDefaultViewCommand = exports.se_GetAccountLevelServiceConfigurationCommand = exports.se_DisassociateDefaultViewCommand = exports.se_DeleteViewCommand = exports.se_DeleteIndexCommand = exports.se_CreateViewCommand = exports.se_CreateIndexCommand = exports.se_BatchGetViewCommand = exports.se_AssociateDefaultViewCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const uuid_1 = require("uuid");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const ResourceExplorer2ServiceException_1 = require("../models/ResourceExplorer2ServiceException");
|
|
9
|
-
const se_AssociateDefaultViewCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/AssociateDefaultView");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
ViewArn: [],
|
|
18
|
-
}));
|
|
19
|
-
b.m("POST").h(headers).b(body);
|
|
20
|
-
return b.build();
|
|
21
|
-
};
|
|
22
|
-
exports.se_AssociateDefaultViewCommand = se_AssociateDefaultViewCommand;
|
|
23
|
-
const se_BatchGetViewCommand = async (input, context) => {
|
|
24
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
25
|
-
const headers = {
|
|
26
|
-
"content-type": "application/json",
|
|
27
|
-
};
|
|
28
|
-
b.bp("/BatchGetView");
|
|
29
|
-
let body;
|
|
30
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
31
|
-
ViewArns: (_) => (0, smithy_client_1._json)(_),
|
|
32
|
-
}));
|
|
33
|
-
b.m("POST").h(headers).b(body);
|
|
34
|
-
return b.build();
|
|
35
|
-
};
|
|
36
|
-
exports.se_BatchGetViewCommand = se_BatchGetViewCommand;
|
|
37
|
-
const se_CreateIndexCommand = async (input, context) => {
|
|
38
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
39
|
-
const headers = {
|
|
40
|
-
"content-type": "application/json",
|
|
41
|
-
};
|
|
42
|
-
b.bp("/CreateIndex");
|
|
43
|
-
let body;
|
|
44
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
45
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
46
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
47
|
-
}));
|
|
48
|
-
b.m("POST").h(headers).b(body);
|
|
49
|
-
return b.build();
|
|
50
|
-
};
|
|
51
|
-
exports.se_CreateIndexCommand = se_CreateIndexCommand;
|
|
52
|
-
const se_CreateViewCommand = async (input, context) => {
|
|
53
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
54
|
-
const headers = {
|
|
55
|
-
"content-type": "application/json",
|
|
56
|
-
};
|
|
57
|
-
b.bp("/CreateView");
|
|
58
|
-
let body;
|
|
59
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
60
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
61
|
-
Filters: (_) => (0, smithy_client_1._json)(_),
|
|
62
|
-
IncludedProperties: (_) => (0, smithy_client_1._json)(_),
|
|
63
|
-
Scope: [],
|
|
64
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
65
|
-
ViewName: [],
|
|
66
|
-
}));
|
|
67
|
-
b.m("POST").h(headers).b(body);
|
|
68
|
-
return b.build();
|
|
69
|
-
};
|
|
70
|
-
exports.se_CreateViewCommand = se_CreateViewCommand;
|
|
71
|
-
const se_DeleteIndexCommand = async (input, context) => {
|
|
72
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
73
|
-
const headers = {
|
|
74
|
-
"content-type": "application/json",
|
|
75
|
-
};
|
|
76
|
-
b.bp("/DeleteIndex");
|
|
77
|
-
let body;
|
|
78
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
79
|
-
Arn: [],
|
|
80
|
-
}));
|
|
81
|
-
b.m("POST").h(headers).b(body);
|
|
82
|
-
return b.build();
|
|
83
|
-
};
|
|
84
|
-
exports.se_DeleteIndexCommand = se_DeleteIndexCommand;
|
|
85
|
-
const se_DeleteViewCommand = async (input, context) => {
|
|
86
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
87
|
-
const headers = {
|
|
88
|
-
"content-type": "application/json",
|
|
89
|
-
};
|
|
90
|
-
b.bp("/DeleteView");
|
|
91
|
-
let body;
|
|
92
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
93
|
-
ViewArn: [],
|
|
94
|
-
}));
|
|
95
|
-
b.m("POST").h(headers).b(body);
|
|
96
|
-
return b.build();
|
|
97
|
-
};
|
|
98
|
-
exports.se_DeleteViewCommand = se_DeleteViewCommand;
|
|
99
|
-
const se_DisassociateDefaultViewCommand = async (input, context) => {
|
|
100
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
101
|
-
const headers = {
|
|
102
|
-
"content-type": "application/json",
|
|
103
|
-
};
|
|
104
|
-
b.bp("/DisassociateDefaultView");
|
|
105
|
-
let body;
|
|
106
|
-
body = "";
|
|
107
|
-
b.m("POST").h(headers).b(body);
|
|
108
|
-
return b.build();
|
|
109
|
-
};
|
|
110
|
-
exports.se_DisassociateDefaultViewCommand = se_DisassociateDefaultViewCommand;
|
|
111
|
-
const se_GetAccountLevelServiceConfigurationCommand = async (input, context) => {
|
|
112
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
113
|
-
const headers = {
|
|
114
|
-
"content-type": "application/json",
|
|
115
|
-
};
|
|
116
|
-
b.bp("/GetAccountLevelServiceConfiguration");
|
|
117
|
-
let body;
|
|
118
|
-
body = "";
|
|
119
|
-
b.m("POST").h(headers).b(body);
|
|
120
|
-
return b.build();
|
|
121
|
-
};
|
|
122
|
-
exports.se_GetAccountLevelServiceConfigurationCommand = se_GetAccountLevelServiceConfigurationCommand;
|
|
123
|
-
const se_GetDefaultViewCommand = async (input, context) => {
|
|
124
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
125
|
-
const headers = {
|
|
126
|
-
"content-type": "application/json",
|
|
127
|
-
};
|
|
128
|
-
b.bp("/GetDefaultView");
|
|
129
|
-
let body;
|
|
130
|
-
body = "";
|
|
131
|
-
b.m("POST").h(headers).b(body);
|
|
132
|
-
return b.build();
|
|
133
|
-
};
|
|
134
|
-
exports.se_GetDefaultViewCommand = se_GetDefaultViewCommand;
|
|
135
|
-
const se_GetIndexCommand = async (input, context) => {
|
|
136
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
137
|
-
const headers = {
|
|
138
|
-
"content-type": "application/json",
|
|
139
|
-
};
|
|
140
|
-
b.bp("/GetIndex");
|
|
141
|
-
let body;
|
|
142
|
-
body = "";
|
|
143
|
-
b.m("POST").h(headers).b(body);
|
|
144
|
-
return b.build();
|
|
145
|
-
};
|
|
146
|
-
exports.se_GetIndexCommand = se_GetIndexCommand;
|
|
147
|
-
const se_GetViewCommand = async (input, context) => {
|
|
148
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
149
|
-
const headers = {
|
|
150
|
-
"content-type": "application/json",
|
|
151
|
-
};
|
|
152
|
-
b.bp("/GetView");
|
|
153
|
-
let body;
|
|
154
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
155
|
-
ViewArn: [],
|
|
156
|
-
}));
|
|
157
|
-
b.m("POST").h(headers).b(body);
|
|
158
|
-
return b.build();
|
|
159
|
-
};
|
|
160
|
-
exports.se_GetViewCommand = se_GetViewCommand;
|
|
161
|
-
const se_ListIndexesCommand = async (input, context) => {
|
|
162
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
163
|
-
const headers = {
|
|
164
|
-
"content-type": "application/json",
|
|
165
|
-
};
|
|
166
|
-
b.bp("/ListIndexes");
|
|
167
|
-
let body;
|
|
168
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
169
|
-
MaxResults: [],
|
|
170
|
-
NextToken: [],
|
|
171
|
-
Regions: (_) => (0, smithy_client_1._json)(_),
|
|
172
|
-
Type: [],
|
|
173
|
-
}));
|
|
174
|
-
b.m("POST").h(headers).b(body);
|
|
175
|
-
return b.build();
|
|
176
|
-
};
|
|
177
|
-
exports.se_ListIndexesCommand = se_ListIndexesCommand;
|
|
178
|
-
const se_ListIndexesForMembersCommand = async (input, context) => {
|
|
179
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
180
|
-
const headers = {
|
|
181
|
-
"content-type": "application/json",
|
|
182
|
-
};
|
|
183
|
-
b.bp("/ListIndexesForMembers");
|
|
184
|
-
let body;
|
|
185
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
186
|
-
AccountIdList: (_) => (0, smithy_client_1._json)(_),
|
|
187
|
-
MaxResults: [],
|
|
188
|
-
NextToken: [],
|
|
189
|
-
}));
|
|
190
|
-
b.m("POST").h(headers).b(body);
|
|
191
|
-
return b.build();
|
|
192
|
-
};
|
|
193
|
-
exports.se_ListIndexesForMembersCommand = se_ListIndexesForMembersCommand;
|
|
194
|
-
const se_ListSupportedResourceTypesCommand = async (input, context) => {
|
|
195
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
196
|
-
const headers = {
|
|
197
|
-
"content-type": "application/json",
|
|
198
|
-
};
|
|
199
|
-
b.bp("/ListSupportedResourceTypes");
|
|
200
|
-
let body;
|
|
201
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
202
|
-
MaxResults: [],
|
|
203
|
-
NextToken: [],
|
|
204
|
-
}));
|
|
205
|
-
b.m("POST").h(headers).b(body);
|
|
206
|
-
return b.build();
|
|
207
|
-
};
|
|
208
|
-
exports.se_ListSupportedResourceTypesCommand = se_ListSupportedResourceTypesCommand;
|
|
209
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
210
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
211
|
-
const headers = {};
|
|
212
|
-
b.bp("/tags/{resourceArn}");
|
|
213
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
214
|
-
let body;
|
|
215
|
-
b.m("GET").h(headers).b(body);
|
|
216
|
-
return b.build();
|
|
217
|
-
};
|
|
218
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
219
|
-
const se_ListViewsCommand = async (input, context) => {
|
|
220
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
221
|
-
const headers = {
|
|
222
|
-
"content-type": "application/json",
|
|
223
|
-
};
|
|
224
|
-
b.bp("/ListViews");
|
|
225
|
-
let body;
|
|
226
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
227
|
-
MaxResults: [],
|
|
228
|
-
NextToken: [],
|
|
229
|
-
}));
|
|
230
|
-
b.m("POST").h(headers).b(body);
|
|
231
|
-
return b.build();
|
|
232
|
-
};
|
|
233
|
-
exports.se_ListViewsCommand = se_ListViewsCommand;
|
|
234
|
-
const se_SearchCommand = async (input, context) => {
|
|
235
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
236
|
-
const headers = {
|
|
237
|
-
"content-type": "application/json",
|
|
238
|
-
};
|
|
239
|
-
b.bp("/Search");
|
|
240
|
-
let body;
|
|
241
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
242
|
-
MaxResults: [],
|
|
243
|
-
NextToken: [],
|
|
244
|
-
QueryString: [],
|
|
245
|
-
ViewArn: [],
|
|
246
|
-
}));
|
|
247
|
-
b.m("POST").h(headers).b(body);
|
|
248
|
-
return b.build();
|
|
249
|
-
};
|
|
250
|
-
exports.se_SearchCommand = se_SearchCommand;
|
|
251
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
252
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
253
|
-
const headers = {
|
|
254
|
-
"content-type": "application/json",
|
|
255
|
-
};
|
|
256
|
-
b.bp("/tags/{resourceArn}");
|
|
257
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
258
|
-
let body;
|
|
259
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
260
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
261
|
-
}));
|
|
262
|
-
b.m("POST").h(headers).b(body);
|
|
263
|
-
return b.build();
|
|
264
|
-
};
|
|
265
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
266
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
267
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
268
|
-
const headers = {};
|
|
269
|
-
b.bp("/tags/{resourceArn}");
|
|
270
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
271
|
-
const query = (0, smithy_client_1.map)({
|
|
272
|
-
[_tK]: [
|
|
273
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
274
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
275
|
-
],
|
|
276
|
-
});
|
|
277
|
-
let body;
|
|
278
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
279
|
-
return b.build();
|
|
280
|
-
};
|
|
281
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
282
|
-
const se_UpdateIndexTypeCommand = async (input, context) => {
|
|
283
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
284
|
-
const headers = {
|
|
285
|
-
"content-type": "application/json",
|
|
286
|
-
};
|
|
287
|
-
b.bp("/UpdateIndexType");
|
|
288
|
-
let body;
|
|
289
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
290
|
-
Arn: [],
|
|
291
|
-
Type: [],
|
|
292
|
-
}));
|
|
293
|
-
b.m("POST").h(headers).b(body);
|
|
294
|
-
return b.build();
|
|
295
|
-
};
|
|
296
|
-
exports.se_UpdateIndexTypeCommand = se_UpdateIndexTypeCommand;
|
|
297
|
-
const se_UpdateViewCommand = async (input, context) => {
|
|
298
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
299
|
-
const headers = {
|
|
300
|
-
"content-type": "application/json",
|
|
301
|
-
};
|
|
302
|
-
b.bp("/UpdateView");
|
|
303
|
-
let body;
|
|
304
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
305
|
-
Filters: (_) => (0, smithy_client_1._json)(_),
|
|
306
|
-
IncludedProperties: (_) => (0, smithy_client_1._json)(_),
|
|
307
|
-
ViewArn: [],
|
|
308
|
-
}));
|
|
309
|
-
b.m("POST").h(headers).b(body);
|
|
310
|
-
return b.build();
|
|
311
|
-
};
|
|
312
|
-
exports.se_UpdateViewCommand = se_UpdateViewCommand;
|
|
313
|
-
const de_AssociateDefaultViewCommand = async (output, context) => {
|
|
314
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
315
|
-
return de_AssociateDefaultViewCommandError(output, context);
|
|
316
|
-
}
|
|
317
|
-
const contents = (0, smithy_client_1.map)({
|
|
318
|
-
$metadata: deserializeMetadata(output),
|
|
319
|
-
});
|
|
320
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
321
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
322
|
-
ViewArn: smithy_client_1.expectString,
|
|
323
|
-
});
|
|
324
|
-
Object.assign(contents, doc);
|
|
325
|
-
return contents;
|
|
326
|
-
};
|
|
327
|
-
exports.de_AssociateDefaultViewCommand = de_AssociateDefaultViewCommand;
|
|
328
|
-
const de_AssociateDefaultViewCommandError = async (output, context) => {
|
|
329
|
-
const parsedOutput = {
|
|
330
|
-
...output,
|
|
331
|
-
body: await parseErrorBody(output.body, context),
|
|
332
|
-
};
|
|
333
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
334
|
-
switch (errorCode) {
|
|
335
|
-
case "AccessDeniedException":
|
|
336
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
337
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
338
|
-
case "InternalServerException":
|
|
339
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
340
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
341
|
-
case "ResourceNotFoundException":
|
|
342
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
343
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
344
|
-
case "ThrottlingException":
|
|
345
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
346
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
347
|
-
case "ValidationException":
|
|
348
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
349
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
350
|
-
default:
|
|
351
|
-
const parsedBody = parsedOutput.body;
|
|
352
|
-
return throwDefaultError({
|
|
353
|
-
output,
|
|
354
|
-
parsedBody,
|
|
355
|
-
errorCode,
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
const de_BatchGetViewCommand = async (output, context) => {
|
|
360
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
361
|
-
return de_BatchGetViewCommandError(output, context);
|
|
362
|
-
}
|
|
363
|
-
const contents = (0, smithy_client_1.map)({
|
|
364
|
-
$metadata: deserializeMetadata(output),
|
|
365
|
-
});
|
|
366
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
367
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
368
|
-
Errors: smithy_client_1._json,
|
|
369
|
-
Views: (_) => de_ViewList(_, context),
|
|
370
|
-
});
|
|
371
|
-
Object.assign(contents, doc);
|
|
372
|
-
return contents;
|
|
373
|
-
};
|
|
374
|
-
exports.de_BatchGetViewCommand = de_BatchGetViewCommand;
|
|
375
|
-
const de_BatchGetViewCommandError = async (output, context) => {
|
|
376
|
-
const parsedOutput = {
|
|
377
|
-
...output,
|
|
378
|
-
body: await parseErrorBody(output.body, context),
|
|
379
|
-
};
|
|
380
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
381
|
-
switch (errorCode) {
|
|
382
|
-
case "AccessDeniedException":
|
|
383
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
384
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
385
|
-
case "InternalServerException":
|
|
386
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
387
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
388
|
-
case "ThrottlingException":
|
|
389
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
390
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
391
|
-
case "UnauthorizedException":
|
|
392
|
-
case "com.amazonaws.resourceexplorer2#UnauthorizedException":
|
|
393
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
394
|
-
case "ValidationException":
|
|
395
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
396
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
397
|
-
default:
|
|
398
|
-
const parsedBody = parsedOutput.body;
|
|
399
|
-
return throwDefaultError({
|
|
400
|
-
output,
|
|
401
|
-
parsedBody,
|
|
402
|
-
errorCode,
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
const de_CreateIndexCommand = async (output, context) => {
|
|
407
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
408
|
-
return de_CreateIndexCommandError(output, context);
|
|
409
|
-
}
|
|
410
|
-
const contents = (0, smithy_client_1.map)({
|
|
411
|
-
$metadata: deserializeMetadata(output),
|
|
412
|
-
});
|
|
413
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
414
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
415
|
-
Arn: smithy_client_1.expectString,
|
|
416
|
-
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
417
|
-
State: smithy_client_1.expectString,
|
|
418
|
-
});
|
|
419
|
-
Object.assign(contents, doc);
|
|
420
|
-
return contents;
|
|
421
|
-
};
|
|
422
|
-
exports.de_CreateIndexCommand = de_CreateIndexCommand;
|
|
423
|
-
const de_CreateIndexCommandError = async (output, context) => {
|
|
424
|
-
const parsedOutput = {
|
|
425
|
-
...output,
|
|
426
|
-
body: await parseErrorBody(output.body, context),
|
|
427
|
-
};
|
|
428
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
429
|
-
switch (errorCode) {
|
|
430
|
-
case "AccessDeniedException":
|
|
431
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
432
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
433
|
-
case "ConflictException":
|
|
434
|
-
case "com.amazonaws.resourceexplorer2#ConflictException":
|
|
435
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
436
|
-
case "InternalServerException":
|
|
437
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
438
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
439
|
-
case "ThrottlingException":
|
|
440
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
441
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
442
|
-
case "ValidationException":
|
|
443
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
444
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
445
|
-
default:
|
|
446
|
-
const parsedBody = parsedOutput.body;
|
|
447
|
-
return throwDefaultError({
|
|
448
|
-
output,
|
|
449
|
-
parsedBody,
|
|
450
|
-
errorCode,
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
const de_CreateViewCommand = async (output, context) => {
|
|
455
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
456
|
-
return de_CreateViewCommandError(output, context);
|
|
457
|
-
}
|
|
458
|
-
const contents = (0, smithy_client_1.map)({
|
|
459
|
-
$metadata: deserializeMetadata(output),
|
|
460
|
-
});
|
|
461
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
462
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
463
|
-
View: (_) => de_View(_, context),
|
|
464
|
-
});
|
|
465
|
-
Object.assign(contents, doc);
|
|
466
|
-
return contents;
|
|
467
|
-
};
|
|
468
|
-
exports.de_CreateViewCommand = de_CreateViewCommand;
|
|
469
|
-
const de_CreateViewCommandError = async (output, context) => {
|
|
470
|
-
const parsedOutput = {
|
|
471
|
-
...output,
|
|
472
|
-
body: await parseErrorBody(output.body, context),
|
|
473
|
-
};
|
|
474
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
475
|
-
switch (errorCode) {
|
|
476
|
-
case "AccessDeniedException":
|
|
477
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
478
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
479
|
-
case "ConflictException":
|
|
480
|
-
case "com.amazonaws.resourceexplorer2#ConflictException":
|
|
481
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
482
|
-
case "InternalServerException":
|
|
483
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
484
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
485
|
-
case "ServiceQuotaExceededException":
|
|
486
|
-
case "com.amazonaws.resourceexplorer2#ServiceQuotaExceededException":
|
|
487
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
488
|
-
case "ThrottlingException":
|
|
489
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
490
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
491
|
-
case "UnauthorizedException":
|
|
492
|
-
case "com.amazonaws.resourceexplorer2#UnauthorizedException":
|
|
493
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
494
|
-
case "ValidationException":
|
|
495
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
496
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
497
|
-
default:
|
|
498
|
-
const parsedBody = parsedOutput.body;
|
|
499
|
-
return throwDefaultError({
|
|
500
|
-
output,
|
|
501
|
-
parsedBody,
|
|
502
|
-
errorCode,
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
const de_DeleteIndexCommand = async (output, context) => {
|
|
507
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
508
|
-
return de_DeleteIndexCommandError(output, context);
|
|
509
|
-
}
|
|
510
|
-
const contents = (0, smithy_client_1.map)({
|
|
511
|
-
$metadata: deserializeMetadata(output),
|
|
512
|
-
});
|
|
513
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
514
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
515
|
-
Arn: smithy_client_1.expectString,
|
|
516
|
-
LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
517
|
-
State: smithy_client_1.expectString,
|
|
518
|
-
});
|
|
519
|
-
Object.assign(contents, doc);
|
|
520
|
-
return contents;
|
|
521
|
-
};
|
|
522
|
-
exports.de_DeleteIndexCommand = de_DeleteIndexCommand;
|
|
523
|
-
const de_DeleteIndexCommandError = async (output, context) => {
|
|
524
|
-
const parsedOutput = {
|
|
525
|
-
...output,
|
|
526
|
-
body: await parseErrorBody(output.body, context),
|
|
527
|
-
};
|
|
528
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
529
|
-
switch (errorCode) {
|
|
530
|
-
case "AccessDeniedException":
|
|
531
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
532
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
533
|
-
case "InternalServerException":
|
|
534
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
535
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
536
|
-
case "ResourceNotFoundException":
|
|
537
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
538
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
539
|
-
case "ThrottlingException":
|
|
540
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
541
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
542
|
-
case "ValidationException":
|
|
543
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
544
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
545
|
-
default:
|
|
546
|
-
const parsedBody = parsedOutput.body;
|
|
547
|
-
return throwDefaultError({
|
|
548
|
-
output,
|
|
549
|
-
parsedBody,
|
|
550
|
-
errorCode,
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
const de_DeleteViewCommand = async (output, context) => {
|
|
555
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
556
|
-
return de_DeleteViewCommandError(output, context);
|
|
557
|
-
}
|
|
558
|
-
const contents = (0, smithy_client_1.map)({
|
|
559
|
-
$metadata: deserializeMetadata(output),
|
|
560
|
-
});
|
|
561
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
562
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
563
|
-
ViewArn: smithy_client_1.expectString,
|
|
564
|
-
});
|
|
565
|
-
Object.assign(contents, doc);
|
|
566
|
-
return contents;
|
|
567
|
-
};
|
|
568
|
-
exports.de_DeleteViewCommand = de_DeleteViewCommand;
|
|
569
|
-
const de_DeleteViewCommandError = async (output, context) => {
|
|
570
|
-
const parsedOutput = {
|
|
571
|
-
...output,
|
|
572
|
-
body: await parseErrorBody(output.body, context),
|
|
573
|
-
};
|
|
574
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
575
|
-
switch (errorCode) {
|
|
576
|
-
case "AccessDeniedException":
|
|
577
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
578
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
579
|
-
case "InternalServerException":
|
|
580
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
581
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
582
|
-
case "ResourceNotFoundException":
|
|
583
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
584
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
585
|
-
case "ThrottlingException":
|
|
586
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
587
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
588
|
-
case "UnauthorizedException":
|
|
589
|
-
case "com.amazonaws.resourceexplorer2#UnauthorizedException":
|
|
590
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
591
|
-
case "ValidationException":
|
|
592
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
593
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
594
|
-
default:
|
|
595
|
-
const parsedBody = parsedOutput.body;
|
|
596
|
-
return throwDefaultError({
|
|
597
|
-
output,
|
|
598
|
-
parsedBody,
|
|
599
|
-
errorCode,
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
const de_DisassociateDefaultViewCommand = async (output, context) => {
|
|
604
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
605
|
-
return de_DisassociateDefaultViewCommandError(output, context);
|
|
606
|
-
}
|
|
607
|
-
const contents = (0, smithy_client_1.map)({
|
|
608
|
-
$metadata: deserializeMetadata(output),
|
|
609
|
-
});
|
|
610
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
611
|
-
return contents;
|
|
612
|
-
};
|
|
613
|
-
exports.de_DisassociateDefaultViewCommand = de_DisassociateDefaultViewCommand;
|
|
614
|
-
const de_DisassociateDefaultViewCommandError = async (output, context) => {
|
|
615
|
-
const parsedOutput = {
|
|
616
|
-
...output,
|
|
617
|
-
body: await parseErrorBody(output.body, context),
|
|
618
|
-
};
|
|
619
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
620
|
-
switch (errorCode) {
|
|
621
|
-
case "AccessDeniedException":
|
|
622
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
623
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
624
|
-
case "InternalServerException":
|
|
625
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
626
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
627
|
-
case "ResourceNotFoundException":
|
|
628
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
629
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
630
|
-
case "ThrottlingException":
|
|
631
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
632
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
633
|
-
case "ValidationException":
|
|
634
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
635
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
636
|
-
default:
|
|
637
|
-
const parsedBody = parsedOutput.body;
|
|
638
|
-
return throwDefaultError({
|
|
639
|
-
output,
|
|
640
|
-
parsedBody,
|
|
641
|
-
errorCode,
|
|
642
|
-
});
|
|
643
|
-
}
|
|
644
|
-
};
|
|
645
|
-
const de_GetAccountLevelServiceConfigurationCommand = async (output, context) => {
|
|
646
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
647
|
-
return de_GetAccountLevelServiceConfigurationCommandError(output, context);
|
|
648
|
-
}
|
|
649
|
-
const contents = (0, smithy_client_1.map)({
|
|
650
|
-
$metadata: deserializeMetadata(output),
|
|
651
|
-
});
|
|
652
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
653
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
654
|
-
OrgConfiguration: smithy_client_1._json,
|
|
655
|
-
});
|
|
656
|
-
Object.assign(contents, doc);
|
|
657
|
-
return contents;
|
|
658
|
-
};
|
|
659
|
-
exports.de_GetAccountLevelServiceConfigurationCommand = de_GetAccountLevelServiceConfigurationCommand;
|
|
660
|
-
const de_GetAccountLevelServiceConfigurationCommandError = async (output, context) => {
|
|
661
|
-
const parsedOutput = {
|
|
662
|
-
...output,
|
|
663
|
-
body: await parseErrorBody(output.body, context),
|
|
664
|
-
};
|
|
665
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
666
|
-
switch (errorCode) {
|
|
667
|
-
case "AccessDeniedException":
|
|
668
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
669
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
670
|
-
case "InternalServerException":
|
|
671
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
672
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
673
|
-
case "ResourceNotFoundException":
|
|
674
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
675
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
676
|
-
case "ThrottlingException":
|
|
677
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
678
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
679
|
-
default:
|
|
680
|
-
const parsedBody = parsedOutput.body;
|
|
681
|
-
return throwDefaultError({
|
|
682
|
-
output,
|
|
683
|
-
parsedBody,
|
|
684
|
-
errorCode,
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
const de_GetDefaultViewCommand = async (output, context) => {
|
|
689
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
690
|
-
return de_GetDefaultViewCommandError(output, context);
|
|
691
|
-
}
|
|
692
|
-
const contents = (0, smithy_client_1.map)({
|
|
693
|
-
$metadata: deserializeMetadata(output),
|
|
694
|
-
});
|
|
695
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
696
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
697
|
-
ViewArn: smithy_client_1.expectString,
|
|
698
|
-
});
|
|
699
|
-
Object.assign(contents, doc);
|
|
700
|
-
return contents;
|
|
701
|
-
};
|
|
702
|
-
exports.de_GetDefaultViewCommand = de_GetDefaultViewCommand;
|
|
703
|
-
const de_GetDefaultViewCommandError = async (output, context) => {
|
|
704
|
-
const parsedOutput = {
|
|
705
|
-
...output,
|
|
706
|
-
body: await parseErrorBody(output.body, context),
|
|
707
|
-
};
|
|
708
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
709
|
-
switch (errorCode) {
|
|
710
|
-
case "AccessDeniedException":
|
|
711
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
712
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
713
|
-
case "InternalServerException":
|
|
714
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
715
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
716
|
-
case "ResourceNotFoundException":
|
|
717
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
718
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
719
|
-
case "ThrottlingException":
|
|
720
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
721
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
722
|
-
case "ValidationException":
|
|
723
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
724
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
725
|
-
default:
|
|
726
|
-
const parsedBody = parsedOutput.body;
|
|
727
|
-
return throwDefaultError({
|
|
728
|
-
output,
|
|
729
|
-
parsedBody,
|
|
730
|
-
errorCode,
|
|
731
|
-
});
|
|
732
|
-
}
|
|
733
|
-
};
|
|
734
|
-
const de_GetIndexCommand = async (output, context) => {
|
|
735
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
736
|
-
return de_GetIndexCommandError(output, context);
|
|
737
|
-
}
|
|
738
|
-
const contents = (0, smithy_client_1.map)({
|
|
739
|
-
$metadata: deserializeMetadata(output),
|
|
740
|
-
});
|
|
741
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
742
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
743
|
-
Arn: smithy_client_1.expectString,
|
|
744
|
-
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
745
|
-
LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
746
|
-
ReplicatingFrom: smithy_client_1._json,
|
|
747
|
-
ReplicatingTo: smithy_client_1._json,
|
|
748
|
-
State: smithy_client_1.expectString,
|
|
749
|
-
Tags: smithy_client_1._json,
|
|
750
|
-
Type: smithy_client_1.expectString,
|
|
751
|
-
});
|
|
752
|
-
Object.assign(contents, doc);
|
|
753
|
-
return contents;
|
|
754
|
-
};
|
|
755
|
-
exports.de_GetIndexCommand = de_GetIndexCommand;
|
|
756
|
-
const de_GetIndexCommandError = async (output, context) => {
|
|
757
|
-
const parsedOutput = {
|
|
758
|
-
...output,
|
|
759
|
-
body: await parseErrorBody(output.body, context),
|
|
760
|
-
};
|
|
761
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
762
|
-
switch (errorCode) {
|
|
763
|
-
case "AccessDeniedException":
|
|
764
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
765
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
766
|
-
case "InternalServerException":
|
|
767
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
768
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
769
|
-
case "ResourceNotFoundException":
|
|
770
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
771
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
772
|
-
case "ThrottlingException":
|
|
773
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
774
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
775
|
-
case "ValidationException":
|
|
776
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
777
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
778
|
-
default:
|
|
779
|
-
const parsedBody = parsedOutput.body;
|
|
780
|
-
return throwDefaultError({
|
|
781
|
-
output,
|
|
782
|
-
parsedBody,
|
|
783
|
-
errorCode,
|
|
784
|
-
});
|
|
785
|
-
}
|
|
786
|
-
};
|
|
787
|
-
const de_GetViewCommand = async (output, context) => {
|
|
788
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
789
|
-
return de_GetViewCommandError(output, context);
|
|
790
|
-
}
|
|
791
|
-
const contents = (0, smithy_client_1.map)({
|
|
792
|
-
$metadata: deserializeMetadata(output),
|
|
793
|
-
});
|
|
794
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
795
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
796
|
-
Tags: smithy_client_1._json,
|
|
797
|
-
View: (_) => de_View(_, context),
|
|
798
|
-
});
|
|
799
|
-
Object.assign(contents, doc);
|
|
800
|
-
return contents;
|
|
801
|
-
};
|
|
802
|
-
exports.de_GetViewCommand = de_GetViewCommand;
|
|
803
|
-
const de_GetViewCommandError = async (output, context) => {
|
|
804
|
-
const parsedOutput = {
|
|
805
|
-
...output,
|
|
806
|
-
body: await parseErrorBody(output.body, context),
|
|
807
|
-
};
|
|
808
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
809
|
-
switch (errorCode) {
|
|
810
|
-
case "AccessDeniedException":
|
|
811
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
812
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
813
|
-
case "InternalServerException":
|
|
814
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
815
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
816
|
-
case "ResourceNotFoundException":
|
|
817
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
818
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
819
|
-
case "ThrottlingException":
|
|
820
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
821
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
822
|
-
case "UnauthorizedException":
|
|
823
|
-
case "com.amazonaws.resourceexplorer2#UnauthorizedException":
|
|
824
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
825
|
-
case "ValidationException":
|
|
826
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
827
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
828
|
-
default:
|
|
829
|
-
const parsedBody = parsedOutput.body;
|
|
830
|
-
return throwDefaultError({
|
|
831
|
-
output,
|
|
832
|
-
parsedBody,
|
|
833
|
-
errorCode,
|
|
834
|
-
});
|
|
835
|
-
}
|
|
836
|
-
};
|
|
837
|
-
const de_ListIndexesCommand = async (output, context) => {
|
|
838
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
839
|
-
return de_ListIndexesCommandError(output, context);
|
|
840
|
-
}
|
|
841
|
-
const contents = (0, smithy_client_1.map)({
|
|
842
|
-
$metadata: deserializeMetadata(output),
|
|
843
|
-
});
|
|
844
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
845
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
846
|
-
Indexes: smithy_client_1._json,
|
|
847
|
-
NextToken: smithy_client_1.expectString,
|
|
848
|
-
});
|
|
849
|
-
Object.assign(contents, doc);
|
|
850
|
-
return contents;
|
|
851
|
-
};
|
|
852
|
-
exports.de_ListIndexesCommand = de_ListIndexesCommand;
|
|
853
|
-
const de_ListIndexesCommandError = async (output, context) => {
|
|
854
|
-
const parsedOutput = {
|
|
855
|
-
...output,
|
|
856
|
-
body: await parseErrorBody(output.body, context),
|
|
857
|
-
};
|
|
858
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
859
|
-
switch (errorCode) {
|
|
860
|
-
case "AccessDeniedException":
|
|
861
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
862
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
863
|
-
case "InternalServerException":
|
|
864
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
865
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
866
|
-
case "ThrottlingException":
|
|
867
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
868
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
869
|
-
case "ValidationException":
|
|
870
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
871
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
872
|
-
default:
|
|
873
|
-
const parsedBody = parsedOutput.body;
|
|
874
|
-
return throwDefaultError({
|
|
875
|
-
output,
|
|
876
|
-
parsedBody,
|
|
877
|
-
errorCode,
|
|
878
|
-
});
|
|
879
|
-
}
|
|
880
|
-
};
|
|
881
|
-
const de_ListIndexesForMembersCommand = async (output, context) => {
|
|
882
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
883
|
-
return de_ListIndexesForMembersCommandError(output, context);
|
|
884
|
-
}
|
|
885
|
-
const contents = (0, smithy_client_1.map)({
|
|
886
|
-
$metadata: deserializeMetadata(output),
|
|
887
|
-
});
|
|
888
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
889
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
890
|
-
Indexes: smithy_client_1._json,
|
|
891
|
-
NextToken: smithy_client_1.expectString,
|
|
892
|
-
});
|
|
893
|
-
Object.assign(contents, doc);
|
|
894
|
-
return contents;
|
|
895
|
-
};
|
|
896
|
-
exports.de_ListIndexesForMembersCommand = de_ListIndexesForMembersCommand;
|
|
897
|
-
const de_ListIndexesForMembersCommandError = async (output, context) => {
|
|
898
|
-
const parsedOutput = {
|
|
899
|
-
...output,
|
|
900
|
-
body: await parseErrorBody(output.body, context),
|
|
901
|
-
};
|
|
902
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
903
|
-
switch (errorCode) {
|
|
904
|
-
case "AccessDeniedException":
|
|
905
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
906
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
907
|
-
case "InternalServerException":
|
|
908
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
909
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
910
|
-
case "ThrottlingException":
|
|
911
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
912
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
913
|
-
case "ValidationException":
|
|
914
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
915
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
916
|
-
default:
|
|
917
|
-
const parsedBody = parsedOutput.body;
|
|
918
|
-
return throwDefaultError({
|
|
919
|
-
output,
|
|
920
|
-
parsedBody,
|
|
921
|
-
errorCode,
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
|
-
const de_ListSupportedResourceTypesCommand = async (output, context) => {
|
|
926
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
927
|
-
return de_ListSupportedResourceTypesCommandError(output, context);
|
|
928
|
-
}
|
|
929
|
-
const contents = (0, smithy_client_1.map)({
|
|
930
|
-
$metadata: deserializeMetadata(output),
|
|
931
|
-
});
|
|
932
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
933
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
934
|
-
NextToken: smithy_client_1.expectString,
|
|
935
|
-
ResourceTypes: smithy_client_1._json,
|
|
936
|
-
});
|
|
937
|
-
Object.assign(contents, doc);
|
|
938
|
-
return contents;
|
|
939
|
-
};
|
|
940
|
-
exports.de_ListSupportedResourceTypesCommand = de_ListSupportedResourceTypesCommand;
|
|
941
|
-
const de_ListSupportedResourceTypesCommandError = async (output, context) => {
|
|
942
|
-
const parsedOutput = {
|
|
943
|
-
...output,
|
|
944
|
-
body: await parseErrorBody(output.body, context),
|
|
945
|
-
};
|
|
946
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
947
|
-
switch (errorCode) {
|
|
948
|
-
case "AccessDeniedException":
|
|
949
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
950
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
951
|
-
case "InternalServerException":
|
|
952
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
953
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
954
|
-
case "ThrottlingException":
|
|
955
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
956
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
957
|
-
case "ValidationException":
|
|
958
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
959
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
960
|
-
default:
|
|
961
|
-
const parsedBody = parsedOutput.body;
|
|
962
|
-
return throwDefaultError({
|
|
963
|
-
output,
|
|
964
|
-
parsedBody,
|
|
965
|
-
errorCode,
|
|
966
|
-
});
|
|
967
|
-
}
|
|
968
|
-
};
|
|
969
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
970
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
971
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
972
|
-
}
|
|
973
|
-
const contents = (0, smithy_client_1.map)({
|
|
974
|
-
$metadata: deserializeMetadata(output),
|
|
975
|
-
});
|
|
976
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
977
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
978
|
-
Tags: smithy_client_1._json,
|
|
979
|
-
});
|
|
980
|
-
Object.assign(contents, doc);
|
|
981
|
-
return contents;
|
|
982
|
-
};
|
|
983
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
984
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
985
|
-
const parsedOutput = {
|
|
986
|
-
...output,
|
|
987
|
-
body: await parseErrorBody(output.body, context),
|
|
988
|
-
};
|
|
989
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
990
|
-
switch (errorCode) {
|
|
991
|
-
case "AccessDeniedException":
|
|
992
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
993
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
994
|
-
case "InternalServerException":
|
|
995
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
996
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
997
|
-
case "ResourceNotFoundException":
|
|
998
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
999
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1000
|
-
case "ThrottlingException":
|
|
1001
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
1002
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1003
|
-
case "UnauthorizedException":
|
|
1004
|
-
case "com.amazonaws.resourceexplorer2#UnauthorizedException":
|
|
1005
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
1006
|
-
case "ValidationException":
|
|
1007
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
1008
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1009
|
-
default:
|
|
1010
|
-
const parsedBody = parsedOutput.body;
|
|
1011
|
-
return throwDefaultError({
|
|
1012
|
-
output,
|
|
1013
|
-
parsedBody,
|
|
1014
|
-
errorCode,
|
|
1015
|
-
});
|
|
1016
|
-
}
|
|
1017
|
-
};
|
|
1018
|
-
const de_ListViewsCommand = async (output, context) => {
|
|
1019
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1020
|
-
return de_ListViewsCommandError(output, context);
|
|
1021
|
-
}
|
|
1022
|
-
const contents = (0, smithy_client_1.map)({
|
|
1023
|
-
$metadata: deserializeMetadata(output),
|
|
1024
|
-
});
|
|
1025
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1026
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1027
|
-
NextToken: smithy_client_1.expectString,
|
|
1028
|
-
Views: smithy_client_1._json,
|
|
1029
|
-
});
|
|
1030
|
-
Object.assign(contents, doc);
|
|
1031
|
-
return contents;
|
|
1032
|
-
};
|
|
1033
|
-
exports.de_ListViewsCommand = de_ListViewsCommand;
|
|
1034
|
-
const de_ListViewsCommandError = async (output, context) => {
|
|
1035
|
-
const parsedOutput = {
|
|
1036
|
-
...output,
|
|
1037
|
-
body: await parseErrorBody(output.body, context),
|
|
1038
|
-
};
|
|
1039
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1040
|
-
switch (errorCode) {
|
|
1041
|
-
case "AccessDeniedException":
|
|
1042
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
1043
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1044
|
-
case "InternalServerException":
|
|
1045
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
1046
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1047
|
-
case "ThrottlingException":
|
|
1048
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
1049
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1050
|
-
case "ValidationException":
|
|
1051
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
1052
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1053
|
-
default:
|
|
1054
|
-
const parsedBody = parsedOutput.body;
|
|
1055
|
-
return throwDefaultError({
|
|
1056
|
-
output,
|
|
1057
|
-
parsedBody,
|
|
1058
|
-
errorCode,
|
|
1059
|
-
});
|
|
1060
|
-
}
|
|
1061
|
-
};
|
|
1062
|
-
const de_SearchCommand = async (output, context) => {
|
|
1063
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1064
|
-
return de_SearchCommandError(output, context);
|
|
1065
|
-
}
|
|
1066
|
-
const contents = (0, smithy_client_1.map)({
|
|
1067
|
-
$metadata: deserializeMetadata(output),
|
|
1068
|
-
});
|
|
1069
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1070
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1071
|
-
Count: smithy_client_1._json,
|
|
1072
|
-
NextToken: smithy_client_1.expectString,
|
|
1073
|
-
Resources: (_) => de_ResourceList(_, context),
|
|
1074
|
-
ViewArn: smithy_client_1.expectString,
|
|
1075
|
-
});
|
|
1076
|
-
Object.assign(contents, doc);
|
|
1077
|
-
return contents;
|
|
1078
|
-
};
|
|
1079
|
-
exports.de_SearchCommand = de_SearchCommand;
|
|
1080
|
-
const de_SearchCommandError = async (output, context) => {
|
|
1081
|
-
const parsedOutput = {
|
|
1082
|
-
...output,
|
|
1083
|
-
body: await parseErrorBody(output.body, context),
|
|
1084
|
-
};
|
|
1085
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1086
|
-
switch (errorCode) {
|
|
1087
|
-
case "AccessDeniedException":
|
|
1088
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
1089
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1090
|
-
case "InternalServerException":
|
|
1091
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
1092
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1093
|
-
case "ResourceNotFoundException":
|
|
1094
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
1095
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1096
|
-
case "ThrottlingException":
|
|
1097
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
1098
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1099
|
-
case "UnauthorizedException":
|
|
1100
|
-
case "com.amazonaws.resourceexplorer2#UnauthorizedException":
|
|
1101
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
1102
|
-
case "ValidationException":
|
|
1103
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
1104
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1105
|
-
default:
|
|
1106
|
-
const parsedBody = parsedOutput.body;
|
|
1107
|
-
return throwDefaultError({
|
|
1108
|
-
output,
|
|
1109
|
-
parsedBody,
|
|
1110
|
-
errorCode,
|
|
1111
|
-
});
|
|
1112
|
-
}
|
|
1113
|
-
};
|
|
1114
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1115
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1116
|
-
return de_TagResourceCommandError(output, context);
|
|
1117
|
-
}
|
|
1118
|
-
const contents = (0, smithy_client_1.map)({
|
|
1119
|
-
$metadata: deserializeMetadata(output),
|
|
1120
|
-
});
|
|
1121
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1122
|
-
return contents;
|
|
1123
|
-
};
|
|
1124
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1125
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1126
|
-
const parsedOutput = {
|
|
1127
|
-
...output,
|
|
1128
|
-
body: await parseErrorBody(output.body, context),
|
|
1129
|
-
};
|
|
1130
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1131
|
-
switch (errorCode) {
|
|
1132
|
-
case "AccessDeniedException":
|
|
1133
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
1134
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1135
|
-
case "ConflictException":
|
|
1136
|
-
case "com.amazonaws.resourceexplorer2#ConflictException":
|
|
1137
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1138
|
-
case "InternalServerException":
|
|
1139
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
1140
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1141
|
-
case "ThrottlingException":
|
|
1142
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
1143
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1144
|
-
case "UnauthorizedException":
|
|
1145
|
-
case "com.amazonaws.resourceexplorer2#UnauthorizedException":
|
|
1146
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
1147
|
-
case "ValidationException":
|
|
1148
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
1149
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1150
|
-
default:
|
|
1151
|
-
const parsedBody = parsedOutput.body;
|
|
1152
|
-
return throwDefaultError({
|
|
1153
|
-
output,
|
|
1154
|
-
parsedBody,
|
|
1155
|
-
errorCode,
|
|
1156
|
-
});
|
|
1157
|
-
}
|
|
1158
|
-
};
|
|
1159
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1160
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1161
|
-
return de_UntagResourceCommandError(output, context);
|
|
1162
|
-
}
|
|
1163
|
-
const contents = (0, smithy_client_1.map)({
|
|
1164
|
-
$metadata: deserializeMetadata(output),
|
|
1165
|
-
});
|
|
1166
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1167
|
-
return contents;
|
|
1168
|
-
};
|
|
1169
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1170
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1171
|
-
const parsedOutput = {
|
|
1172
|
-
...output,
|
|
1173
|
-
body: await parseErrorBody(output.body, context),
|
|
1174
|
-
};
|
|
1175
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1176
|
-
switch (errorCode) {
|
|
1177
|
-
case "AccessDeniedException":
|
|
1178
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
1179
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1180
|
-
case "InternalServerException":
|
|
1181
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
1182
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1183
|
-
case "ResourceNotFoundException":
|
|
1184
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
1185
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1186
|
-
case "ThrottlingException":
|
|
1187
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
1188
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1189
|
-
case "UnauthorizedException":
|
|
1190
|
-
case "com.amazonaws.resourceexplorer2#UnauthorizedException":
|
|
1191
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
1192
|
-
case "ValidationException":
|
|
1193
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
1194
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1195
|
-
default:
|
|
1196
|
-
const parsedBody = parsedOutput.body;
|
|
1197
|
-
return throwDefaultError({
|
|
1198
|
-
output,
|
|
1199
|
-
parsedBody,
|
|
1200
|
-
errorCode,
|
|
1201
|
-
});
|
|
1202
|
-
}
|
|
1203
|
-
};
|
|
1204
|
-
const de_UpdateIndexTypeCommand = async (output, context) => {
|
|
1205
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1206
|
-
return de_UpdateIndexTypeCommandError(output, context);
|
|
1207
|
-
}
|
|
1208
|
-
const contents = (0, smithy_client_1.map)({
|
|
1209
|
-
$metadata: deserializeMetadata(output),
|
|
1210
|
-
});
|
|
1211
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1212
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1213
|
-
Arn: smithy_client_1.expectString,
|
|
1214
|
-
LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1215
|
-
State: smithy_client_1.expectString,
|
|
1216
|
-
Type: smithy_client_1.expectString,
|
|
1217
|
-
});
|
|
1218
|
-
Object.assign(contents, doc);
|
|
1219
|
-
return contents;
|
|
1220
|
-
};
|
|
1221
|
-
exports.de_UpdateIndexTypeCommand = de_UpdateIndexTypeCommand;
|
|
1222
|
-
const de_UpdateIndexTypeCommandError = async (output, context) => {
|
|
1223
|
-
const parsedOutput = {
|
|
1224
|
-
...output,
|
|
1225
|
-
body: await parseErrorBody(output.body, context),
|
|
1226
|
-
};
|
|
1227
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1228
|
-
switch (errorCode) {
|
|
1229
|
-
case "AccessDeniedException":
|
|
1230
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
1231
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1232
|
-
case "ConflictException":
|
|
1233
|
-
case "com.amazonaws.resourceexplorer2#ConflictException":
|
|
1234
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1235
|
-
case "InternalServerException":
|
|
1236
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
1237
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1238
|
-
case "ResourceNotFoundException":
|
|
1239
|
-
case "com.amazonaws.resourceexplorer2#ResourceNotFoundException":
|
|
1240
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1241
|
-
case "ServiceQuotaExceededException":
|
|
1242
|
-
case "com.amazonaws.resourceexplorer2#ServiceQuotaExceededException":
|
|
1243
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1244
|
-
case "ThrottlingException":
|
|
1245
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
1246
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1247
|
-
case "ValidationException":
|
|
1248
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
1249
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1250
|
-
default:
|
|
1251
|
-
const parsedBody = parsedOutput.body;
|
|
1252
|
-
return throwDefaultError({
|
|
1253
|
-
output,
|
|
1254
|
-
parsedBody,
|
|
1255
|
-
errorCode,
|
|
1256
|
-
});
|
|
1257
|
-
}
|
|
1258
|
-
};
|
|
1259
|
-
const de_UpdateViewCommand = async (output, context) => {
|
|
1260
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1261
|
-
return de_UpdateViewCommandError(output, context);
|
|
1262
|
-
}
|
|
1263
|
-
const contents = (0, smithy_client_1.map)({
|
|
1264
|
-
$metadata: deserializeMetadata(output),
|
|
1265
|
-
});
|
|
1266
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1267
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1268
|
-
View: (_) => de_View(_, context),
|
|
1269
|
-
});
|
|
1270
|
-
Object.assign(contents, doc);
|
|
1271
|
-
return contents;
|
|
1272
|
-
};
|
|
1273
|
-
exports.de_UpdateViewCommand = de_UpdateViewCommand;
|
|
1274
|
-
const de_UpdateViewCommandError = async (output, context) => {
|
|
1275
|
-
const parsedOutput = {
|
|
1276
|
-
...output,
|
|
1277
|
-
body: await parseErrorBody(output.body, context),
|
|
1278
|
-
};
|
|
1279
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1280
|
-
switch (errorCode) {
|
|
1281
|
-
case "AccessDeniedException":
|
|
1282
|
-
case "com.amazonaws.resourceexplorer2#AccessDeniedException":
|
|
1283
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1284
|
-
case "InternalServerException":
|
|
1285
|
-
case "com.amazonaws.resourceexplorer2#InternalServerException":
|
|
1286
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1287
|
-
case "ServiceQuotaExceededException":
|
|
1288
|
-
case "com.amazonaws.resourceexplorer2#ServiceQuotaExceededException":
|
|
1289
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1290
|
-
case "ThrottlingException":
|
|
1291
|
-
case "com.amazonaws.resourceexplorer2#ThrottlingException":
|
|
1292
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1293
|
-
case "UnauthorizedException":
|
|
1294
|
-
case "com.amazonaws.resourceexplorer2#UnauthorizedException":
|
|
1295
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
1296
|
-
case "ValidationException":
|
|
1297
|
-
case "com.amazonaws.resourceexplorer2#ValidationException":
|
|
1298
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1299
|
-
default:
|
|
1300
|
-
const parsedBody = parsedOutput.body;
|
|
1301
|
-
return throwDefaultError({
|
|
1302
|
-
output,
|
|
1303
|
-
parsedBody,
|
|
1304
|
-
errorCode,
|
|
1305
|
-
});
|
|
1306
|
-
}
|
|
1307
|
-
};
|
|
1308
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(ResourceExplorer2ServiceException_1.ResourceExplorer2ServiceException);
|
|
1309
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1310
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1311
|
-
const data = parsedOutput.body;
|
|
1312
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1313
|
-
Message: smithy_client_1.expectString,
|
|
1314
|
-
});
|
|
1315
|
-
Object.assign(contents, doc);
|
|
1316
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1317
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1318
|
-
...contents,
|
|
1319
|
-
});
|
|
1320
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1321
|
-
};
|
|
1322
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1323
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1324
|
-
const data = parsedOutput.body;
|
|
1325
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1326
|
-
Message: smithy_client_1.expectString,
|
|
1327
|
-
});
|
|
1328
|
-
Object.assign(contents, doc);
|
|
1329
|
-
const exception = new models_0_1.ConflictException({
|
|
1330
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1331
|
-
...contents,
|
|
1332
|
-
});
|
|
1333
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1334
|
-
};
|
|
1335
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1336
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1337
|
-
const data = parsedOutput.body;
|
|
1338
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1339
|
-
Message: smithy_client_1.expectString,
|
|
1340
|
-
});
|
|
1341
|
-
Object.assign(contents, doc);
|
|
1342
|
-
const exception = new models_0_1.InternalServerException({
|
|
1343
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1344
|
-
...contents,
|
|
1345
|
-
});
|
|
1346
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1347
|
-
};
|
|
1348
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1349
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1350
|
-
const data = parsedOutput.body;
|
|
1351
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1352
|
-
Message: smithy_client_1.expectString,
|
|
1353
|
-
});
|
|
1354
|
-
Object.assign(contents, doc);
|
|
1355
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1356
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1357
|
-
...contents,
|
|
1358
|
-
});
|
|
1359
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1360
|
-
};
|
|
1361
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1362
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1363
|
-
const data = parsedOutput.body;
|
|
1364
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1365
|
-
Message: smithy_client_1.expectString,
|
|
1366
|
-
Name: smithy_client_1.expectString,
|
|
1367
|
-
Value: smithy_client_1.expectString,
|
|
1368
|
-
});
|
|
1369
|
-
Object.assign(contents, doc);
|
|
1370
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1371
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1372
|
-
...contents,
|
|
1373
|
-
});
|
|
1374
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1375
|
-
};
|
|
1376
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1377
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1378
|
-
const data = parsedOutput.body;
|
|
1379
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1380
|
-
Message: smithy_client_1.expectString,
|
|
1381
|
-
});
|
|
1382
|
-
Object.assign(contents, doc);
|
|
1383
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1384
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1385
|
-
...contents,
|
|
1386
|
-
});
|
|
1387
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1388
|
-
};
|
|
1389
|
-
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
1390
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1391
|
-
const data = parsedOutput.body;
|
|
1392
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1393
|
-
Message: smithy_client_1.expectString,
|
|
1394
|
-
});
|
|
1395
|
-
Object.assign(contents, doc);
|
|
1396
|
-
const exception = new models_0_1.UnauthorizedException({
|
|
1397
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1398
|
-
...contents,
|
|
1399
|
-
});
|
|
1400
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1401
|
-
};
|
|
1402
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1403
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1404
|
-
const data = parsedOutput.body;
|
|
1405
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1406
|
-
FieldList: smithy_client_1._json,
|
|
1407
|
-
Message: smithy_client_1.expectString,
|
|
1408
|
-
});
|
|
1409
|
-
Object.assign(contents, doc);
|
|
1410
|
-
const exception = new models_0_1.ValidationException({
|
|
1411
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1412
|
-
...contents,
|
|
1413
|
-
});
|
|
1414
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1415
|
-
};
|
|
1416
|
-
const de_Resource = (output, context) => {
|
|
1417
|
-
return (0, smithy_client_1.take)(output, {
|
|
1418
|
-
Arn: smithy_client_1.expectString,
|
|
1419
|
-
LastReportedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1420
|
-
OwningAccountId: smithy_client_1.expectString,
|
|
1421
|
-
Properties: (_) => de_ResourcePropertyList(_, context),
|
|
1422
|
-
Region: smithy_client_1.expectString,
|
|
1423
|
-
ResourceType: smithy_client_1.expectString,
|
|
1424
|
-
Service: smithy_client_1.expectString,
|
|
1425
|
-
});
|
|
1426
|
-
};
|
|
1427
|
-
const de_ResourceList = (output, context) => {
|
|
1428
|
-
const retVal = (output || [])
|
|
1429
|
-
.filter((e) => e != null)
|
|
1430
|
-
.map((entry) => {
|
|
1431
|
-
return de_Resource(entry, context);
|
|
1432
|
-
});
|
|
1433
|
-
return retVal;
|
|
1434
|
-
};
|
|
1435
|
-
const de_ResourceProperty = (output, context) => {
|
|
1436
|
-
return (0, smithy_client_1.take)(output, {
|
|
1437
|
-
Data: (_) => de_Document(_, context),
|
|
1438
|
-
LastReportedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1439
|
-
Name: smithy_client_1.expectString,
|
|
1440
|
-
});
|
|
1441
|
-
};
|
|
1442
|
-
const de_ResourcePropertyList = (output, context) => {
|
|
1443
|
-
const retVal = (output || [])
|
|
1444
|
-
.filter((e) => e != null)
|
|
1445
|
-
.map((entry) => {
|
|
1446
|
-
return de_ResourceProperty(entry, context);
|
|
1447
|
-
});
|
|
1448
|
-
return retVal;
|
|
1449
|
-
};
|
|
1450
|
-
const de_View = (output, context) => {
|
|
1451
|
-
return (0, smithy_client_1.take)(output, {
|
|
1452
|
-
Filters: smithy_client_1._json,
|
|
1453
|
-
IncludedProperties: smithy_client_1._json,
|
|
1454
|
-
LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1455
|
-
Owner: smithy_client_1.expectString,
|
|
1456
|
-
Scope: smithy_client_1.expectString,
|
|
1457
|
-
ViewArn: smithy_client_1.expectString,
|
|
1458
|
-
});
|
|
1459
|
-
};
|
|
1460
|
-
const de_ViewList = (output, context) => {
|
|
1461
|
-
const retVal = (output || [])
|
|
1462
|
-
.filter((e) => e != null)
|
|
1463
|
-
.map((entry) => {
|
|
1464
|
-
return de_View(entry, context);
|
|
1465
|
-
});
|
|
1466
|
-
return retVal;
|
|
1467
|
-
};
|
|
1468
|
-
const de_Document = (output, context) => {
|
|
1469
|
-
return output;
|
|
1470
|
-
};
|
|
1471
|
-
const deserializeMetadata = (output) => ({
|
|
1472
|
-
httpStatusCode: output.statusCode,
|
|
1473
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1474
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1475
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1476
|
-
});
|
|
1477
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1478
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1479
|
-
value !== null &&
|
|
1480
|
-
value !== "" &&
|
|
1481
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1482
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1483
|
-
const _tK = "tagKeys";
|
|
1484
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1485
|
-
if (encoded.length) {
|
|
1486
|
-
return JSON.parse(encoded);
|
|
1487
|
-
}
|
|
1488
|
-
return {};
|
|
1489
|
-
});
|
|
1490
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1491
|
-
const value = await parseBody(errorBody, context);
|
|
1492
|
-
value.message = value.message ?? value.Message;
|
|
1493
|
-
return value;
|
|
1494
|
-
};
|
|
1495
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1496
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1497
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1498
|
-
let cleanValue = rawValue;
|
|
1499
|
-
if (typeof cleanValue === "number") {
|
|
1500
|
-
cleanValue = cleanValue.toString();
|
|
1501
|
-
}
|
|
1502
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1503
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1504
|
-
}
|
|
1505
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1506
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1507
|
-
}
|
|
1508
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1509
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1510
|
-
}
|
|
1511
|
-
return cleanValue;
|
|
1512
|
-
};
|
|
1513
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1514
|
-
if (headerKey !== undefined) {
|
|
1515
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1516
|
-
}
|
|
1517
|
-
if (data.code !== undefined) {
|
|
1518
|
-
return sanitizeErrorCode(data.code);
|
|
1519
|
-
}
|
|
1520
|
-
if (data["__type"] !== undefined) {
|
|
1521
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1522
|
-
}
|
|
1523
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|