@aws-sdk/client-arc-zonal-shift 3.490.0 → 3.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/ARCZonalShift.js +1 -33
- package/dist-cjs/ARCZonalShiftClient.js +1 -43
- package/dist-cjs/commands/CancelZonalShiftCommand.js +1 -28
- package/dist-cjs/commands/CreatePracticeRunConfigurationCommand.js +1 -28
- package/dist-cjs/commands/DeletePracticeRunConfigurationCommand.js +1 -28
- package/dist-cjs/commands/GetManagedResourceCommand.js +1 -28
- package/dist-cjs/commands/ListAutoshiftsCommand.js +1 -28
- package/dist-cjs/commands/ListManagedResourcesCommand.js +1 -28
- package/dist-cjs/commands/ListZonalShiftsCommand.js +1 -28
- package/dist-cjs/commands/StartZonalShiftCommand.js +1 -28
- package/dist-cjs/commands/UpdatePracticeRunConfigurationCommand.js +1 -28
- package/dist-cjs/commands/UpdateZonalAutoshiftConfigurationCommand.js +1 -28
- package/dist-cjs/commands/UpdateZonalShiftCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -14
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1503 -11
- package/dist-cjs/models/ARCZonalShiftServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -135
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListAutoshiftsPaginator.js +1 -7
- package/dist-cjs/pagination/ListManagedResourcesPaginator.js +1 -7
- package/dist-cjs/pagination/ListZonalShiftsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_restJson1.js +1 -955
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,955 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateZonalShiftCommand = exports.de_UpdateZonalAutoshiftConfigurationCommand = exports.de_UpdatePracticeRunConfigurationCommand = exports.de_StartZonalShiftCommand = exports.de_ListZonalShiftsCommand = exports.de_ListManagedResourcesCommand = exports.de_ListAutoshiftsCommand = exports.de_GetManagedResourceCommand = exports.de_DeletePracticeRunConfigurationCommand = exports.de_CreatePracticeRunConfigurationCommand = exports.de_CancelZonalShiftCommand = exports.se_UpdateZonalShiftCommand = exports.se_UpdateZonalAutoshiftConfigurationCommand = exports.se_UpdatePracticeRunConfigurationCommand = exports.se_StartZonalShiftCommand = exports.se_ListZonalShiftsCommand = exports.se_ListManagedResourcesCommand = exports.se_ListAutoshiftsCommand = exports.se_GetManagedResourceCommand = exports.se_DeletePracticeRunConfigurationCommand = exports.se_CreatePracticeRunConfigurationCommand = exports.se_CancelZonalShiftCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const ARCZonalShiftServiceException_1 = require("../models/ARCZonalShiftServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_CancelZonalShiftCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {};
|
|
11
|
-
b.bp("/zonalshifts/{zonalShiftId}");
|
|
12
|
-
b.p("zonalShiftId", () => input.zonalShiftId, "{zonalShiftId}", false);
|
|
13
|
-
let body;
|
|
14
|
-
b.m("DELETE").h(headers).b(body);
|
|
15
|
-
return b.build();
|
|
16
|
-
};
|
|
17
|
-
exports.se_CancelZonalShiftCommand = se_CancelZonalShiftCommand;
|
|
18
|
-
const se_CreatePracticeRunConfigurationCommand = async (input, context) => {
|
|
19
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
20
|
-
const headers = {
|
|
21
|
-
"content-type": "application/json",
|
|
22
|
-
};
|
|
23
|
-
b.bp("/configuration");
|
|
24
|
-
let body;
|
|
25
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
26
|
-
blockedDates: (_) => (0, smithy_client_1._json)(_),
|
|
27
|
-
blockedWindows: (_) => (0, smithy_client_1._json)(_),
|
|
28
|
-
blockingAlarms: (_) => (0, smithy_client_1._json)(_),
|
|
29
|
-
outcomeAlarms: (_) => (0, smithy_client_1._json)(_),
|
|
30
|
-
resourceIdentifier: [],
|
|
31
|
-
}));
|
|
32
|
-
b.m("POST").h(headers).b(body);
|
|
33
|
-
return b.build();
|
|
34
|
-
};
|
|
35
|
-
exports.se_CreatePracticeRunConfigurationCommand = se_CreatePracticeRunConfigurationCommand;
|
|
36
|
-
const se_DeletePracticeRunConfigurationCommand = async (input, context) => {
|
|
37
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
38
|
-
const headers = {};
|
|
39
|
-
b.bp("/configuration/{resourceIdentifier}");
|
|
40
|
-
b.p("resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
41
|
-
let body;
|
|
42
|
-
b.m("DELETE").h(headers).b(body);
|
|
43
|
-
return b.build();
|
|
44
|
-
};
|
|
45
|
-
exports.se_DeletePracticeRunConfigurationCommand = se_DeletePracticeRunConfigurationCommand;
|
|
46
|
-
const se_GetManagedResourceCommand = async (input, context) => {
|
|
47
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
48
|
-
const headers = {};
|
|
49
|
-
b.bp("/managedresources/{resourceIdentifier}");
|
|
50
|
-
b.p("resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
51
|
-
let body;
|
|
52
|
-
b.m("GET").h(headers).b(body);
|
|
53
|
-
return b.build();
|
|
54
|
-
};
|
|
55
|
-
exports.se_GetManagedResourceCommand = se_GetManagedResourceCommand;
|
|
56
|
-
const se_ListAutoshiftsCommand = async (input, context) => {
|
|
57
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
58
|
-
const headers = {};
|
|
59
|
-
b.bp("/autoshifts");
|
|
60
|
-
const query = (0, smithy_client_1.map)({
|
|
61
|
-
[_nT]: [, input[_nT]],
|
|
62
|
-
[_s]: [, input[_s]],
|
|
63
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
64
|
-
});
|
|
65
|
-
let body;
|
|
66
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
67
|
-
return b.build();
|
|
68
|
-
};
|
|
69
|
-
exports.se_ListAutoshiftsCommand = se_ListAutoshiftsCommand;
|
|
70
|
-
const se_ListManagedResourcesCommand = async (input, context) => {
|
|
71
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
72
|
-
const headers = {};
|
|
73
|
-
b.bp("/managedresources");
|
|
74
|
-
const query = (0, smithy_client_1.map)({
|
|
75
|
-
[_nT]: [, input[_nT]],
|
|
76
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
77
|
-
});
|
|
78
|
-
let body;
|
|
79
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
80
|
-
return b.build();
|
|
81
|
-
};
|
|
82
|
-
exports.se_ListManagedResourcesCommand = se_ListManagedResourcesCommand;
|
|
83
|
-
const se_ListZonalShiftsCommand = async (input, context) => {
|
|
84
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
85
|
-
const headers = {};
|
|
86
|
-
b.bp("/zonalshifts");
|
|
87
|
-
const query = (0, smithy_client_1.map)({
|
|
88
|
-
[_nT]: [, input[_nT]],
|
|
89
|
-
[_s]: [, input[_s]],
|
|
90
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
91
|
-
[_rI]: [, input[_rI]],
|
|
92
|
-
});
|
|
93
|
-
let body;
|
|
94
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
95
|
-
return b.build();
|
|
96
|
-
};
|
|
97
|
-
exports.se_ListZonalShiftsCommand = se_ListZonalShiftsCommand;
|
|
98
|
-
const se_StartZonalShiftCommand = async (input, context) => {
|
|
99
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
100
|
-
const headers = {
|
|
101
|
-
"content-type": "application/json",
|
|
102
|
-
};
|
|
103
|
-
b.bp("/zonalshifts");
|
|
104
|
-
let body;
|
|
105
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
106
|
-
awayFrom: [],
|
|
107
|
-
comment: [],
|
|
108
|
-
expiresIn: [],
|
|
109
|
-
resourceIdentifier: [],
|
|
110
|
-
}));
|
|
111
|
-
b.m("POST").h(headers).b(body);
|
|
112
|
-
return b.build();
|
|
113
|
-
};
|
|
114
|
-
exports.se_StartZonalShiftCommand = se_StartZonalShiftCommand;
|
|
115
|
-
const se_UpdatePracticeRunConfigurationCommand = async (input, context) => {
|
|
116
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
117
|
-
const headers = {
|
|
118
|
-
"content-type": "application/json",
|
|
119
|
-
};
|
|
120
|
-
b.bp("/configuration/{resourceIdentifier}");
|
|
121
|
-
b.p("resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
122
|
-
let body;
|
|
123
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
124
|
-
blockedDates: (_) => (0, smithy_client_1._json)(_),
|
|
125
|
-
blockedWindows: (_) => (0, smithy_client_1._json)(_),
|
|
126
|
-
blockingAlarms: (_) => (0, smithy_client_1._json)(_),
|
|
127
|
-
outcomeAlarms: (_) => (0, smithy_client_1._json)(_),
|
|
128
|
-
}));
|
|
129
|
-
b.m("PATCH").h(headers).b(body);
|
|
130
|
-
return b.build();
|
|
131
|
-
};
|
|
132
|
-
exports.se_UpdatePracticeRunConfigurationCommand = se_UpdatePracticeRunConfigurationCommand;
|
|
133
|
-
const se_UpdateZonalAutoshiftConfigurationCommand = async (input, context) => {
|
|
134
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
135
|
-
const headers = {
|
|
136
|
-
"content-type": "application/json",
|
|
137
|
-
};
|
|
138
|
-
b.bp("/managedresources/{resourceIdentifier}");
|
|
139
|
-
b.p("resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
140
|
-
let body;
|
|
141
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
142
|
-
zonalAutoshiftStatus: [],
|
|
143
|
-
}));
|
|
144
|
-
b.m("PUT").h(headers).b(body);
|
|
145
|
-
return b.build();
|
|
146
|
-
};
|
|
147
|
-
exports.se_UpdateZonalAutoshiftConfigurationCommand = se_UpdateZonalAutoshiftConfigurationCommand;
|
|
148
|
-
const se_UpdateZonalShiftCommand = async (input, context) => {
|
|
149
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
150
|
-
const headers = {
|
|
151
|
-
"content-type": "application/json",
|
|
152
|
-
};
|
|
153
|
-
b.bp("/zonalshifts/{zonalShiftId}");
|
|
154
|
-
b.p("zonalShiftId", () => input.zonalShiftId, "{zonalShiftId}", false);
|
|
155
|
-
let body;
|
|
156
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
157
|
-
comment: [],
|
|
158
|
-
expiresIn: [],
|
|
159
|
-
}));
|
|
160
|
-
b.m("PATCH").h(headers).b(body);
|
|
161
|
-
return b.build();
|
|
162
|
-
};
|
|
163
|
-
exports.se_UpdateZonalShiftCommand = se_UpdateZonalShiftCommand;
|
|
164
|
-
const de_CancelZonalShiftCommand = async (output, context) => {
|
|
165
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
166
|
-
return de_CancelZonalShiftCommandError(output, context);
|
|
167
|
-
}
|
|
168
|
-
const contents = (0, smithy_client_1.map)({
|
|
169
|
-
$metadata: deserializeMetadata(output),
|
|
170
|
-
});
|
|
171
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
172
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
173
|
-
awayFrom: smithy_client_1.expectString,
|
|
174
|
-
comment: smithy_client_1.expectString,
|
|
175
|
-
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
176
|
-
resourceIdentifier: smithy_client_1.expectString,
|
|
177
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
178
|
-
status: smithy_client_1.expectString,
|
|
179
|
-
zonalShiftId: smithy_client_1.expectString,
|
|
180
|
-
});
|
|
181
|
-
Object.assign(contents, doc);
|
|
182
|
-
return contents;
|
|
183
|
-
};
|
|
184
|
-
exports.de_CancelZonalShiftCommand = de_CancelZonalShiftCommand;
|
|
185
|
-
const de_CancelZonalShiftCommandError = async (output, context) => {
|
|
186
|
-
const parsedOutput = {
|
|
187
|
-
...output,
|
|
188
|
-
body: await parseErrorBody(output.body, context),
|
|
189
|
-
};
|
|
190
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
191
|
-
switch (errorCode) {
|
|
192
|
-
case "AccessDeniedException":
|
|
193
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
194
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
195
|
-
case "ConflictException":
|
|
196
|
-
case "com.amazonaws.arczonalshift#ConflictException":
|
|
197
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
198
|
-
case "InternalServerException":
|
|
199
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
200
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
201
|
-
case "ResourceNotFoundException":
|
|
202
|
-
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
203
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
204
|
-
case "ThrottlingException":
|
|
205
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
206
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
207
|
-
case "ValidationException":
|
|
208
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
209
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
210
|
-
default:
|
|
211
|
-
const parsedBody = parsedOutput.body;
|
|
212
|
-
return throwDefaultError({
|
|
213
|
-
output,
|
|
214
|
-
parsedBody,
|
|
215
|
-
errorCode,
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
const de_CreatePracticeRunConfigurationCommand = async (output, context) => {
|
|
220
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
221
|
-
return de_CreatePracticeRunConfigurationCommandError(output, context);
|
|
222
|
-
}
|
|
223
|
-
const contents = (0, smithy_client_1.map)({
|
|
224
|
-
$metadata: deserializeMetadata(output),
|
|
225
|
-
});
|
|
226
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
227
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
228
|
-
arn: smithy_client_1.expectString,
|
|
229
|
-
name: smithy_client_1.expectString,
|
|
230
|
-
practiceRunConfiguration: smithy_client_1._json,
|
|
231
|
-
zonalAutoshiftStatus: smithy_client_1.expectString,
|
|
232
|
-
});
|
|
233
|
-
Object.assign(contents, doc);
|
|
234
|
-
return contents;
|
|
235
|
-
};
|
|
236
|
-
exports.de_CreatePracticeRunConfigurationCommand = de_CreatePracticeRunConfigurationCommand;
|
|
237
|
-
const de_CreatePracticeRunConfigurationCommandError = async (output, context) => {
|
|
238
|
-
const parsedOutput = {
|
|
239
|
-
...output,
|
|
240
|
-
body: await parseErrorBody(output.body, context),
|
|
241
|
-
};
|
|
242
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
243
|
-
switch (errorCode) {
|
|
244
|
-
case "AccessDeniedException":
|
|
245
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
246
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
247
|
-
case "ConflictException":
|
|
248
|
-
case "com.amazonaws.arczonalshift#ConflictException":
|
|
249
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
250
|
-
case "InternalServerException":
|
|
251
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
252
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
253
|
-
case "ResourceNotFoundException":
|
|
254
|
-
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
255
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
256
|
-
case "ThrottlingException":
|
|
257
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
258
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
259
|
-
case "ValidationException":
|
|
260
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
261
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
262
|
-
default:
|
|
263
|
-
const parsedBody = parsedOutput.body;
|
|
264
|
-
return throwDefaultError({
|
|
265
|
-
output,
|
|
266
|
-
parsedBody,
|
|
267
|
-
errorCode,
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
const de_DeletePracticeRunConfigurationCommand = async (output, context) => {
|
|
272
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
273
|
-
return de_DeletePracticeRunConfigurationCommandError(output, context);
|
|
274
|
-
}
|
|
275
|
-
const contents = (0, smithy_client_1.map)({
|
|
276
|
-
$metadata: deserializeMetadata(output),
|
|
277
|
-
});
|
|
278
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
279
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
280
|
-
arn: smithy_client_1.expectString,
|
|
281
|
-
name: smithy_client_1.expectString,
|
|
282
|
-
zonalAutoshiftStatus: smithy_client_1.expectString,
|
|
283
|
-
});
|
|
284
|
-
Object.assign(contents, doc);
|
|
285
|
-
return contents;
|
|
286
|
-
};
|
|
287
|
-
exports.de_DeletePracticeRunConfigurationCommand = de_DeletePracticeRunConfigurationCommand;
|
|
288
|
-
const de_DeletePracticeRunConfigurationCommandError = async (output, context) => {
|
|
289
|
-
const parsedOutput = {
|
|
290
|
-
...output,
|
|
291
|
-
body: await parseErrorBody(output.body, context),
|
|
292
|
-
};
|
|
293
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
294
|
-
switch (errorCode) {
|
|
295
|
-
case "AccessDeniedException":
|
|
296
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
297
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
298
|
-
case "ConflictException":
|
|
299
|
-
case "com.amazonaws.arczonalshift#ConflictException":
|
|
300
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
301
|
-
case "InternalServerException":
|
|
302
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
303
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
304
|
-
case "ResourceNotFoundException":
|
|
305
|
-
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
306
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
307
|
-
case "ThrottlingException":
|
|
308
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
309
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
310
|
-
case "ValidationException":
|
|
311
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
312
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
313
|
-
default:
|
|
314
|
-
const parsedBody = parsedOutput.body;
|
|
315
|
-
return throwDefaultError({
|
|
316
|
-
output,
|
|
317
|
-
parsedBody,
|
|
318
|
-
errorCode,
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
const de_GetManagedResourceCommand = async (output, context) => {
|
|
323
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
324
|
-
return de_GetManagedResourceCommandError(output, context);
|
|
325
|
-
}
|
|
326
|
-
const contents = (0, smithy_client_1.map)({
|
|
327
|
-
$metadata: deserializeMetadata(output),
|
|
328
|
-
});
|
|
329
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
330
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
331
|
-
appliedWeights: (_) => de_AppliedWeights(_, context),
|
|
332
|
-
arn: smithy_client_1.expectString,
|
|
333
|
-
autoshifts: (_) => de_AutoshiftsInResource(_, context),
|
|
334
|
-
name: smithy_client_1.expectString,
|
|
335
|
-
practiceRunConfiguration: smithy_client_1._json,
|
|
336
|
-
zonalAutoshiftStatus: smithy_client_1.expectString,
|
|
337
|
-
zonalShifts: (_) => de_ZonalShiftsInResource(_, context),
|
|
338
|
-
});
|
|
339
|
-
Object.assign(contents, doc);
|
|
340
|
-
return contents;
|
|
341
|
-
};
|
|
342
|
-
exports.de_GetManagedResourceCommand = de_GetManagedResourceCommand;
|
|
343
|
-
const de_GetManagedResourceCommandError = async (output, context) => {
|
|
344
|
-
const parsedOutput = {
|
|
345
|
-
...output,
|
|
346
|
-
body: await parseErrorBody(output.body, context),
|
|
347
|
-
};
|
|
348
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
349
|
-
switch (errorCode) {
|
|
350
|
-
case "AccessDeniedException":
|
|
351
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
352
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
353
|
-
case "InternalServerException":
|
|
354
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
355
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
356
|
-
case "ResourceNotFoundException":
|
|
357
|
-
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
358
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
359
|
-
case "ThrottlingException":
|
|
360
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
361
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
362
|
-
case "ValidationException":
|
|
363
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
364
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
365
|
-
default:
|
|
366
|
-
const parsedBody = parsedOutput.body;
|
|
367
|
-
return throwDefaultError({
|
|
368
|
-
output,
|
|
369
|
-
parsedBody,
|
|
370
|
-
errorCode,
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
const de_ListAutoshiftsCommand = async (output, context) => {
|
|
375
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
376
|
-
return de_ListAutoshiftsCommandError(output, context);
|
|
377
|
-
}
|
|
378
|
-
const contents = (0, smithy_client_1.map)({
|
|
379
|
-
$metadata: deserializeMetadata(output),
|
|
380
|
-
});
|
|
381
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
382
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
383
|
-
items: (_) => de_AutoshiftSummaries(_, context),
|
|
384
|
-
nextToken: smithy_client_1.expectString,
|
|
385
|
-
});
|
|
386
|
-
Object.assign(contents, doc);
|
|
387
|
-
return contents;
|
|
388
|
-
};
|
|
389
|
-
exports.de_ListAutoshiftsCommand = de_ListAutoshiftsCommand;
|
|
390
|
-
const de_ListAutoshiftsCommandError = async (output, context) => {
|
|
391
|
-
const parsedOutput = {
|
|
392
|
-
...output,
|
|
393
|
-
body: await parseErrorBody(output.body, context),
|
|
394
|
-
};
|
|
395
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
396
|
-
switch (errorCode) {
|
|
397
|
-
case "AccessDeniedException":
|
|
398
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
399
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
400
|
-
case "InternalServerException":
|
|
401
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
402
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
403
|
-
case "ThrottlingException":
|
|
404
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
405
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
406
|
-
case "ValidationException":
|
|
407
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
408
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
409
|
-
default:
|
|
410
|
-
const parsedBody = parsedOutput.body;
|
|
411
|
-
return throwDefaultError({
|
|
412
|
-
output,
|
|
413
|
-
parsedBody,
|
|
414
|
-
errorCode,
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
};
|
|
418
|
-
const de_ListManagedResourcesCommand = async (output, context) => {
|
|
419
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
420
|
-
return de_ListManagedResourcesCommandError(output, context);
|
|
421
|
-
}
|
|
422
|
-
const contents = (0, smithy_client_1.map)({
|
|
423
|
-
$metadata: deserializeMetadata(output),
|
|
424
|
-
});
|
|
425
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
426
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
427
|
-
items: (_) => de_ManagedResourceSummaries(_, context),
|
|
428
|
-
nextToken: smithy_client_1.expectString,
|
|
429
|
-
});
|
|
430
|
-
Object.assign(contents, doc);
|
|
431
|
-
return contents;
|
|
432
|
-
};
|
|
433
|
-
exports.de_ListManagedResourcesCommand = de_ListManagedResourcesCommand;
|
|
434
|
-
const de_ListManagedResourcesCommandError = async (output, context) => {
|
|
435
|
-
const parsedOutput = {
|
|
436
|
-
...output,
|
|
437
|
-
body: await parseErrorBody(output.body, context),
|
|
438
|
-
};
|
|
439
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
440
|
-
switch (errorCode) {
|
|
441
|
-
case "AccessDeniedException":
|
|
442
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
443
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
444
|
-
case "InternalServerException":
|
|
445
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
446
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
447
|
-
case "ThrottlingException":
|
|
448
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
449
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
450
|
-
case "ValidationException":
|
|
451
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
452
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
453
|
-
default:
|
|
454
|
-
const parsedBody = parsedOutput.body;
|
|
455
|
-
return throwDefaultError({
|
|
456
|
-
output,
|
|
457
|
-
parsedBody,
|
|
458
|
-
errorCode,
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
const de_ListZonalShiftsCommand = async (output, context) => {
|
|
463
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
464
|
-
return de_ListZonalShiftsCommandError(output, context);
|
|
465
|
-
}
|
|
466
|
-
const contents = (0, smithy_client_1.map)({
|
|
467
|
-
$metadata: deserializeMetadata(output),
|
|
468
|
-
});
|
|
469
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
470
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
471
|
-
items: (_) => de_ZonalShiftSummaries(_, context),
|
|
472
|
-
nextToken: smithy_client_1.expectString,
|
|
473
|
-
});
|
|
474
|
-
Object.assign(contents, doc);
|
|
475
|
-
return contents;
|
|
476
|
-
};
|
|
477
|
-
exports.de_ListZonalShiftsCommand = de_ListZonalShiftsCommand;
|
|
478
|
-
const de_ListZonalShiftsCommandError = async (output, context) => {
|
|
479
|
-
const parsedOutput = {
|
|
480
|
-
...output,
|
|
481
|
-
body: await parseErrorBody(output.body, context),
|
|
482
|
-
};
|
|
483
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
484
|
-
switch (errorCode) {
|
|
485
|
-
case "AccessDeniedException":
|
|
486
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
487
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
488
|
-
case "InternalServerException":
|
|
489
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
490
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
491
|
-
case "ThrottlingException":
|
|
492
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
493
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
494
|
-
case "ValidationException":
|
|
495
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
496
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
497
|
-
default:
|
|
498
|
-
const parsedBody = parsedOutput.body;
|
|
499
|
-
return throwDefaultError({
|
|
500
|
-
output,
|
|
501
|
-
parsedBody,
|
|
502
|
-
errorCode,
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
const de_StartZonalShiftCommand = async (output, context) => {
|
|
507
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
508
|
-
return de_StartZonalShiftCommandError(output, context);
|
|
509
|
-
}
|
|
510
|
-
const contents = (0, smithy_client_1.map)({
|
|
511
|
-
$metadata: deserializeMetadata(output),
|
|
512
|
-
});
|
|
513
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
514
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
515
|
-
awayFrom: smithy_client_1.expectString,
|
|
516
|
-
comment: smithy_client_1.expectString,
|
|
517
|
-
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
518
|
-
resourceIdentifier: smithy_client_1.expectString,
|
|
519
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
520
|
-
status: smithy_client_1.expectString,
|
|
521
|
-
zonalShiftId: smithy_client_1.expectString,
|
|
522
|
-
});
|
|
523
|
-
Object.assign(contents, doc);
|
|
524
|
-
return contents;
|
|
525
|
-
};
|
|
526
|
-
exports.de_StartZonalShiftCommand = de_StartZonalShiftCommand;
|
|
527
|
-
const de_StartZonalShiftCommandError = async (output, context) => {
|
|
528
|
-
const parsedOutput = {
|
|
529
|
-
...output,
|
|
530
|
-
body: await parseErrorBody(output.body, context),
|
|
531
|
-
};
|
|
532
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
533
|
-
switch (errorCode) {
|
|
534
|
-
case "AccessDeniedException":
|
|
535
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
536
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
537
|
-
case "ConflictException":
|
|
538
|
-
case "com.amazonaws.arczonalshift#ConflictException":
|
|
539
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
540
|
-
case "InternalServerException":
|
|
541
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
542
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
543
|
-
case "ResourceNotFoundException":
|
|
544
|
-
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
545
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
546
|
-
case "ThrottlingException":
|
|
547
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
548
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
549
|
-
case "ValidationException":
|
|
550
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
551
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
552
|
-
default:
|
|
553
|
-
const parsedBody = parsedOutput.body;
|
|
554
|
-
return throwDefaultError({
|
|
555
|
-
output,
|
|
556
|
-
parsedBody,
|
|
557
|
-
errorCode,
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
const de_UpdatePracticeRunConfigurationCommand = async (output, context) => {
|
|
562
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
563
|
-
return de_UpdatePracticeRunConfigurationCommandError(output, context);
|
|
564
|
-
}
|
|
565
|
-
const contents = (0, smithy_client_1.map)({
|
|
566
|
-
$metadata: deserializeMetadata(output),
|
|
567
|
-
});
|
|
568
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
569
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
570
|
-
arn: smithy_client_1.expectString,
|
|
571
|
-
name: smithy_client_1.expectString,
|
|
572
|
-
practiceRunConfiguration: smithy_client_1._json,
|
|
573
|
-
zonalAutoshiftStatus: smithy_client_1.expectString,
|
|
574
|
-
});
|
|
575
|
-
Object.assign(contents, doc);
|
|
576
|
-
return contents;
|
|
577
|
-
};
|
|
578
|
-
exports.de_UpdatePracticeRunConfigurationCommand = de_UpdatePracticeRunConfigurationCommand;
|
|
579
|
-
const de_UpdatePracticeRunConfigurationCommandError = async (output, context) => {
|
|
580
|
-
const parsedOutput = {
|
|
581
|
-
...output,
|
|
582
|
-
body: await parseErrorBody(output.body, context),
|
|
583
|
-
};
|
|
584
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
585
|
-
switch (errorCode) {
|
|
586
|
-
case "AccessDeniedException":
|
|
587
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
588
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
589
|
-
case "ConflictException":
|
|
590
|
-
case "com.amazonaws.arczonalshift#ConflictException":
|
|
591
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
592
|
-
case "InternalServerException":
|
|
593
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
594
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
595
|
-
case "ResourceNotFoundException":
|
|
596
|
-
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
597
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
598
|
-
case "ThrottlingException":
|
|
599
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
600
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
601
|
-
case "ValidationException":
|
|
602
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
603
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
604
|
-
default:
|
|
605
|
-
const parsedBody = parsedOutput.body;
|
|
606
|
-
return throwDefaultError({
|
|
607
|
-
output,
|
|
608
|
-
parsedBody,
|
|
609
|
-
errorCode,
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
};
|
|
613
|
-
const de_UpdateZonalAutoshiftConfigurationCommand = async (output, context) => {
|
|
614
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
615
|
-
return de_UpdateZonalAutoshiftConfigurationCommandError(output, context);
|
|
616
|
-
}
|
|
617
|
-
const contents = (0, smithy_client_1.map)({
|
|
618
|
-
$metadata: deserializeMetadata(output),
|
|
619
|
-
});
|
|
620
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
621
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
622
|
-
resourceIdentifier: smithy_client_1.expectString,
|
|
623
|
-
zonalAutoshiftStatus: smithy_client_1.expectString,
|
|
624
|
-
});
|
|
625
|
-
Object.assign(contents, doc);
|
|
626
|
-
return contents;
|
|
627
|
-
};
|
|
628
|
-
exports.de_UpdateZonalAutoshiftConfigurationCommand = de_UpdateZonalAutoshiftConfigurationCommand;
|
|
629
|
-
const de_UpdateZonalAutoshiftConfigurationCommandError = async (output, context) => {
|
|
630
|
-
const parsedOutput = {
|
|
631
|
-
...output,
|
|
632
|
-
body: await parseErrorBody(output.body, context),
|
|
633
|
-
};
|
|
634
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
635
|
-
switch (errorCode) {
|
|
636
|
-
case "AccessDeniedException":
|
|
637
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
638
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
639
|
-
case "ConflictException":
|
|
640
|
-
case "com.amazonaws.arczonalshift#ConflictException":
|
|
641
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
642
|
-
case "InternalServerException":
|
|
643
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
644
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
645
|
-
case "ResourceNotFoundException":
|
|
646
|
-
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
647
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
648
|
-
case "ThrottlingException":
|
|
649
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
650
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
651
|
-
case "ValidationException":
|
|
652
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
653
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
654
|
-
default:
|
|
655
|
-
const parsedBody = parsedOutput.body;
|
|
656
|
-
return throwDefaultError({
|
|
657
|
-
output,
|
|
658
|
-
parsedBody,
|
|
659
|
-
errorCode,
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
};
|
|
663
|
-
const de_UpdateZonalShiftCommand = async (output, context) => {
|
|
664
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
665
|
-
return de_UpdateZonalShiftCommandError(output, context);
|
|
666
|
-
}
|
|
667
|
-
const contents = (0, smithy_client_1.map)({
|
|
668
|
-
$metadata: deserializeMetadata(output),
|
|
669
|
-
});
|
|
670
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
671
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
672
|
-
awayFrom: smithy_client_1.expectString,
|
|
673
|
-
comment: smithy_client_1.expectString,
|
|
674
|
-
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
675
|
-
resourceIdentifier: smithy_client_1.expectString,
|
|
676
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
677
|
-
status: smithy_client_1.expectString,
|
|
678
|
-
zonalShiftId: smithy_client_1.expectString,
|
|
679
|
-
});
|
|
680
|
-
Object.assign(contents, doc);
|
|
681
|
-
return contents;
|
|
682
|
-
};
|
|
683
|
-
exports.de_UpdateZonalShiftCommand = de_UpdateZonalShiftCommand;
|
|
684
|
-
const de_UpdateZonalShiftCommandError = async (output, context) => {
|
|
685
|
-
const parsedOutput = {
|
|
686
|
-
...output,
|
|
687
|
-
body: await parseErrorBody(output.body, context),
|
|
688
|
-
};
|
|
689
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
690
|
-
switch (errorCode) {
|
|
691
|
-
case "AccessDeniedException":
|
|
692
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
693
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
694
|
-
case "ConflictException":
|
|
695
|
-
case "com.amazonaws.arczonalshift#ConflictException":
|
|
696
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
697
|
-
case "InternalServerException":
|
|
698
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
699
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
700
|
-
case "ResourceNotFoundException":
|
|
701
|
-
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
702
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
703
|
-
case "ThrottlingException":
|
|
704
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
705
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
706
|
-
case "ValidationException":
|
|
707
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
708
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
709
|
-
default:
|
|
710
|
-
const parsedBody = parsedOutput.body;
|
|
711
|
-
return throwDefaultError({
|
|
712
|
-
output,
|
|
713
|
-
parsedBody,
|
|
714
|
-
errorCode,
|
|
715
|
-
});
|
|
716
|
-
}
|
|
717
|
-
};
|
|
718
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(ARCZonalShiftServiceException_1.ARCZonalShiftServiceException);
|
|
719
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
720
|
-
const contents = (0, smithy_client_1.map)({});
|
|
721
|
-
const data = parsedOutput.body;
|
|
722
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
723
|
-
message: smithy_client_1.expectString,
|
|
724
|
-
});
|
|
725
|
-
Object.assign(contents, doc);
|
|
726
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
727
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
728
|
-
...contents,
|
|
729
|
-
});
|
|
730
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
731
|
-
};
|
|
732
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
733
|
-
const contents = (0, smithy_client_1.map)({});
|
|
734
|
-
const data = parsedOutput.body;
|
|
735
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
736
|
-
message: smithy_client_1.expectString,
|
|
737
|
-
reason: smithy_client_1.expectString,
|
|
738
|
-
zonalShiftId: smithy_client_1.expectString,
|
|
739
|
-
});
|
|
740
|
-
Object.assign(contents, doc);
|
|
741
|
-
const exception = new models_0_1.ConflictException({
|
|
742
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
743
|
-
...contents,
|
|
744
|
-
});
|
|
745
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
746
|
-
};
|
|
747
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
748
|
-
const contents = (0, smithy_client_1.map)({});
|
|
749
|
-
const data = parsedOutput.body;
|
|
750
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
751
|
-
message: smithy_client_1.expectString,
|
|
752
|
-
});
|
|
753
|
-
Object.assign(contents, doc);
|
|
754
|
-
const exception = new models_0_1.InternalServerException({
|
|
755
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
756
|
-
...contents,
|
|
757
|
-
});
|
|
758
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
759
|
-
};
|
|
760
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
761
|
-
const contents = (0, smithy_client_1.map)({});
|
|
762
|
-
const data = parsedOutput.body;
|
|
763
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
764
|
-
message: smithy_client_1.expectString,
|
|
765
|
-
});
|
|
766
|
-
Object.assign(contents, doc);
|
|
767
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
768
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
769
|
-
...contents,
|
|
770
|
-
});
|
|
771
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
772
|
-
};
|
|
773
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
774
|
-
const contents = (0, smithy_client_1.map)({});
|
|
775
|
-
const data = parsedOutput.body;
|
|
776
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
777
|
-
message: smithy_client_1.expectString,
|
|
778
|
-
});
|
|
779
|
-
Object.assign(contents, doc);
|
|
780
|
-
const exception = new models_0_1.ThrottlingException({
|
|
781
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
782
|
-
...contents,
|
|
783
|
-
});
|
|
784
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
785
|
-
};
|
|
786
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
787
|
-
const contents = (0, smithy_client_1.map)({});
|
|
788
|
-
const data = parsedOutput.body;
|
|
789
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
790
|
-
message: smithy_client_1.expectString,
|
|
791
|
-
reason: smithy_client_1.expectString,
|
|
792
|
-
});
|
|
793
|
-
Object.assign(contents, doc);
|
|
794
|
-
const exception = new models_0_1.ValidationException({
|
|
795
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
796
|
-
...contents,
|
|
797
|
-
});
|
|
798
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
799
|
-
};
|
|
800
|
-
const de_AppliedWeights = (output, context) => {
|
|
801
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
802
|
-
if (value === null) {
|
|
803
|
-
return acc;
|
|
804
|
-
}
|
|
805
|
-
acc[key] = (0, smithy_client_1.limitedParseFloat32)(value);
|
|
806
|
-
return acc;
|
|
807
|
-
}, {});
|
|
808
|
-
};
|
|
809
|
-
const de_AutoshiftInResource = (output, context) => {
|
|
810
|
-
return (0, smithy_client_1.take)(output, {
|
|
811
|
-
appliedStatus: smithy_client_1.expectString,
|
|
812
|
-
awayFrom: smithy_client_1.expectString,
|
|
813
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
814
|
-
});
|
|
815
|
-
};
|
|
816
|
-
const de_AutoshiftsInResource = (output, context) => {
|
|
817
|
-
const retVal = (output || [])
|
|
818
|
-
.filter((e) => e != null)
|
|
819
|
-
.map((entry) => {
|
|
820
|
-
return de_AutoshiftInResource(entry, context);
|
|
821
|
-
});
|
|
822
|
-
return retVal;
|
|
823
|
-
};
|
|
824
|
-
const de_AutoshiftSummaries = (output, context) => {
|
|
825
|
-
const retVal = (output || [])
|
|
826
|
-
.filter((e) => e != null)
|
|
827
|
-
.map((entry) => {
|
|
828
|
-
return de_AutoshiftSummary(entry, context);
|
|
829
|
-
});
|
|
830
|
-
return retVal;
|
|
831
|
-
};
|
|
832
|
-
const de_AutoshiftSummary = (output, context) => {
|
|
833
|
-
return (0, smithy_client_1.take)(output, {
|
|
834
|
-
awayFrom: smithy_client_1.expectString,
|
|
835
|
-
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
836
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
837
|
-
status: smithy_client_1.expectString,
|
|
838
|
-
});
|
|
839
|
-
};
|
|
840
|
-
const de_ManagedResourceSummaries = (output, context) => {
|
|
841
|
-
const retVal = (output || [])
|
|
842
|
-
.filter((e) => e != null)
|
|
843
|
-
.map((entry) => {
|
|
844
|
-
return de_ManagedResourceSummary(entry, context);
|
|
845
|
-
});
|
|
846
|
-
return retVal;
|
|
847
|
-
};
|
|
848
|
-
const de_ManagedResourceSummary = (output, context) => {
|
|
849
|
-
return (0, smithy_client_1.take)(output, {
|
|
850
|
-
appliedWeights: (_) => de_AppliedWeights(_, context),
|
|
851
|
-
arn: smithy_client_1.expectString,
|
|
852
|
-
autoshifts: (_) => de_AutoshiftsInResource(_, context),
|
|
853
|
-
availabilityZones: smithy_client_1._json,
|
|
854
|
-
name: smithy_client_1.expectString,
|
|
855
|
-
practiceRunStatus: smithy_client_1.expectString,
|
|
856
|
-
zonalAutoshiftStatus: smithy_client_1.expectString,
|
|
857
|
-
zonalShifts: (_) => de_ZonalShiftsInResource(_, context),
|
|
858
|
-
});
|
|
859
|
-
};
|
|
860
|
-
const de_ZonalShiftInResource = (output, context) => {
|
|
861
|
-
return (0, smithy_client_1.take)(output, {
|
|
862
|
-
appliedStatus: smithy_client_1.expectString,
|
|
863
|
-
awayFrom: smithy_client_1.expectString,
|
|
864
|
-
comment: smithy_client_1.expectString,
|
|
865
|
-
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
866
|
-
practiceRunOutcome: smithy_client_1.expectString,
|
|
867
|
-
resourceIdentifier: smithy_client_1.expectString,
|
|
868
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
869
|
-
zonalShiftId: smithy_client_1.expectString,
|
|
870
|
-
});
|
|
871
|
-
};
|
|
872
|
-
const de_ZonalShiftsInResource = (output, context) => {
|
|
873
|
-
const retVal = (output || [])
|
|
874
|
-
.filter((e) => e != null)
|
|
875
|
-
.map((entry) => {
|
|
876
|
-
return de_ZonalShiftInResource(entry, context);
|
|
877
|
-
});
|
|
878
|
-
return retVal;
|
|
879
|
-
};
|
|
880
|
-
const de_ZonalShiftSummaries = (output, context) => {
|
|
881
|
-
const retVal = (output || [])
|
|
882
|
-
.filter((e) => e != null)
|
|
883
|
-
.map((entry) => {
|
|
884
|
-
return de_ZonalShiftSummary(entry, context);
|
|
885
|
-
});
|
|
886
|
-
return retVal;
|
|
887
|
-
};
|
|
888
|
-
const de_ZonalShiftSummary = (output, context) => {
|
|
889
|
-
return (0, smithy_client_1.take)(output, {
|
|
890
|
-
awayFrom: smithy_client_1.expectString,
|
|
891
|
-
comment: smithy_client_1.expectString,
|
|
892
|
-
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
893
|
-
practiceRunOutcome: smithy_client_1.expectString,
|
|
894
|
-
resourceIdentifier: smithy_client_1.expectString,
|
|
895
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
896
|
-
status: smithy_client_1.expectString,
|
|
897
|
-
zonalShiftId: smithy_client_1.expectString,
|
|
898
|
-
});
|
|
899
|
-
};
|
|
900
|
-
const deserializeMetadata = (output) => ({
|
|
901
|
-
httpStatusCode: output.statusCode,
|
|
902
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
903
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
904
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
905
|
-
});
|
|
906
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
907
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
908
|
-
value !== null &&
|
|
909
|
-
value !== "" &&
|
|
910
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
911
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
912
|
-
const _mR = "maxResults";
|
|
913
|
-
const _nT = "nextToken";
|
|
914
|
-
const _rI = "resourceIdentifier";
|
|
915
|
-
const _s = "status";
|
|
916
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
917
|
-
if (encoded.length) {
|
|
918
|
-
return JSON.parse(encoded);
|
|
919
|
-
}
|
|
920
|
-
return {};
|
|
921
|
-
});
|
|
922
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
923
|
-
const value = await parseBody(errorBody, context);
|
|
924
|
-
value.message = value.message ?? value.Message;
|
|
925
|
-
return value;
|
|
926
|
-
};
|
|
927
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
928
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
929
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
930
|
-
let cleanValue = rawValue;
|
|
931
|
-
if (typeof cleanValue === "number") {
|
|
932
|
-
cleanValue = cleanValue.toString();
|
|
933
|
-
}
|
|
934
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
935
|
-
cleanValue = cleanValue.split(",")[0];
|
|
936
|
-
}
|
|
937
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
938
|
-
cleanValue = cleanValue.split(":")[0];
|
|
939
|
-
}
|
|
940
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
941
|
-
cleanValue = cleanValue.split("#")[1];
|
|
942
|
-
}
|
|
943
|
-
return cleanValue;
|
|
944
|
-
};
|
|
945
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
946
|
-
if (headerKey !== undefined) {
|
|
947
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
948
|
-
}
|
|
949
|
-
if (data.code !== undefined) {
|
|
950
|
-
return sanitizeErrorCode(data.code);
|
|
951
|
-
}
|
|
952
|
-
if (data["__type"] !== undefined) {
|
|
953
|
-
return sanitizeErrorCode(data["__type"]);
|
|
954
|
-
}
|
|
955
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|