@aws-sdk/client-ebs 3.306.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 +6 -6
|
@@ -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 { ListSnapshotBlocksResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
-
import {
|
|
5
|
+
import { de_ListSnapshotBlocksCommand, se_ListSnapshotBlocksCommand } from "../protocols/Aws_restJson1";
|
|
6
6
|
export class ListSnapshotBlocksCommand extends $Command {
|
|
7
7
|
static getEndpointParameterInstructions() {
|
|
8
8
|
return {
|
|
@@ -34,9 +34,9 @@ export class ListSnapshotBlocksCommand 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_ListSnapshotBlocksCommand(input, context);
|
|
38
38
|
}
|
|
39
39
|
deserialize(output, context) {
|
|
40
|
-
return
|
|
40
|
+
return de_ListSnapshotBlocksCommand(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 { PutSnapshotBlockRequestFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
-
import {
|
|
5
|
+
import { de_PutSnapshotBlockCommand, se_PutSnapshotBlockCommand } from "../protocols/Aws_restJson1";
|
|
6
6
|
export class PutSnapshotBlockCommand extends $Command {
|
|
7
7
|
static getEndpointParameterInstructions() {
|
|
8
8
|
return {
|
|
@@ -34,9 +34,9 @@ export class PutSnapshotBlockCommand 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_PutSnapshotBlockCommand(input, context);
|
|
38
38
|
}
|
|
39
39
|
deserialize(output, context) {
|
|
40
|
-
return
|
|
40
|
+
return de_PutSnapshotBlockCommand(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 { StartSnapshotRequestFilterSensitiveLog, StartSnapshotResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
-
import {
|
|
5
|
+
import { de_StartSnapshotCommand, se_StartSnapshotCommand } from "../protocols/Aws_restJson1";
|
|
6
6
|
export class StartSnapshotCommand extends $Command {
|
|
7
7
|
static getEndpointParameterInstructions() {
|
|
8
8
|
return {
|
|
@@ -34,9 +34,9 @@ export class StartSnapshotCommand 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_StartSnapshotCommand(input, context);
|
|
38
38
|
}
|
|
39
39
|
deserialize(output, context) {
|
|
40
|
-
return
|
|
40
|
+
return de_StartSnapshotCommand(output, context);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -3,7 +3,7 @@ import { decorateServiceException as __decorateServiceException, expectInt32 as
|
|
|
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
|
-
export const
|
|
6
|
+
export const se_CompleteSnapshotCommand = async (input, context) => {
|
|
7
7
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
8
|
const headers = map({}, isSerializableHeaderValue, {
|
|
9
9
|
"x-amz-changedblockscount": [
|
|
@@ -27,7 +27,7 @@ export const serializeAws_restJson1CompleteSnapshotCommand = async (input, conte
|
|
|
27
27
|
body,
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
|
-
export const
|
|
30
|
+
export const se_GetSnapshotBlockCommand = async (input, context) => {
|
|
31
31
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
32
32
|
const headers = {};
|
|
33
33
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
@@ -49,7 +49,7 @@ export const serializeAws_restJson1GetSnapshotBlockCommand = async (input, conte
|
|
|
49
49
|
body,
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
export const
|
|
52
|
+
export const se_ListChangedBlocksCommand = async (input, context) => {
|
|
53
53
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
54
|
const headers = {};
|
|
55
55
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
@@ -73,7 +73,7 @@ export const serializeAws_restJson1ListChangedBlocksCommand = async (input, cont
|
|
|
73
73
|
body,
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
-
export const
|
|
76
|
+
export const se_ListSnapshotBlocksCommand = async (input, context) => {
|
|
77
77
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
78
78
|
const headers = {};
|
|
79
79
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/snapshots/{SnapshotId}/blocks";
|
|
@@ -95,7 +95,7 @@ export const serializeAws_restJson1ListSnapshotBlocksCommand = async (input, con
|
|
|
95
95
|
body,
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
|
-
export const
|
|
98
|
+
export const se_PutSnapshotBlockCommand = async (input, context) => {
|
|
99
99
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
100
100
|
const headers = map({}, isSerializableHeaderValue, {
|
|
101
101
|
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
|
|
@@ -123,7 +123,7 @@ export const serializeAws_restJson1PutSnapshotBlockCommand = async (input, conte
|
|
|
123
123
|
body,
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
|
-
export const
|
|
126
|
+
export const se_StartSnapshotCommand = async (input, context) => {
|
|
127
127
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
128
128
|
const headers = {
|
|
129
129
|
"content-type": "application/json",
|
|
@@ -136,7 +136,7 @@ export const serializeAws_restJson1StartSnapshotCommand = async (input, context)
|
|
|
136
136
|
...(input.Encrypted != null && { Encrypted: input.Encrypted }),
|
|
137
137
|
...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
|
|
138
138
|
...(input.ParentSnapshotId != null && { ParentSnapshotId: input.ParentSnapshotId }),
|
|
139
|
-
...(input.Tags != null && { Tags:
|
|
139
|
+
...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
|
|
140
140
|
...(input.Timeout != null && { Timeout: input.Timeout }),
|
|
141
141
|
...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }),
|
|
142
142
|
});
|
|
@@ -150,9 +150,9 @@ export const serializeAws_restJson1StartSnapshotCommand = async (input, context)
|
|
|
150
150
|
body,
|
|
151
151
|
});
|
|
152
152
|
};
|
|
153
|
-
export const
|
|
153
|
+
export const de_CompleteSnapshotCommand = async (output, context) => {
|
|
154
154
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
155
|
-
return
|
|
155
|
+
return de_CompleteSnapshotCommandError(output, context);
|
|
156
156
|
}
|
|
157
157
|
const contents = map({
|
|
158
158
|
$metadata: deserializeMetadata(output),
|
|
@@ -163,7 +163,7 @@ export const deserializeAws_restJson1CompleteSnapshotCommand = async (output, co
|
|
|
163
163
|
}
|
|
164
164
|
return contents;
|
|
165
165
|
};
|
|
166
|
-
const
|
|
166
|
+
const de_CompleteSnapshotCommandError = async (output, context) => {
|
|
167
167
|
const parsedOutput = {
|
|
168
168
|
...output,
|
|
169
169
|
body: await parseErrorBody(output.body, context),
|
|
@@ -172,22 +172,22 @@ const deserializeAws_restJson1CompleteSnapshotCommandError = async (output, cont
|
|
|
172
172
|
switch (errorCode) {
|
|
173
173
|
case "AccessDeniedException":
|
|
174
174
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
175
|
-
throw await
|
|
175
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
176
176
|
case "InternalServerException":
|
|
177
177
|
case "com.amazonaws.ebs#InternalServerException":
|
|
178
|
-
throw await
|
|
178
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
179
179
|
case "RequestThrottledException":
|
|
180
180
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
181
|
-
throw await
|
|
181
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
182
182
|
case "ResourceNotFoundException":
|
|
183
183
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
184
|
-
throw await
|
|
184
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
185
185
|
case "ServiceQuotaExceededException":
|
|
186
186
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
187
|
-
throw await
|
|
187
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
188
188
|
case "ValidationException":
|
|
189
189
|
case "com.amazonaws.ebs#ValidationException":
|
|
190
|
-
throw await
|
|
190
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
191
191
|
default:
|
|
192
192
|
const parsedBody = parsedOutput.body;
|
|
193
193
|
throwDefaultError({
|
|
@@ -198,9 +198,9 @@ const deserializeAws_restJson1CompleteSnapshotCommandError = async (output, cont
|
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
export const
|
|
201
|
+
export const de_GetSnapshotBlockCommand = async (output, context) => {
|
|
202
202
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
203
|
-
return
|
|
203
|
+
return de_GetSnapshotBlockCommandError(output, context);
|
|
204
204
|
}
|
|
205
205
|
const contents = map({
|
|
206
206
|
$metadata: deserializeMetadata(output),
|
|
@@ -216,7 +216,7 @@ export const deserializeAws_restJson1GetSnapshotBlockCommand = async (output, co
|
|
|
216
216
|
contents.BlockData = data;
|
|
217
217
|
return contents;
|
|
218
218
|
};
|
|
219
|
-
const
|
|
219
|
+
const de_GetSnapshotBlockCommandError = async (output, context) => {
|
|
220
220
|
const parsedOutput = {
|
|
221
221
|
...output,
|
|
222
222
|
body: await parseErrorBody(output.body, context),
|
|
@@ -225,22 +225,22 @@ const deserializeAws_restJson1GetSnapshotBlockCommandError = async (output, cont
|
|
|
225
225
|
switch (errorCode) {
|
|
226
226
|
case "AccessDeniedException":
|
|
227
227
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
228
|
-
throw await
|
|
228
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
229
229
|
case "InternalServerException":
|
|
230
230
|
case "com.amazonaws.ebs#InternalServerException":
|
|
231
|
-
throw await
|
|
231
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
232
232
|
case "RequestThrottledException":
|
|
233
233
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
234
|
-
throw await
|
|
234
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
235
235
|
case "ResourceNotFoundException":
|
|
236
236
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
237
|
-
throw await
|
|
237
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
238
238
|
case "ServiceQuotaExceededException":
|
|
239
239
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
240
|
-
throw await
|
|
240
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
241
241
|
case "ValidationException":
|
|
242
242
|
case "com.amazonaws.ebs#ValidationException":
|
|
243
|
-
throw await
|
|
243
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
244
244
|
default:
|
|
245
245
|
const parsedBody = parsedOutput.body;
|
|
246
246
|
throwDefaultError({
|
|
@@ -251,9 +251,9 @@ const deserializeAws_restJson1GetSnapshotBlockCommandError = async (output, cont
|
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
|
-
export const
|
|
254
|
+
export const de_ListChangedBlocksCommand = async (output, context) => {
|
|
255
255
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
256
|
-
return
|
|
256
|
+
return de_ListChangedBlocksCommandError(output, context);
|
|
257
257
|
}
|
|
258
258
|
const contents = map({
|
|
259
259
|
$metadata: deserializeMetadata(output),
|
|
@@ -263,7 +263,7 @@ export const deserializeAws_restJson1ListChangedBlocksCommand = async (output, c
|
|
|
263
263
|
contents.BlockSize = __expectInt32(data.BlockSize);
|
|
264
264
|
}
|
|
265
265
|
if (data.ChangedBlocks != null) {
|
|
266
|
-
contents.ChangedBlocks =
|
|
266
|
+
contents.ChangedBlocks = de_ChangedBlocks(data.ChangedBlocks, context);
|
|
267
267
|
}
|
|
268
268
|
if (data.ExpiryTime != null) {
|
|
269
269
|
contents.ExpiryTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ExpiryTime)));
|
|
@@ -276,7 +276,7 @@ export const deserializeAws_restJson1ListChangedBlocksCommand = async (output, c
|
|
|
276
276
|
}
|
|
277
277
|
return contents;
|
|
278
278
|
};
|
|
279
|
-
const
|
|
279
|
+
const de_ListChangedBlocksCommandError = async (output, context) => {
|
|
280
280
|
const parsedOutput = {
|
|
281
281
|
...output,
|
|
282
282
|
body: await parseErrorBody(output.body, context),
|
|
@@ -285,22 +285,22 @@ const deserializeAws_restJson1ListChangedBlocksCommandError = async (output, con
|
|
|
285
285
|
switch (errorCode) {
|
|
286
286
|
case "AccessDeniedException":
|
|
287
287
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
288
|
-
throw await
|
|
288
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
289
289
|
case "InternalServerException":
|
|
290
290
|
case "com.amazonaws.ebs#InternalServerException":
|
|
291
|
-
throw await
|
|
291
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
292
292
|
case "RequestThrottledException":
|
|
293
293
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
294
|
-
throw await
|
|
294
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
295
295
|
case "ResourceNotFoundException":
|
|
296
296
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
297
|
-
throw await
|
|
297
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
298
298
|
case "ServiceQuotaExceededException":
|
|
299
299
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
300
|
-
throw await
|
|
300
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
301
301
|
case "ValidationException":
|
|
302
302
|
case "com.amazonaws.ebs#ValidationException":
|
|
303
|
-
throw await
|
|
303
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
304
304
|
default:
|
|
305
305
|
const parsedBody = parsedOutput.body;
|
|
306
306
|
throwDefaultError({
|
|
@@ -311,9 +311,9 @@ const deserializeAws_restJson1ListChangedBlocksCommandError = async (output, con
|
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
|
-
export const
|
|
314
|
+
export const de_ListSnapshotBlocksCommand = async (output, context) => {
|
|
315
315
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
316
|
-
return
|
|
316
|
+
return de_ListSnapshotBlocksCommandError(output, context);
|
|
317
317
|
}
|
|
318
318
|
const contents = map({
|
|
319
319
|
$metadata: deserializeMetadata(output),
|
|
@@ -323,7 +323,7 @@ export const deserializeAws_restJson1ListSnapshotBlocksCommand = async (output,
|
|
|
323
323
|
contents.BlockSize = __expectInt32(data.BlockSize);
|
|
324
324
|
}
|
|
325
325
|
if (data.Blocks != null) {
|
|
326
|
-
contents.Blocks =
|
|
326
|
+
contents.Blocks = de_Blocks(data.Blocks, context);
|
|
327
327
|
}
|
|
328
328
|
if (data.ExpiryTime != null) {
|
|
329
329
|
contents.ExpiryTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ExpiryTime)));
|
|
@@ -336,7 +336,7 @@ export const deserializeAws_restJson1ListSnapshotBlocksCommand = async (output,
|
|
|
336
336
|
}
|
|
337
337
|
return contents;
|
|
338
338
|
};
|
|
339
|
-
const
|
|
339
|
+
const de_ListSnapshotBlocksCommandError = async (output, context) => {
|
|
340
340
|
const parsedOutput = {
|
|
341
341
|
...output,
|
|
342
342
|
body: await parseErrorBody(output.body, context),
|
|
@@ -345,22 +345,22 @@ const deserializeAws_restJson1ListSnapshotBlocksCommandError = async (output, co
|
|
|
345
345
|
switch (errorCode) {
|
|
346
346
|
case "AccessDeniedException":
|
|
347
347
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
348
|
-
throw await
|
|
348
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
349
349
|
case "InternalServerException":
|
|
350
350
|
case "com.amazonaws.ebs#InternalServerException":
|
|
351
|
-
throw await
|
|
351
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
352
352
|
case "RequestThrottledException":
|
|
353
353
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
354
|
-
throw await
|
|
354
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
355
355
|
case "ResourceNotFoundException":
|
|
356
356
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
357
|
-
throw await
|
|
357
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
358
358
|
case "ServiceQuotaExceededException":
|
|
359
359
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
360
|
-
throw await
|
|
360
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
361
361
|
case "ValidationException":
|
|
362
362
|
case "com.amazonaws.ebs#ValidationException":
|
|
363
|
-
throw await
|
|
363
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
364
364
|
default:
|
|
365
365
|
const parsedBody = parsedOutput.body;
|
|
366
366
|
throwDefaultError({
|
|
@@ -371,9 +371,9 @@ const deserializeAws_restJson1ListSnapshotBlocksCommandError = async (output, co
|
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
|
-
export const
|
|
374
|
+
export const de_PutSnapshotBlockCommand = async (output, context) => {
|
|
375
375
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
376
|
-
return
|
|
376
|
+
return de_PutSnapshotBlockCommandError(output, context);
|
|
377
377
|
}
|
|
378
378
|
const contents = map({
|
|
379
379
|
$metadata: deserializeMetadata(output),
|
|
@@ -383,7 +383,7 @@ export const deserializeAws_restJson1PutSnapshotBlockCommand = async (output, co
|
|
|
383
383
|
await collectBody(output.body, context);
|
|
384
384
|
return contents;
|
|
385
385
|
};
|
|
386
|
-
const
|
|
386
|
+
const de_PutSnapshotBlockCommandError = async (output, context) => {
|
|
387
387
|
const parsedOutput = {
|
|
388
388
|
...output,
|
|
389
389
|
body: await parseErrorBody(output.body, context),
|
|
@@ -392,22 +392,22 @@ const deserializeAws_restJson1PutSnapshotBlockCommandError = async (output, cont
|
|
|
392
392
|
switch (errorCode) {
|
|
393
393
|
case "AccessDeniedException":
|
|
394
394
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
395
|
-
throw await
|
|
395
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
396
396
|
case "InternalServerException":
|
|
397
397
|
case "com.amazonaws.ebs#InternalServerException":
|
|
398
|
-
throw await
|
|
398
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
399
399
|
case "RequestThrottledException":
|
|
400
400
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
401
|
-
throw await
|
|
401
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
402
402
|
case "ResourceNotFoundException":
|
|
403
403
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
404
|
-
throw await
|
|
404
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
405
405
|
case "ServiceQuotaExceededException":
|
|
406
406
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
407
|
-
throw await
|
|
407
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
408
408
|
case "ValidationException":
|
|
409
409
|
case "com.amazonaws.ebs#ValidationException":
|
|
410
|
-
throw await
|
|
410
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
411
411
|
default:
|
|
412
412
|
const parsedBody = parsedOutput.body;
|
|
413
413
|
throwDefaultError({
|
|
@@ -418,9 +418,9 @@ const deserializeAws_restJson1PutSnapshotBlockCommandError = async (output, cont
|
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
};
|
|
421
|
-
export const
|
|
421
|
+
export const de_StartSnapshotCommand = async (output, context) => {
|
|
422
422
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
423
|
-
return
|
|
423
|
+
return de_StartSnapshotCommandError(output, context);
|
|
424
424
|
}
|
|
425
425
|
const contents = map({
|
|
426
426
|
$metadata: deserializeMetadata(output),
|
|
@@ -451,14 +451,14 @@ export const deserializeAws_restJson1StartSnapshotCommand = async (output, conte
|
|
|
451
451
|
contents.Status = __expectString(data.Status);
|
|
452
452
|
}
|
|
453
453
|
if (data.Tags != null) {
|
|
454
|
-
contents.Tags =
|
|
454
|
+
contents.Tags = de_Tags(data.Tags, context);
|
|
455
455
|
}
|
|
456
456
|
if (data.VolumeSize != null) {
|
|
457
457
|
contents.VolumeSize = __expectLong(data.VolumeSize);
|
|
458
458
|
}
|
|
459
459
|
return contents;
|
|
460
460
|
};
|
|
461
|
-
const
|
|
461
|
+
const de_StartSnapshotCommandError = async (output, context) => {
|
|
462
462
|
const parsedOutput = {
|
|
463
463
|
...output,
|
|
464
464
|
body: await parseErrorBody(output.body, context),
|
|
@@ -467,28 +467,28 @@ const deserializeAws_restJson1StartSnapshotCommandError = async (output, context
|
|
|
467
467
|
switch (errorCode) {
|
|
468
468
|
case "AccessDeniedException":
|
|
469
469
|
case "com.amazonaws.ebs#AccessDeniedException":
|
|
470
|
-
throw await
|
|
470
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
471
471
|
case "ConcurrentLimitExceededException":
|
|
472
472
|
case "com.amazonaws.ebs#ConcurrentLimitExceededException":
|
|
473
|
-
throw await
|
|
473
|
+
throw await de_ConcurrentLimitExceededExceptionRes(parsedOutput, context);
|
|
474
474
|
case "ConflictException":
|
|
475
475
|
case "com.amazonaws.ebs#ConflictException":
|
|
476
|
-
throw await
|
|
476
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
477
477
|
case "InternalServerException":
|
|
478
478
|
case "com.amazonaws.ebs#InternalServerException":
|
|
479
|
-
throw await
|
|
479
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
480
480
|
case "RequestThrottledException":
|
|
481
481
|
case "com.amazonaws.ebs#RequestThrottledException":
|
|
482
|
-
throw await
|
|
482
|
+
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
483
483
|
case "ResourceNotFoundException":
|
|
484
484
|
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
485
|
-
throw await
|
|
485
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
486
486
|
case "ServiceQuotaExceededException":
|
|
487
487
|
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
488
|
-
throw await
|
|
488
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
489
489
|
case "ValidationException":
|
|
490
490
|
case "com.amazonaws.ebs#ValidationException":
|
|
491
|
-
throw await
|
|
491
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
492
492
|
default:
|
|
493
493
|
const parsedBody = parsedOutput.body;
|
|
494
494
|
throwDefaultError({
|
|
@@ -500,7 +500,7 @@ const deserializeAws_restJson1StartSnapshotCommandError = async (output, context
|
|
|
500
500
|
}
|
|
501
501
|
};
|
|
502
502
|
const map = __map;
|
|
503
|
-
const
|
|
503
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
504
504
|
const contents = map({});
|
|
505
505
|
const data = parsedOutput.body;
|
|
506
506
|
if (data.Message != null) {
|
|
@@ -515,7 +515,7 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
515
515
|
});
|
|
516
516
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
517
517
|
};
|
|
518
|
-
const
|
|
518
|
+
const de_ConcurrentLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
519
519
|
const contents = map({});
|
|
520
520
|
const data = parsedOutput.body;
|
|
521
521
|
if (data.Message != null) {
|
|
@@ -527,7 +527,7 @@ const deserializeAws_restJson1ConcurrentLimitExceededExceptionResponse = async (
|
|
|
527
527
|
});
|
|
528
528
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
529
529
|
};
|
|
530
|
-
const
|
|
530
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
531
531
|
const contents = map({});
|
|
532
532
|
const data = parsedOutput.body;
|
|
533
533
|
if (data.Message != null) {
|
|
@@ -539,7 +539,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
539
539
|
});
|
|
540
540
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
541
541
|
};
|
|
542
|
-
const
|
|
542
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
543
543
|
const contents = map({});
|
|
544
544
|
const data = parsedOutput.body;
|
|
545
545
|
if (data.Message != null) {
|
|
@@ -551,7 +551,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
551
551
|
});
|
|
552
552
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
553
553
|
};
|
|
554
|
-
const
|
|
554
|
+
const de_RequestThrottledExceptionRes = async (parsedOutput, context) => {
|
|
555
555
|
const contents = map({});
|
|
556
556
|
const data = parsedOutput.body;
|
|
557
557
|
if (data.Message != null) {
|
|
@@ -566,7 +566,7 @@ const deserializeAws_restJson1RequestThrottledExceptionResponse = async (parsedO
|
|
|
566
566
|
});
|
|
567
567
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
568
568
|
};
|
|
569
|
-
const
|
|
569
|
+
const de_ResourceNotFoundExceptionRes = 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_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
581
581
|
});
|
|
582
582
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
583
583
|
};
|
|
584
|
-
const
|
|
584
|
+
const de_ServiceQuotaExceededExceptionRes = 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_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
596
596
|
});
|
|
597
597
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
598
598
|
};
|
|
599
|
-
const
|
|
599
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
600
600
|
const contents = map({});
|
|
601
601
|
const data = parsedOutput.body;
|
|
602
602
|
if (data.Message != null) {
|
|
@@ -611,68 +611,68 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
611
611
|
});
|
|
612
612
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
613
613
|
};
|
|
614
|
-
const
|
|
614
|
+
const se_Tag = (input, context) => {
|
|
615
615
|
return {
|
|
616
616
|
...(input.Key != null && { Key: input.Key }),
|
|
617
617
|
...(input.Value != null && { Value: input.Value }),
|
|
618
618
|
};
|
|
619
619
|
};
|
|
620
|
-
const
|
|
620
|
+
const se_Tags = (input, context) => {
|
|
621
621
|
return input
|
|
622
622
|
.filter((e) => e != null)
|
|
623
623
|
.map((entry) => {
|
|
624
|
-
return
|
|
624
|
+
return se_Tag(entry, context);
|
|
625
625
|
});
|
|
626
626
|
};
|
|
627
|
-
const
|
|
627
|
+
const de_Block = (output, context) => {
|
|
628
628
|
return {
|
|
629
629
|
BlockIndex: __expectInt32(output.BlockIndex),
|
|
630
630
|
BlockToken: __expectString(output.BlockToken),
|
|
631
631
|
};
|
|
632
632
|
};
|
|
633
|
-
const
|
|
633
|
+
const de_Blocks = (output, context) => {
|
|
634
634
|
const retVal = (output || [])
|
|
635
635
|
.filter((e) => e != null)
|
|
636
636
|
.map((entry) => {
|
|
637
637
|
if (entry === null) {
|
|
638
638
|
return null;
|
|
639
639
|
}
|
|
640
|
-
return
|
|
640
|
+
return de_Block(entry, context);
|
|
641
641
|
});
|
|
642
642
|
return retVal;
|
|
643
643
|
};
|
|
644
|
-
const
|
|
644
|
+
const de_ChangedBlock = (output, context) => {
|
|
645
645
|
return {
|
|
646
646
|
BlockIndex: __expectInt32(output.BlockIndex),
|
|
647
647
|
FirstBlockToken: __expectString(output.FirstBlockToken),
|
|
648
648
|
SecondBlockToken: __expectString(output.SecondBlockToken),
|
|
649
649
|
};
|
|
650
650
|
};
|
|
651
|
-
const
|
|
651
|
+
const de_ChangedBlocks = (output, context) => {
|
|
652
652
|
const retVal = (output || [])
|
|
653
653
|
.filter((e) => e != null)
|
|
654
654
|
.map((entry) => {
|
|
655
655
|
if (entry === null) {
|
|
656
656
|
return null;
|
|
657
657
|
}
|
|
658
|
-
return
|
|
658
|
+
return de_ChangedBlock(entry, context);
|
|
659
659
|
});
|
|
660
660
|
return retVal;
|
|
661
661
|
};
|
|
662
|
-
const
|
|
662
|
+
const de_Tag = (output, context) => {
|
|
663
663
|
return {
|
|
664
664
|
Key: __expectString(output.Key),
|
|
665
665
|
Value: __expectString(output.Value),
|
|
666
666
|
};
|
|
667
667
|
};
|
|
668
|
-
const
|
|
668
|
+
const de_Tags = (output, context) => {
|
|
669
669
|
const retVal = (output || [])
|
|
670
670
|
.filter((e) => e != null)
|
|
671
671
|
.map((entry) => {
|
|
672
672
|
if (entry === null) {
|
|
673
673
|
return null;
|
|
674
674
|
}
|
|
675
|
-
return
|
|
675
|
+
return de_Tag(entry, context);
|
|
676
676
|
});
|
|
677
677
|
return retVal;
|
|
678
678
|
};
|