@aws-sdk/client-ebs 3.303.0 → 3.309.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/commands/CompleteSnapshotCommand.js +2 -2
- package/dist-cjs/commands/GetSnapshotBlockCommand.js +2 -2
- package/dist-cjs/commands/ListChangedBlocksCommand.js +2 -2
- package/dist-cjs/commands/ListSnapshotBlocksCommand.js +2 -2
- package/dist-cjs/commands/PutSnapshotBlockCommand.js +2 -2
- package/dist-cjs/commands/StartSnapshotCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +99 -99
- package/dist-es/commands/CompleteSnapshotCommand.js +3 -3
- package/dist-es/commands/GetSnapshotBlockCommand.js +3 -3
- package/dist-es/commands/ListChangedBlocksCommand.js +3 -3
- package/dist-es/commands/ListSnapshotBlocksCommand.js +3 -3
- package/dist-es/commands/PutSnapshotBlockCommand.js +3 -3
- package/dist-es/commands/StartSnapshotCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +86 -86
- package/dist-types/protocols/Aws_restJson1.d.ts +48 -12
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -12
- package/package.json +31 -31
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/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
|
-
const
|
|
9
|
+
const se_CompleteSnapshotCommand = async (input, context) => {
|
|
10
10
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
11
11
|
const headers = map({}, isSerializableHeaderValue, {
|
|
12
12
|
"x-amz-changedblockscount": [
|
|
@@ -30,8 +30,8 @@ const serializeAws_restJson1CompleteSnapshotCommand = async (input, context) =>
|
|
|
30
30
|
body,
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
exports.
|
|
34
|
-
const
|
|
33
|
+
exports.se_CompleteSnapshotCommand = se_CompleteSnapshotCommand;
|
|
34
|
+
const se_GetSnapshotBlockCommand = async (input, context) => {
|
|
35
35
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
36
36
|
const headers = {};
|
|
37
37
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
@@ -53,8 +53,8 @@ const serializeAws_restJson1GetSnapshotBlockCommand = async (input, context) =>
|
|
|
53
53
|
body,
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
-
exports.
|
|
57
|
-
const
|
|
56
|
+
exports.se_GetSnapshotBlockCommand = se_GetSnapshotBlockCommand;
|
|
57
|
+
const se_ListChangedBlocksCommand = async (input, context) => {
|
|
58
58
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
59
59
|
const headers = {};
|
|
60
60
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
@@ -78,8 +78,8 @@ const serializeAws_restJson1ListChangedBlocksCommand = async (input, context) =>
|
|
|
78
78
|
body,
|
|
79
79
|
});
|
|
80
80
|
};
|
|
81
|
-
exports.
|
|
82
|
-
const
|
|
81
|
+
exports.se_ListChangedBlocksCommand = se_ListChangedBlocksCommand;
|
|
82
|
+
const se_ListSnapshotBlocksCommand = async (input, context) => {
|
|
83
83
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
84
84
|
const headers = {};
|
|
85
85
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/snapshots/{SnapshotId}/blocks";
|
|
@@ -101,8 +101,8 @@ const serializeAws_restJson1ListSnapshotBlocksCommand = async (input, context) =
|
|
|
101
101
|
body,
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
exports.
|
|
105
|
-
const
|
|
104
|
+
exports.se_ListSnapshotBlocksCommand = se_ListSnapshotBlocksCommand;
|
|
105
|
+
const se_PutSnapshotBlockCommand = async (input, context) => {
|
|
106
106
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
107
107
|
const headers = map({}, isSerializableHeaderValue, {
|
|
108
108
|
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
|
|
@@ -130,8 +130,8 @@ const serializeAws_restJson1PutSnapshotBlockCommand = async (input, context) =>
|
|
|
130
130
|
body,
|
|
131
131
|
});
|
|
132
132
|
};
|
|
133
|
-
exports.
|
|
134
|
-
const
|
|
133
|
+
exports.se_PutSnapshotBlockCommand = se_PutSnapshotBlockCommand;
|
|
134
|
+
const se_StartSnapshotCommand = async (input, context) => {
|
|
135
135
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
136
136
|
const headers = {
|
|
137
137
|
"content-type": "application/json",
|
|
@@ -144,7 +144,7 @@ const serializeAws_restJson1StartSnapshotCommand = async (input, context) => {
|
|
|
144
144
|
...(input.Encrypted != null && { Encrypted: input.Encrypted }),
|
|
145
145
|
...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
|
|
146
146
|
...(input.ParentSnapshotId != null && { ParentSnapshotId: input.ParentSnapshotId }),
|
|
147
|
-
...(input.Tags != null && { Tags:
|
|
147
|
+
...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
|
|
148
148
|
...(input.Timeout != null && { Timeout: input.Timeout }),
|
|
149
149
|
...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }),
|
|
150
150
|
});
|
|
@@ -158,10 +158,10 @@ const serializeAws_restJson1StartSnapshotCommand = async (input, context) => {
|
|
|
158
158
|
body,
|
|
159
159
|
});
|
|
160
160
|
};
|
|
161
|
-
exports.
|
|
162
|
-
const
|
|
161
|
+
exports.se_StartSnapshotCommand = se_StartSnapshotCommand;
|
|
162
|
+
const de_CompleteSnapshotCommand = async (output, context) => {
|
|
163
163
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
164
|
-
return
|
|
164
|
+
return de_CompleteSnapshotCommandError(output, context);
|
|
165
165
|
}
|
|
166
166
|
const contents = map({
|
|
167
167
|
$metadata: deserializeMetadata(output),
|
|
@@ -172,8 +172,8 @@ const deserializeAws_restJson1CompleteSnapshotCommand = async (output, context)
|
|
|
172
172
|
}
|
|
173
173
|
return contents;
|
|
174
174
|
};
|
|
175
|
-
exports.
|
|
176
|
-
const
|
|
175
|
+
exports.de_CompleteSnapshotCommand = de_CompleteSnapshotCommand;
|
|
176
|
+
const de_CompleteSnapshotCommandError = async (output, context) => {
|
|
177
177
|
const parsedOutput = {
|
|
178
178
|
...output,
|
|
179
179
|
body: await parseErrorBody(output.body, context),
|
|
@@ -182,22 +182,22 @@ const deserializeAws_restJson1CompleteSnapshotCommandError = async (output, cont
|
|
|
182
182
|
switch (errorCode) {
|
|
183
183
|
case "AccessDeniedException":
|
|
184
184
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
185
|
-
throw await
|
|
185
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
186
186
|
case "InternalServerException":
|
|
187
187
|
case "com.amazonaws.ebs#InternalServerException":
|
|
188
|
-
throw await
|
|
188
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
189
189
|
case "RequestThrottledException":
|
|
190
190
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
191
|
-
throw await
|
|
191
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
192
192
|
case "ResourceNotFoundException":
|
|
193
193
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
194
|
-
throw await
|
|
194
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
195
195
|
case "ServiceQuotaExceededException":
|
|
196
196
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
197
|
-
throw await
|
|
197
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
198
198
|
case "ValidationException":
|
|
199
199
|
case "com.amazonaws.ebs#ValidationException":
|
|
200
|
-
throw await
|
|
200
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
201
201
|
default:
|
|
202
202
|
const parsedBody = parsedOutput.body;
|
|
203
203
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -208,9 +208,9 @@ const deserializeAws_restJson1CompleteSnapshotCommandError = async (output, cont
|
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
const
|
|
211
|
+
const de_GetSnapshotBlockCommand = async (output, context) => {
|
|
212
212
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
213
|
-
return
|
|
213
|
+
return de_GetSnapshotBlockCommandError(output, context);
|
|
214
214
|
}
|
|
215
215
|
const contents = map({
|
|
216
216
|
$metadata: deserializeMetadata(output),
|
|
@@ -226,8 +226,8 @@ const deserializeAws_restJson1GetSnapshotBlockCommand = async (output, context)
|
|
|
226
226
|
contents.BlockData = data;
|
|
227
227
|
return contents;
|
|
228
228
|
};
|
|
229
|
-
exports.
|
|
230
|
-
const
|
|
229
|
+
exports.de_GetSnapshotBlockCommand = de_GetSnapshotBlockCommand;
|
|
230
|
+
const de_GetSnapshotBlockCommandError = async (output, context) => {
|
|
231
231
|
const parsedOutput = {
|
|
232
232
|
...output,
|
|
233
233
|
body: await parseErrorBody(output.body, context),
|
|
@@ -236,22 +236,22 @@ const deserializeAws_restJson1GetSnapshotBlockCommandError = async (output, cont
|
|
|
236
236
|
switch (errorCode) {
|
|
237
237
|
case "AccessDeniedException":
|
|
238
238
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
239
|
-
throw await
|
|
239
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
240
240
|
case "InternalServerException":
|
|
241
241
|
case "com.amazonaws.ebs#InternalServerException":
|
|
242
|
-
throw await
|
|
242
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
243
243
|
case "RequestThrottledException":
|
|
244
244
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
245
|
-
throw await
|
|
245
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
246
246
|
case "ResourceNotFoundException":
|
|
247
247
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
248
|
-
throw await
|
|
248
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
249
249
|
case "ServiceQuotaExceededException":
|
|
250
250
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
251
|
-
throw await
|
|
251
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
252
252
|
case "ValidationException":
|
|
253
253
|
case "com.amazonaws.ebs#ValidationException":
|
|
254
|
-
throw await
|
|
254
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
255
255
|
default:
|
|
256
256
|
const parsedBody = parsedOutput.body;
|
|
257
257
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -262,9 +262,9 @@ const deserializeAws_restJson1GetSnapshotBlockCommandError = async (output, cont
|
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
|
-
const
|
|
265
|
+
const de_ListChangedBlocksCommand = async (output, context) => {
|
|
266
266
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
267
|
-
return
|
|
267
|
+
return de_ListChangedBlocksCommandError(output, context);
|
|
268
268
|
}
|
|
269
269
|
const contents = map({
|
|
270
270
|
$metadata: deserializeMetadata(output),
|
|
@@ -274,7 +274,7 @@ const deserializeAws_restJson1ListChangedBlocksCommand = async (output, context)
|
|
|
274
274
|
contents.BlockSize = (0, smithy_client_1.expectInt32)(data.BlockSize);
|
|
275
275
|
}
|
|
276
276
|
if (data.ChangedBlocks != null) {
|
|
277
|
-
contents.ChangedBlocks =
|
|
277
|
+
contents.ChangedBlocks = de_ChangedBlocks(data.ChangedBlocks, context);
|
|
278
278
|
}
|
|
279
279
|
if (data.ExpiryTime != null) {
|
|
280
280
|
contents.ExpiryTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.ExpiryTime)));
|
|
@@ -287,8 +287,8 @@ const deserializeAws_restJson1ListChangedBlocksCommand = async (output, context)
|
|
|
287
287
|
}
|
|
288
288
|
return contents;
|
|
289
289
|
};
|
|
290
|
-
exports.
|
|
291
|
-
const
|
|
290
|
+
exports.de_ListChangedBlocksCommand = de_ListChangedBlocksCommand;
|
|
291
|
+
const de_ListChangedBlocksCommandError = async (output, context) => {
|
|
292
292
|
const parsedOutput = {
|
|
293
293
|
...output,
|
|
294
294
|
body: await parseErrorBody(output.body, context),
|
|
@@ -297,22 +297,22 @@ const deserializeAws_restJson1ListChangedBlocksCommandError = async (output, con
|
|
|
297
297
|
switch (errorCode) {
|
|
298
298
|
case "AccessDeniedException":
|
|
299
299
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
300
|
-
throw await
|
|
300
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
301
301
|
case "InternalServerException":
|
|
302
302
|
case "com.amazonaws.ebs#InternalServerException":
|
|
303
|
-
throw await
|
|
303
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
304
304
|
case "RequestThrottledException":
|
|
305
305
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
306
|
-
throw await
|
|
306
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
307
307
|
case "ResourceNotFoundException":
|
|
308
308
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
309
|
-
throw await
|
|
309
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
310
310
|
case "ServiceQuotaExceededException":
|
|
311
311
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
312
|
-
throw await
|
|
312
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
313
313
|
case "ValidationException":
|
|
314
314
|
case "com.amazonaws.ebs#ValidationException":
|
|
315
|
-
throw await
|
|
315
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
316
316
|
default:
|
|
317
317
|
const parsedBody = parsedOutput.body;
|
|
318
318
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -323,9 +323,9 @@ const deserializeAws_restJson1ListChangedBlocksCommandError = async (output, con
|
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
};
|
|
326
|
-
const
|
|
326
|
+
const de_ListSnapshotBlocksCommand = async (output, context) => {
|
|
327
327
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
328
|
-
return
|
|
328
|
+
return de_ListSnapshotBlocksCommandError(output, context);
|
|
329
329
|
}
|
|
330
330
|
const contents = map({
|
|
331
331
|
$metadata: deserializeMetadata(output),
|
|
@@ -335,7 +335,7 @@ const deserializeAws_restJson1ListSnapshotBlocksCommand = async (output, context
|
|
|
335
335
|
contents.BlockSize = (0, smithy_client_1.expectInt32)(data.BlockSize);
|
|
336
336
|
}
|
|
337
337
|
if (data.Blocks != null) {
|
|
338
|
-
contents.Blocks =
|
|
338
|
+
contents.Blocks = de_Blocks(data.Blocks, context);
|
|
339
339
|
}
|
|
340
340
|
if (data.ExpiryTime != null) {
|
|
341
341
|
contents.ExpiryTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.ExpiryTime)));
|
|
@@ -348,8 +348,8 @@ const deserializeAws_restJson1ListSnapshotBlocksCommand = async (output, context
|
|
|
348
348
|
}
|
|
349
349
|
return contents;
|
|
350
350
|
};
|
|
351
|
-
exports.
|
|
352
|
-
const
|
|
351
|
+
exports.de_ListSnapshotBlocksCommand = de_ListSnapshotBlocksCommand;
|
|
352
|
+
const de_ListSnapshotBlocksCommandError = async (output, context) => {
|
|
353
353
|
const parsedOutput = {
|
|
354
354
|
...output,
|
|
355
355
|
body: await parseErrorBody(output.body, context),
|
|
@@ -358,22 +358,22 @@ const deserializeAws_restJson1ListSnapshotBlocksCommandError = async (output, co
|
|
|
358
358
|
switch (errorCode) {
|
|
359
359
|
case "AccessDeniedException":
|
|
360
360
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
361
|
-
throw await
|
|
361
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
362
362
|
case "InternalServerException":
|
|
363
363
|
case "com.amazonaws.ebs#InternalServerException":
|
|
364
|
-
throw await
|
|
364
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
365
365
|
case "RequestThrottledException":
|
|
366
366
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
367
|
-
throw await
|
|
367
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
368
368
|
case "ResourceNotFoundException":
|
|
369
369
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
370
|
-
throw await
|
|
370
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
371
371
|
case "ServiceQuotaExceededException":
|
|
372
372
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
373
|
-
throw await
|
|
373
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
374
374
|
case "ValidationException":
|
|
375
375
|
case "com.amazonaws.ebs#ValidationException":
|
|
376
|
-
throw await
|
|
376
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
377
377
|
default:
|
|
378
378
|
const parsedBody = parsedOutput.body;
|
|
379
379
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -384,9 +384,9 @@ const deserializeAws_restJson1ListSnapshotBlocksCommandError = async (output, co
|
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
|
-
const
|
|
387
|
+
const de_PutSnapshotBlockCommand = async (output, context) => {
|
|
388
388
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
389
|
-
return
|
|
389
|
+
return de_PutSnapshotBlockCommandError(output, context);
|
|
390
390
|
}
|
|
391
391
|
const contents = map({
|
|
392
392
|
$metadata: deserializeMetadata(output),
|
|
@@ -396,8 +396,8 @@ const deserializeAws_restJson1PutSnapshotBlockCommand = async (output, context)
|
|
|
396
396
|
await collectBody(output.body, context);
|
|
397
397
|
return contents;
|
|
398
398
|
};
|
|
399
|
-
exports.
|
|
400
|
-
const
|
|
399
|
+
exports.de_PutSnapshotBlockCommand = de_PutSnapshotBlockCommand;
|
|
400
|
+
const de_PutSnapshotBlockCommandError = async (output, context) => {
|
|
401
401
|
const parsedOutput = {
|
|
402
402
|
...output,
|
|
403
403
|
body: await parseErrorBody(output.body, context),
|
|
@@ -406,22 +406,22 @@ const deserializeAws_restJson1PutSnapshotBlockCommandError = async (output, cont
|
|
|
406
406
|
switch (errorCode) {
|
|
407
407
|
case "AccessDeniedException":
|
|
408
408
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
409
|
-
throw await
|
|
409
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
410
410
|
case "InternalServerException":
|
|
411
411
|
case "com.amazonaws.ebs#InternalServerException":
|
|
412
|
-
throw await
|
|
412
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
413
413
|
case "RequestThrottledException":
|
|
414
414
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
415
|
-
throw await
|
|
415
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
416
416
|
case "ResourceNotFoundException":
|
|
417
417
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
418
|
-
throw await
|
|
418
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
419
419
|
case "ServiceQuotaExceededException":
|
|
420
420
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
421
|
-
throw await
|
|
421
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
422
422
|
case "ValidationException":
|
|
423
423
|
case "com.amazonaws.ebs#ValidationException":
|
|
424
|
-
throw await
|
|
424
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
425
425
|
default:
|
|
426
426
|
const parsedBody = parsedOutput.body;
|
|
427
427
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -432,9 +432,9 @@ const deserializeAws_restJson1PutSnapshotBlockCommandError = async (output, cont
|
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
434
|
};
|
|
435
|
-
const
|
|
435
|
+
const de_StartSnapshotCommand = async (output, context) => {
|
|
436
436
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
437
|
-
return
|
|
437
|
+
return de_StartSnapshotCommandError(output, context);
|
|
438
438
|
}
|
|
439
439
|
const contents = map({
|
|
440
440
|
$metadata: deserializeMetadata(output),
|
|
@@ -465,15 +465,15 @@ const deserializeAws_restJson1StartSnapshotCommand = async (output, context) =>
|
|
|
465
465
|
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
466
466
|
}
|
|
467
467
|
if (data.Tags != null) {
|
|
468
|
-
contents.Tags =
|
|
468
|
+
contents.Tags = de_Tags(data.Tags, context);
|
|
469
469
|
}
|
|
470
470
|
if (data.VolumeSize != null) {
|
|
471
471
|
contents.VolumeSize = (0, smithy_client_1.expectLong)(data.VolumeSize);
|
|
472
472
|
}
|
|
473
473
|
return contents;
|
|
474
474
|
};
|
|
475
|
-
exports.
|
|
476
|
-
const
|
|
475
|
+
exports.de_StartSnapshotCommand = de_StartSnapshotCommand;
|
|
476
|
+
const de_StartSnapshotCommandError = async (output, context) => {
|
|
477
477
|
const parsedOutput = {
|
|
478
478
|
...output,
|
|
479
479
|
body: await parseErrorBody(output.body, context),
|
|
@@ -482,28 +482,28 @@ const deserializeAws_restJson1StartSnapshotCommandError = async (output, context
|
|
|
482
482
|
switch (errorCode) {
|
|
483
483
|
case "AccessDeniedException":
|
|
484
484
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
485
|
-
throw await
|
|
485
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
486
486
|
case "ConcurrentLimitExceededException":
|
|
487
487
|
case "com.amazonaws.ebs#ConcurrentLimitExceededException":
|
|
488
|
-
throw await
|
|
488
|
+
throw await de_ConcurrentLimitExceededExceptionRes(parsedOutput, context);
|
|
489
489
|
case "ConflictException":
|
|
490
490
|
case "com.amazonaws.ebs#ConflictException":
|
|
491
|
-
throw await
|
|
491
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
492
492
|
case "InternalServerException":
|
|
493
493
|
case "com.amazonaws.ebs#InternalServerException":
|
|
494
|
-
throw await
|
|
494
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
495
495
|
case "RequestThrottledException":
|
|
496
496
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
497
|
-
throw await
|
|
497
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
498
498
|
case "ResourceNotFoundException":
|
|
499
499
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
500
|
-
throw await
|
|
500
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
501
501
|
case "ServiceQuotaExceededException":
|
|
502
502
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
503
|
-
throw await
|
|
503
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
504
504
|
case "ValidationException":
|
|
505
505
|
case "com.amazonaws.ebs#ValidationException":
|
|
506
|
-
throw await
|
|
506
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
507
507
|
default:
|
|
508
508
|
const parsedBody = parsedOutput.body;
|
|
509
509
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -515,7 +515,7 @@ const deserializeAws_restJson1StartSnapshotCommandError = async (output, context
|
|
|
515
515
|
}
|
|
516
516
|
};
|
|
517
517
|
const map = smithy_client_1.map;
|
|
518
|
-
const
|
|
518
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
519
519
|
const contents = map({});
|
|
520
520
|
const data = parsedOutput.body;
|
|
521
521
|
if (data.Message != null) {
|
|
@@ -530,7 +530,7 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
530
530
|
});
|
|
531
531
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
532
532
|
};
|
|
533
|
-
const
|
|
533
|
+
const de_ConcurrentLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
534
534
|
const contents = map({});
|
|
535
535
|
const data = parsedOutput.body;
|
|
536
536
|
if (data.Message != null) {
|
|
@@ -542,7 +542,7 @@ const deserializeAws_restJson1ConcurrentLimitExceededExceptionResponse = async (
|
|
|
542
542
|
});
|
|
543
543
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
544
544
|
};
|
|
545
|
-
const
|
|
545
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
546
546
|
const contents = map({});
|
|
547
547
|
const data = parsedOutput.body;
|
|
548
548
|
if (data.Message != null) {
|
|
@@ -554,7 +554,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
554
554
|
});
|
|
555
555
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
556
556
|
};
|
|
557
|
-
const
|
|
557
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
558
558
|
const contents = map({});
|
|
559
559
|
const data = parsedOutput.body;
|
|
560
560
|
if (data.Message != null) {
|
|
@@ -566,7 +566,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
566
566
|
});
|
|
567
567
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
568
568
|
};
|
|
569
|
-
const
|
|
569
|
+
const de_RequestThrottledExceptionRes = async (parsedOutput, context) => {
|
|
570
570
|
const contents = map({});
|
|
571
571
|
const data = parsedOutput.body;
|
|
572
572
|
if (data.Message != null) {
|
|
@@ -581,7 +581,7 @@ const deserializeAws_restJson1RequestThrottledExceptionResponse = async (parsedO
|
|
|
581
581
|
});
|
|
582
582
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
583
583
|
};
|
|
584
|
-
const
|
|
584
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
585
585
|
const contents = map({});
|
|
586
586
|
const data = parsedOutput.body;
|
|
587
587
|
if (data.Message != null) {
|
|
@@ -596,7 +596,7 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
596
596
|
});
|
|
597
597
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
598
598
|
};
|
|
599
|
-
const
|
|
599
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
600
600
|
const contents = map({});
|
|
601
601
|
const data = parsedOutput.body;
|
|
602
602
|
if (data.Message != null) {
|
|
@@ -611,7 +611,7 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
611
611
|
});
|
|
612
612
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
613
613
|
};
|
|
614
|
-
const
|
|
614
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
615
615
|
const contents = map({});
|
|
616
616
|
const data = parsedOutput.body;
|
|
617
617
|
if (data.Message != null) {
|
|
@@ -626,68 +626,68 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
626
626
|
});
|
|
627
627
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
628
628
|
};
|
|
629
|
-
const
|
|
629
|
+
const se_Tag = (input, context) => {
|
|
630
630
|
return {
|
|
631
631
|
...(input.Key != null && { Key: input.Key }),
|
|
632
632
|
...(input.Value != null && { Value: input.Value }),
|
|
633
633
|
};
|
|
634
634
|
};
|
|
635
|
-
const
|
|
635
|
+
const se_Tags = (input, context) => {
|
|
636
636
|
return input
|
|
637
637
|
.filter((e) => e != null)
|
|
638
638
|
.map((entry) => {
|
|
639
|
-
return
|
|
639
|
+
return se_Tag(entry, context);
|
|
640
640
|
});
|
|
641
641
|
};
|
|
642
|
-
const
|
|
642
|
+
const de_Block = (output, context) => {
|
|
643
643
|
return {
|
|
644
644
|
BlockIndex: (0, smithy_client_1.expectInt32)(output.BlockIndex),
|
|
645
645
|
BlockToken: (0, smithy_client_1.expectString)(output.BlockToken),
|
|
646
646
|
};
|
|
647
647
|
};
|
|
648
|
-
const
|
|
648
|
+
const de_Blocks = (output, context) => {
|
|
649
649
|
const retVal = (output || [])
|
|
650
650
|
.filter((e) => e != null)
|
|
651
651
|
.map((entry) => {
|
|
652
652
|
if (entry === null) {
|
|
653
653
|
return null;
|
|
654
654
|
}
|
|
655
|
-
return
|
|
655
|
+
return de_Block(entry, context);
|
|
656
656
|
});
|
|
657
657
|
return retVal;
|
|
658
658
|
};
|
|
659
|
-
const
|
|
659
|
+
const de_ChangedBlock = (output, context) => {
|
|
660
660
|
return {
|
|
661
661
|
BlockIndex: (0, smithy_client_1.expectInt32)(output.BlockIndex),
|
|
662
662
|
FirstBlockToken: (0, smithy_client_1.expectString)(output.FirstBlockToken),
|
|
663
663
|
SecondBlockToken: (0, smithy_client_1.expectString)(output.SecondBlockToken),
|
|
664
664
|
};
|
|
665
665
|
};
|
|
666
|
-
const
|
|
666
|
+
const de_ChangedBlocks = (output, context) => {
|
|
667
667
|
const retVal = (output || [])
|
|
668
668
|
.filter((e) => e != null)
|
|
669
669
|
.map((entry) => {
|
|
670
670
|
if (entry === null) {
|
|
671
671
|
return null;
|
|
672
672
|
}
|
|
673
|
-
return
|
|
673
|
+
return de_ChangedBlock(entry, context);
|
|
674
674
|
});
|
|
675
675
|
return retVal;
|
|
676
676
|
};
|
|
677
|
-
const
|
|
677
|
+
const de_Tag = (output, context) => {
|
|
678
678
|
return {
|
|
679
679
|
Key: (0, smithy_client_1.expectString)(output.Key),
|
|
680
680
|
Value: (0, smithy_client_1.expectString)(output.Value),
|
|
681
681
|
};
|
|
682
682
|
};
|
|
683
|
-
const
|
|
683
|
+
const de_Tags = (output, context) => {
|
|
684
684
|
const retVal = (output || [])
|
|
685
685
|
.filter((e) => e != null)
|
|
686
686
|
.map((entry) => {
|
|
687
687
|
if (entry === null) {
|
|
688
688
|
return null;
|
|
689
689
|
}
|
|
690
|
-
return
|
|
690
|
+
return de_Tag(entry, context);
|
|
691
691
|
});
|
|
692
692
|
return retVal;
|
|
693
693
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { de_CompleteSnapshotCommand, se_CompleteSnapshotCommand } from "../protocols/Aws_restJson1";
|
|
5
5
|
export class CompleteSnapshotCommand extends $Command {
|
|
6
6
|
static getEndpointParameterInstructions() {
|
|
7
7
|
return {
|
|
@@ -33,9 +33,9 @@ export class CompleteSnapshotCommand extends $Command {
|
|
|
33
33
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
34
|
}
|
|
35
35
|
serialize(input, context) {
|
|
36
|
-
return
|
|
36
|
+
return se_CompleteSnapshotCommand(input, context);
|
|
37
37
|
}
|
|
38
38
|
deserialize(output, context) {
|
|
39
|
-
return
|
|
39
|
+
return de_CompleteSnapshotCommand(output, context);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -2,7 +2,7 @@ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { GetSnapshotBlockResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
-
import {
|
|
5
|
+
import { de_GetSnapshotBlockCommand, se_GetSnapshotBlockCommand } from "../protocols/Aws_restJson1";
|
|
6
6
|
export class GetSnapshotBlockCommand extends $Command {
|
|
7
7
|
static getEndpointParameterInstructions() {
|
|
8
8
|
return {
|
|
@@ -34,9 +34,9 @@ export class GetSnapshotBlockCommand extends $Command {
|
|
|
34
34
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
35
|
}
|
|
36
36
|
serialize(input, context) {
|
|
37
|
-
return
|
|
37
|
+
return se_GetSnapshotBlockCommand(input, context);
|
|
38
38
|
}
|
|
39
39
|
deserialize(output, context) {
|
|
40
|
-
return
|
|
40
|
+
return de_GetSnapshotBlockCommand(output, context);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -2,7 +2,7 @@ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { ListChangedBlocksResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
-
import {
|
|
5
|
+
import { de_ListChangedBlocksCommand, se_ListChangedBlocksCommand } from "../protocols/Aws_restJson1";
|
|
6
6
|
export class ListChangedBlocksCommand extends $Command {
|
|
7
7
|
static getEndpointParameterInstructions() {
|
|
8
8
|
return {
|
|
@@ -34,9 +34,9 @@ export class ListChangedBlocksCommand extends $Command {
|
|
|
34
34
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
35
|
}
|
|
36
36
|
serialize(input, context) {
|
|
37
|
-
return
|
|
37
|
+
return se_ListChangedBlocksCommand(input, context);
|
|
38
38
|
}
|
|
39
39
|
deserialize(output, context) {
|
|
40
|
-
return
|
|
40
|
+
return de_ListChangedBlocksCommand(output, context);
|
|
41
41
|
}
|
|
42
42
|
}
|