@aws-sdk/client-arc-zonal-shift 3.928.0 → 3.929.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/index.js +609 -802
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/ARCZonalShiftClient.js +2 -0
- package/dist-es/commands/CancelPracticeRunCommand.js +3 -9
- package/dist-es/commands/CancelZonalShiftCommand.js +3 -9
- package/dist-es/commands/CreatePracticeRunConfigurationCommand.js +3 -9
- package/dist-es/commands/DeletePracticeRunConfigurationCommand.js +3 -9
- package/dist-es/commands/GetAutoshiftObserverNotificationStatusCommand.js +3 -9
- package/dist-es/commands/GetManagedResourceCommand.js +3 -9
- package/dist-es/commands/ListAutoshiftsCommand.js +3 -9
- package/dist-es/commands/ListManagedResourcesCommand.js +3 -9
- package/dist-es/commands/ListZonalShiftsCommand.js +3 -9
- package/dist-es/commands/StartPracticeRunCommand.js +3 -9
- package/dist-es/commands/StartZonalShiftCommand.js +3 -9
- package/dist-es/commands/UpdateAutoshiftObserverNotificationStatusCommand.js +3 -9
- package/dist-es/commands/UpdatePracticeRunConfigurationCommand.js +3 -9
- package/dist-es/commands/UpdateZonalAutoshiftConfigurationCommand.js +3 -9
- package/dist-es/commands/UpdateZonalShiftCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +569 -0
- package/dist-types/ARCZonalShiftClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +71 -0
- package/dist-types/ts3.4/ARCZonalShiftClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +76 -0
- package/package.json +2 -2
- package/dist-es/protocols/Aws_restJson1.js +0 -684
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -137
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -185
|
@@ -1,684 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { ARCZonalShiftServiceException as __BaseException } from "../models/ARCZonalShiftServiceException";
|
|
5
|
-
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export const se_CancelPracticeRunCommand = async (input, context) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {};
|
|
9
|
-
b.bp("/practiceruns/{zonalShiftId}");
|
|
10
|
-
b.p("zonalShiftId", () => input.zonalShiftId, "{zonalShiftId}", false);
|
|
11
|
-
let body;
|
|
12
|
-
b.m("DELETE").h(headers).b(body);
|
|
13
|
-
return b.build();
|
|
14
|
-
};
|
|
15
|
-
export const se_CancelZonalShiftCommand = async (input, context) => {
|
|
16
|
-
const b = rb(input, context);
|
|
17
|
-
const headers = {};
|
|
18
|
-
b.bp("/zonalshifts/{zonalShiftId}");
|
|
19
|
-
b.p("zonalShiftId", () => input.zonalShiftId, "{zonalShiftId}", false);
|
|
20
|
-
let body;
|
|
21
|
-
b.m("DELETE").h(headers).b(body);
|
|
22
|
-
return b.build();
|
|
23
|
-
};
|
|
24
|
-
export const se_CreatePracticeRunConfigurationCommand = async (input, context) => {
|
|
25
|
-
const b = rb(input, context);
|
|
26
|
-
const headers = {
|
|
27
|
-
"content-type": "application/json",
|
|
28
|
-
};
|
|
29
|
-
b.bp("/configuration");
|
|
30
|
-
let body;
|
|
31
|
-
body = JSON.stringify(take(input, {
|
|
32
|
-
allowedWindows: (_) => _json(_),
|
|
33
|
-
blockedDates: (_) => _json(_),
|
|
34
|
-
blockedWindows: (_) => _json(_),
|
|
35
|
-
blockingAlarms: (_) => _json(_),
|
|
36
|
-
outcomeAlarms: (_) => _json(_),
|
|
37
|
-
resourceIdentifier: [],
|
|
38
|
-
}));
|
|
39
|
-
b.m("POST").h(headers).b(body);
|
|
40
|
-
return b.build();
|
|
41
|
-
};
|
|
42
|
-
export const se_DeletePracticeRunConfigurationCommand = async (input, context) => {
|
|
43
|
-
const b = rb(input, context);
|
|
44
|
-
const headers = {};
|
|
45
|
-
b.bp("/configuration/{resourceIdentifier}");
|
|
46
|
-
b.p("resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
47
|
-
let body;
|
|
48
|
-
b.m("DELETE").h(headers).b(body);
|
|
49
|
-
return b.build();
|
|
50
|
-
};
|
|
51
|
-
export const se_GetAutoshiftObserverNotificationStatusCommand = async (input, context) => {
|
|
52
|
-
const b = rb(input, context);
|
|
53
|
-
const headers = {};
|
|
54
|
-
b.bp("/autoshift-observer-notification");
|
|
55
|
-
let body;
|
|
56
|
-
b.m("GET").h(headers).b(body);
|
|
57
|
-
return b.build();
|
|
58
|
-
};
|
|
59
|
-
export const se_GetManagedResourceCommand = async (input, context) => {
|
|
60
|
-
const b = rb(input, context);
|
|
61
|
-
const headers = {};
|
|
62
|
-
b.bp("/managedresources/{resourceIdentifier}");
|
|
63
|
-
b.p("resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
64
|
-
let body;
|
|
65
|
-
b.m("GET").h(headers).b(body);
|
|
66
|
-
return b.build();
|
|
67
|
-
};
|
|
68
|
-
export const se_ListAutoshiftsCommand = async (input, context) => {
|
|
69
|
-
const b = rb(input, context);
|
|
70
|
-
const headers = {};
|
|
71
|
-
b.bp("/autoshifts");
|
|
72
|
-
const query = map({
|
|
73
|
-
[_nT]: [, input[_nT]],
|
|
74
|
-
[_s]: [, input[_s]],
|
|
75
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
76
|
-
});
|
|
77
|
-
let body;
|
|
78
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
79
|
-
return b.build();
|
|
80
|
-
};
|
|
81
|
-
export const se_ListManagedResourcesCommand = async (input, context) => {
|
|
82
|
-
const b = rb(input, context);
|
|
83
|
-
const headers = {};
|
|
84
|
-
b.bp("/managedresources");
|
|
85
|
-
const query = map({
|
|
86
|
-
[_nT]: [, input[_nT]],
|
|
87
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
88
|
-
});
|
|
89
|
-
let body;
|
|
90
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
91
|
-
return b.build();
|
|
92
|
-
};
|
|
93
|
-
export const se_ListZonalShiftsCommand = async (input, context) => {
|
|
94
|
-
const b = rb(input, context);
|
|
95
|
-
const headers = {};
|
|
96
|
-
b.bp("/zonalshifts");
|
|
97
|
-
const query = map({
|
|
98
|
-
[_nT]: [, input[_nT]],
|
|
99
|
-
[_s]: [, input[_s]],
|
|
100
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
101
|
-
[_rI]: [, input[_rI]],
|
|
102
|
-
});
|
|
103
|
-
let body;
|
|
104
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
105
|
-
return b.build();
|
|
106
|
-
};
|
|
107
|
-
export const se_StartPracticeRunCommand = async (input, context) => {
|
|
108
|
-
const b = rb(input, context);
|
|
109
|
-
const headers = {
|
|
110
|
-
"content-type": "application/json",
|
|
111
|
-
};
|
|
112
|
-
b.bp("/practiceruns");
|
|
113
|
-
let body;
|
|
114
|
-
body = JSON.stringify(take(input, {
|
|
115
|
-
awayFrom: [],
|
|
116
|
-
comment: [],
|
|
117
|
-
resourceIdentifier: [],
|
|
118
|
-
}));
|
|
119
|
-
b.m("POST").h(headers).b(body);
|
|
120
|
-
return b.build();
|
|
121
|
-
};
|
|
122
|
-
export const se_StartZonalShiftCommand = async (input, context) => {
|
|
123
|
-
const b = rb(input, context);
|
|
124
|
-
const headers = {
|
|
125
|
-
"content-type": "application/json",
|
|
126
|
-
};
|
|
127
|
-
b.bp("/zonalshifts");
|
|
128
|
-
let body;
|
|
129
|
-
body = JSON.stringify(take(input, {
|
|
130
|
-
awayFrom: [],
|
|
131
|
-
comment: [],
|
|
132
|
-
expiresIn: [],
|
|
133
|
-
resourceIdentifier: [],
|
|
134
|
-
}));
|
|
135
|
-
b.m("POST").h(headers).b(body);
|
|
136
|
-
return b.build();
|
|
137
|
-
};
|
|
138
|
-
export const se_UpdateAutoshiftObserverNotificationStatusCommand = async (input, context) => {
|
|
139
|
-
const b = rb(input, context);
|
|
140
|
-
const headers = {
|
|
141
|
-
"content-type": "application/json",
|
|
142
|
-
};
|
|
143
|
-
b.bp("/autoshift-observer-notification");
|
|
144
|
-
let body;
|
|
145
|
-
body = JSON.stringify(take(input, {
|
|
146
|
-
status: [],
|
|
147
|
-
}));
|
|
148
|
-
b.m("PUT").h(headers).b(body);
|
|
149
|
-
return b.build();
|
|
150
|
-
};
|
|
151
|
-
export const se_UpdatePracticeRunConfigurationCommand = async (input, context) => {
|
|
152
|
-
const b = rb(input, context);
|
|
153
|
-
const headers = {
|
|
154
|
-
"content-type": "application/json",
|
|
155
|
-
};
|
|
156
|
-
b.bp("/configuration/{resourceIdentifier}");
|
|
157
|
-
b.p("resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
158
|
-
let body;
|
|
159
|
-
body = JSON.stringify(take(input, {
|
|
160
|
-
allowedWindows: (_) => _json(_),
|
|
161
|
-
blockedDates: (_) => _json(_),
|
|
162
|
-
blockedWindows: (_) => _json(_),
|
|
163
|
-
blockingAlarms: (_) => _json(_),
|
|
164
|
-
outcomeAlarms: (_) => _json(_),
|
|
165
|
-
}));
|
|
166
|
-
b.m("PATCH").h(headers).b(body);
|
|
167
|
-
return b.build();
|
|
168
|
-
};
|
|
169
|
-
export const se_UpdateZonalAutoshiftConfigurationCommand = async (input, context) => {
|
|
170
|
-
const b = rb(input, context);
|
|
171
|
-
const headers = {
|
|
172
|
-
"content-type": "application/json",
|
|
173
|
-
};
|
|
174
|
-
b.bp("/managedresources/{resourceIdentifier}");
|
|
175
|
-
b.p("resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
176
|
-
let body;
|
|
177
|
-
body = JSON.stringify(take(input, {
|
|
178
|
-
zonalAutoshiftStatus: [],
|
|
179
|
-
}));
|
|
180
|
-
b.m("PUT").h(headers).b(body);
|
|
181
|
-
return b.build();
|
|
182
|
-
};
|
|
183
|
-
export const se_UpdateZonalShiftCommand = async (input, context) => {
|
|
184
|
-
const b = rb(input, context);
|
|
185
|
-
const headers = {
|
|
186
|
-
"content-type": "application/json",
|
|
187
|
-
};
|
|
188
|
-
b.bp("/zonalshifts/{zonalShiftId}");
|
|
189
|
-
b.p("zonalShiftId", () => input.zonalShiftId, "{zonalShiftId}", false);
|
|
190
|
-
let body;
|
|
191
|
-
body = JSON.stringify(take(input, {
|
|
192
|
-
comment: [],
|
|
193
|
-
expiresIn: [],
|
|
194
|
-
}));
|
|
195
|
-
b.m("PATCH").h(headers).b(body);
|
|
196
|
-
return b.build();
|
|
197
|
-
};
|
|
198
|
-
export const de_CancelPracticeRunCommand = async (output, context) => {
|
|
199
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
200
|
-
return de_CommandError(output, context);
|
|
201
|
-
}
|
|
202
|
-
const contents = map({
|
|
203
|
-
$metadata: deserializeMetadata(output),
|
|
204
|
-
});
|
|
205
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
206
|
-
const doc = take(data, {
|
|
207
|
-
awayFrom: __expectString,
|
|
208
|
-
comment: __expectString,
|
|
209
|
-
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
210
|
-
resourceIdentifier: __expectString,
|
|
211
|
-
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
212
|
-
status: __expectString,
|
|
213
|
-
zonalShiftId: __expectString,
|
|
214
|
-
});
|
|
215
|
-
Object.assign(contents, doc);
|
|
216
|
-
return contents;
|
|
217
|
-
};
|
|
218
|
-
export const de_CancelZonalShiftCommand = async (output, context) => {
|
|
219
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
220
|
-
return de_CommandError(output, context);
|
|
221
|
-
}
|
|
222
|
-
const contents = map({
|
|
223
|
-
$metadata: deserializeMetadata(output),
|
|
224
|
-
});
|
|
225
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
226
|
-
const doc = take(data, {
|
|
227
|
-
awayFrom: __expectString,
|
|
228
|
-
comment: __expectString,
|
|
229
|
-
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
230
|
-
resourceIdentifier: __expectString,
|
|
231
|
-
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
232
|
-
status: __expectString,
|
|
233
|
-
zonalShiftId: __expectString,
|
|
234
|
-
});
|
|
235
|
-
Object.assign(contents, doc);
|
|
236
|
-
return contents;
|
|
237
|
-
};
|
|
238
|
-
export const de_CreatePracticeRunConfigurationCommand = async (output, context) => {
|
|
239
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
240
|
-
return de_CommandError(output, context);
|
|
241
|
-
}
|
|
242
|
-
const contents = map({
|
|
243
|
-
$metadata: deserializeMetadata(output),
|
|
244
|
-
});
|
|
245
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
246
|
-
const doc = take(data, {
|
|
247
|
-
arn: __expectString,
|
|
248
|
-
name: __expectString,
|
|
249
|
-
practiceRunConfiguration: _json,
|
|
250
|
-
zonalAutoshiftStatus: __expectString,
|
|
251
|
-
});
|
|
252
|
-
Object.assign(contents, doc);
|
|
253
|
-
return contents;
|
|
254
|
-
};
|
|
255
|
-
export const de_DeletePracticeRunConfigurationCommand = async (output, context) => {
|
|
256
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
257
|
-
return de_CommandError(output, context);
|
|
258
|
-
}
|
|
259
|
-
const contents = map({
|
|
260
|
-
$metadata: deserializeMetadata(output),
|
|
261
|
-
});
|
|
262
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
263
|
-
const doc = take(data, {
|
|
264
|
-
arn: __expectString,
|
|
265
|
-
name: __expectString,
|
|
266
|
-
zonalAutoshiftStatus: __expectString,
|
|
267
|
-
});
|
|
268
|
-
Object.assign(contents, doc);
|
|
269
|
-
return contents;
|
|
270
|
-
};
|
|
271
|
-
export const de_GetAutoshiftObserverNotificationStatusCommand = async (output, context) => {
|
|
272
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
273
|
-
return de_CommandError(output, context);
|
|
274
|
-
}
|
|
275
|
-
const contents = map({
|
|
276
|
-
$metadata: deserializeMetadata(output),
|
|
277
|
-
});
|
|
278
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
279
|
-
const doc = take(data, {
|
|
280
|
-
status: __expectString,
|
|
281
|
-
});
|
|
282
|
-
Object.assign(contents, doc);
|
|
283
|
-
return contents;
|
|
284
|
-
};
|
|
285
|
-
export const de_GetManagedResourceCommand = async (output, context) => {
|
|
286
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
287
|
-
return de_CommandError(output, context);
|
|
288
|
-
}
|
|
289
|
-
const contents = map({
|
|
290
|
-
$metadata: deserializeMetadata(output),
|
|
291
|
-
});
|
|
292
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
293
|
-
const doc = take(data, {
|
|
294
|
-
appliedWeights: (_) => de_AppliedWeights(_, context),
|
|
295
|
-
arn: __expectString,
|
|
296
|
-
autoshifts: (_) => de_AutoshiftsInResource(_, context),
|
|
297
|
-
name: __expectString,
|
|
298
|
-
practiceRunConfiguration: _json,
|
|
299
|
-
zonalAutoshiftStatus: __expectString,
|
|
300
|
-
zonalShifts: (_) => de_ZonalShiftsInResource(_, context),
|
|
301
|
-
});
|
|
302
|
-
Object.assign(contents, doc);
|
|
303
|
-
return contents;
|
|
304
|
-
};
|
|
305
|
-
export const de_ListAutoshiftsCommand = async (output, context) => {
|
|
306
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
307
|
-
return de_CommandError(output, context);
|
|
308
|
-
}
|
|
309
|
-
const contents = map({
|
|
310
|
-
$metadata: deserializeMetadata(output),
|
|
311
|
-
});
|
|
312
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
313
|
-
const doc = take(data, {
|
|
314
|
-
items: (_) => de_AutoshiftSummaries(_, context),
|
|
315
|
-
nextToken: __expectString,
|
|
316
|
-
});
|
|
317
|
-
Object.assign(contents, doc);
|
|
318
|
-
return contents;
|
|
319
|
-
};
|
|
320
|
-
export const de_ListManagedResourcesCommand = async (output, context) => {
|
|
321
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
322
|
-
return de_CommandError(output, context);
|
|
323
|
-
}
|
|
324
|
-
const contents = map({
|
|
325
|
-
$metadata: deserializeMetadata(output),
|
|
326
|
-
});
|
|
327
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
328
|
-
const doc = take(data, {
|
|
329
|
-
items: (_) => de_ManagedResourceSummaries(_, context),
|
|
330
|
-
nextToken: __expectString,
|
|
331
|
-
});
|
|
332
|
-
Object.assign(contents, doc);
|
|
333
|
-
return contents;
|
|
334
|
-
};
|
|
335
|
-
export const de_ListZonalShiftsCommand = async (output, context) => {
|
|
336
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
337
|
-
return de_CommandError(output, context);
|
|
338
|
-
}
|
|
339
|
-
const contents = map({
|
|
340
|
-
$metadata: deserializeMetadata(output),
|
|
341
|
-
});
|
|
342
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
343
|
-
const doc = take(data, {
|
|
344
|
-
items: (_) => de_ZonalShiftSummaries(_, context),
|
|
345
|
-
nextToken: __expectString,
|
|
346
|
-
});
|
|
347
|
-
Object.assign(contents, doc);
|
|
348
|
-
return contents;
|
|
349
|
-
};
|
|
350
|
-
export const de_StartPracticeRunCommand = async (output, context) => {
|
|
351
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
352
|
-
return de_CommandError(output, context);
|
|
353
|
-
}
|
|
354
|
-
const contents = map({
|
|
355
|
-
$metadata: deserializeMetadata(output),
|
|
356
|
-
});
|
|
357
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
358
|
-
const doc = take(data, {
|
|
359
|
-
awayFrom: __expectString,
|
|
360
|
-
comment: __expectString,
|
|
361
|
-
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
362
|
-
resourceIdentifier: __expectString,
|
|
363
|
-
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
364
|
-
status: __expectString,
|
|
365
|
-
zonalShiftId: __expectString,
|
|
366
|
-
});
|
|
367
|
-
Object.assign(contents, doc);
|
|
368
|
-
return contents;
|
|
369
|
-
};
|
|
370
|
-
export const de_StartZonalShiftCommand = async (output, context) => {
|
|
371
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
372
|
-
return de_CommandError(output, context);
|
|
373
|
-
}
|
|
374
|
-
const contents = map({
|
|
375
|
-
$metadata: deserializeMetadata(output),
|
|
376
|
-
});
|
|
377
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
378
|
-
const doc = take(data, {
|
|
379
|
-
awayFrom: __expectString,
|
|
380
|
-
comment: __expectString,
|
|
381
|
-
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
382
|
-
resourceIdentifier: __expectString,
|
|
383
|
-
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
384
|
-
status: __expectString,
|
|
385
|
-
zonalShiftId: __expectString,
|
|
386
|
-
});
|
|
387
|
-
Object.assign(contents, doc);
|
|
388
|
-
return contents;
|
|
389
|
-
};
|
|
390
|
-
export const de_UpdateAutoshiftObserverNotificationStatusCommand = async (output, context) => {
|
|
391
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
392
|
-
return de_CommandError(output, context);
|
|
393
|
-
}
|
|
394
|
-
const contents = map({
|
|
395
|
-
$metadata: deserializeMetadata(output),
|
|
396
|
-
});
|
|
397
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
398
|
-
const doc = take(data, {
|
|
399
|
-
status: __expectString,
|
|
400
|
-
});
|
|
401
|
-
Object.assign(contents, doc);
|
|
402
|
-
return contents;
|
|
403
|
-
};
|
|
404
|
-
export const de_UpdatePracticeRunConfigurationCommand = async (output, context) => {
|
|
405
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
406
|
-
return de_CommandError(output, context);
|
|
407
|
-
}
|
|
408
|
-
const contents = map({
|
|
409
|
-
$metadata: deserializeMetadata(output),
|
|
410
|
-
});
|
|
411
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
412
|
-
const doc = take(data, {
|
|
413
|
-
arn: __expectString,
|
|
414
|
-
name: __expectString,
|
|
415
|
-
practiceRunConfiguration: _json,
|
|
416
|
-
zonalAutoshiftStatus: __expectString,
|
|
417
|
-
});
|
|
418
|
-
Object.assign(contents, doc);
|
|
419
|
-
return contents;
|
|
420
|
-
};
|
|
421
|
-
export const de_UpdateZonalAutoshiftConfigurationCommand = async (output, context) => {
|
|
422
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
423
|
-
return de_CommandError(output, context);
|
|
424
|
-
}
|
|
425
|
-
const contents = map({
|
|
426
|
-
$metadata: deserializeMetadata(output),
|
|
427
|
-
});
|
|
428
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
429
|
-
const doc = take(data, {
|
|
430
|
-
resourceIdentifier: __expectString,
|
|
431
|
-
zonalAutoshiftStatus: __expectString,
|
|
432
|
-
});
|
|
433
|
-
Object.assign(contents, doc);
|
|
434
|
-
return contents;
|
|
435
|
-
};
|
|
436
|
-
export const de_UpdateZonalShiftCommand = async (output, context) => {
|
|
437
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
438
|
-
return de_CommandError(output, context);
|
|
439
|
-
}
|
|
440
|
-
const contents = map({
|
|
441
|
-
$metadata: deserializeMetadata(output),
|
|
442
|
-
});
|
|
443
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
444
|
-
const doc = take(data, {
|
|
445
|
-
awayFrom: __expectString,
|
|
446
|
-
comment: __expectString,
|
|
447
|
-
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
448
|
-
resourceIdentifier: __expectString,
|
|
449
|
-
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
450
|
-
status: __expectString,
|
|
451
|
-
zonalShiftId: __expectString,
|
|
452
|
-
});
|
|
453
|
-
Object.assign(contents, doc);
|
|
454
|
-
return contents;
|
|
455
|
-
};
|
|
456
|
-
const de_CommandError = async (output, context) => {
|
|
457
|
-
const parsedOutput = {
|
|
458
|
-
...output,
|
|
459
|
-
body: await parseErrorBody(output.body, context),
|
|
460
|
-
};
|
|
461
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
462
|
-
switch (errorCode) {
|
|
463
|
-
case "AccessDeniedException":
|
|
464
|
-
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
465
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
466
|
-
case "ConflictException":
|
|
467
|
-
case "com.amazonaws.arczonalshift#ConflictException":
|
|
468
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
469
|
-
case "InternalServerException":
|
|
470
|
-
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
471
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
472
|
-
case "ResourceNotFoundException":
|
|
473
|
-
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
474
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
475
|
-
case "ThrottlingException":
|
|
476
|
-
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
477
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
478
|
-
case "ValidationException":
|
|
479
|
-
case "com.amazonaws.arczonalshift#ValidationException":
|
|
480
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
481
|
-
default:
|
|
482
|
-
const parsedBody = parsedOutput.body;
|
|
483
|
-
return throwDefaultError({
|
|
484
|
-
output,
|
|
485
|
-
parsedBody,
|
|
486
|
-
errorCode,
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
491
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
492
|
-
const contents = map({});
|
|
493
|
-
const data = parsedOutput.body;
|
|
494
|
-
const doc = take(data, {
|
|
495
|
-
message: __expectString,
|
|
496
|
-
});
|
|
497
|
-
Object.assign(contents, doc);
|
|
498
|
-
const exception = new AccessDeniedException({
|
|
499
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
500
|
-
...contents,
|
|
501
|
-
});
|
|
502
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
503
|
-
};
|
|
504
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
505
|
-
const contents = map({});
|
|
506
|
-
const data = parsedOutput.body;
|
|
507
|
-
const doc = take(data, {
|
|
508
|
-
message: __expectString,
|
|
509
|
-
reason: __expectString,
|
|
510
|
-
zonalShiftId: __expectString,
|
|
511
|
-
});
|
|
512
|
-
Object.assign(contents, doc);
|
|
513
|
-
const exception = new ConflictException({
|
|
514
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
515
|
-
...contents,
|
|
516
|
-
});
|
|
517
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
518
|
-
};
|
|
519
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
520
|
-
const contents = map({});
|
|
521
|
-
const data = parsedOutput.body;
|
|
522
|
-
const doc = take(data, {
|
|
523
|
-
message: __expectString,
|
|
524
|
-
});
|
|
525
|
-
Object.assign(contents, doc);
|
|
526
|
-
const exception = new InternalServerException({
|
|
527
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
528
|
-
...contents,
|
|
529
|
-
});
|
|
530
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
531
|
-
};
|
|
532
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
533
|
-
const contents = map({});
|
|
534
|
-
const data = parsedOutput.body;
|
|
535
|
-
const doc = take(data, {
|
|
536
|
-
message: __expectString,
|
|
537
|
-
});
|
|
538
|
-
Object.assign(contents, doc);
|
|
539
|
-
const exception = new ResourceNotFoundException({
|
|
540
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
541
|
-
...contents,
|
|
542
|
-
});
|
|
543
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
544
|
-
};
|
|
545
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
546
|
-
const contents = map({});
|
|
547
|
-
const data = parsedOutput.body;
|
|
548
|
-
const doc = take(data, {
|
|
549
|
-
message: __expectString,
|
|
550
|
-
});
|
|
551
|
-
Object.assign(contents, doc);
|
|
552
|
-
const exception = new ThrottlingException({
|
|
553
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
554
|
-
...contents,
|
|
555
|
-
});
|
|
556
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
557
|
-
};
|
|
558
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
559
|
-
const contents = map({});
|
|
560
|
-
const data = parsedOutput.body;
|
|
561
|
-
const doc = take(data, {
|
|
562
|
-
message: __expectString,
|
|
563
|
-
reason: __expectString,
|
|
564
|
-
});
|
|
565
|
-
Object.assign(contents, doc);
|
|
566
|
-
const exception = new ValidationException({
|
|
567
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
568
|
-
...contents,
|
|
569
|
-
});
|
|
570
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
571
|
-
};
|
|
572
|
-
const de_AppliedWeights = (output, context) => {
|
|
573
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
574
|
-
if (value === null) {
|
|
575
|
-
return acc;
|
|
576
|
-
}
|
|
577
|
-
acc[key] = __limitedParseFloat32(value);
|
|
578
|
-
return acc;
|
|
579
|
-
}, {});
|
|
580
|
-
};
|
|
581
|
-
const de_AutoshiftInResource = (output, context) => {
|
|
582
|
-
return take(output, {
|
|
583
|
-
appliedStatus: __expectString,
|
|
584
|
-
awayFrom: __expectString,
|
|
585
|
-
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
586
|
-
});
|
|
587
|
-
};
|
|
588
|
-
const de_AutoshiftsInResource = (output, context) => {
|
|
589
|
-
const retVal = (output || [])
|
|
590
|
-
.filter((e) => e != null)
|
|
591
|
-
.map((entry) => {
|
|
592
|
-
return de_AutoshiftInResource(entry, context);
|
|
593
|
-
});
|
|
594
|
-
return retVal;
|
|
595
|
-
};
|
|
596
|
-
const de_AutoshiftSummaries = (output, context) => {
|
|
597
|
-
const retVal = (output || [])
|
|
598
|
-
.filter((e) => e != null)
|
|
599
|
-
.map((entry) => {
|
|
600
|
-
return de_AutoshiftSummary(entry, context);
|
|
601
|
-
});
|
|
602
|
-
return retVal;
|
|
603
|
-
};
|
|
604
|
-
const de_AutoshiftSummary = (output, context) => {
|
|
605
|
-
return take(output, {
|
|
606
|
-
awayFrom: __expectString,
|
|
607
|
-
endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
608
|
-
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
609
|
-
status: __expectString,
|
|
610
|
-
});
|
|
611
|
-
};
|
|
612
|
-
const de_ManagedResourceSummaries = (output, context) => {
|
|
613
|
-
const retVal = (output || [])
|
|
614
|
-
.filter((e) => e != null)
|
|
615
|
-
.map((entry) => {
|
|
616
|
-
return de_ManagedResourceSummary(entry, context);
|
|
617
|
-
});
|
|
618
|
-
return retVal;
|
|
619
|
-
};
|
|
620
|
-
const de_ManagedResourceSummary = (output, context) => {
|
|
621
|
-
return take(output, {
|
|
622
|
-
appliedWeights: (_) => de_AppliedWeights(_, context),
|
|
623
|
-
arn: __expectString,
|
|
624
|
-
autoshifts: (_) => de_AutoshiftsInResource(_, context),
|
|
625
|
-
availabilityZones: _json,
|
|
626
|
-
name: __expectString,
|
|
627
|
-
practiceRunStatus: __expectString,
|
|
628
|
-
zonalAutoshiftStatus: __expectString,
|
|
629
|
-
zonalShifts: (_) => de_ZonalShiftsInResource(_, context),
|
|
630
|
-
});
|
|
631
|
-
};
|
|
632
|
-
const de_ZonalShiftInResource = (output, context) => {
|
|
633
|
-
return take(output, {
|
|
634
|
-
appliedStatus: __expectString,
|
|
635
|
-
awayFrom: __expectString,
|
|
636
|
-
comment: __expectString,
|
|
637
|
-
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
638
|
-
practiceRunOutcome: __expectString,
|
|
639
|
-
resourceIdentifier: __expectString,
|
|
640
|
-
shiftType: __expectString,
|
|
641
|
-
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
642
|
-
zonalShiftId: __expectString,
|
|
643
|
-
});
|
|
644
|
-
};
|
|
645
|
-
const de_ZonalShiftsInResource = (output, context) => {
|
|
646
|
-
const retVal = (output || [])
|
|
647
|
-
.filter((e) => e != null)
|
|
648
|
-
.map((entry) => {
|
|
649
|
-
return de_ZonalShiftInResource(entry, context);
|
|
650
|
-
});
|
|
651
|
-
return retVal;
|
|
652
|
-
};
|
|
653
|
-
const de_ZonalShiftSummaries = (output, context) => {
|
|
654
|
-
const retVal = (output || [])
|
|
655
|
-
.filter((e) => e != null)
|
|
656
|
-
.map((entry) => {
|
|
657
|
-
return de_ZonalShiftSummary(entry, context);
|
|
658
|
-
});
|
|
659
|
-
return retVal;
|
|
660
|
-
};
|
|
661
|
-
const de_ZonalShiftSummary = (output, context) => {
|
|
662
|
-
return take(output, {
|
|
663
|
-
awayFrom: __expectString,
|
|
664
|
-
comment: __expectString,
|
|
665
|
-
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
666
|
-
practiceRunOutcome: __expectString,
|
|
667
|
-
resourceIdentifier: __expectString,
|
|
668
|
-
shiftType: __expectString,
|
|
669
|
-
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
670
|
-
status: __expectString,
|
|
671
|
-
zonalShiftId: __expectString,
|
|
672
|
-
});
|
|
673
|
-
};
|
|
674
|
-
const deserializeMetadata = (output) => ({
|
|
675
|
-
httpStatusCode: output.statusCode,
|
|
676
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
677
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
678
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
679
|
-
});
|
|
680
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
681
|
-
const _mR = "maxResults";
|
|
682
|
-
const _nT = "nextToken";
|
|
683
|
-
const _rI = "resourceIdentifier";
|
|
684
|
-
const _s = "status";
|