@aws-sdk/client-backup 3.216.0 → 3.218.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 +7 -7
- package/dist-cjs/Backup.js +90 -0
- package/dist-cjs/commands/CancelLegalHoldCommand.js +46 -0
- package/dist-cjs/commands/CreateLegalHoldCommand.js +46 -0
- package/dist-cjs/commands/DisassociateRecoveryPointFromParentCommand.js +46 -0
- package/dist-cjs/commands/GetLegalHoldCommand.js +46 -0
- package/dist-cjs/commands/ListLegalHoldsCommand.js +46 -0
- package/dist-cjs/commands/ListRecoveryPointsByLegalHoldCommand.js +46 -0
- package/dist-cjs/commands/index.js +6 -0
- package/dist-cjs/endpoint/ruleset.js +1 -1
- package/dist-cjs/models/models_0.js +116 -46
- package/dist-cjs/pagination/ListLegalHoldsPaginator.js +36 -0
- package/dist-cjs/pagination/ListRecoveryPointsByLegalHoldPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +615 -3
- package/dist-es/Backup.js +90 -0
- package/dist-es/commands/CancelLegalHoldCommand.js +42 -0
- package/dist-es/commands/CreateLegalHoldCommand.js +42 -0
- package/dist-es/commands/DisassociateRecoveryPointFromParentCommand.js +42 -0
- package/dist-es/commands/GetLegalHoldCommand.js +42 -0
- package/dist-es/commands/ListLegalHoldsCommand.js +42 -0
- package/dist-es/commands/ListRecoveryPointsByLegalHoldCommand.js +42 -0
- package/dist-es/commands/index.js +6 -0
- package/dist-es/endpoint/ruleset.js +1 -1
- package/dist-es/models/models_0.js +90 -35
- package/dist-es/pagination/ListLegalHoldsPaginator.js +32 -0
- package/dist-es/pagination/ListRecoveryPointsByLegalHoldPaginator.js +32 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +600 -0
- package/dist-types/Backup.d.ts +63 -0
- package/dist-types/BackupClient.d.ts +8 -2
- package/dist-types/commands/CancelLegalHoldCommand.d.ts +38 -0
- package/dist-types/commands/CreateLegalHoldCommand.d.ts +40 -0
- package/dist-types/commands/DeleteRecoveryPointCommand.d.ts +10 -0
- package/dist-types/commands/DisassociateRecoveryPointFromParentCommand.d.ts +38 -0
- package/dist-types/commands/GetLegalHoldCommand.d.ts +38 -0
- package/dist-types/commands/ListLegalHoldsCommand.d.ts +37 -0
- package/dist-types/commands/ListRecoveryPointsByLegalHoldCommand.d.ts +38 -0
- package/dist-types/commands/StopBackupJobCommand.d.ts +4 -0
- package/dist-types/commands/index.d.ts +6 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +653 -128
- package/dist-types/pagination/ListLegalHoldsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListRecoveryPointsByLegalHoldPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/Backup.d.ts +108 -0
- package/dist-types/ts3.4/BackupClient.d.ts +36 -0
- package/dist-types/ts3.4/commands/CancelLegalHoldCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/CreateLegalHoldCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/DisassociateRecoveryPointFromParentCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/GetLegalHoldCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/ListLegalHoldsCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/ListRecoveryPointsByLegalHoldCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +6 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +210 -55
- package/dist-types/ts3.4/pagination/ListLegalHoldsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRecoveryPointsByLegalHoldPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +72 -0
- package/package.json +3 -3
|
@@ -3,6 +3,27 @@ import { decorateServiceException as __decorateServiceException, expectBoolean a
|
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { BackupServiceException as __BaseException } from "../models/BackupServiceException";
|
|
5
5
|
import { AlreadyExistsException, ConflictException, DependencyFailureException, InvalidParameterValueException, InvalidRequestException, InvalidResourceStateException, LimitExceededException, MissingParameterValueException, ResourceNotFoundException, ServiceUnavailableException, } from "../models/models_0";
|
|
6
|
+
export const serializeAws_restJson1CancelLegalHoldCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {};
|
|
9
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/legal-holds/{LegalHoldId}";
|
|
10
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "LegalHoldId", () => input.LegalHoldId, "{LegalHoldId}", false);
|
|
11
|
+
const query = map({
|
|
12
|
+
cancelDescription: [, __expectNonNull(input.CancelDescription, `CancelDescription`)],
|
|
13
|
+
retainRecordInDays: [() => input.RetainRecordInDays !== void 0, () => input.RetainRecordInDays.toString()],
|
|
14
|
+
});
|
|
15
|
+
let body;
|
|
16
|
+
return new __HttpRequest({
|
|
17
|
+
protocol,
|
|
18
|
+
hostname,
|
|
19
|
+
port,
|
|
20
|
+
method: "DELETE",
|
|
21
|
+
headers,
|
|
22
|
+
path: resolvedPath,
|
|
23
|
+
query,
|
|
24
|
+
body,
|
|
25
|
+
});
|
|
26
|
+
};
|
|
6
27
|
export const serializeAws_restJson1CreateBackupPlanCommand = async (input, context) => {
|
|
7
28
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
29
|
const headers = {
|
|
@@ -102,6 +123,32 @@ export const serializeAws_restJson1CreateFrameworkCommand = async (input, contex
|
|
|
102
123
|
body,
|
|
103
124
|
});
|
|
104
125
|
};
|
|
126
|
+
export const serializeAws_restJson1CreateLegalHoldCommand = async (input, context) => {
|
|
127
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
128
|
+
const headers = {
|
|
129
|
+
"content-type": "application/json",
|
|
130
|
+
};
|
|
131
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/legal-holds";
|
|
132
|
+
let body;
|
|
133
|
+
body = JSON.stringify({
|
|
134
|
+
...(input.Description != null && { Description: input.Description }),
|
|
135
|
+
...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }),
|
|
136
|
+
...(input.RecoveryPointSelection != null && {
|
|
137
|
+
RecoveryPointSelection: serializeAws_restJson1RecoveryPointSelection(input.RecoveryPointSelection, context),
|
|
138
|
+
}),
|
|
139
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
140
|
+
...(input.Title != null && { Title: input.Title }),
|
|
141
|
+
});
|
|
142
|
+
return new __HttpRequest({
|
|
143
|
+
protocol,
|
|
144
|
+
hostname,
|
|
145
|
+
port,
|
|
146
|
+
method: "POST",
|
|
147
|
+
headers,
|
|
148
|
+
path: resolvedPath,
|
|
149
|
+
body,
|
|
150
|
+
});
|
|
151
|
+
};
|
|
105
152
|
export const serializeAws_restJson1CreateReportPlanCommand = async (input, context) => {
|
|
106
153
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
107
154
|
const headers = {
|
|
@@ -484,6 +531,24 @@ export const serializeAws_restJson1DisassociateRecoveryPointCommand = async (inp
|
|
|
484
531
|
body,
|
|
485
532
|
});
|
|
486
533
|
};
|
|
534
|
+
export const serializeAws_restJson1DisassociateRecoveryPointFromParentCommand = async (input, context) => {
|
|
535
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
536
|
+
const headers = {};
|
|
537
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
538
|
+
"/backup-vaults/{BackupVaultName}/recovery-points/{RecoveryPointArn}/parentAssociation";
|
|
539
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "BackupVaultName", () => input.BackupVaultName, "{BackupVaultName}", false);
|
|
540
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "RecoveryPointArn", () => input.RecoveryPointArn, "{RecoveryPointArn}", false);
|
|
541
|
+
let body;
|
|
542
|
+
return new __HttpRequest({
|
|
543
|
+
protocol,
|
|
544
|
+
hostname,
|
|
545
|
+
port,
|
|
546
|
+
method: "DELETE",
|
|
547
|
+
headers,
|
|
548
|
+
path: resolvedPath,
|
|
549
|
+
body,
|
|
550
|
+
});
|
|
551
|
+
};
|
|
487
552
|
export const serializeAws_restJson1ExportBackupPlanTemplateCommand = async (input, context) => {
|
|
488
553
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
489
554
|
const headers = {};
|
|
@@ -609,6 +674,22 @@ export const serializeAws_restJson1GetBackupVaultNotificationsCommand = async (i
|
|
|
609
674
|
body,
|
|
610
675
|
});
|
|
611
676
|
};
|
|
677
|
+
export const serializeAws_restJson1GetLegalHoldCommand = async (input, context) => {
|
|
678
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
679
|
+
const headers = {};
|
|
680
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/legal-holds/{LegalHoldId}";
|
|
681
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "LegalHoldId", () => input.LegalHoldId, "{LegalHoldId}", false);
|
|
682
|
+
let body;
|
|
683
|
+
return new __HttpRequest({
|
|
684
|
+
protocol,
|
|
685
|
+
hostname,
|
|
686
|
+
port,
|
|
687
|
+
method: "GET",
|
|
688
|
+
headers,
|
|
689
|
+
path: resolvedPath,
|
|
690
|
+
body,
|
|
691
|
+
});
|
|
692
|
+
};
|
|
612
693
|
export const serializeAws_restJson1GetRecoveryPointRestoreMetadataCommand = async (input, context) => {
|
|
613
694
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
614
695
|
const headers = {};
|
|
@@ -673,6 +754,7 @@ export const serializeAws_restJson1ListBackupJobsCommand = async (input, context
|
|
|
673
754
|
() => input.ByCompleteBefore !== void 0,
|
|
674
755
|
() => (input.ByCompleteBefore.toISOString().split(".")[0] + "Z").toString(),
|
|
675
756
|
],
|
|
757
|
+
parentJobId: [, input.ByParentJobId],
|
|
676
758
|
});
|
|
677
759
|
let body;
|
|
678
760
|
return new __HttpRequest({
|
|
@@ -817,6 +899,7 @@ export const serializeAws_restJson1ListCopyJobsCommand = async (input, context)
|
|
|
817
899
|
() => input.ByCompleteAfter !== void 0,
|
|
818
900
|
() => (input.ByCompleteAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
819
901
|
],
|
|
902
|
+
parentJobId: [, input.ByParentJobId],
|
|
820
903
|
});
|
|
821
904
|
let body;
|
|
822
905
|
return new __HttpRequest({
|
|
@@ -850,6 +933,26 @@ export const serializeAws_restJson1ListFrameworksCommand = async (input, context
|
|
|
850
933
|
body,
|
|
851
934
|
});
|
|
852
935
|
};
|
|
936
|
+
export const serializeAws_restJson1ListLegalHoldsCommand = async (input, context) => {
|
|
937
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
938
|
+
const headers = {};
|
|
939
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/legal-holds";
|
|
940
|
+
const query = map({
|
|
941
|
+
nextToken: [, input.NextToken],
|
|
942
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
943
|
+
});
|
|
944
|
+
let body;
|
|
945
|
+
return new __HttpRequest({
|
|
946
|
+
protocol,
|
|
947
|
+
hostname,
|
|
948
|
+
port,
|
|
949
|
+
method: "GET",
|
|
950
|
+
headers,
|
|
951
|
+
path: resolvedPath,
|
|
952
|
+
query,
|
|
953
|
+
body,
|
|
954
|
+
});
|
|
955
|
+
};
|
|
853
956
|
export const serializeAws_restJson1ListProtectedResourcesCommand = async (input, context) => {
|
|
854
957
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
855
958
|
const headers = {};
|
|
@@ -890,6 +993,29 @@ export const serializeAws_restJson1ListRecoveryPointsByBackupVaultCommand = asyn
|
|
|
890
993
|
() => input.ByCreatedAfter !== void 0,
|
|
891
994
|
() => (input.ByCreatedAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
892
995
|
],
|
|
996
|
+
parentRecoveryPointArn: [, input.ByParentRecoveryPointArn],
|
|
997
|
+
});
|
|
998
|
+
let body;
|
|
999
|
+
return new __HttpRequest({
|
|
1000
|
+
protocol,
|
|
1001
|
+
hostname,
|
|
1002
|
+
port,
|
|
1003
|
+
method: "GET",
|
|
1004
|
+
headers,
|
|
1005
|
+
path: resolvedPath,
|
|
1006
|
+
query,
|
|
1007
|
+
body,
|
|
1008
|
+
});
|
|
1009
|
+
};
|
|
1010
|
+
export const serializeAws_restJson1ListRecoveryPointsByLegalHoldCommand = async (input, context) => {
|
|
1011
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1012
|
+
const headers = {};
|
|
1013
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1014
|
+
"/legal-holds/{LegalHoldId}/recovery-points";
|
|
1015
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "LegalHoldId", () => input.LegalHoldId, "{LegalHoldId}", false);
|
|
1016
|
+
const query = map({
|
|
1017
|
+
nextToken: [, input.NextToken],
|
|
1018
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
893
1019
|
});
|
|
894
1020
|
let body;
|
|
895
1021
|
return new __HttpRequest({
|
|
@@ -1408,6 +1534,48 @@ export const serializeAws_restJson1UpdateReportPlanCommand = async (input, conte
|
|
|
1408
1534
|
body,
|
|
1409
1535
|
});
|
|
1410
1536
|
};
|
|
1537
|
+
export const deserializeAws_restJson1CancelLegalHoldCommand = async (output, context) => {
|
|
1538
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1539
|
+
return deserializeAws_restJson1CancelLegalHoldCommandError(output, context);
|
|
1540
|
+
}
|
|
1541
|
+
const contents = map({
|
|
1542
|
+
$metadata: deserializeMetadata(output),
|
|
1543
|
+
});
|
|
1544
|
+
await collectBody(output.body, context);
|
|
1545
|
+
return contents;
|
|
1546
|
+
};
|
|
1547
|
+
const deserializeAws_restJson1CancelLegalHoldCommandError = async (output, context) => {
|
|
1548
|
+
const parsedOutput = {
|
|
1549
|
+
...output,
|
|
1550
|
+
body: await parseErrorBody(output.body, context),
|
|
1551
|
+
};
|
|
1552
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1553
|
+
switch (errorCode) {
|
|
1554
|
+
case "InvalidParameterValueException":
|
|
1555
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
1556
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
1557
|
+
case "InvalidResourceStateException":
|
|
1558
|
+
case "com.amazonaws.backup#InvalidResourceStateException":
|
|
1559
|
+
throw await deserializeAws_restJson1InvalidResourceStateExceptionResponse(parsedOutput, context);
|
|
1560
|
+
case "MissingParameterValueException":
|
|
1561
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
1562
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
1563
|
+
case "ResourceNotFoundException":
|
|
1564
|
+
case "com.amazonaws.backup#ResourceNotFoundException":
|
|
1565
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1566
|
+
case "ServiceUnavailableException":
|
|
1567
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
1568
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1569
|
+
default:
|
|
1570
|
+
const parsedBody = parsedOutput.body;
|
|
1571
|
+
throwDefaultError({
|
|
1572
|
+
output,
|
|
1573
|
+
parsedBody,
|
|
1574
|
+
exceptionCtor: __BaseException,
|
|
1575
|
+
errorCode,
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
};
|
|
1411
1579
|
export const deserializeAws_restJson1CreateBackupPlanCommand = async (output, context) => {
|
|
1412
1580
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1413
1581
|
return deserializeAws_restJson1CreateBackupPlanCommandError(output, context);
|
|
@@ -1615,6 +1783,66 @@ const deserializeAws_restJson1CreateFrameworkCommandError = async (output, conte
|
|
|
1615
1783
|
});
|
|
1616
1784
|
}
|
|
1617
1785
|
};
|
|
1786
|
+
export const deserializeAws_restJson1CreateLegalHoldCommand = async (output, context) => {
|
|
1787
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1788
|
+
return deserializeAws_restJson1CreateLegalHoldCommandError(output, context);
|
|
1789
|
+
}
|
|
1790
|
+
const contents = map({
|
|
1791
|
+
$metadata: deserializeMetadata(output),
|
|
1792
|
+
});
|
|
1793
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1794
|
+
if (data.CreationDate != null) {
|
|
1795
|
+
contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate)));
|
|
1796
|
+
}
|
|
1797
|
+
if (data.Description != null) {
|
|
1798
|
+
contents.Description = __expectString(data.Description);
|
|
1799
|
+
}
|
|
1800
|
+
if (data.LegalHoldArn != null) {
|
|
1801
|
+
contents.LegalHoldArn = __expectString(data.LegalHoldArn);
|
|
1802
|
+
}
|
|
1803
|
+
if (data.LegalHoldId != null) {
|
|
1804
|
+
contents.LegalHoldId = __expectString(data.LegalHoldId);
|
|
1805
|
+
}
|
|
1806
|
+
if (data.RecoveryPointSelection != null) {
|
|
1807
|
+
contents.RecoveryPointSelection = deserializeAws_restJson1RecoveryPointSelection(data.RecoveryPointSelection, context);
|
|
1808
|
+
}
|
|
1809
|
+
if (data.Status != null) {
|
|
1810
|
+
contents.Status = __expectString(data.Status);
|
|
1811
|
+
}
|
|
1812
|
+
if (data.Title != null) {
|
|
1813
|
+
contents.Title = __expectString(data.Title);
|
|
1814
|
+
}
|
|
1815
|
+
return contents;
|
|
1816
|
+
};
|
|
1817
|
+
const deserializeAws_restJson1CreateLegalHoldCommandError = async (output, context) => {
|
|
1818
|
+
const parsedOutput = {
|
|
1819
|
+
...output,
|
|
1820
|
+
body: await parseErrorBody(output.body, context),
|
|
1821
|
+
};
|
|
1822
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1823
|
+
switch (errorCode) {
|
|
1824
|
+
case "InvalidParameterValueException":
|
|
1825
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
1826
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
1827
|
+
case "LimitExceededException":
|
|
1828
|
+
case "com.amazonaws.backup#LimitExceededException":
|
|
1829
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1830
|
+
case "MissingParameterValueException":
|
|
1831
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
1832
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
1833
|
+
case "ServiceUnavailableException":
|
|
1834
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
1835
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1836
|
+
default:
|
|
1837
|
+
const parsedBody = parsedOutput.body;
|
|
1838
|
+
throwDefaultError({
|
|
1839
|
+
output,
|
|
1840
|
+
parsedBody,
|
|
1841
|
+
exceptionCtor: __BaseException,
|
|
1842
|
+
errorCode,
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
};
|
|
1618
1846
|
export const deserializeAws_restJson1CreateReportPlanCommand = async (output, context) => {
|
|
1619
1847
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1620
1848
|
return deserializeAws_restJson1CreateReportPlanCommandError(output, context);
|
|
@@ -2082,6 +2310,9 @@ export const deserializeAws_restJson1DescribeBackupJobCommand = async (output, c
|
|
|
2082
2310
|
if (data.BytesTransferred != null) {
|
|
2083
2311
|
contents.BytesTransferred = __expectLong(data.BytesTransferred);
|
|
2084
2312
|
}
|
|
2313
|
+
if (data.ChildJobsInState != null) {
|
|
2314
|
+
contents.ChildJobsInState = deserializeAws_restJson1BackupJobChildJobsInState(data.ChildJobsInState, context);
|
|
2315
|
+
}
|
|
2085
2316
|
if (data.CompletionDate != null) {
|
|
2086
2317
|
contents.CompletionDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CompletionDate)));
|
|
2087
2318
|
}
|
|
@@ -2097,6 +2328,15 @@ export const deserializeAws_restJson1DescribeBackupJobCommand = async (output, c
|
|
|
2097
2328
|
if (data.IamRoleArn != null) {
|
|
2098
2329
|
contents.IamRoleArn = __expectString(data.IamRoleArn);
|
|
2099
2330
|
}
|
|
2331
|
+
if (data.IsParent != null) {
|
|
2332
|
+
contents.IsParent = __expectBoolean(data.IsParent);
|
|
2333
|
+
}
|
|
2334
|
+
if (data.NumberOfChildJobs != null) {
|
|
2335
|
+
contents.NumberOfChildJobs = __expectLong(data.NumberOfChildJobs);
|
|
2336
|
+
}
|
|
2337
|
+
if (data.ParentJobId != null) {
|
|
2338
|
+
contents.ParentJobId = __expectString(data.ParentJobId);
|
|
2339
|
+
}
|
|
2100
2340
|
if (data.PercentDone != null) {
|
|
2101
2341
|
contents.PercentDone = __expectString(data.PercentDone);
|
|
2102
2342
|
}
|
|
@@ -2436,6 +2676,9 @@ export const deserializeAws_restJson1DescribeRecoveryPointCommand = async (outpu
|
|
|
2436
2676
|
if (data.CompletionDate != null) {
|
|
2437
2677
|
contents.CompletionDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CompletionDate)));
|
|
2438
2678
|
}
|
|
2679
|
+
if (data.CompositeMemberIdentifier != null) {
|
|
2680
|
+
contents.CompositeMemberIdentifier = __expectString(data.CompositeMemberIdentifier);
|
|
2681
|
+
}
|
|
2439
2682
|
if (data.CreatedBy != null) {
|
|
2440
2683
|
contents.CreatedBy = deserializeAws_restJson1RecoveryPointCreator(data.CreatedBy, context);
|
|
2441
2684
|
}
|
|
@@ -2451,12 +2694,18 @@ export const deserializeAws_restJson1DescribeRecoveryPointCommand = async (outpu
|
|
|
2451
2694
|
if (data.IsEncrypted != null) {
|
|
2452
2695
|
contents.IsEncrypted = __expectBoolean(data.IsEncrypted);
|
|
2453
2696
|
}
|
|
2697
|
+
if (data.IsParent != null) {
|
|
2698
|
+
contents.IsParent = __expectBoolean(data.IsParent);
|
|
2699
|
+
}
|
|
2454
2700
|
if (data.LastRestoreTime != null) {
|
|
2455
2701
|
contents.LastRestoreTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastRestoreTime)));
|
|
2456
2702
|
}
|
|
2457
2703
|
if (data.Lifecycle != null) {
|
|
2458
2704
|
contents.Lifecycle = deserializeAws_restJson1Lifecycle(data.Lifecycle, context);
|
|
2459
2705
|
}
|
|
2706
|
+
if (data.ParentRecoveryPointArn != null) {
|
|
2707
|
+
contents.ParentRecoveryPointArn = __expectString(data.ParentRecoveryPointArn);
|
|
2708
|
+
}
|
|
2460
2709
|
if (data.RecoveryPointArn != null) {
|
|
2461
2710
|
contents.RecoveryPointArn = __expectString(data.RecoveryPointArn);
|
|
2462
2711
|
}
|
|
@@ -2752,6 +3001,48 @@ const deserializeAws_restJson1DisassociateRecoveryPointCommandError = async (out
|
|
|
2752
3001
|
});
|
|
2753
3002
|
}
|
|
2754
3003
|
};
|
|
3004
|
+
export const deserializeAws_restJson1DisassociateRecoveryPointFromParentCommand = async (output, context) => {
|
|
3005
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3006
|
+
return deserializeAws_restJson1DisassociateRecoveryPointFromParentCommandError(output, context);
|
|
3007
|
+
}
|
|
3008
|
+
const contents = map({
|
|
3009
|
+
$metadata: deserializeMetadata(output),
|
|
3010
|
+
});
|
|
3011
|
+
await collectBody(output.body, context);
|
|
3012
|
+
return contents;
|
|
3013
|
+
};
|
|
3014
|
+
const deserializeAws_restJson1DisassociateRecoveryPointFromParentCommandError = async (output, context) => {
|
|
3015
|
+
const parsedOutput = {
|
|
3016
|
+
...output,
|
|
3017
|
+
body: await parseErrorBody(output.body, context),
|
|
3018
|
+
};
|
|
3019
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3020
|
+
switch (errorCode) {
|
|
3021
|
+
case "InvalidParameterValueException":
|
|
3022
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
3023
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
3024
|
+
case "InvalidRequestException":
|
|
3025
|
+
case "com.amazonaws.backup#InvalidRequestException":
|
|
3026
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
3027
|
+
case "MissingParameterValueException":
|
|
3028
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
3029
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
3030
|
+
case "ResourceNotFoundException":
|
|
3031
|
+
case "com.amazonaws.backup#ResourceNotFoundException":
|
|
3032
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3033
|
+
case "ServiceUnavailableException":
|
|
3034
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
3035
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3036
|
+
default:
|
|
3037
|
+
const parsedBody = parsedOutput.body;
|
|
3038
|
+
throwDefaultError({
|
|
3039
|
+
output,
|
|
3040
|
+
parsedBody,
|
|
3041
|
+
exceptionCtor: __BaseException,
|
|
3042
|
+
errorCode,
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
};
|
|
2755
3046
|
export const deserializeAws_restJson1ExportBackupPlanTemplateCommand = async (output, context) => {
|
|
2756
3047
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2757
3048
|
return deserializeAws_restJson1ExportBackupPlanTemplateCommandError(output, context);
|
|
@@ -3100,6 +3391,75 @@ const deserializeAws_restJson1GetBackupVaultNotificationsCommandError = async (o
|
|
|
3100
3391
|
});
|
|
3101
3392
|
}
|
|
3102
3393
|
};
|
|
3394
|
+
export const deserializeAws_restJson1GetLegalHoldCommand = async (output, context) => {
|
|
3395
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3396
|
+
return deserializeAws_restJson1GetLegalHoldCommandError(output, context);
|
|
3397
|
+
}
|
|
3398
|
+
const contents = map({
|
|
3399
|
+
$metadata: deserializeMetadata(output),
|
|
3400
|
+
});
|
|
3401
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3402
|
+
if (data.CancelDescription != null) {
|
|
3403
|
+
contents.CancelDescription = __expectString(data.CancelDescription);
|
|
3404
|
+
}
|
|
3405
|
+
if (data.CancellationDate != null) {
|
|
3406
|
+
contents.CancellationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CancellationDate)));
|
|
3407
|
+
}
|
|
3408
|
+
if (data.CreationDate != null) {
|
|
3409
|
+
contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate)));
|
|
3410
|
+
}
|
|
3411
|
+
if (data.Description != null) {
|
|
3412
|
+
contents.Description = __expectString(data.Description);
|
|
3413
|
+
}
|
|
3414
|
+
if (data.LegalHoldArn != null) {
|
|
3415
|
+
contents.LegalHoldArn = __expectString(data.LegalHoldArn);
|
|
3416
|
+
}
|
|
3417
|
+
if (data.LegalHoldId != null) {
|
|
3418
|
+
contents.LegalHoldId = __expectString(data.LegalHoldId);
|
|
3419
|
+
}
|
|
3420
|
+
if (data.RecoveryPointSelection != null) {
|
|
3421
|
+
contents.RecoveryPointSelection = deserializeAws_restJson1RecoveryPointSelection(data.RecoveryPointSelection, context);
|
|
3422
|
+
}
|
|
3423
|
+
if (data.RetainRecordUntil != null) {
|
|
3424
|
+
contents.RetainRecordUntil = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.RetainRecordUntil)));
|
|
3425
|
+
}
|
|
3426
|
+
if (data.Status != null) {
|
|
3427
|
+
contents.Status = __expectString(data.Status);
|
|
3428
|
+
}
|
|
3429
|
+
if (data.Title != null) {
|
|
3430
|
+
contents.Title = __expectString(data.Title);
|
|
3431
|
+
}
|
|
3432
|
+
return contents;
|
|
3433
|
+
};
|
|
3434
|
+
const deserializeAws_restJson1GetLegalHoldCommandError = async (output, context) => {
|
|
3435
|
+
const parsedOutput = {
|
|
3436
|
+
...output,
|
|
3437
|
+
body: await parseErrorBody(output.body, context),
|
|
3438
|
+
};
|
|
3439
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3440
|
+
switch (errorCode) {
|
|
3441
|
+
case "InvalidParameterValueException":
|
|
3442
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
3443
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
3444
|
+
case "MissingParameterValueException":
|
|
3445
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
3446
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
3447
|
+
case "ResourceNotFoundException":
|
|
3448
|
+
case "com.amazonaws.backup#ResourceNotFoundException":
|
|
3449
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3450
|
+
case "ServiceUnavailableException":
|
|
3451
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
3452
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3453
|
+
default:
|
|
3454
|
+
const parsedBody = parsedOutput.body;
|
|
3455
|
+
throwDefaultError({
|
|
3456
|
+
output,
|
|
3457
|
+
parsedBody,
|
|
3458
|
+
exceptionCtor: __BaseException,
|
|
3459
|
+
errorCode,
|
|
3460
|
+
});
|
|
3461
|
+
}
|
|
3462
|
+
};
|
|
3103
3463
|
export const deserializeAws_restJson1GetRecoveryPointRestoreMetadataCommand = async (output, context) => {
|
|
3104
3464
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3105
3465
|
return deserializeAws_restJson1GetRecoveryPointRestoreMetadataCommandError(output, context);
|
|
@@ -3523,6 +3883,45 @@ const deserializeAws_restJson1ListFrameworksCommandError = async (output, contex
|
|
|
3523
3883
|
});
|
|
3524
3884
|
}
|
|
3525
3885
|
};
|
|
3886
|
+
export const deserializeAws_restJson1ListLegalHoldsCommand = async (output, context) => {
|
|
3887
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3888
|
+
return deserializeAws_restJson1ListLegalHoldsCommandError(output, context);
|
|
3889
|
+
}
|
|
3890
|
+
const contents = map({
|
|
3891
|
+
$metadata: deserializeMetadata(output),
|
|
3892
|
+
});
|
|
3893
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3894
|
+
if (data.LegalHolds != null) {
|
|
3895
|
+
contents.LegalHolds = deserializeAws_restJson1LegalHoldsList(data.LegalHolds, context);
|
|
3896
|
+
}
|
|
3897
|
+
if (data.NextToken != null) {
|
|
3898
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
3899
|
+
}
|
|
3900
|
+
return contents;
|
|
3901
|
+
};
|
|
3902
|
+
const deserializeAws_restJson1ListLegalHoldsCommandError = async (output, context) => {
|
|
3903
|
+
const parsedOutput = {
|
|
3904
|
+
...output,
|
|
3905
|
+
body: await parseErrorBody(output.body, context),
|
|
3906
|
+
};
|
|
3907
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3908
|
+
switch (errorCode) {
|
|
3909
|
+
case "InvalidParameterValueException":
|
|
3910
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
3911
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
3912
|
+
case "ServiceUnavailableException":
|
|
3913
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
3914
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3915
|
+
default:
|
|
3916
|
+
const parsedBody = parsedOutput.body;
|
|
3917
|
+
throwDefaultError({
|
|
3918
|
+
output,
|
|
3919
|
+
parsedBody,
|
|
3920
|
+
exceptionCtor: __BaseException,
|
|
3921
|
+
errorCode,
|
|
3922
|
+
});
|
|
3923
|
+
}
|
|
3924
|
+
};
|
|
3526
3925
|
export const deserializeAws_restJson1ListProtectedResourcesCommand = async (output, context) => {
|
|
3527
3926
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3528
3927
|
return deserializeAws_restJson1ListProtectedResourcesCommandError(output, context);
|
|
@@ -3607,6 +4006,48 @@ const deserializeAws_restJson1ListRecoveryPointsByBackupVaultCommandError = asyn
|
|
|
3607
4006
|
});
|
|
3608
4007
|
}
|
|
3609
4008
|
};
|
|
4009
|
+
export const deserializeAws_restJson1ListRecoveryPointsByLegalHoldCommand = async (output, context) => {
|
|
4010
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4011
|
+
return deserializeAws_restJson1ListRecoveryPointsByLegalHoldCommandError(output, context);
|
|
4012
|
+
}
|
|
4013
|
+
const contents = map({
|
|
4014
|
+
$metadata: deserializeMetadata(output),
|
|
4015
|
+
});
|
|
4016
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4017
|
+
if (data.NextToken != null) {
|
|
4018
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
4019
|
+
}
|
|
4020
|
+
if (data.RecoveryPoints != null) {
|
|
4021
|
+
contents.RecoveryPoints = deserializeAws_restJson1RecoveryPointsList(data.RecoveryPoints, context);
|
|
4022
|
+
}
|
|
4023
|
+
return contents;
|
|
4024
|
+
};
|
|
4025
|
+
const deserializeAws_restJson1ListRecoveryPointsByLegalHoldCommandError = async (output, context) => {
|
|
4026
|
+
const parsedOutput = {
|
|
4027
|
+
...output,
|
|
4028
|
+
body: await parseErrorBody(output.body, context),
|
|
4029
|
+
};
|
|
4030
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4031
|
+
switch (errorCode) {
|
|
4032
|
+
case "InvalidParameterValueException":
|
|
4033
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
4034
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
4035
|
+
case "MissingParameterValueException":
|
|
4036
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
4037
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
4038
|
+
case "ServiceUnavailableException":
|
|
4039
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
4040
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4041
|
+
default:
|
|
4042
|
+
const parsedBody = parsedOutput.body;
|
|
4043
|
+
throwDefaultError({
|
|
4044
|
+
output,
|
|
4045
|
+
parsedBody,
|
|
4046
|
+
exceptionCtor: __BaseException,
|
|
4047
|
+
errorCode,
|
|
4048
|
+
});
|
|
4049
|
+
}
|
|
4050
|
+
};
|
|
3610
4051
|
export const deserializeAws_restJson1ListRecoveryPointsByResourceCommand = async (output, context) => {
|
|
3611
4052
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3612
4053
|
return deserializeAws_restJson1ListRecoveryPointsByResourceCommandError(output, context);
|
|
@@ -3678,6 +4119,9 @@ const deserializeAws_restJson1ListReportJobsCommandError = async (output, contex
|
|
|
3678
4119
|
case "InvalidParameterValueException":
|
|
3679
4120
|
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
3680
4121
|
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
4122
|
+
case "ResourceNotFoundException":
|
|
4123
|
+
case "com.amazonaws.backup#ResourceNotFoundException":
|
|
4124
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3681
4125
|
case "ServiceUnavailableException":
|
|
3682
4126
|
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
3683
4127
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
@@ -3954,6 +4398,9 @@ export const deserializeAws_restJson1StartBackupJobCommand = async (output, cont
|
|
|
3954
4398
|
if (data.CreationDate != null) {
|
|
3955
4399
|
contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate)));
|
|
3956
4400
|
}
|
|
4401
|
+
if (data.IsParent != null) {
|
|
4402
|
+
contents.IsParent = __expectBoolean(data.IsParent);
|
|
4403
|
+
}
|
|
3957
4404
|
if (data.RecoveryPointArn != null) {
|
|
3958
4405
|
contents.RecoveryPointArn = __expectString(data.RecoveryPointArn);
|
|
3959
4406
|
}
|
|
@@ -4008,6 +4455,9 @@ export const deserializeAws_restJson1StartCopyJobCommand = async (output, contex
|
|
|
4008
4455
|
if (data.CreationDate != null) {
|
|
4009
4456
|
contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate)));
|
|
4010
4457
|
}
|
|
4458
|
+
if (data.IsParent != null) {
|
|
4459
|
+
contents.IsParent = __expectBoolean(data.IsParent);
|
|
4460
|
+
}
|
|
4011
4461
|
return contents;
|
|
4012
4462
|
};
|
|
4013
4463
|
const deserializeAws_restJson1StartCopyJobCommandError = async (output, context) => {
|
|
@@ -4914,6 +5364,12 @@ const serializeAws_restJson1CopyActions = (input, context) => {
|
|
|
4914
5364
|
return serializeAws_restJson1CopyAction(entry, context);
|
|
4915
5365
|
});
|
|
4916
5366
|
};
|
|
5367
|
+
const serializeAws_restJson1DateRange = (input, context) => {
|
|
5368
|
+
return {
|
|
5369
|
+
...(input.FromDate != null && { FromDate: Math.round(input.FromDate.getTime() / 1000) }),
|
|
5370
|
+
...(input.ToDate != null && { ToDate: Math.round(input.ToDate.getTime() / 1000) }),
|
|
5371
|
+
};
|
|
5372
|
+
};
|
|
4917
5373
|
const serializeAws_restJson1FormatList = (input, context) => {
|
|
4918
5374
|
return input
|
|
4919
5375
|
.filter((e) => e != null)
|
|
@@ -4970,6 +5426,15 @@ const serializeAws_restJson1Metadata = (input, context) => {
|
|
|
4970
5426
|
return acc;
|
|
4971
5427
|
}, {});
|
|
4972
5428
|
};
|
|
5429
|
+
const serializeAws_restJson1RecoveryPointSelection = (input, context) => {
|
|
5430
|
+
return {
|
|
5431
|
+
...(input.DateRange != null && { DateRange: serializeAws_restJson1DateRange(input.DateRange, context) }),
|
|
5432
|
+
...(input.ResourceIdentifiers != null && {
|
|
5433
|
+
ResourceIdentifiers: serializeAws_restJson1ResourceIdentifiers(input.ResourceIdentifiers, context),
|
|
5434
|
+
}),
|
|
5435
|
+
...(input.VaultNames != null && { VaultNames: serializeAws_restJson1VaultNames(input.VaultNames, context) }),
|
|
5436
|
+
};
|
|
5437
|
+
};
|
|
4973
5438
|
const serializeAws_restJson1ReportDeliveryChannel = (input, context) => {
|
|
4974
5439
|
return {
|
|
4975
5440
|
...(input.Formats != null && { Formats: serializeAws_restJson1FormatList(input.Formats, context) }),
|
|
@@ -4979,10 +5444,15 @@ const serializeAws_restJson1ReportDeliveryChannel = (input, context) => {
|
|
|
4979
5444
|
};
|
|
4980
5445
|
const serializeAws_restJson1ReportSetting = (input, context) => {
|
|
4981
5446
|
return {
|
|
5447
|
+
...(input.Accounts != null && { Accounts: serializeAws_restJson1stringList(input.Accounts, context) }),
|
|
4982
5448
|
...(input.FrameworkArns != null && {
|
|
4983
5449
|
FrameworkArns: serializeAws_restJson1stringList(input.FrameworkArns, context),
|
|
4984
5450
|
}),
|
|
4985
5451
|
...(input.NumberOfFrameworks != null && { NumberOfFrameworks: input.NumberOfFrameworks }),
|
|
5452
|
+
...(input.OrganizationUnits != null && {
|
|
5453
|
+
OrganizationUnits: serializeAws_restJson1stringList(input.OrganizationUnits, context),
|
|
5454
|
+
}),
|
|
5455
|
+
...(input.Regions != null && { Regions: serializeAws_restJson1stringList(input.Regions, context) }),
|
|
4986
5456
|
...(input.ReportTemplate != null && { ReportTemplate: input.ReportTemplate }),
|
|
4987
5457
|
};
|
|
4988
5458
|
};
|
|
@@ -4993,6 +5463,13 @@ const serializeAws_restJson1ResourceArns = (input, context) => {
|
|
|
4993
5463
|
return entry;
|
|
4994
5464
|
});
|
|
4995
5465
|
};
|
|
5466
|
+
const serializeAws_restJson1ResourceIdentifiers = (input, context) => {
|
|
5467
|
+
return input
|
|
5468
|
+
.filter((e) => e != null)
|
|
5469
|
+
.map((entry) => {
|
|
5470
|
+
return entry;
|
|
5471
|
+
});
|
|
5472
|
+
};
|
|
4996
5473
|
const serializeAws_restJson1ResourceTypeList = (input, context) => {
|
|
4997
5474
|
return input
|
|
4998
5475
|
.filter((e) => e != null)
|
|
@@ -5050,6 +5527,13 @@ const serializeAws_restJson1Tags = (input, context) => {
|
|
|
5050
5527
|
return acc;
|
|
5051
5528
|
}, {});
|
|
5052
5529
|
};
|
|
5530
|
+
const serializeAws_restJson1VaultNames = (input, context) => {
|
|
5531
|
+
return input
|
|
5532
|
+
.filter((e) => e != null)
|
|
5533
|
+
.map((entry) => {
|
|
5534
|
+
return entry;
|
|
5535
|
+
});
|
|
5536
|
+
};
|
|
5053
5537
|
const deserializeAws_restJson1AdvancedBackupSetting = (output, context) => {
|
|
5054
5538
|
return {
|
|
5055
5539
|
BackupOptions: output.BackupOptions != null ? deserializeAws_restJson1BackupOptions(output.BackupOptions, context) : undefined,
|
|
@@ -5088,6 +5572,8 @@ const deserializeAws_restJson1BackupJob = (output, context) => {
|
|
|
5088
5572
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpectedCompletionDate)))
|
|
5089
5573
|
: undefined,
|
|
5090
5574
|
IamRoleArn: __expectString(output.IamRoleArn),
|
|
5575
|
+
IsParent: __expectBoolean(output.IsParent),
|
|
5576
|
+
ParentJobId: __expectString(output.ParentJobId),
|
|
5091
5577
|
PercentDone: __expectString(output.PercentDone),
|
|
5092
5578
|
RecoveryPointArn: __expectString(output.RecoveryPointArn),
|
|
5093
5579
|
ResourceArn: __expectString(output.ResourceArn),
|
|
@@ -5097,6 +5583,15 @@ const deserializeAws_restJson1BackupJob = (output, context) => {
|
|
|
5097
5583
|
StatusMessage: __expectString(output.StatusMessage),
|
|
5098
5584
|
};
|
|
5099
5585
|
};
|
|
5586
|
+
const deserializeAws_restJson1BackupJobChildJobsInState = (output, context) => {
|
|
5587
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
5588
|
+
if (value === null) {
|
|
5589
|
+
return acc;
|
|
5590
|
+
}
|
|
5591
|
+
acc[key] = __expectLong(value);
|
|
5592
|
+
return acc;
|
|
5593
|
+
}, {});
|
|
5594
|
+
};
|
|
5100
5595
|
const deserializeAws_restJson1BackupJobsList = (output, context) => {
|
|
5101
5596
|
const retVal = (output || [])
|
|
5102
5597
|
.filter((e) => e != null)
|
|
@@ -5388,9 +5883,13 @@ const deserializeAws_restJson1CopyJob = (output, context) => {
|
|
|
5388
5883
|
return {
|
|
5389
5884
|
AccountId: __expectString(output.AccountId),
|
|
5390
5885
|
BackupSizeInBytes: __expectLong(output.BackupSizeInBytes),
|
|
5886
|
+
ChildJobsInState: output.ChildJobsInState != null
|
|
5887
|
+
? deserializeAws_restJson1CopyJobChildJobsInState(output.ChildJobsInState, context)
|
|
5888
|
+
: undefined,
|
|
5391
5889
|
CompletionDate: output.CompletionDate != null
|
|
5392
5890
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionDate)))
|
|
5393
5891
|
: undefined,
|
|
5892
|
+
CompositeMemberIdentifier: __expectString(output.CompositeMemberIdentifier),
|
|
5394
5893
|
CopyJobId: __expectString(output.CopyJobId),
|
|
5395
5894
|
CreatedBy: output.CreatedBy != null ? deserializeAws_restJson1RecoveryPointCreator(output.CreatedBy, context) : undefined,
|
|
5396
5895
|
CreationDate: output.CreationDate != null
|
|
@@ -5399,6 +5898,9 @@ const deserializeAws_restJson1CopyJob = (output, context) => {
|
|
|
5399
5898
|
DestinationBackupVaultArn: __expectString(output.DestinationBackupVaultArn),
|
|
5400
5899
|
DestinationRecoveryPointArn: __expectString(output.DestinationRecoveryPointArn),
|
|
5401
5900
|
IamRoleArn: __expectString(output.IamRoleArn),
|
|
5901
|
+
IsParent: __expectBoolean(output.IsParent),
|
|
5902
|
+
NumberOfChildJobs: __expectLong(output.NumberOfChildJobs),
|
|
5903
|
+
ParentJobId: __expectString(output.ParentJobId),
|
|
5402
5904
|
ResourceArn: __expectString(output.ResourceArn),
|
|
5403
5905
|
ResourceType: __expectString(output.ResourceType),
|
|
5404
5906
|
SourceBackupVaultArn: __expectString(output.SourceBackupVaultArn),
|
|
@@ -5407,6 +5909,15 @@ const deserializeAws_restJson1CopyJob = (output, context) => {
|
|
|
5407
5909
|
StatusMessage: __expectString(output.StatusMessage),
|
|
5408
5910
|
};
|
|
5409
5911
|
};
|
|
5912
|
+
const deserializeAws_restJson1CopyJobChildJobsInState = (output, context) => {
|
|
5913
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
5914
|
+
if (value === null) {
|
|
5915
|
+
return acc;
|
|
5916
|
+
}
|
|
5917
|
+
acc[key] = __expectLong(value);
|
|
5918
|
+
return acc;
|
|
5919
|
+
}, {});
|
|
5920
|
+
};
|
|
5410
5921
|
const deserializeAws_restJson1CopyJobsList = (output, context) => {
|
|
5411
5922
|
const retVal = (output || [])
|
|
5412
5923
|
.filter((e) => e != null)
|
|
@@ -5418,6 +5929,12 @@ const deserializeAws_restJson1CopyJobsList = (output, context) => {
|
|
|
5418
5929
|
});
|
|
5419
5930
|
return retVal;
|
|
5420
5931
|
};
|
|
5932
|
+
const deserializeAws_restJson1DateRange = (output, context) => {
|
|
5933
|
+
return {
|
|
5934
|
+
FromDate: output.FromDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FromDate))) : undefined,
|
|
5935
|
+
ToDate: output.ToDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ToDate))) : undefined,
|
|
5936
|
+
};
|
|
5937
|
+
};
|
|
5421
5938
|
const deserializeAws_restJson1FormatList = (output, context) => {
|
|
5422
5939
|
const retVal = (output || [])
|
|
5423
5940
|
.filter((e) => e != null)
|
|
@@ -5481,6 +5998,32 @@ const deserializeAws_restJson1GlobalSettings = (output, context) => {
|
|
|
5481
5998
|
return acc;
|
|
5482
5999
|
}, {});
|
|
5483
6000
|
};
|
|
6001
|
+
const deserializeAws_restJson1LegalHold = (output, context) => {
|
|
6002
|
+
return {
|
|
6003
|
+
CancellationDate: output.CancellationDate != null
|
|
6004
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CancellationDate)))
|
|
6005
|
+
: undefined,
|
|
6006
|
+
CreationDate: output.CreationDate != null
|
|
6007
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
|
|
6008
|
+
: undefined,
|
|
6009
|
+
Description: __expectString(output.Description),
|
|
6010
|
+
LegalHoldArn: __expectString(output.LegalHoldArn),
|
|
6011
|
+
LegalHoldId: __expectString(output.LegalHoldId),
|
|
6012
|
+
Status: __expectString(output.Status),
|
|
6013
|
+
Title: __expectString(output.Title),
|
|
6014
|
+
};
|
|
6015
|
+
};
|
|
6016
|
+
const deserializeAws_restJson1LegalHoldsList = (output, context) => {
|
|
6017
|
+
const retVal = (output || [])
|
|
6018
|
+
.filter((e) => e != null)
|
|
6019
|
+
.map((entry) => {
|
|
6020
|
+
if (entry === null) {
|
|
6021
|
+
return null;
|
|
6022
|
+
}
|
|
6023
|
+
return deserializeAws_restJson1LegalHold(entry, context);
|
|
6024
|
+
});
|
|
6025
|
+
return retVal;
|
|
6026
|
+
};
|
|
5484
6027
|
const deserializeAws_restJson1Lifecycle = (output, context) => {
|
|
5485
6028
|
return {
|
|
5486
6029
|
DeleteAfterDays: __expectLong(output.DeleteAfterDays),
|
|
@@ -5538,6 +6081,7 @@ const deserializeAws_restJson1RecoveryPointByBackupVault = (output, context) =>
|
|
|
5538
6081
|
CompletionDate: output.CompletionDate != null
|
|
5539
6082
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionDate)))
|
|
5540
6083
|
: undefined,
|
|
6084
|
+
CompositeMemberIdentifier: __expectString(output.CompositeMemberIdentifier),
|
|
5541
6085
|
CreatedBy: output.CreatedBy != null ? deserializeAws_restJson1RecoveryPointCreator(output.CreatedBy, context) : undefined,
|
|
5542
6086
|
CreationDate: output.CreationDate != null
|
|
5543
6087
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
|
|
@@ -5545,10 +6089,12 @@ const deserializeAws_restJson1RecoveryPointByBackupVault = (output, context) =>
|
|
|
5545
6089
|
EncryptionKeyArn: __expectString(output.EncryptionKeyArn),
|
|
5546
6090
|
IamRoleArn: __expectString(output.IamRoleArn),
|
|
5547
6091
|
IsEncrypted: __expectBoolean(output.IsEncrypted),
|
|
6092
|
+
IsParent: __expectBoolean(output.IsParent),
|
|
5548
6093
|
LastRestoreTime: output.LastRestoreTime != null
|
|
5549
6094
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRestoreTime)))
|
|
5550
6095
|
: undefined,
|
|
5551
6096
|
Lifecycle: output.Lifecycle != null ? deserializeAws_restJson1Lifecycle(output.Lifecycle, context) : undefined,
|
|
6097
|
+
ParentRecoveryPointArn: __expectString(output.ParentRecoveryPointArn),
|
|
5552
6098
|
RecoveryPointArn: __expectString(output.RecoveryPointArn),
|
|
5553
6099
|
ResourceArn: __expectString(output.ResourceArn),
|
|
5554
6100
|
ResourceType: __expectString(output.ResourceType),
|
|
@@ -5576,6 +6122,8 @@ const deserializeAws_restJson1RecoveryPointByResource = (output, context) => {
|
|
|
5576
6122
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
|
|
5577
6123
|
: undefined,
|
|
5578
6124
|
EncryptionKeyArn: __expectString(output.EncryptionKeyArn),
|
|
6125
|
+
IsParent: __expectBoolean(output.IsParent),
|
|
6126
|
+
ParentRecoveryPointArn: __expectString(output.ParentRecoveryPointArn),
|
|
5579
6127
|
RecoveryPointArn: __expectString(output.RecoveryPointArn),
|
|
5580
6128
|
Status: __expectString(output.Status),
|
|
5581
6129
|
StatusMessage: __expectString(output.StatusMessage),
|
|
@@ -5600,6 +6148,31 @@ const deserializeAws_restJson1RecoveryPointCreator = (output, context) => {
|
|
|
5600
6148
|
BackupRuleId: __expectString(output.BackupRuleId),
|
|
5601
6149
|
};
|
|
5602
6150
|
};
|
|
6151
|
+
const deserializeAws_restJson1RecoveryPointMember = (output, context) => {
|
|
6152
|
+
return {
|
|
6153
|
+
RecoveryPointArn: __expectString(output.RecoveryPointArn),
|
|
6154
|
+
};
|
|
6155
|
+
};
|
|
6156
|
+
const deserializeAws_restJson1RecoveryPointSelection = (output, context) => {
|
|
6157
|
+
return {
|
|
6158
|
+
DateRange: output.DateRange != null ? deserializeAws_restJson1DateRange(output.DateRange, context) : undefined,
|
|
6159
|
+
ResourceIdentifiers: output.ResourceIdentifiers != null
|
|
6160
|
+
? deserializeAws_restJson1ResourceIdentifiers(output.ResourceIdentifiers, context)
|
|
6161
|
+
: undefined,
|
|
6162
|
+
VaultNames: output.VaultNames != null ? deserializeAws_restJson1VaultNames(output.VaultNames, context) : undefined,
|
|
6163
|
+
};
|
|
6164
|
+
};
|
|
6165
|
+
const deserializeAws_restJson1RecoveryPointsList = (output, context) => {
|
|
6166
|
+
const retVal = (output || [])
|
|
6167
|
+
.filter((e) => e != null)
|
|
6168
|
+
.map((entry) => {
|
|
6169
|
+
if (entry === null) {
|
|
6170
|
+
return null;
|
|
6171
|
+
}
|
|
6172
|
+
return deserializeAws_restJson1RecoveryPointMember(entry, context);
|
|
6173
|
+
});
|
|
6174
|
+
return retVal;
|
|
6175
|
+
};
|
|
5603
6176
|
const deserializeAws_restJson1ReportDeliveryChannel = (output, context) => {
|
|
5604
6177
|
return {
|
|
5605
6178
|
Formats: output.Formats != null ? deserializeAws_restJson1FormatList(output.Formats, context) : undefined,
|
|
@@ -5676,8 +6249,13 @@ const deserializeAws_restJson1ReportPlanList = (output, context) => {
|
|
|
5676
6249
|
};
|
|
5677
6250
|
const deserializeAws_restJson1ReportSetting = (output, context) => {
|
|
5678
6251
|
return {
|
|
6252
|
+
Accounts: output.Accounts != null ? deserializeAws_restJson1stringList(output.Accounts, context) : undefined,
|
|
5679
6253
|
FrameworkArns: output.FrameworkArns != null ? deserializeAws_restJson1stringList(output.FrameworkArns, context) : undefined,
|
|
5680
6254
|
NumberOfFrameworks: __expectInt32(output.NumberOfFrameworks),
|
|
6255
|
+
OrganizationUnits: output.OrganizationUnits != null
|
|
6256
|
+
? deserializeAws_restJson1stringList(output.OrganizationUnits, context)
|
|
6257
|
+
: undefined,
|
|
6258
|
+
Regions: output.Regions != null ? deserializeAws_restJson1stringList(output.Regions, context) : undefined,
|
|
5681
6259
|
ReportTemplate: __expectString(output.ReportTemplate),
|
|
5682
6260
|
};
|
|
5683
6261
|
};
|
|
@@ -5692,6 +6270,17 @@ const deserializeAws_restJson1ResourceArns = (output, context) => {
|
|
|
5692
6270
|
});
|
|
5693
6271
|
return retVal;
|
|
5694
6272
|
};
|
|
6273
|
+
const deserializeAws_restJson1ResourceIdentifiers = (output, context) => {
|
|
6274
|
+
const retVal = (output || [])
|
|
6275
|
+
.filter((e) => e != null)
|
|
6276
|
+
.map((entry) => {
|
|
6277
|
+
if (entry === null) {
|
|
6278
|
+
return null;
|
|
6279
|
+
}
|
|
6280
|
+
return __expectString(entry);
|
|
6281
|
+
});
|
|
6282
|
+
return retVal;
|
|
6283
|
+
};
|
|
5695
6284
|
const deserializeAws_restJson1ResourceTypeList = (output, context) => {
|
|
5696
6285
|
const retVal = (output || [])
|
|
5697
6286
|
.filter((e) => e != null)
|
|
@@ -5793,6 +6382,17 @@ const deserializeAws_restJson1Tags = (output, context) => {
|
|
|
5793
6382
|
return acc;
|
|
5794
6383
|
}, {});
|
|
5795
6384
|
};
|
|
6385
|
+
const deserializeAws_restJson1VaultNames = (output, context) => {
|
|
6386
|
+
const retVal = (output || [])
|
|
6387
|
+
.filter((e) => e != null)
|
|
6388
|
+
.map((entry) => {
|
|
6389
|
+
if (entry === null) {
|
|
6390
|
+
return null;
|
|
6391
|
+
}
|
|
6392
|
+
return __expectString(entry);
|
|
6393
|
+
});
|
|
6394
|
+
return retVal;
|
|
6395
|
+
};
|
|
5796
6396
|
const deserializeMetadata = (output) => ({
|
|
5797
6397
|
httpStatusCode: output.statusCode,
|
|
5798
6398
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|