@aws-sdk/client-ebs 3.474.0 → 3.477.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.
|
@@ -1,142 +1,98 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.de_StartSnapshotCommand = exports.de_PutSnapshotBlockCommand = exports.de_ListSnapshotBlocksCommand = exports.de_ListChangedBlocksCommand = exports.de_GetSnapshotBlockCommand = exports.de_CompleteSnapshotCommand = exports.se_StartSnapshotCommand = exports.se_PutSnapshotBlockCommand = exports.se_ListSnapshotBlocksCommand = exports.se_ListChangedBlocksCommand = exports.se_GetSnapshotBlockCommand = exports.se_CompleteSnapshotCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
7
7
|
const EBSServiceException_1 = require("../models/EBSServiceException");
|
|
8
8
|
const models_0_1 = require("../models/models_0");
|
|
9
9
|
const se_CompleteSnapshotCommand = async (input, context) => {
|
|
10
|
-
const
|
|
10
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
11
|
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
],
|
|
16
|
-
"x-amz-checksum": input.Checksum,
|
|
17
|
-
"x-amz-checksum-algorithm": input.ChecksumAlgorithm,
|
|
18
|
-
"x-amz-checksum-aggregation-method": input.ChecksumAggregationMethod,
|
|
12
|
+
[_xac]: [() => isSerializableHeaderValue(input[_CBC]), () => input[_CBC].toString()],
|
|
13
|
+
[_xac_]: input[_C],
|
|
14
|
+
[_xaca]: input[_CA],
|
|
15
|
+
[_xacam]: input[_CAM],
|
|
19
16
|
});
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
b.bp("/snapshots/completion/{SnapshotId}");
|
|
18
|
+
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
22
19
|
let body;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
hostname,
|
|
26
|
-
port,
|
|
27
|
-
method: "POST",
|
|
28
|
-
headers,
|
|
29
|
-
path: resolvedPath,
|
|
30
|
-
body,
|
|
31
|
-
});
|
|
20
|
+
b.m("POST").h(headers).b(body);
|
|
21
|
+
return b.build();
|
|
32
22
|
};
|
|
33
23
|
exports.se_CompleteSnapshotCommand = se_CompleteSnapshotCommand;
|
|
34
24
|
const se_GetSnapshotBlockCommand = async (input, context) => {
|
|
35
|
-
const
|
|
25
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
36
26
|
const headers = {};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
27
|
+
b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");
|
|
28
|
+
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
29
|
+
b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
41
30
|
const query = (0, smithy_client_1.map)({
|
|
42
|
-
|
|
31
|
+
[_bT]: [, (0, smithy_client_1.expectNonNull)(input[_BT], `BlockToken`)],
|
|
43
32
|
});
|
|
44
33
|
let body;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
hostname,
|
|
48
|
-
port,
|
|
49
|
-
method: "GET",
|
|
50
|
-
headers,
|
|
51
|
-
path: resolvedPath,
|
|
52
|
-
query,
|
|
53
|
-
body,
|
|
54
|
-
});
|
|
34
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
35
|
+
return b.build();
|
|
55
36
|
};
|
|
56
37
|
exports.se_GetSnapshotBlockCommand = se_GetSnapshotBlockCommand;
|
|
57
38
|
const se_ListChangedBlocksCommand = async (input, context) => {
|
|
58
|
-
const
|
|
39
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
59
40
|
const headers = {};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SecondSnapshotId", () => input.SecondSnapshotId, "{SecondSnapshotId}", false);
|
|
41
|
+
b.bp("/snapshots/{SecondSnapshotId}/changedblocks");
|
|
42
|
+
b.p("SecondSnapshotId", () => input.SecondSnapshotId, "{SecondSnapshotId}", false);
|
|
63
43
|
const query = (0, smithy_client_1.map)({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
44
|
+
[_fSI]: [, input[_FSI]],
|
|
45
|
+
[_pT]: [, input[_NT]],
|
|
46
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
47
|
+
[_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()],
|
|
68
48
|
});
|
|
69
49
|
let body;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
hostname,
|
|
73
|
-
port,
|
|
74
|
-
method: "GET",
|
|
75
|
-
headers,
|
|
76
|
-
path: resolvedPath,
|
|
77
|
-
query,
|
|
78
|
-
body,
|
|
79
|
-
});
|
|
50
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
51
|
+
return b.build();
|
|
80
52
|
};
|
|
81
53
|
exports.se_ListChangedBlocksCommand = se_ListChangedBlocksCommand;
|
|
82
54
|
const se_ListSnapshotBlocksCommand = async (input, context) => {
|
|
83
|
-
const
|
|
55
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
84
56
|
const headers = {};
|
|
85
|
-
|
|
86
|
-
|
|
57
|
+
b.bp("/snapshots/{SnapshotId}/blocks");
|
|
58
|
+
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
87
59
|
const query = (0, smithy_client_1.map)({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
60
|
+
[_pT]: [, input[_NT]],
|
|
61
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
62
|
+
[_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()],
|
|
91
63
|
});
|
|
92
64
|
let body;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
hostname,
|
|
96
|
-
port,
|
|
97
|
-
method: "GET",
|
|
98
|
-
headers,
|
|
99
|
-
path: resolvedPath,
|
|
100
|
-
query,
|
|
101
|
-
body,
|
|
102
|
-
});
|
|
65
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
66
|
+
return b.build();
|
|
103
67
|
};
|
|
104
68
|
exports.se_ListSnapshotBlocksCommand = se_ListSnapshotBlocksCommand;
|
|
105
69
|
const se_PutSnapshotBlockCommand = async (input, context) => {
|
|
106
|
-
const
|
|
70
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
107
71
|
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
108
72
|
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
|
|
109
73
|
"content-type": "application/octet-stream",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
74
|
+
[_xadl]: [() => isSerializableHeaderValue(input[_DL]), () => input[_DL].toString()],
|
|
75
|
+
[_xap]: [() => isSerializableHeaderValue(input[_P]), () => input[_P].toString()],
|
|
76
|
+
[_xac_]: input[_C],
|
|
77
|
+
[_xaca]: input[_CA],
|
|
78
|
+
});
|
|
79
|
+
b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");
|
|
80
|
+
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
81
|
+
b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
119
82
|
let body;
|
|
120
83
|
if (input.BlockData !== undefined) {
|
|
121
84
|
body = input.BlockData;
|
|
122
85
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
hostname,
|
|
126
|
-
port,
|
|
127
|
-
method: "PUT",
|
|
128
|
-
headers,
|
|
129
|
-
path: resolvedPath,
|
|
130
|
-
body,
|
|
131
|
-
});
|
|
86
|
+
b.m("PUT").h(headers).b(body);
|
|
87
|
+
return b.build();
|
|
132
88
|
};
|
|
133
89
|
exports.se_PutSnapshotBlockCommand = se_PutSnapshotBlockCommand;
|
|
134
90
|
const se_StartSnapshotCommand = async (input, context) => {
|
|
135
|
-
const
|
|
91
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
136
92
|
const headers = {
|
|
137
93
|
"content-type": "application/json",
|
|
138
94
|
};
|
|
139
|
-
|
|
95
|
+
b.bp("/snapshots");
|
|
140
96
|
let body;
|
|
141
97
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
142
98
|
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
@@ -148,15 +104,8 @@ const se_StartSnapshotCommand = async (input, context) => {
|
|
|
148
104
|
Timeout: [],
|
|
149
105
|
VolumeSize: [],
|
|
150
106
|
}));
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
hostname,
|
|
154
|
-
port,
|
|
155
|
-
method: "POST",
|
|
156
|
-
headers,
|
|
157
|
-
path: resolvedPath,
|
|
158
|
-
body,
|
|
159
|
-
});
|
|
107
|
+
b.m("POST").h(headers).b(body);
|
|
108
|
+
return b.build();
|
|
160
109
|
};
|
|
161
110
|
exports.se_StartSnapshotCommand = se_StartSnapshotCommand;
|
|
162
111
|
const de_CompleteSnapshotCommand = async (output, context) => {
|
|
@@ -214,12 +163,9 @@ const de_GetSnapshotBlockCommand = async (output, context) => {
|
|
|
214
163
|
}
|
|
215
164
|
const contents = (0, smithy_client_1.map)({
|
|
216
165
|
$metadata: deserializeMetadata(output),
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
],
|
|
221
|
-
Checksum: [, output.headers["x-amz-checksum"]],
|
|
222
|
-
ChecksumAlgorithm: [, output.headers["x-amz-checksum-algorithm"]],
|
|
166
|
+
[_DL]: [() => void 0 !== output.headers[_xadl], () => (0, smithy_client_1.strictParseInt32)(output.headers[_xadl])],
|
|
167
|
+
[_C]: [, output.headers[_xac_]],
|
|
168
|
+
[_CA]: [, output.headers[_xaca]],
|
|
223
169
|
});
|
|
224
170
|
const data = output.body;
|
|
225
171
|
context.sdkStreamMixin(data);
|
|
@@ -373,8 +319,8 @@ const de_PutSnapshotBlockCommand = async (output, context) => {
|
|
|
373
319
|
}
|
|
374
320
|
const contents = (0, smithy_client_1.map)({
|
|
375
321
|
$metadata: deserializeMetadata(output),
|
|
376
|
-
|
|
377
|
-
|
|
322
|
+
[_C]: [, output.headers[_xac_]],
|
|
323
|
+
[_CA]: [, output.headers[_xaca]],
|
|
378
324
|
});
|
|
379
325
|
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
380
326
|
return contents;
|
|
@@ -601,6 +547,28 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
601
547
|
value !== "" &&
|
|
602
548
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
603
549
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
550
|
+
const _BT = "BlockToken";
|
|
551
|
+
const _C = "Checksum";
|
|
552
|
+
const _CA = "ChecksumAlgorithm";
|
|
553
|
+
const _CAM = "ChecksumAggregationMethod";
|
|
554
|
+
const _CBC = "ChangedBlocksCount";
|
|
555
|
+
const _DL = "DataLength";
|
|
556
|
+
const _FSI = "FirstSnapshotId";
|
|
557
|
+
const _MR = "MaxResults";
|
|
558
|
+
const _NT = "NextToken";
|
|
559
|
+
const _P = "Progress";
|
|
560
|
+
const _SBI = "StartingBlockIndex";
|
|
561
|
+
const _bT = "blockToken";
|
|
562
|
+
const _fSI = "firstSnapshotId";
|
|
563
|
+
const _mR = "maxResults";
|
|
564
|
+
const _pT = "pageToken";
|
|
565
|
+
const _sBI = "startingBlockIndex";
|
|
566
|
+
const _xac = "x-amz-changedblockscount";
|
|
567
|
+
const _xac_ = "x-amz-checksum";
|
|
568
|
+
const _xaca = "x-amz-checksum-algorithm";
|
|
569
|
+
const _xacam = "x-amz-checksum-aggregation-method";
|
|
570
|
+
const _xadl = "x-amz-data-length";
|
|
571
|
+
const _xap = "x-amz-progress";
|
|
604
572
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
605
573
|
if (encoded.length) {
|
|
606
574
|
return JSON.parse(encoded);
|
|
@@ -1,134 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp,
|
|
1
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
2
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { EBSServiceException as __BaseException } from "../models/EBSServiceException";
|
|
5
5
|
import { AccessDeniedException, ConcurrentLimitExceededException, ConflictException, InternalServerException, RequestThrottledException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
6
6
|
export const se_CompleteSnapshotCommand = async (input, context) => {
|
|
7
|
-
const
|
|
7
|
+
const b = rb(input, context);
|
|
8
8
|
const headers = map({}, isSerializableHeaderValue, {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
],
|
|
13
|
-
"x-amz-checksum": input.Checksum,
|
|
14
|
-
"x-amz-checksum-algorithm": input.ChecksumAlgorithm,
|
|
15
|
-
"x-amz-checksum-aggregation-method": input.ChecksumAggregationMethod,
|
|
9
|
+
[_xac]: [() => isSerializableHeaderValue(input[_CBC]), () => input[_CBC].toString()],
|
|
10
|
+
[_xac_]: input[_C],
|
|
11
|
+
[_xaca]: input[_CA],
|
|
12
|
+
[_xacam]: input[_CAM],
|
|
16
13
|
});
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
b.bp("/snapshots/completion/{SnapshotId}");
|
|
15
|
+
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
19
16
|
let body;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
hostname,
|
|
23
|
-
port,
|
|
24
|
-
method: "POST",
|
|
25
|
-
headers,
|
|
26
|
-
path: resolvedPath,
|
|
27
|
-
body,
|
|
28
|
-
});
|
|
17
|
+
b.m("POST").h(headers).b(body);
|
|
18
|
+
return b.build();
|
|
29
19
|
};
|
|
30
20
|
export const se_GetSnapshotBlockCommand = async (input, context) => {
|
|
31
|
-
const
|
|
21
|
+
const b = rb(input, context);
|
|
32
22
|
const headers = {};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
23
|
+
b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");
|
|
24
|
+
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
25
|
+
b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
37
26
|
const query = map({
|
|
38
|
-
|
|
27
|
+
[_bT]: [, __expectNonNull(input[_BT], `BlockToken`)],
|
|
39
28
|
});
|
|
40
29
|
let body;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
hostname,
|
|
44
|
-
port,
|
|
45
|
-
method: "GET",
|
|
46
|
-
headers,
|
|
47
|
-
path: resolvedPath,
|
|
48
|
-
query,
|
|
49
|
-
body,
|
|
50
|
-
});
|
|
30
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
31
|
+
return b.build();
|
|
51
32
|
};
|
|
52
33
|
export const se_ListChangedBlocksCommand = async (input, context) => {
|
|
53
|
-
const
|
|
34
|
+
const b = rb(input, context);
|
|
54
35
|
const headers = {};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "SecondSnapshotId", () => input.SecondSnapshotId, "{SecondSnapshotId}", false);
|
|
36
|
+
b.bp("/snapshots/{SecondSnapshotId}/changedblocks");
|
|
37
|
+
b.p("SecondSnapshotId", () => input.SecondSnapshotId, "{SecondSnapshotId}", false);
|
|
58
38
|
const query = map({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
39
|
+
[_fSI]: [, input[_FSI]],
|
|
40
|
+
[_pT]: [, input[_NT]],
|
|
41
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
42
|
+
[_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()],
|
|
63
43
|
});
|
|
64
44
|
let body;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
hostname,
|
|
68
|
-
port,
|
|
69
|
-
method: "GET",
|
|
70
|
-
headers,
|
|
71
|
-
path: resolvedPath,
|
|
72
|
-
query,
|
|
73
|
-
body,
|
|
74
|
-
});
|
|
45
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
46
|
+
return b.build();
|
|
75
47
|
};
|
|
76
48
|
export const se_ListSnapshotBlocksCommand = async (input, context) => {
|
|
77
|
-
const
|
|
49
|
+
const b = rb(input, context);
|
|
78
50
|
const headers = {};
|
|
79
|
-
|
|
80
|
-
|
|
51
|
+
b.bp("/snapshots/{SnapshotId}/blocks");
|
|
52
|
+
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
81
53
|
const query = map({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
54
|
+
[_pT]: [, input[_NT]],
|
|
55
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
56
|
+
[_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()],
|
|
85
57
|
});
|
|
86
58
|
let body;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
hostname,
|
|
90
|
-
port,
|
|
91
|
-
method: "GET",
|
|
92
|
-
headers,
|
|
93
|
-
path: resolvedPath,
|
|
94
|
-
query,
|
|
95
|
-
body,
|
|
96
|
-
});
|
|
59
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
60
|
+
return b.build();
|
|
97
61
|
};
|
|
98
62
|
export const se_PutSnapshotBlockCommand = async (input, context) => {
|
|
99
|
-
const
|
|
63
|
+
const b = rb(input, context);
|
|
100
64
|
const headers = map({}, isSerializableHeaderValue, {
|
|
101
65
|
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
|
|
102
66
|
"content-type": "application/octet-stream",
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
67
|
+
[_xadl]: [() => isSerializableHeaderValue(input[_DL]), () => input[_DL].toString()],
|
|
68
|
+
[_xap]: [() => isSerializableHeaderValue(input[_P]), () => input[_P].toString()],
|
|
69
|
+
[_xac_]: input[_C],
|
|
70
|
+
[_xaca]: input[_CA],
|
|
71
|
+
});
|
|
72
|
+
b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");
|
|
73
|
+
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
74
|
+
b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
112
75
|
let body;
|
|
113
76
|
if (input.BlockData !== undefined) {
|
|
114
77
|
body = input.BlockData;
|
|
115
78
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
hostname,
|
|
119
|
-
port,
|
|
120
|
-
method: "PUT",
|
|
121
|
-
headers,
|
|
122
|
-
path: resolvedPath,
|
|
123
|
-
body,
|
|
124
|
-
});
|
|
79
|
+
b.m("PUT").h(headers).b(body);
|
|
80
|
+
return b.build();
|
|
125
81
|
};
|
|
126
82
|
export const se_StartSnapshotCommand = async (input, context) => {
|
|
127
|
-
const
|
|
83
|
+
const b = rb(input, context);
|
|
128
84
|
const headers = {
|
|
129
85
|
"content-type": "application/json",
|
|
130
86
|
};
|
|
131
|
-
|
|
87
|
+
b.bp("/snapshots");
|
|
132
88
|
let body;
|
|
133
89
|
body = JSON.stringify(take(input, {
|
|
134
90
|
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
@@ -140,15 +96,8 @@ export const se_StartSnapshotCommand = async (input, context) => {
|
|
|
140
96
|
Timeout: [],
|
|
141
97
|
VolumeSize: [],
|
|
142
98
|
}));
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
hostname,
|
|
146
|
-
port,
|
|
147
|
-
method: "POST",
|
|
148
|
-
headers,
|
|
149
|
-
path: resolvedPath,
|
|
150
|
-
body,
|
|
151
|
-
});
|
|
99
|
+
b.m("POST").h(headers).b(body);
|
|
100
|
+
return b.build();
|
|
152
101
|
};
|
|
153
102
|
export const de_CompleteSnapshotCommand = async (output, context) => {
|
|
154
103
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
@@ -204,12 +153,9 @@ export const de_GetSnapshotBlockCommand = async (output, context) => {
|
|
|
204
153
|
}
|
|
205
154
|
const contents = map({
|
|
206
155
|
$metadata: deserializeMetadata(output),
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
],
|
|
211
|
-
Checksum: [, output.headers["x-amz-checksum"]],
|
|
212
|
-
ChecksumAlgorithm: [, output.headers["x-amz-checksum-algorithm"]],
|
|
156
|
+
[_DL]: [() => void 0 !== output.headers[_xadl], () => __strictParseInt32(output.headers[_xadl])],
|
|
157
|
+
[_C]: [, output.headers[_xac_]],
|
|
158
|
+
[_CA]: [, output.headers[_xaca]],
|
|
213
159
|
});
|
|
214
160
|
const data = output.body;
|
|
215
161
|
context.sdkStreamMixin(data);
|
|
@@ -360,8 +306,8 @@ export const de_PutSnapshotBlockCommand = async (output, context) => {
|
|
|
360
306
|
}
|
|
361
307
|
const contents = map({
|
|
362
308
|
$metadata: deserializeMetadata(output),
|
|
363
|
-
|
|
364
|
-
|
|
309
|
+
[_C]: [, output.headers[_xac_]],
|
|
310
|
+
[_CA]: [, output.headers[_xaca]],
|
|
365
311
|
});
|
|
366
312
|
await collectBody(output.body, context);
|
|
367
313
|
return contents;
|
|
@@ -586,6 +532,28 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
586
532
|
value !== "" &&
|
|
587
533
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
588
534
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
535
|
+
const _BT = "BlockToken";
|
|
536
|
+
const _C = "Checksum";
|
|
537
|
+
const _CA = "ChecksumAlgorithm";
|
|
538
|
+
const _CAM = "ChecksumAggregationMethod";
|
|
539
|
+
const _CBC = "ChangedBlocksCount";
|
|
540
|
+
const _DL = "DataLength";
|
|
541
|
+
const _FSI = "FirstSnapshotId";
|
|
542
|
+
const _MR = "MaxResults";
|
|
543
|
+
const _NT = "NextToken";
|
|
544
|
+
const _P = "Progress";
|
|
545
|
+
const _SBI = "StartingBlockIndex";
|
|
546
|
+
const _bT = "blockToken";
|
|
547
|
+
const _fSI = "firstSnapshotId";
|
|
548
|
+
const _mR = "maxResults";
|
|
549
|
+
const _pT = "pageToken";
|
|
550
|
+
const _sBI = "startingBlockIndex";
|
|
551
|
+
const _xac = "x-amz-changedblockscount";
|
|
552
|
+
const _xac_ = "x-amz-checksum";
|
|
553
|
+
const _xaca = "x-amz-checksum-algorithm";
|
|
554
|
+
const _xacam = "x-amz-checksum-aggregation-method";
|
|
555
|
+
const _xadl = "x-amz-data-length";
|
|
556
|
+
const _xap = "x-amz-progress";
|
|
589
557
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
590
558
|
if (encoded.length) {
|
|
591
559
|
return JSON.parse(encoded);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-ebs",
|
|
3
3
|
"description": "AWS SDK for JavaScript Ebs Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.477.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.477.0",
|
|
24
|
+
"@aws-sdk/core": "3.477.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.477.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.468.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.468.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.468.0",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "3.468.0",
|
|
35
35
|
"@aws-sdk/util-user-agent-node": "3.470.0",
|
|
36
36
|
"@smithy/config-resolver": "^2.0.21",
|
|
37
|
+
"@smithy/core": "^1.2.0",
|
|
37
38
|
"@smithy/fetch-http-handler": "^2.3.1",
|
|
38
39
|
"@smithy/hash-node": "^2.0.17",
|
|
39
40
|
"@smithy/invalid-dependency": "^2.0.15",
|