@aws-sdk/client-oam 3.490.0 → 3.496.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/OAM.js +1 -41
- package/dist-cjs/OAMClient.js +1 -43
- package/dist-cjs/commands/CreateLinkCommand.js +1 -28
- package/dist-cjs/commands/CreateSinkCommand.js +1 -28
- package/dist-cjs/commands/DeleteLinkCommand.js +1 -28
- package/dist-cjs/commands/DeleteSinkCommand.js +1 -28
- package/dist-cjs/commands/GetLinkCommand.js +1 -28
- package/dist-cjs/commands/GetSinkCommand.js +1 -28
- package/dist-cjs/commands/GetSinkPolicyCommand.js +1 -28
- package/dist-cjs/commands/ListAttachedLinksCommand.js +1 -28
- package/dist-cjs/commands/ListLinksCommand.js +1 -28
- package/dist-cjs/commands/ListSinksCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/PutSinkPolicyCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateLinkCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -18
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1682 -11
- package/dist-cjs/models/OAMServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -126
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListAttachedLinksPaginator.js +1 -7
- package/dist-cjs/pagination/ListLinksPaginator.js +1 -7
- package/dist-cjs/pagination/ListSinksPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1047
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1047 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateLinkCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PutSinkPolicyCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSinksCommand = exports.de_ListLinksCommand = exports.de_ListAttachedLinksCommand = exports.de_GetSinkPolicyCommand = exports.de_GetSinkCommand = exports.de_GetLinkCommand = exports.de_DeleteSinkCommand = exports.de_DeleteLinkCommand = exports.de_CreateSinkCommand = exports.de_CreateLinkCommand = exports.se_UpdateLinkCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PutSinkPolicyCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSinksCommand = exports.se_ListLinksCommand = exports.se_ListAttachedLinksCommand = exports.se_GetSinkPolicyCommand = exports.se_GetSinkCommand = exports.se_GetLinkCommand = exports.se_DeleteSinkCommand = exports.se_DeleteLinkCommand = exports.se_CreateSinkCommand = exports.se_CreateLinkCommand = 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 OAMServiceException_1 = require("../models/OAMServiceException");
|
|
8
|
-
const se_CreateLinkCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/CreateLink");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
LabelTemplate: [],
|
|
17
|
-
ResourceTypes: (_) => (0, smithy_client_1._json)(_),
|
|
18
|
-
SinkIdentifier: [],
|
|
19
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
20
|
-
}));
|
|
21
|
-
b.m("POST").h(headers).b(body);
|
|
22
|
-
return b.build();
|
|
23
|
-
};
|
|
24
|
-
exports.se_CreateLinkCommand = se_CreateLinkCommand;
|
|
25
|
-
const se_CreateSinkCommand = async (input, context) => {
|
|
26
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
27
|
-
const headers = {
|
|
28
|
-
"content-type": "application/json",
|
|
29
|
-
};
|
|
30
|
-
b.bp("/CreateSink");
|
|
31
|
-
let body;
|
|
32
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
33
|
-
Name: [],
|
|
34
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
35
|
-
}));
|
|
36
|
-
b.m("POST").h(headers).b(body);
|
|
37
|
-
return b.build();
|
|
38
|
-
};
|
|
39
|
-
exports.se_CreateSinkCommand = se_CreateSinkCommand;
|
|
40
|
-
const se_DeleteLinkCommand = async (input, context) => {
|
|
41
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
42
|
-
const headers = {
|
|
43
|
-
"content-type": "application/json",
|
|
44
|
-
};
|
|
45
|
-
b.bp("/DeleteLink");
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
48
|
-
Identifier: [],
|
|
49
|
-
}));
|
|
50
|
-
b.m("POST").h(headers).b(body);
|
|
51
|
-
return b.build();
|
|
52
|
-
};
|
|
53
|
-
exports.se_DeleteLinkCommand = se_DeleteLinkCommand;
|
|
54
|
-
const se_DeleteSinkCommand = async (input, context) => {
|
|
55
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
56
|
-
const headers = {
|
|
57
|
-
"content-type": "application/json",
|
|
58
|
-
};
|
|
59
|
-
b.bp("/DeleteSink");
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
62
|
-
Identifier: [],
|
|
63
|
-
}));
|
|
64
|
-
b.m("POST").h(headers).b(body);
|
|
65
|
-
return b.build();
|
|
66
|
-
};
|
|
67
|
-
exports.se_DeleteSinkCommand = se_DeleteSinkCommand;
|
|
68
|
-
const se_GetLinkCommand = async (input, context) => {
|
|
69
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
70
|
-
const headers = {
|
|
71
|
-
"content-type": "application/json",
|
|
72
|
-
};
|
|
73
|
-
b.bp("/GetLink");
|
|
74
|
-
let body;
|
|
75
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
76
|
-
Identifier: [],
|
|
77
|
-
}));
|
|
78
|
-
b.m("POST").h(headers).b(body);
|
|
79
|
-
return b.build();
|
|
80
|
-
};
|
|
81
|
-
exports.se_GetLinkCommand = se_GetLinkCommand;
|
|
82
|
-
const se_GetSinkCommand = async (input, context) => {
|
|
83
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
84
|
-
const headers = {
|
|
85
|
-
"content-type": "application/json",
|
|
86
|
-
};
|
|
87
|
-
b.bp("/GetSink");
|
|
88
|
-
let body;
|
|
89
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
90
|
-
Identifier: [],
|
|
91
|
-
}));
|
|
92
|
-
b.m("POST").h(headers).b(body);
|
|
93
|
-
return b.build();
|
|
94
|
-
};
|
|
95
|
-
exports.se_GetSinkCommand = se_GetSinkCommand;
|
|
96
|
-
const se_GetSinkPolicyCommand = async (input, context) => {
|
|
97
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
98
|
-
const headers = {
|
|
99
|
-
"content-type": "application/json",
|
|
100
|
-
};
|
|
101
|
-
b.bp("/GetSinkPolicy");
|
|
102
|
-
let body;
|
|
103
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
104
|
-
SinkIdentifier: [],
|
|
105
|
-
}));
|
|
106
|
-
b.m("POST").h(headers).b(body);
|
|
107
|
-
return b.build();
|
|
108
|
-
};
|
|
109
|
-
exports.se_GetSinkPolicyCommand = se_GetSinkPolicyCommand;
|
|
110
|
-
const se_ListAttachedLinksCommand = async (input, context) => {
|
|
111
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
112
|
-
const headers = {
|
|
113
|
-
"content-type": "application/json",
|
|
114
|
-
};
|
|
115
|
-
b.bp("/ListAttachedLinks");
|
|
116
|
-
let body;
|
|
117
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
118
|
-
MaxResults: [],
|
|
119
|
-
NextToken: [],
|
|
120
|
-
SinkIdentifier: [],
|
|
121
|
-
}));
|
|
122
|
-
b.m("POST").h(headers).b(body);
|
|
123
|
-
return b.build();
|
|
124
|
-
};
|
|
125
|
-
exports.se_ListAttachedLinksCommand = se_ListAttachedLinksCommand;
|
|
126
|
-
const se_ListLinksCommand = async (input, context) => {
|
|
127
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
128
|
-
const headers = {
|
|
129
|
-
"content-type": "application/json",
|
|
130
|
-
};
|
|
131
|
-
b.bp("/ListLinks");
|
|
132
|
-
let body;
|
|
133
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
134
|
-
MaxResults: [],
|
|
135
|
-
NextToken: [],
|
|
136
|
-
}));
|
|
137
|
-
b.m("POST").h(headers).b(body);
|
|
138
|
-
return b.build();
|
|
139
|
-
};
|
|
140
|
-
exports.se_ListLinksCommand = se_ListLinksCommand;
|
|
141
|
-
const se_ListSinksCommand = async (input, context) => {
|
|
142
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
143
|
-
const headers = {
|
|
144
|
-
"content-type": "application/json",
|
|
145
|
-
};
|
|
146
|
-
b.bp("/ListSinks");
|
|
147
|
-
let body;
|
|
148
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
149
|
-
MaxResults: [],
|
|
150
|
-
NextToken: [],
|
|
151
|
-
}));
|
|
152
|
-
b.m("POST").h(headers).b(body);
|
|
153
|
-
return b.build();
|
|
154
|
-
};
|
|
155
|
-
exports.se_ListSinksCommand = se_ListSinksCommand;
|
|
156
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
157
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
158
|
-
const headers = {};
|
|
159
|
-
b.bp("/tags/{ResourceArn}");
|
|
160
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
161
|
-
let body;
|
|
162
|
-
b.m("GET").h(headers).b(body);
|
|
163
|
-
return b.build();
|
|
164
|
-
};
|
|
165
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
166
|
-
const se_PutSinkPolicyCommand = async (input, context) => {
|
|
167
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
168
|
-
const headers = {
|
|
169
|
-
"content-type": "application/json",
|
|
170
|
-
};
|
|
171
|
-
b.bp("/PutSinkPolicy");
|
|
172
|
-
let body;
|
|
173
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
174
|
-
Policy: [],
|
|
175
|
-
SinkIdentifier: [],
|
|
176
|
-
}));
|
|
177
|
-
b.m("POST").h(headers).b(body);
|
|
178
|
-
return b.build();
|
|
179
|
-
};
|
|
180
|
-
exports.se_PutSinkPolicyCommand = se_PutSinkPolicyCommand;
|
|
181
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
182
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
183
|
-
const headers = {
|
|
184
|
-
"content-type": "application/json",
|
|
185
|
-
};
|
|
186
|
-
b.bp("/tags/{ResourceArn}");
|
|
187
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
188
|
-
let body;
|
|
189
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
190
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
191
|
-
}));
|
|
192
|
-
b.m("PUT").h(headers).b(body);
|
|
193
|
-
return b.build();
|
|
194
|
-
};
|
|
195
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
196
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
197
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
198
|
-
const headers = {};
|
|
199
|
-
b.bp("/tags/{ResourceArn}");
|
|
200
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
201
|
-
const query = (0, smithy_client_1.map)({
|
|
202
|
-
[_tK]: [
|
|
203
|
-
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
204
|
-
() => (input[_TK] || []).map((_entry) => _entry),
|
|
205
|
-
],
|
|
206
|
-
});
|
|
207
|
-
let body;
|
|
208
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
209
|
-
return b.build();
|
|
210
|
-
};
|
|
211
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
212
|
-
const se_UpdateLinkCommand = async (input, context) => {
|
|
213
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
214
|
-
const headers = {
|
|
215
|
-
"content-type": "application/json",
|
|
216
|
-
};
|
|
217
|
-
b.bp("/UpdateLink");
|
|
218
|
-
let body;
|
|
219
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
220
|
-
Identifier: [],
|
|
221
|
-
ResourceTypes: (_) => (0, smithy_client_1._json)(_),
|
|
222
|
-
}));
|
|
223
|
-
b.m("POST").h(headers).b(body);
|
|
224
|
-
return b.build();
|
|
225
|
-
};
|
|
226
|
-
exports.se_UpdateLinkCommand = se_UpdateLinkCommand;
|
|
227
|
-
const de_CreateLinkCommand = async (output, context) => {
|
|
228
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
229
|
-
return de_CreateLinkCommandError(output, context);
|
|
230
|
-
}
|
|
231
|
-
const contents = (0, smithy_client_1.map)({
|
|
232
|
-
$metadata: deserializeMetadata(output),
|
|
233
|
-
});
|
|
234
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
235
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
236
|
-
Arn: smithy_client_1.expectString,
|
|
237
|
-
Id: smithy_client_1.expectString,
|
|
238
|
-
Label: smithy_client_1.expectString,
|
|
239
|
-
LabelTemplate: smithy_client_1.expectString,
|
|
240
|
-
ResourceTypes: smithy_client_1._json,
|
|
241
|
-
SinkArn: smithy_client_1.expectString,
|
|
242
|
-
Tags: smithy_client_1._json,
|
|
243
|
-
});
|
|
244
|
-
Object.assign(contents, doc);
|
|
245
|
-
return contents;
|
|
246
|
-
};
|
|
247
|
-
exports.de_CreateLinkCommand = de_CreateLinkCommand;
|
|
248
|
-
const de_CreateLinkCommandError = async (output, context) => {
|
|
249
|
-
const parsedOutput = {
|
|
250
|
-
...output,
|
|
251
|
-
body: await parseErrorBody(output.body, context),
|
|
252
|
-
};
|
|
253
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
254
|
-
switch (errorCode) {
|
|
255
|
-
case "ConflictException":
|
|
256
|
-
case "com.amazonaws.oam#ConflictException":
|
|
257
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
258
|
-
case "InternalServiceFault":
|
|
259
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
260
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
261
|
-
case "InvalidParameterException":
|
|
262
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
263
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
264
|
-
case "MissingRequiredParameterException":
|
|
265
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
266
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
267
|
-
case "ServiceQuotaExceededException":
|
|
268
|
-
case "com.amazonaws.oam#ServiceQuotaExceededException":
|
|
269
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
270
|
-
default:
|
|
271
|
-
const parsedBody = parsedOutput.body;
|
|
272
|
-
return throwDefaultError({
|
|
273
|
-
output,
|
|
274
|
-
parsedBody,
|
|
275
|
-
errorCode,
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
const de_CreateSinkCommand = async (output, context) => {
|
|
280
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
281
|
-
return de_CreateSinkCommandError(output, context);
|
|
282
|
-
}
|
|
283
|
-
const contents = (0, smithy_client_1.map)({
|
|
284
|
-
$metadata: deserializeMetadata(output),
|
|
285
|
-
});
|
|
286
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
287
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
288
|
-
Arn: smithy_client_1.expectString,
|
|
289
|
-
Id: smithy_client_1.expectString,
|
|
290
|
-
Name: smithy_client_1.expectString,
|
|
291
|
-
Tags: smithy_client_1._json,
|
|
292
|
-
});
|
|
293
|
-
Object.assign(contents, doc);
|
|
294
|
-
return contents;
|
|
295
|
-
};
|
|
296
|
-
exports.de_CreateSinkCommand = de_CreateSinkCommand;
|
|
297
|
-
const de_CreateSinkCommandError = async (output, context) => {
|
|
298
|
-
const parsedOutput = {
|
|
299
|
-
...output,
|
|
300
|
-
body: await parseErrorBody(output.body, context),
|
|
301
|
-
};
|
|
302
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
303
|
-
switch (errorCode) {
|
|
304
|
-
case "ConflictException":
|
|
305
|
-
case "com.amazonaws.oam#ConflictException":
|
|
306
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
307
|
-
case "InternalServiceFault":
|
|
308
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
309
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
310
|
-
case "InvalidParameterException":
|
|
311
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
312
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
313
|
-
case "MissingRequiredParameterException":
|
|
314
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
315
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
316
|
-
case "ServiceQuotaExceededException":
|
|
317
|
-
case "com.amazonaws.oam#ServiceQuotaExceededException":
|
|
318
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
319
|
-
default:
|
|
320
|
-
const parsedBody = parsedOutput.body;
|
|
321
|
-
return throwDefaultError({
|
|
322
|
-
output,
|
|
323
|
-
parsedBody,
|
|
324
|
-
errorCode,
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
const de_DeleteLinkCommand = async (output, context) => {
|
|
329
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
330
|
-
return de_DeleteLinkCommandError(output, context);
|
|
331
|
-
}
|
|
332
|
-
const contents = (0, smithy_client_1.map)({
|
|
333
|
-
$metadata: deserializeMetadata(output),
|
|
334
|
-
});
|
|
335
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
336
|
-
return contents;
|
|
337
|
-
};
|
|
338
|
-
exports.de_DeleteLinkCommand = de_DeleteLinkCommand;
|
|
339
|
-
const de_DeleteLinkCommandError = async (output, context) => {
|
|
340
|
-
const parsedOutput = {
|
|
341
|
-
...output,
|
|
342
|
-
body: await parseErrorBody(output.body, context),
|
|
343
|
-
};
|
|
344
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
345
|
-
switch (errorCode) {
|
|
346
|
-
case "InternalServiceFault":
|
|
347
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
348
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
349
|
-
case "InvalidParameterException":
|
|
350
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
351
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
352
|
-
case "MissingRequiredParameterException":
|
|
353
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
354
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
355
|
-
case "ResourceNotFoundException":
|
|
356
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
357
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
358
|
-
default:
|
|
359
|
-
const parsedBody = parsedOutput.body;
|
|
360
|
-
return throwDefaultError({
|
|
361
|
-
output,
|
|
362
|
-
parsedBody,
|
|
363
|
-
errorCode,
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
};
|
|
367
|
-
const de_DeleteSinkCommand = async (output, context) => {
|
|
368
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
369
|
-
return de_DeleteSinkCommandError(output, context);
|
|
370
|
-
}
|
|
371
|
-
const contents = (0, smithy_client_1.map)({
|
|
372
|
-
$metadata: deserializeMetadata(output),
|
|
373
|
-
});
|
|
374
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
375
|
-
return contents;
|
|
376
|
-
};
|
|
377
|
-
exports.de_DeleteSinkCommand = de_DeleteSinkCommand;
|
|
378
|
-
const de_DeleteSinkCommandError = async (output, context) => {
|
|
379
|
-
const parsedOutput = {
|
|
380
|
-
...output,
|
|
381
|
-
body: await parseErrorBody(output.body, context),
|
|
382
|
-
};
|
|
383
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
384
|
-
switch (errorCode) {
|
|
385
|
-
case "ConflictException":
|
|
386
|
-
case "com.amazonaws.oam#ConflictException":
|
|
387
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
388
|
-
case "InternalServiceFault":
|
|
389
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
390
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
391
|
-
case "InvalidParameterException":
|
|
392
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
393
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
394
|
-
case "MissingRequiredParameterException":
|
|
395
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
396
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
397
|
-
case "ResourceNotFoundException":
|
|
398
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
399
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
400
|
-
default:
|
|
401
|
-
const parsedBody = parsedOutput.body;
|
|
402
|
-
return throwDefaultError({
|
|
403
|
-
output,
|
|
404
|
-
parsedBody,
|
|
405
|
-
errorCode,
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
const de_GetLinkCommand = async (output, context) => {
|
|
410
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
411
|
-
return de_GetLinkCommandError(output, context);
|
|
412
|
-
}
|
|
413
|
-
const contents = (0, smithy_client_1.map)({
|
|
414
|
-
$metadata: deserializeMetadata(output),
|
|
415
|
-
});
|
|
416
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
417
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
418
|
-
Arn: smithy_client_1.expectString,
|
|
419
|
-
Id: smithy_client_1.expectString,
|
|
420
|
-
Label: smithy_client_1.expectString,
|
|
421
|
-
LabelTemplate: smithy_client_1.expectString,
|
|
422
|
-
ResourceTypes: smithy_client_1._json,
|
|
423
|
-
SinkArn: smithy_client_1.expectString,
|
|
424
|
-
Tags: smithy_client_1._json,
|
|
425
|
-
});
|
|
426
|
-
Object.assign(contents, doc);
|
|
427
|
-
return contents;
|
|
428
|
-
};
|
|
429
|
-
exports.de_GetLinkCommand = de_GetLinkCommand;
|
|
430
|
-
const de_GetLinkCommandError = async (output, context) => {
|
|
431
|
-
const parsedOutput = {
|
|
432
|
-
...output,
|
|
433
|
-
body: await parseErrorBody(output.body, context),
|
|
434
|
-
};
|
|
435
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
436
|
-
switch (errorCode) {
|
|
437
|
-
case "InternalServiceFault":
|
|
438
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
439
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
440
|
-
case "InvalidParameterException":
|
|
441
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
442
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
443
|
-
case "MissingRequiredParameterException":
|
|
444
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
445
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
446
|
-
case "ResourceNotFoundException":
|
|
447
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
448
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
449
|
-
default:
|
|
450
|
-
const parsedBody = parsedOutput.body;
|
|
451
|
-
return throwDefaultError({
|
|
452
|
-
output,
|
|
453
|
-
parsedBody,
|
|
454
|
-
errorCode,
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
const de_GetSinkCommand = async (output, context) => {
|
|
459
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
460
|
-
return de_GetSinkCommandError(output, context);
|
|
461
|
-
}
|
|
462
|
-
const contents = (0, smithy_client_1.map)({
|
|
463
|
-
$metadata: deserializeMetadata(output),
|
|
464
|
-
});
|
|
465
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
466
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
467
|
-
Arn: smithy_client_1.expectString,
|
|
468
|
-
Id: smithy_client_1.expectString,
|
|
469
|
-
Name: smithy_client_1.expectString,
|
|
470
|
-
Tags: smithy_client_1._json,
|
|
471
|
-
});
|
|
472
|
-
Object.assign(contents, doc);
|
|
473
|
-
return contents;
|
|
474
|
-
};
|
|
475
|
-
exports.de_GetSinkCommand = de_GetSinkCommand;
|
|
476
|
-
const de_GetSinkCommandError = async (output, context) => {
|
|
477
|
-
const parsedOutput = {
|
|
478
|
-
...output,
|
|
479
|
-
body: await parseErrorBody(output.body, context),
|
|
480
|
-
};
|
|
481
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
482
|
-
switch (errorCode) {
|
|
483
|
-
case "InternalServiceFault":
|
|
484
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
485
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
486
|
-
case "InvalidParameterException":
|
|
487
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
488
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
489
|
-
case "MissingRequiredParameterException":
|
|
490
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
491
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
492
|
-
case "ResourceNotFoundException":
|
|
493
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
494
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
495
|
-
default:
|
|
496
|
-
const parsedBody = parsedOutput.body;
|
|
497
|
-
return throwDefaultError({
|
|
498
|
-
output,
|
|
499
|
-
parsedBody,
|
|
500
|
-
errorCode,
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
const de_GetSinkPolicyCommand = async (output, context) => {
|
|
505
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
506
|
-
return de_GetSinkPolicyCommandError(output, context);
|
|
507
|
-
}
|
|
508
|
-
const contents = (0, smithy_client_1.map)({
|
|
509
|
-
$metadata: deserializeMetadata(output),
|
|
510
|
-
});
|
|
511
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
512
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
513
|
-
Policy: smithy_client_1.expectString,
|
|
514
|
-
SinkArn: smithy_client_1.expectString,
|
|
515
|
-
SinkId: smithy_client_1.expectString,
|
|
516
|
-
});
|
|
517
|
-
Object.assign(contents, doc);
|
|
518
|
-
return contents;
|
|
519
|
-
};
|
|
520
|
-
exports.de_GetSinkPolicyCommand = de_GetSinkPolicyCommand;
|
|
521
|
-
const de_GetSinkPolicyCommandError = async (output, context) => {
|
|
522
|
-
const parsedOutput = {
|
|
523
|
-
...output,
|
|
524
|
-
body: await parseErrorBody(output.body, context),
|
|
525
|
-
};
|
|
526
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
527
|
-
switch (errorCode) {
|
|
528
|
-
case "InternalServiceFault":
|
|
529
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
530
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
531
|
-
case "InvalidParameterException":
|
|
532
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
533
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
534
|
-
case "MissingRequiredParameterException":
|
|
535
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
536
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
537
|
-
case "ResourceNotFoundException":
|
|
538
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
539
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
540
|
-
default:
|
|
541
|
-
const parsedBody = parsedOutput.body;
|
|
542
|
-
return throwDefaultError({
|
|
543
|
-
output,
|
|
544
|
-
parsedBody,
|
|
545
|
-
errorCode,
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
};
|
|
549
|
-
const de_ListAttachedLinksCommand = async (output, context) => {
|
|
550
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
551
|
-
return de_ListAttachedLinksCommandError(output, context);
|
|
552
|
-
}
|
|
553
|
-
const contents = (0, smithy_client_1.map)({
|
|
554
|
-
$metadata: deserializeMetadata(output),
|
|
555
|
-
});
|
|
556
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
557
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
558
|
-
Items: smithy_client_1._json,
|
|
559
|
-
NextToken: smithy_client_1.expectString,
|
|
560
|
-
});
|
|
561
|
-
Object.assign(contents, doc);
|
|
562
|
-
return contents;
|
|
563
|
-
};
|
|
564
|
-
exports.de_ListAttachedLinksCommand = de_ListAttachedLinksCommand;
|
|
565
|
-
const de_ListAttachedLinksCommandError = async (output, context) => {
|
|
566
|
-
const parsedOutput = {
|
|
567
|
-
...output,
|
|
568
|
-
body: await parseErrorBody(output.body, context),
|
|
569
|
-
};
|
|
570
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
571
|
-
switch (errorCode) {
|
|
572
|
-
case "InternalServiceFault":
|
|
573
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
574
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
575
|
-
case "InvalidParameterException":
|
|
576
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
577
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
578
|
-
case "MissingRequiredParameterException":
|
|
579
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
580
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
581
|
-
case "ResourceNotFoundException":
|
|
582
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
583
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
584
|
-
default:
|
|
585
|
-
const parsedBody = parsedOutput.body;
|
|
586
|
-
return throwDefaultError({
|
|
587
|
-
output,
|
|
588
|
-
parsedBody,
|
|
589
|
-
errorCode,
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
};
|
|
593
|
-
const de_ListLinksCommand = async (output, context) => {
|
|
594
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
595
|
-
return de_ListLinksCommandError(output, context);
|
|
596
|
-
}
|
|
597
|
-
const contents = (0, smithy_client_1.map)({
|
|
598
|
-
$metadata: deserializeMetadata(output),
|
|
599
|
-
});
|
|
600
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
601
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
602
|
-
Items: smithy_client_1._json,
|
|
603
|
-
NextToken: smithy_client_1.expectString,
|
|
604
|
-
});
|
|
605
|
-
Object.assign(contents, doc);
|
|
606
|
-
return contents;
|
|
607
|
-
};
|
|
608
|
-
exports.de_ListLinksCommand = de_ListLinksCommand;
|
|
609
|
-
const de_ListLinksCommandError = async (output, context) => {
|
|
610
|
-
const parsedOutput = {
|
|
611
|
-
...output,
|
|
612
|
-
body: await parseErrorBody(output.body, context),
|
|
613
|
-
};
|
|
614
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
615
|
-
switch (errorCode) {
|
|
616
|
-
case "InternalServiceFault":
|
|
617
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
618
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
619
|
-
case "InvalidParameterException":
|
|
620
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
621
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
622
|
-
case "ResourceNotFoundException":
|
|
623
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
624
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
625
|
-
default:
|
|
626
|
-
const parsedBody = parsedOutput.body;
|
|
627
|
-
return throwDefaultError({
|
|
628
|
-
output,
|
|
629
|
-
parsedBody,
|
|
630
|
-
errorCode,
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
const de_ListSinksCommand = async (output, context) => {
|
|
635
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
636
|
-
return de_ListSinksCommandError(output, context);
|
|
637
|
-
}
|
|
638
|
-
const contents = (0, smithy_client_1.map)({
|
|
639
|
-
$metadata: deserializeMetadata(output),
|
|
640
|
-
});
|
|
641
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
642
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
643
|
-
Items: smithy_client_1._json,
|
|
644
|
-
NextToken: smithy_client_1.expectString,
|
|
645
|
-
});
|
|
646
|
-
Object.assign(contents, doc);
|
|
647
|
-
return contents;
|
|
648
|
-
};
|
|
649
|
-
exports.de_ListSinksCommand = de_ListSinksCommand;
|
|
650
|
-
const de_ListSinksCommandError = async (output, context) => {
|
|
651
|
-
const parsedOutput = {
|
|
652
|
-
...output,
|
|
653
|
-
body: await parseErrorBody(output.body, context),
|
|
654
|
-
};
|
|
655
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
656
|
-
switch (errorCode) {
|
|
657
|
-
case "InternalServiceFault":
|
|
658
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
659
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
660
|
-
case "InvalidParameterException":
|
|
661
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
662
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
663
|
-
case "ResourceNotFoundException":
|
|
664
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
665
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
666
|
-
default:
|
|
667
|
-
const parsedBody = parsedOutput.body;
|
|
668
|
-
return throwDefaultError({
|
|
669
|
-
output,
|
|
670
|
-
parsedBody,
|
|
671
|
-
errorCode,
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
};
|
|
675
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
676
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
677
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
678
|
-
}
|
|
679
|
-
const contents = (0, smithy_client_1.map)({
|
|
680
|
-
$metadata: deserializeMetadata(output),
|
|
681
|
-
});
|
|
682
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
683
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
684
|
-
Tags: smithy_client_1._json,
|
|
685
|
-
});
|
|
686
|
-
Object.assign(contents, doc);
|
|
687
|
-
return contents;
|
|
688
|
-
};
|
|
689
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
690
|
-
const de_ListTagsForResourceCommandError = 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 "ResourceNotFoundException":
|
|
698
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
699
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
700
|
-
case "ValidationException":
|
|
701
|
-
case "com.amazonaws.oam#ValidationException":
|
|
702
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
703
|
-
default:
|
|
704
|
-
const parsedBody = parsedOutput.body;
|
|
705
|
-
return throwDefaultError({
|
|
706
|
-
output,
|
|
707
|
-
parsedBody,
|
|
708
|
-
errorCode,
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
};
|
|
712
|
-
const de_PutSinkPolicyCommand = async (output, context) => {
|
|
713
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
714
|
-
return de_PutSinkPolicyCommandError(output, context);
|
|
715
|
-
}
|
|
716
|
-
const contents = (0, smithy_client_1.map)({
|
|
717
|
-
$metadata: deserializeMetadata(output),
|
|
718
|
-
});
|
|
719
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
720
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
721
|
-
Policy: smithy_client_1.expectString,
|
|
722
|
-
SinkArn: smithy_client_1.expectString,
|
|
723
|
-
SinkId: smithy_client_1.expectString,
|
|
724
|
-
});
|
|
725
|
-
Object.assign(contents, doc);
|
|
726
|
-
return contents;
|
|
727
|
-
};
|
|
728
|
-
exports.de_PutSinkPolicyCommand = de_PutSinkPolicyCommand;
|
|
729
|
-
const de_PutSinkPolicyCommandError = async (output, context) => {
|
|
730
|
-
const parsedOutput = {
|
|
731
|
-
...output,
|
|
732
|
-
body: await parseErrorBody(output.body, context),
|
|
733
|
-
};
|
|
734
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
735
|
-
switch (errorCode) {
|
|
736
|
-
case "InternalServiceFault":
|
|
737
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
738
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
739
|
-
case "InvalidParameterException":
|
|
740
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
741
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
742
|
-
case "MissingRequiredParameterException":
|
|
743
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
744
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
745
|
-
case "ResourceNotFoundException":
|
|
746
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
747
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
748
|
-
default:
|
|
749
|
-
const parsedBody = parsedOutput.body;
|
|
750
|
-
return throwDefaultError({
|
|
751
|
-
output,
|
|
752
|
-
parsedBody,
|
|
753
|
-
errorCode,
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
};
|
|
757
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
758
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
759
|
-
return de_TagResourceCommandError(output, context);
|
|
760
|
-
}
|
|
761
|
-
const contents = (0, smithy_client_1.map)({
|
|
762
|
-
$metadata: deserializeMetadata(output),
|
|
763
|
-
});
|
|
764
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
765
|
-
return contents;
|
|
766
|
-
};
|
|
767
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
768
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
769
|
-
const parsedOutput = {
|
|
770
|
-
...output,
|
|
771
|
-
body: await parseErrorBody(output.body, context),
|
|
772
|
-
};
|
|
773
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
774
|
-
switch (errorCode) {
|
|
775
|
-
case "ResourceNotFoundException":
|
|
776
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
777
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
778
|
-
case "TooManyTagsException":
|
|
779
|
-
case "com.amazonaws.oam#TooManyTagsException":
|
|
780
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
781
|
-
case "ValidationException":
|
|
782
|
-
case "com.amazonaws.oam#ValidationException":
|
|
783
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
784
|
-
default:
|
|
785
|
-
const parsedBody = parsedOutput.body;
|
|
786
|
-
return throwDefaultError({
|
|
787
|
-
output,
|
|
788
|
-
parsedBody,
|
|
789
|
-
errorCode,
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
794
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
795
|
-
return de_UntagResourceCommandError(output, context);
|
|
796
|
-
}
|
|
797
|
-
const contents = (0, smithy_client_1.map)({
|
|
798
|
-
$metadata: deserializeMetadata(output),
|
|
799
|
-
});
|
|
800
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
801
|
-
return contents;
|
|
802
|
-
};
|
|
803
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
804
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
805
|
-
const parsedOutput = {
|
|
806
|
-
...output,
|
|
807
|
-
body: await parseErrorBody(output.body, context),
|
|
808
|
-
};
|
|
809
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
810
|
-
switch (errorCode) {
|
|
811
|
-
case "ResourceNotFoundException":
|
|
812
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
813
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
814
|
-
case "ValidationException":
|
|
815
|
-
case "com.amazonaws.oam#ValidationException":
|
|
816
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
817
|
-
default:
|
|
818
|
-
const parsedBody = parsedOutput.body;
|
|
819
|
-
return throwDefaultError({
|
|
820
|
-
output,
|
|
821
|
-
parsedBody,
|
|
822
|
-
errorCode,
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
};
|
|
826
|
-
const de_UpdateLinkCommand = async (output, context) => {
|
|
827
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
828
|
-
return de_UpdateLinkCommandError(output, context);
|
|
829
|
-
}
|
|
830
|
-
const contents = (0, smithy_client_1.map)({
|
|
831
|
-
$metadata: deserializeMetadata(output),
|
|
832
|
-
});
|
|
833
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
834
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
835
|
-
Arn: smithy_client_1.expectString,
|
|
836
|
-
Id: smithy_client_1.expectString,
|
|
837
|
-
Label: smithy_client_1.expectString,
|
|
838
|
-
LabelTemplate: smithy_client_1.expectString,
|
|
839
|
-
ResourceTypes: smithy_client_1._json,
|
|
840
|
-
SinkArn: smithy_client_1.expectString,
|
|
841
|
-
Tags: smithy_client_1._json,
|
|
842
|
-
});
|
|
843
|
-
Object.assign(contents, doc);
|
|
844
|
-
return contents;
|
|
845
|
-
};
|
|
846
|
-
exports.de_UpdateLinkCommand = de_UpdateLinkCommand;
|
|
847
|
-
const de_UpdateLinkCommandError = async (output, context) => {
|
|
848
|
-
const parsedOutput = {
|
|
849
|
-
...output,
|
|
850
|
-
body: await parseErrorBody(output.body, context),
|
|
851
|
-
};
|
|
852
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
853
|
-
switch (errorCode) {
|
|
854
|
-
case "InternalServiceFault":
|
|
855
|
-
case "com.amazonaws.oam#InternalServiceFault":
|
|
856
|
-
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
857
|
-
case "InvalidParameterException":
|
|
858
|
-
case "com.amazonaws.oam#InvalidParameterException":
|
|
859
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
860
|
-
case "MissingRequiredParameterException":
|
|
861
|
-
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
862
|
-
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
863
|
-
case "ResourceNotFoundException":
|
|
864
|
-
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
865
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
866
|
-
default:
|
|
867
|
-
const parsedBody = parsedOutput.body;
|
|
868
|
-
return throwDefaultError({
|
|
869
|
-
output,
|
|
870
|
-
parsedBody,
|
|
871
|
-
errorCode,
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
};
|
|
875
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(OAMServiceException_1.OAMServiceException);
|
|
876
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
877
|
-
const contents = (0, smithy_client_1.map)({
|
|
878
|
-
[_aET]: [, parsedOutput.headers[_xae]],
|
|
879
|
-
});
|
|
880
|
-
const data = parsedOutput.body;
|
|
881
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
882
|
-
Message: smithy_client_1.expectString,
|
|
883
|
-
});
|
|
884
|
-
Object.assign(contents, doc);
|
|
885
|
-
const exception = new models_0_1.ConflictException({
|
|
886
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
887
|
-
...contents,
|
|
888
|
-
});
|
|
889
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
890
|
-
};
|
|
891
|
-
const de_InternalServiceFaultRes = async (parsedOutput, context) => {
|
|
892
|
-
const contents = (0, smithy_client_1.map)({
|
|
893
|
-
[_aET]: [, parsedOutput.headers[_xae]],
|
|
894
|
-
});
|
|
895
|
-
const data = parsedOutput.body;
|
|
896
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
897
|
-
Message: smithy_client_1.expectString,
|
|
898
|
-
});
|
|
899
|
-
Object.assign(contents, doc);
|
|
900
|
-
const exception = new models_0_1.InternalServiceFault({
|
|
901
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
902
|
-
...contents,
|
|
903
|
-
});
|
|
904
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
905
|
-
};
|
|
906
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
907
|
-
const contents = (0, smithy_client_1.map)({
|
|
908
|
-
[_aET]: [, parsedOutput.headers[_xae]],
|
|
909
|
-
});
|
|
910
|
-
const data = parsedOutput.body;
|
|
911
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
912
|
-
message: smithy_client_1.expectString,
|
|
913
|
-
});
|
|
914
|
-
Object.assign(contents, doc);
|
|
915
|
-
const exception = new models_0_1.InvalidParameterException({
|
|
916
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
917
|
-
...contents,
|
|
918
|
-
});
|
|
919
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
920
|
-
};
|
|
921
|
-
const de_MissingRequiredParameterExceptionRes = async (parsedOutput, context) => {
|
|
922
|
-
const contents = (0, smithy_client_1.map)({
|
|
923
|
-
[_aET]: [, parsedOutput.headers[_xae]],
|
|
924
|
-
});
|
|
925
|
-
const data = parsedOutput.body;
|
|
926
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
927
|
-
message: smithy_client_1.expectString,
|
|
928
|
-
});
|
|
929
|
-
Object.assign(contents, doc);
|
|
930
|
-
const exception = new models_0_1.MissingRequiredParameterException({
|
|
931
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
932
|
-
...contents,
|
|
933
|
-
});
|
|
934
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
935
|
-
};
|
|
936
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
937
|
-
const contents = (0, smithy_client_1.map)({
|
|
938
|
-
[_aET]: [, parsedOutput.headers[_xae]],
|
|
939
|
-
});
|
|
940
|
-
const data = parsedOutput.body;
|
|
941
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
942
|
-
Message: smithy_client_1.expectString,
|
|
943
|
-
});
|
|
944
|
-
Object.assign(contents, doc);
|
|
945
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
946
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
947
|
-
...contents,
|
|
948
|
-
});
|
|
949
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
950
|
-
};
|
|
951
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
952
|
-
const contents = (0, smithy_client_1.map)({
|
|
953
|
-
[_aET]: [, parsedOutput.headers[_xae]],
|
|
954
|
-
});
|
|
955
|
-
const data = parsedOutput.body;
|
|
956
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
957
|
-
Message: smithy_client_1.expectString,
|
|
958
|
-
});
|
|
959
|
-
Object.assign(contents, doc);
|
|
960
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
961
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
962
|
-
...contents,
|
|
963
|
-
});
|
|
964
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
965
|
-
};
|
|
966
|
-
const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
967
|
-
const contents = (0, smithy_client_1.map)({});
|
|
968
|
-
const data = parsedOutput.body;
|
|
969
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
970
|
-
Message: smithy_client_1.expectString,
|
|
971
|
-
});
|
|
972
|
-
Object.assign(contents, doc);
|
|
973
|
-
const exception = new models_0_1.TooManyTagsException({
|
|
974
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
975
|
-
...contents,
|
|
976
|
-
});
|
|
977
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
978
|
-
};
|
|
979
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
980
|
-
const contents = (0, smithy_client_1.map)({});
|
|
981
|
-
const data = parsedOutput.body;
|
|
982
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
983
|
-
Message: smithy_client_1.expectString,
|
|
984
|
-
});
|
|
985
|
-
Object.assign(contents, doc);
|
|
986
|
-
const exception = new models_0_1.ValidationException({
|
|
987
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
988
|
-
...contents,
|
|
989
|
-
});
|
|
990
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
991
|
-
};
|
|
992
|
-
const deserializeMetadata = (output) => ({
|
|
993
|
-
httpStatusCode: output.statusCode,
|
|
994
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
995
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
996
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
997
|
-
});
|
|
998
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
999
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1000
|
-
value !== null &&
|
|
1001
|
-
value !== "" &&
|
|
1002
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1003
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1004
|
-
const _TK = "TagKeys";
|
|
1005
|
-
const _aET = "amznErrorType";
|
|
1006
|
-
const _tK = "tagKeys";
|
|
1007
|
-
const _xae = "x-amzn-errortype";
|
|
1008
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1009
|
-
if (encoded.length) {
|
|
1010
|
-
return JSON.parse(encoded);
|
|
1011
|
-
}
|
|
1012
|
-
return {};
|
|
1013
|
-
});
|
|
1014
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1015
|
-
const value = await parseBody(errorBody, context);
|
|
1016
|
-
value.message = value.message ?? value.Message;
|
|
1017
|
-
return value;
|
|
1018
|
-
};
|
|
1019
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1020
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1021
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1022
|
-
let cleanValue = rawValue;
|
|
1023
|
-
if (typeof cleanValue === "number") {
|
|
1024
|
-
cleanValue = cleanValue.toString();
|
|
1025
|
-
}
|
|
1026
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1027
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1028
|
-
}
|
|
1029
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1030
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1031
|
-
}
|
|
1032
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1033
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1034
|
-
}
|
|
1035
|
-
return cleanValue;
|
|
1036
|
-
};
|
|
1037
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1038
|
-
if (headerKey !== undefined) {
|
|
1039
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1040
|
-
}
|
|
1041
|
-
if (data.code !== undefined) {
|
|
1042
|
-
return sanitizeErrorCode(data.code);
|
|
1043
|
-
}
|
|
1044
|
-
if (data["__type"] !== undefined) {
|
|
1045
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1046
|
-
}
|
|
1047
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|