@aws-sdk/client-arc-zonal-shift 3.461.0 → 3.464.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/README.md +74 -22
- package/dist-cjs/ARCZonalShift.js +10 -0
- package/dist-cjs/commands/CreatePracticeRunConfigurationCommand.js +51 -0
- package/dist-cjs/commands/DeletePracticeRunConfigurationCommand.js +51 -0
- package/dist-cjs/commands/ListAutoshiftsCommand.js +51 -0
- package/dist-cjs/commands/UpdatePracticeRunConfigurationCommand.js +51 -0
- package/dist-cjs/commands/UpdateZonalAutoshiftConfigurationCommand.js +51 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +61 -34
- package/dist-cjs/pagination/ListAutoshiftsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +419 -2
- package/dist-es/ARCZonalShift.js +10 -0
- package/dist-es/commands/CreatePracticeRunConfigurationCommand.js +47 -0
- package/dist-es/commands/DeletePracticeRunConfigurationCommand.js +47 -0
- package/dist-es/commands/ListAutoshiftsCommand.js +47 -0
- package/dist-es/commands/UpdatePracticeRunConfigurationCommand.js +47 -0
- package/dist-es/commands/UpdateZonalAutoshiftConfigurationCommand.js +47 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +58 -31
- package/dist-es/pagination/ListAutoshiftsPaginator.js +25 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +408 -1
- package/dist-types/ARCZonalShift.d.ts +62 -15
- package/dist-types/ARCZonalShiftClient.d.ts +34 -17
- package/dist-types/commands/CancelZonalShiftCommand.d.ts +5 -2
- package/dist-types/commands/CreatePracticeRunConfigurationCommand.d.ts +138 -0
- package/dist-types/commands/DeletePracticeRunConfigurationCommand.d.ts +95 -0
- package/dist-types/commands/GetManagedResourceCommand.d.ts +33 -4
- package/dist-types/commands/ListAutoshiftsCommand.d.ts +95 -0
- package/dist-types/commands/ListManagedResourcesCommand.d.ts +28 -3
- package/dist-types/commands/ListZonalShiftsCommand.d.ts +8 -2
- package/dist-types/commands/StartZonalShiftCommand.d.ts +8 -7
- package/dist-types/commands/UpdatePracticeRunConfigurationCommand.d.ts +133 -0
- package/dist-types/commands/UpdateZonalAutoshiftConfigurationCommand.d.ts +96 -0
- package/dist-types/commands/UpdateZonalShiftCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/index.d.ts +27 -15
- package/dist-types/models/models_0.d.ts +698 -95
- package/dist-types/pagination/ListAutoshiftsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
- package/dist-types/ts3.4/ARCZonalShift.d.ts +91 -0
- package/dist-types/ts3.4/ARCZonalShiftClient.d.ts +30 -0
- package/dist-types/ts3.4/commands/CreatePracticeRunConfigurationCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeletePracticeRunConfigurationCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListAutoshiftsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdatePracticeRunConfigurationCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/UpdateZonalAutoshiftConfigurationCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +143 -23
- package/dist-types/ts3.4/pagination/ListAutoshiftsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
- package/package.json +2 -2
|
@@ -18,6 +18,46 @@ export const se_CancelZonalShiftCommand = async (input, context) => {
|
|
|
18
18
|
body,
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
+
export const se_CreatePracticeRunConfigurationCommand = async (input, context) => {
|
|
22
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
23
|
+
const headers = {
|
|
24
|
+
"content-type": "application/json",
|
|
25
|
+
};
|
|
26
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration";
|
|
27
|
+
let body;
|
|
28
|
+
body = JSON.stringify(take(input, {
|
|
29
|
+
blockedDates: (_) => _json(_),
|
|
30
|
+
blockedWindows: (_) => _json(_),
|
|
31
|
+
blockingAlarms: (_) => _json(_),
|
|
32
|
+
outcomeAlarms: (_) => _json(_),
|
|
33
|
+
resourceIdentifier: [],
|
|
34
|
+
}));
|
|
35
|
+
return new __HttpRequest({
|
|
36
|
+
protocol,
|
|
37
|
+
hostname,
|
|
38
|
+
port,
|
|
39
|
+
method: "POST",
|
|
40
|
+
headers,
|
|
41
|
+
path: resolvedPath,
|
|
42
|
+
body,
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export const se_DeletePracticeRunConfigurationCommand = async (input, context) => {
|
|
46
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
47
|
+
const headers = {};
|
|
48
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/{resourceIdentifier}";
|
|
49
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
50
|
+
let body;
|
|
51
|
+
return new __HttpRequest({
|
|
52
|
+
protocol,
|
|
53
|
+
hostname,
|
|
54
|
+
port,
|
|
55
|
+
method: "DELETE",
|
|
56
|
+
headers,
|
|
57
|
+
path: resolvedPath,
|
|
58
|
+
body,
|
|
59
|
+
});
|
|
60
|
+
};
|
|
21
61
|
export const se_GetManagedResourceCommand = async (input, context) => {
|
|
22
62
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
23
63
|
const headers = {};
|
|
@@ -34,6 +74,27 @@ export const se_GetManagedResourceCommand = async (input, context) => {
|
|
|
34
74
|
body,
|
|
35
75
|
});
|
|
36
76
|
};
|
|
77
|
+
export const se_ListAutoshiftsCommand = async (input, context) => {
|
|
78
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
79
|
+
const headers = {};
|
|
80
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/autoshifts";
|
|
81
|
+
const query = map({
|
|
82
|
+
nextToken: [, input.nextToken],
|
|
83
|
+
status: [, input.status],
|
|
84
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
85
|
+
});
|
|
86
|
+
let body;
|
|
87
|
+
return new __HttpRequest({
|
|
88
|
+
protocol,
|
|
89
|
+
hostname,
|
|
90
|
+
port,
|
|
91
|
+
method: "GET",
|
|
92
|
+
headers,
|
|
93
|
+
path: resolvedPath,
|
|
94
|
+
query,
|
|
95
|
+
body,
|
|
96
|
+
});
|
|
97
|
+
};
|
|
37
98
|
export const se_ListManagedResourcesCommand = async (input, context) => {
|
|
38
99
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
39
100
|
const headers = {};
|
|
@@ -62,6 +123,7 @@ export const se_ListZonalShiftsCommand = async (input, context) => {
|
|
|
62
123
|
nextToken: [, input.nextToken],
|
|
63
124
|
status: [, input.status],
|
|
64
125
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
126
|
+
resourceIdentifier: [, input.resourceIdentifier],
|
|
65
127
|
});
|
|
66
128
|
let body;
|
|
67
129
|
return new __HttpRequest({
|
|
@@ -98,6 +160,51 @@ export const se_StartZonalShiftCommand = async (input, context) => {
|
|
|
98
160
|
body,
|
|
99
161
|
});
|
|
100
162
|
};
|
|
163
|
+
export const se_UpdatePracticeRunConfigurationCommand = async (input, context) => {
|
|
164
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
165
|
+
const headers = {
|
|
166
|
+
"content-type": "application/json",
|
|
167
|
+
};
|
|
168
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/{resourceIdentifier}";
|
|
169
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
170
|
+
let body;
|
|
171
|
+
body = JSON.stringify(take(input, {
|
|
172
|
+
blockedDates: (_) => _json(_),
|
|
173
|
+
blockedWindows: (_) => _json(_),
|
|
174
|
+
blockingAlarms: (_) => _json(_),
|
|
175
|
+
outcomeAlarms: (_) => _json(_),
|
|
176
|
+
}));
|
|
177
|
+
return new __HttpRequest({
|
|
178
|
+
protocol,
|
|
179
|
+
hostname,
|
|
180
|
+
port,
|
|
181
|
+
method: "PATCH",
|
|
182
|
+
headers,
|
|
183
|
+
path: resolvedPath,
|
|
184
|
+
body,
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
export const se_UpdateZonalAutoshiftConfigurationCommand = async (input, context) => {
|
|
188
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
189
|
+
const headers = {
|
|
190
|
+
"content-type": "application/json",
|
|
191
|
+
};
|
|
192
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/managedresources/{resourceIdentifier}";
|
|
193
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
|
|
194
|
+
let body;
|
|
195
|
+
body = JSON.stringify(take(input, {
|
|
196
|
+
zonalAutoshiftStatus: [],
|
|
197
|
+
}));
|
|
198
|
+
return new __HttpRequest({
|
|
199
|
+
protocol,
|
|
200
|
+
hostname,
|
|
201
|
+
port,
|
|
202
|
+
method: "PUT",
|
|
203
|
+
headers,
|
|
204
|
+
path: resolvedPath,
|
|
205
|
+
body,
|
|
206
|
+
});
|
|
207
|
+
};
|
|
101
208
|
export const se_UpdateZonalShiftCommand = async (input, context) => {
|
|
102
209
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
103
210
|
const headers = {
|
|
@@ -174,6 +281,107 @@ const de_CancelZonalShiftCommandError = async (output, context) => {
|
|
|
174
281
|
});
|
|
175
282
|
}
|
|
176
283
|
};
|
|
284
|
+
export const de_CreatePracticeRunConfigurationCommand = async (output, context) => {
|
|
285
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
286
|
+
return de_CreatePracticeRunConfigurationCommandError(output, context);
|
|
287
|
+
}
|
|
288
|
+
const contents = map({
|
|
289
|
+
$metadata: deserializeMetadata(output),
|
|
290
|
+
});
|
|
291
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
292
|
+
const doc = take(data, {
|
|
293
|
+
arn: __expectString,
|
|
294
|
+
name: __expectString,
|
|
295
|
+
practiceRunConfiguration: _json,
|
|
296
|
+
zonalAutoshiftStatus: __expectString,
|
|
297
|
+
});
|
|
298
|
+
Object.assign(contents, doc);
|
|
299
|
+
return contents;
|
|
300
|
+
};
|
|
301
|
+
const de_CreatePracticeRunConfigurationCommandError = async (output, context) => {
|
|
302
|
+
const parsedOutput = {
|
|
303
|
+
...output,
|
|
304
|
+
body: await parseErrorBody(output.body, context),
|
|
305
|
+
};
|
|
306
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
307
|
+
switch (errorCode) {
|
|
308
|
+
case "AccessDeniedException":
|
|
309
|
+
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
310
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
311
|
+
case "ConflictException":
|
|
312
|
+
case "com.amazonaws.arczonalshift#ConflictException":
|
|
313
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
314
|
+
case "InternalServerException":
|
|
315
|
+
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
316
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
317
|
+
case "ResourceNotFoundException":
|
|
318
|
+
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
319
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
320
|
+
case "ThrottlingException":
|
|
321
|
+
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
322
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
323
|
+
case "ValidationException":
|
|
324
|
+
case "com.amazonaws.arczonalshift#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
|
+
export const de_DeletePracticeRunConfigurationCommand = async (output, context) => {
|
|
336
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
337
|
+
return de_DeletePracticeRunConfigurationCommandError(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
|
+
arn: __expectString,
|
|
345
|
+
name: __expectString,
|
|
346
|
+
zonalAutoshiftStatus: __expectString,
|
|
347
|
+
});
|
|
348
|
+
Object.assign(contents, doc);
|
|
349
|
+
return contents;
|
|
350
|
+
};
|
|
351
|
+
const de_DeletePracticeRunConfigurationCommandError = async (output, context) => {
|
|
352
|
+
const parsedOutput = {
|
|
353
|
+
...output,
|
|
354
|
+
body: await parseErrorBody(output.body, context),
|
|
355
|
+
};
|
|
356
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
357
|
+
switch (errorCode) {
|
|
358
|
+
case "AccessDeniedException":
|
|
359
|
+
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
360
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
361
|
+
case "ConflictException":
|
|
362
|
+
case "com.amazonaws.arczonalshift#ConflictException":
|
|
363
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
364
|
+
case "InternalServerException":
|
|
365
|
+
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
366
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
367
|
+
case "ResourceNotFoundException":
|
|
368
|
+
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
369
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
370
|
+
case "ThrottlingException":
|
|
371
|
+
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
372
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
373
|
+
case "ValidationException":
|
|
374
|
+
case "com.amazonaws.arczonalshift#ValidationException":
|
|
375
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
376
|
+
default:
|
|
377
|
+
const parsedBody = parsedOutput.body;
|
|
378
|
+
return throwDefaultError({
|
|
379
|
+
output,
|
|
380
|
+
parsedBody,
|
|
381
|
+
errorCode,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
};
|
|
177
385
|
export const de_GetManagedResourceCommand = async (output, context) => {
|
|
178
386
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
179
387
|
return de_GetManagedResourceCommandError(output, context);
|
|
@@ -185,7 +393,10 @@ export const de_GetManagedResourceCommand = async (output, context) => {
|
|
|
185
393
|
const doc = take(data, {
|
|
186
394
|
appliedWeights: (_) => de_AppliedWeights(_, context),
|
|
187
395
|
arn: __expectString,
|
|
396
|
+
autoshifts: (_) => de_AutoshiftsInResource(_, context),
|
|
188
397
|
name: __expectString,
|
|
398
|
+
practiceRunConfiguration: _json,
|
|
399
|
+
zonalAutoshiftStatus: __expectString,
|
|
189
400
|
zonalShifts: (_) => de_ZonalShiftsInResource(_, context),
|
|
190
401
|
});
|
|
191
402
|
Object.assign(contents, doc);
|
|
@@ -222,6 +433,49 @@ const de_GetManagedResourceCommandError = async (output, context) => {
|
|
|
222
433
|
});
|
|
223
434
|
}
|
|
224
435
|
};
|
|
436
|
+
export const de_ListAutoshiftsCommand = async (output, context) => {
|
|
437
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
438
|
+
return de_ListAutoshiftsCommandError(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
|
+
items: (_) => de_AutoshiftSummaries(_, context),
|
|
446
|
+
nextToken: __expectString,
|
|
447
|
+
});
|
|
448
|
+
Object.assign(contents, doc);
|
|
449
|
+
return contents;
|
|
450
|
+
};
|
|
451
|
+
const de_ListAutoshiftsCommandError = async (output, context) => {
|
|
452
|
+
const parsedOutput = {
|
|
453
|
+
...output,
|
|
454
|
+
body: await parseErrorBody(output.body, context),
|
|
455
|
+
};
|
|
456
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
457
|
+
switch (errorCode) {
|
|
458
|
+
case "AccessDeniedException":
|
|
459
|
+
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
460
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
461
|
+
case "InternalServerException":
|
|
462
|
+
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
463
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
464
|
+
case "ThrottlingException":
|
|
465
|
+
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
466
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
467
|
+
case "ValidationException":
|
|
468
|
+
case "com.amazonaws.arczonalshift#ValidationException":
|
|
469
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
470
|
+
default:
|
|
471
|
+
const parsedBody = parsedOutput.body;
|
|
472
|
+
return throwDefaultError({
|
|
473
|
+
output,
|
|
474
|
+
parsedBody,
|
|
475
|
+
errorCode,
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
};
|
|
225
479
|
export const de_ListManagedResourcesCommand = async (output, context) => {
|
|
226
480
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
227
481
|
return de_ListManagedResourcesCommandError(output, context);
|
|
@@ -231,7 +485,7 @@ export const de_ListManagedResourcesCommand = async (output, context) => {
|
|
|
231
485
|
});
|
|
232
486
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
233
487
|
const doc = take(data, {
|
|
234
|
-
items:
|
|
488
|
+
items: (_) => de_ManagedResourceSummaries(_, context),
|
|
235
489
|
nextToken: __expectString,
|
|
236
490
|
});
|
|
237
491
|
Object.assign(contents, doc);
|
|
@@ -362,6 +616,106 @@ const de_StartZonalShiftCommandError = async (output, context) => {
|
|
|
362
616
|
});
|
|
363
617
|
}
|
|
364
618
|
};
|
|
619
|
+
export const de_UpdatePracticeRunConfigurationCommand = async (output, context) => {
|
|
620
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
621
|
+
return de_UpdatePracticeRunConfigurationCommandError(output, context);
|
|
622
|
+
}
|
|
623
|
+
const contents = map({
|
|
624
|
+
$metadata: deserializeMetadata(output),
|
|
625
|
+
});
|
|
626
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
627
|
+
const doc = take(data, {
|
|
628
|
+
arn: __expectString,
|
|
629
|
+
name: __expectString,
|
|
630
|
+
practiceRunConfiguration: _json,
|
|
631
|
+
zonalAutoshiftStatus: __expectString,
|
|
632
|
+
});
|
|
633
|
+
Object.assign(contents, doc);
|
|
634
|
+
return contents;
|
|
635
|
+
};
|
|
636
|
+
const de_UpdatePracticeRunConfigurationCommandError = async (output, context) => {
|
|
637
|
+
const parsedOutput = {
|
|
638
|
+
...output,
|
|
639
|
+
body: await parseErrorBody(output.body, context),
|
|
640
|
+
};
|
|
641
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
642
|
+
switch (errorCode) {
|
|
643
|
+
case "AccessDeniedException":
|
|
644
|
+
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
645
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
646
|
+
case "ConflictException":
|
|
647
|
+
case "com.amazonaws.arczonalshift#ConflictException":
|
|
648
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
649
|
+
case "InternalServerException":
|
|
650
|
+
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
651
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
652
|
+
case "ResourceNotFoundException":
|
|
653
|
+
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
654
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
655
|
+
case "ThrottlingException":
|
|
656
|
+
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
657
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
658
|
+
case "ValidationException":
|
|
659
|
+
case "com.amazonaws.arczonalshift#ValidationException":
|
|
660
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
661
|
+
default:
|
|
662
|
+
const parsedBody = parsedOutput.body;
|
|
663
|
+
return throwDefaultError({
|
|
664
|
+
output,
|
|
665
|
+
parsedBody,
|
|
666
|
+
errorCode,
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
};
|
|
670
|
+
export const de_UpdateZonalAutoshiftConfigurationCommand = async (output, context) => {
|
|
671
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
672
|
+
return de_UpdateZonalAutoshiftConfigurationCommandError(output, context);
|
|
673
|
+
}
|
|
674
|
+
const contents = map({
|
|
675
|
+
$metadata: deserializeMetadata(output),
|
|
676
|
+
});
|
|
677
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
678
|
+
const doc = take(data, {
|
|
679
|
+
resourceIdentifier: __expectString,
|
|
680
|
+
zonalAutoshiftStatus: __expectString,
|
|
681
|
+
});
|
|
682
|
+
Object.assign(contents, doc);
|
|
683
|
+
return contents;
|
|
684
|
+
};
|
|
685
|
+
const de_UpdateZonalAutoshiftConfigurationCommandError = async (output, context) => {
|
|
686
|
+
const parsedOutput = {
|
|
687
|
+
...output,
|
|
688
|
+
body: await parseErrorBody(output.body, context),
|
|
689
|
+
};
|
|
690
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
691
|
+
switch (errorCode) {
|
|
692
|
+
case "AccessDeniedException":
|
|
693
|
+
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
694
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
695
|
+
case "ConflictException":
|
|
696
|
+
case "com.amazonaws.arczonalshift#ConflictException":
|
|
697
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
698
|
+
case "InternalServerException":
|
|
699
|
+
case "com.amazonaws.arczonalshift#InternalServerException":
|
|
700
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
701
|
+
case "ResourceNotFoundException":
|
|
702
|
+
case "com.amazonaws.arczonalshift#ResourceNotFoundException":
|
|
703
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
704
|
+
case "ThrottlingException":
|
|
705
|
+
case "com.amazonaws.arczonalshift#ThrottlingException":
|
|
706
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
707
|
+
case "ValidationException":
|
|
708
|
+
case "com.amazonaws.arczonalshift#ValidationException":
|
|
709
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
710
|
+
default:
|
|
711
|
+
const parsedBody = parsedOutput.body;
|
|
712
|
+
return throwDefaultError({
|
|
713
|
+
output,
|
|
714
|
+
parsedBody,
|
|
715
|
+
errorCode,
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
};
|
|
365
719
|
export const de_UpdateZonalShiftCommand = async (output, context) => {
|
|
366
720
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
367
721
|
return de_UpdateZonalShiftCommandError(output, context);
|
|
@@ -507,12 +861,64 @@ const de_AppliedWeights = (output, context) => {
|
|
|
507
861
|
return acc;
|
|
508
862
|
}, {});
|
|
509
863
|
};
|
|
864
|
+
const de_AutoshiftInResource = (output, context) => {
|
|
865
|
+
return take(output, {
|
|
866
|
+
appliedStatus: __expectString,
|
|
867
|
+
awayFrom: __expectString,
|
|
868
|
+
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
869
|
+
});
|
|
870
|
+
};
|
|
871
|
+
const de_AutoshiftsInResource = (output, context) => {
|
|
872
|
+
const retVal = (output || [])
|
|
873
|
+
.filter((e) => e != null)
|
|
874
|
+
.map((entry) => {
|
|
875
|
+
return de_AutoshiftInResource(entry, context);
|
|
876
|
+
});
|
|
877
|
+
return retVal;
|
|
878
|
+
};
|
|
879
|
+
const de_AutoshiftSummaries = (output, context) => {
|
|
880
|
+
const retVal = (output || [])
|
|
881
|
+
.filter((e) => e != null)
|
|
882
|
+
.map((entry) => {
|
|
883
|
+
return de_AutoshiftSummary(entry, context);
|
|
884
|
+
});
|
|
885
|
+
return retVal;
|
|
886
|
+
};
|
|
887
|
+
const de_AutoshiftSummary = (output, context) => {
|
|
888
|
+
return take(output, {
|
|
889
|
+
awayFrom: __expectString,
|
|
890
|
+
endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
891
|
+
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
892
|
+
status: __expectString,
|
|
893
|
+
});
|
|
894
|
+
};
|
|
895
|
+
const de_ManagedResourceSummaries = (output, context) => {
|
|
896
|
+
const retVal = (output || [])
|
|
897
|
+
.filter((e) => e != null)
|
|
898
|
+
.map((entry) => {
|
|
899
|
+
return de_ManagedResourceSummary(entry, context);
|
|
900
|
+
});
|
|
901
|
+
return retVal;
|
|
902
|
+
};
|
|
903
|
+
const de_ManagedResourceSummary = (output, context) => {
|
|
904
|
+
return take(output, {
|
|
905
|
+
appliedWeights: (_) => de_AppliedWeights(_, context),
|
|
906
|
+
arn: __expectString,
|
|
907
|
+
autoshifts: (_) => de_AutoshiftsInResource(_, context),
|
|
908
|
+
availabilityZones: _json,
|
|
909
|
+
name: __expectString,
|
|
910
|
+
practiceRunStatus: __expectString,
|
|
911
|
+
zonalAutoshiftStatus: __expectString,
|
|
912
|
+
zonalShifts: (_) => de_ZonalShiftsInResource(_, context),
|
|
913
|
+
});
|
|
914
|
+
};
|
|
510
915
|
const de_ZonalShiftInResource = (output, context) => {
|
|
511
916
|
return take(output, {
|
|
512
917
|
appliedStatus: __expectString,
|
|
513
918
|
awayFrom: __expectString,
|
|
514
919
|
comment: __expectString,
|
|
515
920
|
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
921
|
+
practiceRunOutcome: __expectString,
|
|
516
922
|
resourceIdentifier: __expectString,
|
|
517
923
|
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
518
924
|
zonalShiftId: __expectString,
|
|
@@ -539,6 +945,7 @@ const de_ZonalShiftSummary = (output, context) => {
|
|
|
539
945
|
awayFrom: __expectString,
|
|
540
946
|
comment: __expectString,
|
|
541
947
|
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
948
|
+
practiceRunOutcome: __expectString,
|
|
542
949
|
resourceIdentifier: __expectString,
|
|
543
950
|
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
544
951
|
status: __expectString,
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
2
|
import { ARCZonalShiftClient } from "./ARCZonalShiftClient";
|
|
3
3
|
import { CancelZonalShiftCommandInput, CancelZonalShiftCommandOutput } from "./commands/CancelZonalShiftCommand";
|
|
4
|
+
import { CreatePracticeRunConfigurationCommandInput, CreatePracticeRunConfigurationCommandOutput } from "./commands/CreatePracticeRunConfigurationCommand";
|
|
5
|
+
import { DeletePracticeRunConfigurationCommandInput, DeletePracticeRunConfigurationCommandOutput } from "./commands/DeletePracticeRunConfigurationCommand";
|
|
4
6
|
import { GetManagedResourceCommandInput, GetManagedResourceCommandOutput } from "./commands/GetManagedResourceCommand";
|
|
7
|
+
import { ListAutoshiftsCommandInput, ListAutoshiftsCommandOutput } from "./commands/ListAutoshiftsCommand";
|
|
5
8
|
import { ListManagedResourcesCommandInput, ListManagedResourcesCommandOutput } from "./commands/ListManagedResourcesCommand";
|
|
6
9
|
import { ListZonalShiftsCommandInput, ListZonalShiftsCommandOutput } from "./commands/ListZonalShiftsCommand";
|
|
7
10
|
import { StartZonalShiftCommandInput, StartZonalShiftCommandOutput } from "./commands/StartZonalShiftCommand";
|
|
11
|
+
import { UpdatePracticeRunConfigurationCommandInput, UpdatePracticeRunConfigurationCommandOutput } from "./commands/UpdatePracticeRunConfigurationCommand";
|
|
12
|
+
import { UpdateZonalAutoshiftConfigurationCommandInput, UpdateZonalAutoshiftConfigurationCommandOutput } from "./commands/UpdateZonalAutoshiftConfigurationCommand";
|
|
8
13
|
import { UpdateZonalShiftCommandInput, UpdateZonalShiftCommandOutput } from "./commands/UpdateZonalShiftCommand";
|
|
9
14
|
export interface ARCZonalShift {
|
|
10
15
|
/**
|
|
@@ -13,12 +18,30 @@ export interface ARCZonalShift {
|
|
|
13
18
|
cancelZonalShift(args: CancelZonalShiftCommandInput, options?: __HttpHandlerOptions): Promise<CancelZonalShiftCommandOutput>;
|
|
14
19
|
cancelZonalShift(args: CancelZonalShiftCommandInput, cb: (err: any, data?: CancelZonalShiftCommandOutput) => void): void;
|
|
15
20
|
cancelZonalShift(args: CancelZonalShiftCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelZonalShiftCommandOutput) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* @see {@link CreatePracticeRunConfigurationCommand}
|
|
23
|
+
*/
|
|
24
|
+
createPracticeRunConfiguration(args: CreatePracticeRunConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<CreatePracticeRunConfigurationCommandOutput>;
|
|
25
|
+
createPracticeRunConfiguration(args: CreatePracticeRunConfigurationCommandInput, cb: (err: any, data?: CreatePracticeRunConfigurationCommandOutput) => void): void;
|
|
26
|
+
createPracticeRunConfiguration(args: CreatePracticeRunConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreatePracticeRunConfigurationCommandOutput) => void): void;
|
|
27
|
+
/**
|
|
28
|
+
* @see {@link DeletePracticeRunConfigurationCommand}
|
|
29
|
+
*/
|
|
30
|
+
deletePracticeRunConfiguration(args: DeletePracticeRunConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<DeletePracticeRunConfigurationCommandOutput>;
|
|
31
|
+
deletePracticeRunConfiguration(args: DeletePracticeRunConfigurationCommandInput, cb: (err: any, data?: DeletePracticeRunConfigurationCommandOutput) => void): void;
|
|
32
|
+
deletePracticeRunConfiguration(args: DeletePracticeRunConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeletePracticeRunConfigurationCommandOutput) => void): void;
|
|
16
33
|
/**
|
|
17
34
|
* @see {@link GetManagedResourceCommand}
|
|
18
35
|
*/
|
|
19
36
|
getManagedResource(args: GetManagedResourceCommandInput, options?: __HttpHandlerOptions): Promise<GetManagedResourceCommandOutput>;
|
|
20
37
|
getManagedResource(args: GetManagedResourceCommandInput, cb: (err: any, data?: GetManagedResourceCommandOutput) => void): void;
|
|
21
38
|
getManagedResource(args: GetManagedResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetManagedResourceCommandOutput) => void): void;
|
|
39
|
+
/**
|
|
40
|
+
* @see {@link ListAutoshiftsCommand}
|
|
41
|
+
*/
|
|
42
|
+
listAutoshifts(args: ListAutoshiftsCommandInput, options?: __HttpHandlerOptions): Promise<ListAutoshiftsCommandOutput>;
|
|
43
|
+
listAutoshifts(args: ListAutoshiftsCommandInput, cb: (err: any, data?: ListAutoshiftsCommandOutput) => void): void;
|
|
44
|
+
listAutoshifts(args: ListAutoshiftsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAutoshiftsCommandOutput) => void): void;
|
|
22
45
|
/**
|
|
23
46
|
* @see {@link ListManagedResourcesCommand}
|
|
24
47
|
*/
|
|
@@ -37,6 +60,18 @@ export interface ARCZonalShift {
|
|
|
37
60
|
startZonalShift(args: StartZonalShiftCommandInput, options?: __HttpHandlerOptions): Promise<StartZonalShiftCommandOutput>;
|
|
38
61
|
startZonalShift(args: StartZonalShiftCommandInput, cb: (err: any, data?: StartZonalShiftCommandOutput) => void): void;
|
|
39
62
|
startZonalShift(args: StartZonalShiftCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartZonalShiftCommandOutput) => void): void;
|
|
63
|
+
/**
|
|
64
|
+
* @see {@link UpdatePracticeRunConfigurationCommand}
|
|
65
|
+
*/
|
|
66
|
+
updatePracticeRunConfiguration(args: UpdatePracticeRunConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<UpdatePracticeRunConfigurationCommandOutput>;
|
|
67
|
+
updatePracticeRunConfiguration(args: UpdatePracticeRunConfigurationCommandInput, cb: (err: any, data?: UpdatePracticeRunConfigurationCommandOutput) => void): void;
|
|
68
|
+
updatePracticeRunConfiguration(args: UpdatePracticeRunConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdatePracticeRunConfigurationCommandOutput) => void): void;
|
|
69
|
+
/**
|
|
70
|
+
* @see {@link UpdateZonalAutoshiftConfigurationCommand}
|
|
71
|
+
*/
|
|
72
|
+
updateZonalAutoshiftConfiguration(args: UpdateZonalAutoshiftConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<UpdateZonalAutoshiftConfigurationCommandOutput>;
|
|
73
|
+
updateZonalAutoshiftConfiguration(args: UpdateZonalAutoshiftConfigurationCommandInput, cb: (err: any, data?: UpdateZonalAutoshiftConfigurationCommandOutput) => void): void;
|
|
74
|
+
updateZonalAutoshiftConfiguration(args: UpdateZonalAutoshiftConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateZonalAutoshiftConfigurationCommandOutput) => void): void;
|
|
40
75
|
/**
|
|
41
76
|
* @see {@link UpdateZonalShiftCommand}
|
|
42
77
|
*/
|
|
@@ -46,21 +81,33 @@ export interface ARCZonalShift {
|
|
|
46
81
|
}
|
|
47
82
|
/**
|
|
48
83
|
* @public
|
|
49
|
-
* <p>
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* in
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
84
|
+
* <p>Welcome to the Zonal Shift API Reference Guide for Amazon Route 53 Application Recovery Controller (Route 53 ARC).</p>
|
|
85
|
+
* <p>You can start a zonal shift to move traffic for a load balancer resource away from an Availability Zone to
|
|
86
|
+
* help your application recover quickly from an impairment in an Availability Zone. For example,
|
|
87
|
+
* you can recover your application from a developer's bad code deployment or from an
|
|
88
|
+
* Amazon Web Services infrastructure failure in a single Availability Zone.</p>
|
|
89
|
+
* <p>You can also configure zonal autoshift for a load balancer resource. Zonal autoshift
|
|
90
|
+
* is a capability in Route 53 ARC where Amazon Web Services shifts away application resource
|
|
91
|
+
* traffic from an Availability Zone, on your behalf, to help reduce your time to recovery during events.
|
|
92
|
+
* Amazon Web Services shifts away traffic for resources that are enabled for zonal autoshift whenever Amazon Web Services
|
|
93
|
+
* determines that there's an issue in the Availability Zone that could potentially affect
|
|
94
|
+
* customers.</p>
|
|
95
|
+
* <p>To ensure that zonal autoshift is safe for your application, you must
|
|
96
|
+
* also configure practice runs when you enable zonal autoshift for a resource. Practice runs start
|
|
97
|
+
* weekly zonal shifts for a resource, to shift
|
|
98
|
+
* traffic for the resource out of an Availability Zone. Practice runs make sure, on a regular basis,
|
|
99
|
+
* that you have enough capacity in all the Availability Zones in an Amazon Web Services Region
|
|
100
|
+
* for your application to continue to operate normally
|
|
101
|
+
* when traffic for a resource is shifted away from one Availability Zone.</p>
|
|
102
|
+
* <important>
|
|
103
|
+
* <p>You must prescale resource capacity in all Availability Zones in the Region
|
|
104
|
+
* where your application is deployed, before you configure practice runs or enable zonal autoshift
|
|
105
|
+
* for a resource. You should not rely on scaling on demand when an autoshift or practice run
|
|
106
|
+
* starts. </p>
|
|
107
|
+
* </important>
|
|
108
|
+
* <p>For more information about using zonal shift and zonal autoshift, see the
|
|
109
|
+
* <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route53-recovery.html">Amazon Route 53 Application Recovery Controller
|
|
110
|
+
* Developer Guide</a>.</p>
|
|
64
111
|
*/
|
|
65
112
|
export declare class ARCZonalShift extends ARCZonalShiftClient implements ARCZonalShift {
|
|
66
113
|
}
|