@aws-sdk/client-codestar-notifications 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/CodestarNotifications.js +1 -37
- package/dist-cjs/CodestarNotificationsClient.js +1 -43
- package/dist-cjs/commands/CreateNotificationRuleCommand.js +1 -29
- package/dist-cjs/commands/DeleteNotificationRuleCommand.js +1 -28
- package/dist-cjs/commands/DeleteTargetCommand.js +1 -29
- package/dist-cjs/commands/DescribeNotificationRuleCommand.js +1 -29
- package/dist-cjs/commands/ListEventTypesCommand.js +1 -28
- package/dist-cjs/commands/ListNotificationRulesCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/ListTargetsCommand.js +1 -29
- package/dist-cjs/commands/SubscribeCommand.js +1 -29
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UnsubscribeCommand.js +1 -29
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateNotificationRuleCommand.js +1 -29
- package/dist-cjs/commands/index.js +1 -16
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1568 -11
- package/dist-cjs/models/CodestarNotificationsServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -195
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListEventTypesPaginator.js +1 -7
- package/dist-cjs/pagination/ListNotificationRulesPaginator.js +1 -7
- package/dist-cjs/pagination/ListTargetsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_restJson1.js +1 -883
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,883 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateNotificationRuleCommand = exports.de_UntagResourceCommand = exports.de_UnsubscribeCommand = exports.de_TagResourceCommand = exports.de_SubscribeCommand = exports.de_ListTargetsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListNotificationRulesCommand = exports.de_ListEventTypesCommand = exports.de_DescribeNotificationRuleCommand = exports.de_DeleteTargetCommand = exports.de_DeleteNotificationRuleCommand = exports.de_CreateNotificationRuleCommand = exports.se_UpdateNotificationRuleCommand = exports.se_UntagResourceCommand = exports.se_UnsubscribeCommand = exports.se_TagResourceCommand = exports.se_SubscribeCommand = exports.se_ListTargetsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListNotificationRulesCommand = exports.se_ListEventTypesCommand = exports.se_DescribeNotificationRuleCommand = exports.se_DeleteTargetCommand = exports.se_DeleteNotificationRuleCommand = exports.se_CreateNotificationRuleCommand = 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 CodestarNotificationsServiceException_1 = require("../models/CodestarNotificationsServiceException");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const se_CreateNotificationRuleCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/createNotificationRule");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
ClientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
18
|
-
DetailType: [],
|
|
19
|
-
EventTypeIds: (_) => (0, smithy_client_1._json)(_),
|
|
20
|
-
Name: [],
|
|
21
|
-
Resource: [],
|
|
22
|
-
Status: [],
|
|
23
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
24
|
-
Targets: (_) => (0, smithy_client_1._json)(_),
|
|
25
|
-
}));
|
|
26
|
-
b.m("POST").h(headers).b(body);
|
|
27
|
-
return b.build();
|
|
28
|
-
};
|
|
29
|
-
exports.se_CreateNotificationRuleCommand = se_CreateNotificationRuleCommand;
|
|
30
|
-
const se_DeleteNotificationRuleCommand = async (input, context) => {
|
|
31
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
32
|
-
const headers = {
|
|
33
|
-
"content-type": "application/json",
|
|
34
|
-
};
|
|
35
|
-
b.bp("/deleteNotificationRule");
|
|
36
|
-
let body;
|
|
37
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
38
|
-
Arn: [],
|
|
39
|
-
}));
|
|
40
|
-
b.m("POST").h(headers).b(body);
|
|
41
|
-
return b.build();
|
|
42
|
-
};
|
|
43
|
-
exports.se_DeleteNotificationRuleCommand = se_DeleteNotificationRuleCommand;
|
|
44
|
-
const se_DeleteTargetCommand = async (input, context) => {
|
|
45
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
46
|
-
const headers = {
|
|
47
|
-
"content-type": "application/json",
|
|
48
|
-
};
|
|
49
|
-
b.bp("/deleteTarget");
|
|
50
|
-
let body;
|
|
51
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
52
|
-
ForceUnsubscribeAll: [],
|
|
53
|
-
TargetAddress: [],
|
|
54
|
-
}));
|
|
55
|
-
b.m("POST").h(headers).b(body);
|
|
56
|
-
return b.build();
|
|
57
|
-
};
|
|
58
|
-
exports.se_DeleteTargetCommand = se_DeleteTargetCommand;
|
|
59
|
-
const se_DescribeNotificationRuleCommand = async (input, context) => {
|
|
60
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
61
|
-
const headers = {
|
|
62
|
-
"content-type": "application/json",
|
|
63
|
-
};
|
|
64
|
-
b.bp("/describeNotificationRule");
|
|
65
|
-
let body;
|
|
66
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
67
|
-
Arn: [],
|
|
68
|
-
}));
|
|
69
|
-
b.m("POST").h(headers).b(body);
|
|
70
|
-
return b.build();
|
|
71
|
-
};
|
|
72
|
-
exports.se_DescribeNotificationRuleCommand = se_DescribeNotificationRuleCommand;
|
|
73
|
-
const se_ListEventTypesCommand = async (input, context) => {
|
|
74
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
75
|
-
const headers = {
|
|
76
|
-
"content-type": "application/json",
|
|
77
|
-
};
|
|
78
|
-
b.bp("/listEventTypes");
|
|
79
|
-
let body;
|
|
80
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
81
|
-
Filters: (_) => (0, smithy_client_1._json)(_),
|
|
82
|
-
MaxResults: [],
|
|
83
|
-
NextToken: [],
|
|
84
|
-
}));
|
|
85
|
-
b.m("POST").h(headers).b(body);
|
|
86
|
-
return b.build();
|
|
87
|
-
};
|
|
88
|
-
exports.se_ListEventTypesCommand = se_ListEventTypesCommand;
|
|
89
|
-
const se_ListNotificationRulesCommand = async (input, context) => {
|
|
90
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
91
|
-
const headers = {
|
|
92
|
-
"content-type": "application/json",
|
|
93
|
-
};
|
|
94
|
-
b.bp("/listNotificationRules");
|
|
95
|
-
let body;
|
|
96
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
97
|
-
Filters: (_) => (0, smithy_client_1._json)(_),
|
|
98
|
-
MaxResults: [],
|
|
99
|
-
NextToken: [],
|
|
100
|
-
}));
|
|
101
|
-
b.m("POST").h(headers).b(body);
|
|
102
|
-
return b.build();
|
|
103
|
-
};
|
|
104
|
-
exports.se_ListNotificationRulesCommand = se_ListNotificationRulesCommand;
|
|
105
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
106
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
107
|
-
const headers = {
|
|
108
|
-
"content-type": "application/json",
|
|
109
|
-
};
|
|
110
|
-
b.bp("/listTagsForResource");
|
|
111
|
-
let body;
|
|
112
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
113
|
-
Arn: [],
|
|
114
|
-
}));
|
|
115
|
-
b.m("POST").h(headers).b(body);
|
|
116
|
-
return b.build();
|
|
117
|
-
};
|
|
118
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
119
|
-
const se_ListTargetsCommand = async (input, context) => {
|
|
120
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
121
|
-
const headers = {
|
|
122
|
-
"content-type": "application/json",
|
|
123
|
-
};
|
|
124
|
-
b.bp("/listTargets");
|
|
125
|
-
let body;
|
|
126
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
127
|
-
Filters: (_) => (0, smithy_client_1._json)(_),
|
|
128
|
-
MaxResults: [],
|
|
129
|
-
NextToken: [],
|
|
130
|
-
}));
|
|
131
|
-
b.m("POST").h(headers).b(body);
|
|
132
|
-
return b.build();
|
|
133
|
-
};
|
|
134
|
-
exports.se_ListTargetsCommand = se_ListTargetsCommand;
|
|
135
|
-
const se_SubscribeCommand = async (input, context) => {
|
|
136
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
137
|
-
const headers = {
|
|
138
|
-
"content-type": "application/json",
|
|
139
|
-
};
|
|
140
|
-
b.bp("/subscribe");
|
|
141
|
-
let body;
|
|
142
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
143
|
-
Arn: [],
|
|
144
|
-
ClientRequestToken: [],
|
|
145
|
-
Target: (_) => (0, smithy_client_1._json)(_),
|
|
146
|
-
}));
|
|
147
|
-
b.m("POST").h(headers).b(body);
|
|
148
|
-
return b.build();
|
|
149
|
-
};
|
|
150
|
-
exports.se_SubscribeCommand = se_SubscribeCommand;
|
|
151
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
152
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
153
|
-
const headers = {
|
|
154
|
-
"content-type": "application/json",
|
|
155
|
-
};
|
|
156
|
-
b.bp("/tagResource");
|
|
157
|
-
let body;
|
|
158
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
159
|
-
Arn: [],
|
|
160
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
161
|
-
}));
|
|
162
|
-
b.m("POST").h(headers).b(body);
|
|
163
|
-
return b.build();
|
|
164
|
-
};
|
|
165
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
166
|
-
const se_UnsubscribeCommand = async (input, context) => {
|
|
167
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
168
|
-
const headers = {
|
|
169
|
-
"content-type": "application/json",
|
|
170
|
-
};
|
|
171
|
-
b.bp("/unsubscribe");
|
|
172
|
-
let body;
|
|
173
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
174
|
-
Arn: [],
|
|
175
|
-
TargetAddress: [],
|
|
176
|
-
}));
|
|
177
|
-
b.m("POST").h(headers).b(body);
|
|
178
|
-
return b.build();
|
|
179
|
-
};
|
|
180
|
-
exports.se_UnsubscribeCommand = se_UnsubscribeCommand;
|
|
181
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
182
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
183
|
-
const headers = {};
|
|
184
|
-
b.bp("/untagResource/{Arn}");
|
|
185
|
-
b.p("Arn", () => input.Arn, "{Arn}", false);
|
|
186
|
-
const query = (0, smithy_client_1.map)({
|
|
187
|
-
[_tK]: [
|
|
188
|
-
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
189
|
-
() => (input[_TK] || []).map((_entry) => _entry),
|
|
190
|
-
],
|
|
191
|
-
});
|
|
192
|
-
let body;
|
|
193
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
194
|
-
return b.build();
|
|
195
|
-
};
|
|
196
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
197
|
-
const se_UpdateNotificationRuleCommand = async (input, context) => {
|
|
198
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
199
|
-
const headers = {
|
|
200
|
-
"content-type": "application/json",
|
|
201
|
-
};
|
|
202
|
-
b.bp("/updateNotificationRule");
|
|
203
|
-
let body;
|
|
204
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
205
|
-
Arn: [],
|
|
206
|
-
DetailType: [],
|
|
207
|
-
EventTypeIds: (_) => (0, smithy_client_1._json)(_),
|
|
208
|
-
Name: [],
|
|
209
|
-
Status: [],
|
|
210
|
-
Targets: (_) => (0, smithy_client_1._json)(_),
|
|
211
|
-
}));
|
|
212
|
-
b.m("POST").h(headers).b(body);
|
|
213
|
-
return b.build();
|
|
214
|
-
};
|
|
215
|
-
exports.se_UpdateNotificationRuleCommand = se_UpdateNotificationRuleCommand;
|
|
216
|
-
const de_CreateNotificationRuleCommand = async (output, context) => {
|
|
217
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
218
|
-
return de_CreateNotificationRuleCommandError(output, context);
|
|
219
|
-
}
|
|
220
|
-
const contents = (0, smithy_client_1.map)({
|
|
221
|
-
$metadata: deserializeMetadata(output),
|
|
222
|
-
});
|
|
223
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
224
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
225
|
-
Arn: smithy_client_1.expectString,
|
|
226
|
-
});
|
|
227
|
-
Object.assign(contents, doc);
|
|
228
|
-
return contents;
|
|
229
|
-
};
|
|
230
|
-
exports.de_CreateNotificationRuleCommand = de_CreateNotificationRuleCommand;
|
|
231
|
-
const de_CreateNotificationRuleCommandError = async (output, context) => {
|
|
232
|
-
const parsedOutput = {
|
|
233
|
-
...output,
|
|
234
|
-
body: await parseErrorBody(output.body, context),
|
|
235
|
-
};
|
|
236
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
237
|
-
switch (errorCode) {
|
|
238
|
-
case "AccessDeniedException":
|
|
239
|
-
case "com.amazonaws.codestarnotifications#AccessDeniedException":
|
|
240
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
241
|
-
case "ConcurrentModificationException":
|
|
242
|
-
case "com.amazonaws.codestarnotifications#ConcurrentModificationException":
|
|
243
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
244
|
-
case "ConfigurationException":
|
|
245
|
-
case "com.amazonaws.codestarnotifications#ConfigurationException":
|
|
246
|
-
throw await de_ConfigurationExceptionRes(parsedOutput, context);
|
|
247
|
-
case "LimitExceededException":
|
|
248
|
-
case "com.amazonaws.codestarnotifications#LimitExceededException":
|
|
249
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
250
|
-
case "ResourceAlreadyExistsException":
|
|
251
|
-
case "com.amazonaws.codestarnotifications#ResourceAlreadyExistsException":
|
|
252
|
-
throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
|
|
253
|
-
case "ValidationException":
|
|
254
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
255
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
256
|
-
default:
|
|
257
|
-
const parsedBody = parsedOutput.body;
|
|
258
|
-
return throwDefaultError({
|
|
259
|
-
output,
|
|
260
|
-
parsedBody,
|
|
261
|
-
errorCode,
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
const de_DeleteNotificationRuleCommand = async (output, context) => {
|
|
266
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
267
|
-
return de_DeleteNotificationRuleCommandError(output, context);
|
|
268
|
-
}
|
|
269
|
-
const contents = (0, smithy_client_1.map)({
|
|
270
|
-
$metadata: deserializeMetadata(output),
|
|
271
|
-
});
|
|
272
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
273
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
274
|
-
Arn: smithy_client_1.expectString,
|
|
275
|
-
});
|
|
276
|
-
Object.assign(contents, doc);
|
|
277
|
-
return contents;
|
|
278
|
-
};
|
|
279
|
-
exports.de_DeleteNotificationRuleCommand = de_DeleteNotificationRuleCommand;
|
|
280
|
-
const de_DeleteNotificationRuleCommandError = async (output, context) => {
|
|
281
|
-
const parsedOutput = {
|
|
282
|
-
...output,
|
|
283
|
-
body: await parseErrorBody(output.body, context),
|
|
284
|
-
};
|
|
285
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
286
|
-
switch (errorCode) {
|
|
287
|
-
case "ConcurrentModificationException":
|
|
288
|
-
case "com.amazonaws.codestarnotifications#ConcurrentModificationException":
|
|
289
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
290
|
-
case "LimitExceededException":
|
|
291
|
-
case "com.amazonaws.codestarnotifications#LimitExceededException":
|
|
292
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
293
|
-
case "ValidationException":
|
|
294
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
295
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
296
|
-
default:
|
|
297
|
-
const parsedBody = parsedOutput.body;
|
|
298
|
-
return throwDefaultError({
|
|
299
|
-
output,
|
|
300
|
-
parsedBody,
|
|
301
|
-
errorCode,
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
const de_DeleteTargetCommand = async (output, context) => {
|
|
306
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
307
|
-
return de_DeleteTargetCommandError(output, context);
|
|
308
|
-
}
|
|
309
|
-
const contents = (0, smithy_client_1.map)({
|
|
310
|
-
$metadata: deserializeMetadata(output),
|
|
311
|
-
});
|
|
312
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
313
|
-
return contents;
|
|
314
|
-
};
|
|
315
|
-
exports.de_DeleteTargetCommand = de_DeleteTargetCommand;
|
|
316
|
-
const de_DeleteTargetCommandError = async (output, context) => {
|
|
317
|
-
const parsedOutput = {
|
|
318
|
-
...output,
|
|
319
|
-
body: await parseErrorBody(output.body, context),
|
|
320
|
-
};
|
|
321
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
322
|
-
switch (errorCode) {
|
|
323
|
-
case "ValidationException":
|
|
324
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
325
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
326
|
-
default:
|
|
327
|
-
const parsedBody = parsedOutput.body;
|
|
328
|
-
return throwDefaultError({
|
|
329
|
-
output,
|
|
330
|
-
parsedBody,
|
|
331
|
-
errorCode,
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
};
|
|
335
|
-
const de_DescribeNotificationRuleCommand = async (output, context) => {
|
|
336
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
337
|
-
return de_DescribeNotificationRuleCommandError(output, context);
|
|
338
|
-
}
|
|
339
|
-
const contents = (0, smithy_client_1.map)({
|
|
340
|
-
$metadata: deserializeMetadata(output),
|
|
341
|
-
});
|
|
342
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
343
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
344
|
-
Arn: smithy_client_1.expectString,
|
|
345
|
-
CreatedBy: smithy_client_1.expectString,
|
|
346
|
-
CreatedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
347
|
-
DetailType: smithy_client_1.expectString,
|
|
348
|
-
EventTypes: smithy_client_1._json,
|
|
349
|
-
LastModifiedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
350
|
-
Name: smithy_client_1.expectString,
|
|
351
|
-
Resource: smithy_client_1.expectString,
|
|
352
|
-
Status: smithy_client_1.expectString,
|
|
353
|
-
Tags: smithy_client_1._json,
|
|
354
|
-
Targets: smithy_client_1._json,
|
|
355
|
-
});
|
|
356
|
-
Object.assign(contents, doc);
|
|
357
|
-
return contents;
|
|
358
|
-
};
|
|
359
|
-
exports.de_DescribeNotificationRuleCommand = de_DescribeNotificationRuleCommand;
|
|
360
|
-
const de_DescribeNotificationRuleCommandError = async (output, context) => {
|
|
361
|
-
const parsedOutput = {
|
|
362
|
-
...output,
|
|
363
|
-
body: await parseErrorBody(output.body, context),
|
|
364
|
-
};
|
|
365
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
366
|
-
switch (errorCode) {
|
|
367
|
-
case "ResourceNotFoundException":
|
|
368
|
-
case "com.amazonaws.codestarnotifications#ResourceNotFoundException":
|
|
369
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
370
|
-
case "ValidationException":
|
|
371
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
372
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
373
|
-
default:
|
|
374
|
-
const parsedBody = parsedOutput.body;
|
|
375
|
-
return throwDefaultError({
|
|
376
|
-
output,
|
|
377
|
-
parsedBody,
|
|
378
|
-
errorCode,
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
const de_ListEventTypesCommand = async (output, context) => {
|
|
383
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
384
|
-
return de_ListEventTypesCommandError(output, context);
|
|
385
|
-
}
|
|
386
|
-
const contents = (0, smithy_client_1.map)({
|
|
387
|
-
$metadata: deserializeMetadata(output),
|
|
388
|
-
});
|
|
389
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
390
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
391
|
-
EventTypes: smithy_client_1._json,
|
|
392
|
-
NextToken: smithy_client_1.expectString,
|
|
393
|
-
});
|
|
394
|
-
Object.assign(contents, doc);
|
|
395
|
-
return contents;
|
|
396
|
-
};
|
|
397
|
-
exports.de_ListEventTypesCommand = de_ListEventTypesCommand;
|
|
398
|
-
const de_ListEventTypesCommandError = async (output, context) => {
|
|
399
|
-
const parsedOutput = {
|
|
400
|
-
...output,
|
|
401
|
-
body: await parseErrorBody(output.body, context),
|
|
402
|
-
};
|
|
403
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
404
|
-
switch (errorCode) {
|
|
405
|
-
case "InvalidNextTokenException":
|
|
406
|
-
case "com.amazonaws.codestarnotifications#InvalidNextTokenException":
|
|
407
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
408
|
-
case "ValidationException":
|
|
409
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
410
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
411
|
-
default:
|
|
412
|
-
const parsedBody = parsedOutput.body;
|
|
413
|
-
return throwDefaultError({
|
|
414
|
-
output,
|
|
415
|
-
parsedBody,
|
|
416
|
-
errorCode,
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
};
|
|
420
|
-
const de_ListNotificationRulesCommand = async (output, context) => {
|
|
421
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
422
|
-
return de_ListNotificationRulesCommandError(output, context);
|
|
423
|
-
}
|
|
424
|
-
const contents = (0, smithy_client_1.map)({
|
|
425
|
-
$metadata: deserializeMetadata(output),
|
|
426
|
-
});
|
|
427
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
428
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
429
|
-
NextToken: smithy_client_1.expectString,
|
|
430
|
-
NotificationRules: smithy_client_1._json,
|
|
431
|
-
});
|
|
432
|
-
Object.assign(contents, doc);
|
|
433
|
-
return contents;
|
|
434
|
-
};
|
|
435
|
-
exports.de_ListNotificationRulesCommand = de_ListNotificationRulesCommand;
|
|
436
|
-
const de_ListNotificationRulesCommandError = async (output, context) => {
|
|
437
|
-
const parsedOutput = {
|
|
438
|
-
...output,
|
|
439
|
-
body: await parseErrorBody(output.body, context),
|
|
440
|
-
};
|
|
441
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
442
|
-
switch (errorCode) {
|
|
443
|
-
case "InvalidNextTokenException":
|
|
444
|
-
case "com.amazonaws.codestarnotifications#InvalidNextTokenException":
|
|
445
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
446
|
-
case "ValidationException":
|
|
447
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
448
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
449
|
-
default:
|
|
450
|
-
const parsedBody = parsedOutput.body;
|
|
451
|
-
return throwDefaultError({
|
|
452
|
-
output,
|
|
453
|
-
parsedBody,
|
|
454
|
-
errorCode,
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
459
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
460
|
-
return de_ListTagsForResourceCommandError(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
|
-
Tags: smithy_client_1._json,
|
|
468
|
-
});
|
|
469
|
-
Object.assign(contents, doc);
|
|
470
|
-
return contents;
|
|
471
|
-
};
|
|
472
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
473
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
474
|
-
const parsedOutput = {
|
|
475
|
-
...output,
|
|
476
|
-
body: await parseErrorBody(output.body, context),
|
|
477
|
-
};
|
|
478
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
479
|
-
switch (errorCode) {
|
|
480
|
-
case "ResourceNotFoundException":
|
|
481
|
-
case "com.amazonaws.codestarnotifications#ResourceNotFoundException":
|
|
482
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
483
|
-
case "ValidationException":
|
|
484
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
485
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
486
|
-
default:
|
|
487
|
-
const parsedBody = parsedOutput.body;
|
|
488
|
-
return throwDefaultError({
|
|
489
|
-
output,
|
|
490
|
-
parsedBody,
|
|
491
|
-
errorCode,
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
const de_ListTargetsCommand = async (output, context) => {
|
|
496
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
497
|
-
return de_ListTargetsCommandError(output, context);
|
|
498
|
-
}
|
|
499
|
-
const contents = (0, smithy_client_1.map)({
|
|
500
|
-
$metadata: deserializeMetadata(output),
|
|
501
|
-
});
|
|
502
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
503
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
504
|
-
NextToken: smithy_client_1.expectString,
|
|
505
|
-
Targets: smithy_client_1._json,
|
|
506
|
-
});
|
|
507
|
-
Object.assign(contents, doc);
|
|
508
|
-
return contents;
|
|
509
|
-
};
|
|
510
|
-
exports.de_ListTargetsCommand = de_ListTargetsCommand;
|
|
511
|
-
const de_ListTargetsCommandError = async (output, context) => {
|
|
512
|
-
const parsedOutput = {
|
|
513
|
-
...output,
|
|
514
|
-
body: await parseErrorBody(output.body, context),
|
|
515
|
-
};
|
|
516
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
517
|
-
switch (errorCode) {
|
|
518
|
-
case "InvalidNextTokenException":
|
|
519
|
-
case "com.amazonaws.codestarnotifications#InvalidNextTokenException":
|
|
520
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
521
|
-
case "ValidationException":
|
|
522
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
523
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
524
|
-
default:
|
|
525
|
-
const parsedBody = parsedOutput.body;
|
|
526
|
-
return throwDefaultError({
|
|
527
|
-
output,
|
|
528
|
-
parsedBody,
|
|
529
|
-
errorCode,
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
};
|
|
533
|
-
const de_SubscribeCommand = async (output, context) => {
|
|
534
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
535
|
-
return de_SubscribeCommandError(output, context);
|
|
536
|
-
}
|
|
537
|
-
const contents = (0, smithy_client_1.map)({
|
|
538
|
-
$metadata: deserializeMetadata(output),
|
|
539
|
-
});
|
|
540
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
541
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
542
|
-
Arn: smithy_client_1.expectString,
|
|
543
|
-
});
|
|
544
|
-
Object.assign(contents, doc);
|
|
545
|
-
return contents;
|
|
546
|
-
};
|
|
547
|
-
exports.de_SubscribeCommand = de_SubscribeCommand;
|
|
548
|
-
const de_SubscribeCommandError = async (output, context) => {
|
|
549
|
-
const parsedOutput = {
|
|
550
|
-
...output,
|
|
551
|
-
body: await parseErrorBody(output.body, context),
|
|
552
|
-
};
|
|
553
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
554
|
-
switch (errorCode) {
|
|
555
|
-
case "ConfigurationException":
|
|
556
|
-
case "com.amazonaws.codestarnotifications#ConfigurationException":
|
|
557
|
-
throw await de_ConfigurationExceptionRes(parsedOutput, context);
|
|
558
|
-
case "ResourceNotFoundException":
|
|
559
|
-
case "com.amazonaws.codestarnotifications#ResourceNotFoundException":
|
|
560
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
561
|
-
case "ValidationException":
|
|
562
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
563
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
564
|
-
default:
|
|
565
|
-
const parsedBody = parsedOutput.body;
|
|
566
|
-
return throwDefaultError({
|
|
567
|
-
output,
|
|
568
|
-
parsedBody,
|
|
569
|
-
errorCode,
|
|
570
|
-
});
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
574
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
575
|
-
return de_TagResourceCommandError(output, context);
|
|
576
|
-
}
|
|
577
|
-
const contents = (0, smithy_client_1.map)({
|
|
578
|
-
$metadata: deserializeMetadata(output),
|
|
579
|
-
});
|
|
580
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
581
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
582
|
-
Tags: smithy_client_1._json,
|
|
583
|
-
});
|
|
584
|
-
Object.assign(contents, doc);
|
|
585
|
-
return contents;
|
|
586
|
-
};
|
|
587
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
588
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
589
|
-
const parsedOutput = {
|
|
590
|
-
...output,
|
|
591
|
-
body: await parseErrorBody(output.body, context),
|
|
592
|
-
};
|
|
593
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
594
|
-
switch (errorCode) {
|
|
595
|
-
case "ConcurrentModificationException":
|
|
596
|
-
case "com.amazonaws.codestarnotifications#ConcurrentModificationException":
|
|
597
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
598
|
-
case "LimitExceededException":
|
|
599
|
-
case "com.amazonaws.codestarnotifications#LimitExceededException":
|
|
600
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
601
|
-
case "ResourceNotFoundException":
|
|
602
|
-
case "com.amazonaws.codestarnotifications#ResourceNotFoundException":
|
|
603
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
604
|
-
case "ValidationException":
|
|
605
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
606
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
607
|
-
default:
|
|
608
|
-
const parsedBody = parsedOutput.body;
|
|
609
|
-
return throwDefaultError({
|
|
610
|
-
output,
|
|
611
|
-
parsedBody,
|
|
612
|
-
errorCode,
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
};
|
|
616
|
-
const de_UnsubscribeCommand = async (output, context) => {
|
|
617
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
618
|
-
return de_UnsubscribeCommandError(output, context);
|
|
619
|
-
}
|
|
620
|
-
const contents = (0, smithy_client_1.map)({
|
|
621
|
-
$metadata: deserializeMetadata(output),
|
|
622
|
-
});
|
|
623
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
624
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
625
|
-
Arn: smithy_client_1.expectString,
|
|
626
|
-
});
|
|
627
|
-
Object.assign(contents, doc);
|
|
628
|
-
return contents;
|
|
629
|
-
};
|
|
630
|
-
exports.de_UnsubscribeCommand = de_UnsubscribeCommand;
|
|
631
|
-
const de_UnsubscribeCommandError = async (output, context) => {
|
|
632
|
-
const parsedOutput = {
|
|
633
|
-
...output,
|
|
634
|
-
body: await parseErrorBody(output.body, context),
|
|
635
|
-
};
|
|
636
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
637
|
-
switch (errorCode) {
|
|
638
|
-
case "ValidationException":
|
|
639
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
640
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
641
|
-
default:
|
|
642
|
-
const parsedBody = parsedOutput.body;
|
|
643
|
-
return throwDefaultError({
|
|
644
|
-
output,
|
|
645
|
-
parsedBody,
|
|
646
|
-
errorCode,
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
};
|
|
650
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
651
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
652
|
-
return de_UntagResourceCommandError(output, context);
|
|
653
|
-
}
|
|
654
|
-
const contents = (0, smithy_client_1.map)({
|
|
655
|
-
$metadata: deserializeMetadata(output),
|
|
656
|
-
});
|
|
657
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
658
|
-
return contents;
|
|
659
|
-
};
|
|
660
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
661
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
662
|
-
const parsedOutput = {
|
|
663
|
-
...output,
|
|
664
|
-
body: await parseErrorBody(output.body, context),
|
|
665
|
-
};
|
|
666
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
667
|
-
switch (errorCode) {
|
|
668
|
-
case "ConcurrentModificationException":
|
|
669
|
-
case "com.amazonaws.codestarnotifications#ConcurrentModificationException":
|
|
670
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
671
|
-
case "LimitExceededException":
|
|
672
|
-
case "com.amazonaws.codestarnotifications#LimitExceededException":
|
|
673
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
674
|
-
case "ResourceNotFoundException":
|
|
675
|
-
case "com.amazonaws.codestarnotifications#ResourceNotFoundException":
|
|
676
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
677
|
-
case "ValidationException":
|
|
678
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
679
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
680
|
-
default:
|
|
681
|
-
const parsedBody = parsedOutput.body;
|
|
682
|
-
return throwDefaultError({
|
|
683
|
-
output,
|
|
684
|
-
parsedBody,
|
|
685
|
-
errorCode,
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
};
|
|
689
|
-
const de_UpdateNotificationRuleCommand = async (output, context) => {
|
|
690
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
691
|
-
return de_UpdateNotificationRuleCommandError(output, context);
|
|
692
|
-
}
|
|
693
|
-
const contents = (0, smithy_client_1.map)({
|
|
694
|
-
$metadata: deserializeMetadata(output),
|
|
695
|
-
});
|
|
696
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
697
|
-
return contents;
|
|
698
|
-
};
|
|
699
|
-
exports.de_UpdateNotificationRuleCommand = de_UpdateNotificationRuleCommand;
|
|
700
|
-
const de_UpdateNotificationRuleCommandError = async (output, context) => {
|
|
701
|
-
const parsedOutput = {
|
|
702
|
-
...output,
|
|
703
|
-
body: await parseErrorBody(output.body, context),
|
|
704
|
-
};
|
|
705
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
706
|
-
switch (errorCode) {
|
|
707
|
-
case "ConfigurationException":
|
|
708
|
-
case "com.amazonaws.codestarnotifications#ConfigurationException":
|
|
709
|
-
throw await de_ConfigurationExceptionRes(parsedOutput, context);
|
|
710
|
-
case "ResourceNotFoundException":
|
|
711
|
-
case "com.amazonaws.codestarnotifications#ResourceNotFoundException":
|
|
712
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
713
|
-
case "ValidationException":
|
|
714
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
715
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
716
|
-
default:
|
|
717
|
-
const parsedBody = parsedOutput.body;
|
|
718
|
-
return throwDefaultError({
|
|
719
|
-
output,
|
|
720
|
-
parsedBody,
|
|
721
|
-
errorCode,
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
};
|
|
725
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(CodestarNotificationsServiceException_1.CodestarNotificationsServiceException);
|
|
726
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
727
|
-
const contents = (0, smithy_client_1.map)({});
|
|
728
|
-
const data = parsedOutput.body;
|
|
729
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
730
|
-
Message: smithy_client_1.expectString,
|
|
731
|
-
});
|
|
732
|
-
Object.assign(contents, doc);
|
|
733
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
734
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
735
|
-
...contents,
|
|
736
|
-
});
|
|
737
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
738
|
-
};
|
|
739
|
-
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
740
|
-
const contents = (0, smithy_client_1.map)({});
|
|
741
|
-
const data = parsedOutput.body;
|
|
742
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
743
|
-
Message: smithy_client_1.expectString,
|
|
744
|
-
});
|
|
745
|
-
Object.assign(contents, doc);
|
|
746
|
-
const exception = new models_0_1.ConcurrentModificationException({
|
|
747
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
748
|
-
...contents,
|
|
749
|
-
});
|
|
750
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
751
|
-
};
|
|
752
|
-
const de_ConfigurationExceptionRes = async (parsedOutput, context) => {
|
|
753
|
-
const contents = (0, smithy_client_1.map)({});
|
|
754
|
-
const data = parsedOutput.body;
|
|
755
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
756
|
-
Message: smithy_client_1.expectString,
|
|
757
|
-
});
|
|
758
|
-
Object.assign(contents, doc);
|
|
759
|
-
const exception = new models_0_1.ConfigurationException({
|
|
760
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
761
|
-
...contents,
|
|
762
|
-
});
|
|
763
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
764
|
-
};
|
|
765
|
-
const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
|
|
766
|
-
const contents = (0, smithy_client_1.map)({});
|
|
767
|
-
const data = parsedOutput.body;
|
|
768
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
769
|
-
Message: smithy_client_1.expectString,
|
|
770
|
-
});
|
|
771
|
-
Object.assign(contents, doc);
|
|
772
|
-
const exception = new models_0_1.InvalidNextTokenException({
|
|
773
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
774
|
-
...contents,
|
|
775
|
-
});
|
|
776
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
777
|
-
};
|
|
778
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
779
|
-
const contents = (0, smithy_client_1.map)({});
|
|
780
|
-
const data = parsedOutput.body;
|
|
781
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
782
|
-
Message: smithy_client_1.expectString,
|
|
783
|
-
});
|
|
784
|
-
Object.assign(contents, doc);
|
|
785
|
-
const exception = new models_0_1.LimitExceededException({
|
|
786
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
787
|
-
...contents,
|
|
788
|
-
});
|
|
789
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
790
|
-
};
|
|
791
|
-
const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
|
|
792
|
-
const contents = (0, smithy_client_1.map)({});
|
|
793
|
-
const data = parsedOutput.body;
|
|
794
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
795
|
-
Message: smithy_client_1.expectString,
|
|
796
|
-
});
|
|
797
|
-
Object.assign(contents, doc);
|
|
798
|
-
const exception = new models_0_1.ResourceAlreadyExistsException({
|
|
799
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
800
|
-
...contents,
|
|
801
|
-
});
|
|
802
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
803
|
-
};
|
|
804
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
805
|
-
const contents = (0, smithy_client_1.map)({});
|
|
806
|
-
const data = parsedOutput.body;
|
|
807
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
808
|
-
Message: smithy_client_1.expectString,
|
|
809
|
-
});
|
|
810
|
-
Object.assign(contents, doc);
|
|
811
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
812
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
813
|
-
...contents,
|
|
814
|
-
});
|
|
815
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
816
|
-
};
|
|
817
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
818
|
-
const contents = (0, smithy_client_1.map)({});
|
|
819
|
-
const data = parsedOutput.body;
|
|
820
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
821
|
-
Message: smithy_client_1.expectString,
|
|
822
|
-
});
|
|
823
|
-
Object.assign(contents, doc);
|
|
824
|
-
const exception = new models_0_1.ValidationException({
|
|
825
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
826
|
-
...contents,
|
|
827
|
-
});
|
|
828
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
829
|
-
};
|
|
830
|
-
const deserializeMetadata = (output) => ({
|
|
831
|
-
httpStatusCode: output.statusCode,
|
|
832
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
833
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
834
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
835
|
-
});
|
|
836
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
837
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
838
|
-
value !== null &&
|
|
839
|
-
value !== "" &&
|
|
840
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
841
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
842
|
-
const _TK = "TagKeys";
|
|
843
|
-
const _tK = "tagKeys";
|
|
844
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
845
|
-
if (encoded.length) {
|
|
846
|
-
return JSON.parse(encoded);
|
|
847
|
-
}
|
|
848
|
-
return {};
|
|
849
|
-
});
|
|
850
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
851
|
-
const value = await parseBody(errorBody, context);
|
|
852
|
-
value.message = value.message ?? value.Message;
|
|
853
|
-
return value;
|
|
854
|
-
};
|
|
855
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
856
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
857
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
858
|
-
let cleanValue = rawValue;
|
|
859
|
-
if (typeof cleanValue === "number") {
|
|
860
|
-
cleanValue = cleanValue.toString();
|
|
861
|
-
}
|
|
862
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
863
|
-
cleanValue = cleanValue.split(",")[0];
|
|
864
|
-
}
|
|
865
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
866
|
-
cleanValue = cleanValue.split(":")[0];
|
|
867
|
-
}
|
|
868
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
869
|
-
cleanValue = cleanValue.split("#")[1];
|
|
870
|
-
}
|
|
871
|
-
return cleanValue;
|
|
872
|
-
};
|
|
873
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
874
|
-
if (headerKey !== undefined) {
|
|
875
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
876
|
-
}
|
|
877
|
-
if (data.code !== undefined) {
|
|
878
|
-
return sanitizeErrorCode(data.code);
|
|
879
|
-
}
|
|
880
|
-
if (data["__type"] !== undefined) {
|
|
881
|
-
return sanitizeErrorCode(data["__type"]);
|
|
882
|
-
}
|
|
883
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|