@aws-sdk/client-ebs 3.490.0 → 3.496.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/index.js CHANGED
@@ -1,12 +1,1160 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EBSServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./EBSClient"), exports);
6
- tslib_1.__exportStar(require("./EBS"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./models"), exports);
10
- require("@aws-sdk/util-endpoints");
11
- var EBSServiceException_1 = require("./models/EBSServiceException");
12
- Object.defineProperty(exports, "EBSServiceException", { enumerable: true, get: function () { return EBSServiceException_1.EBSServiceException; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ AccessDeniedException: () => AccessDeniedException,
25
+ AccessDeniedExceptionReason: () => AccessDeniedExceptionReason,
26
+ ChangedBlockFilterSensitiveLog: () => ChangedBlockFilterSensitiveLog,
27
+ ChecksumAggregationMethod: () => ChecksumAggregationMethod,
28
+ ChecksumAlgorithm: () => ChecksumAlgorithm,
29
+ CompleteSnapshotCommand: () => CompleteSnapshotCommand,
30
+ ConcurrentLimitExceededException: () => ConcurrentLimitExceededException,
31
+ ConflictException: () => ConflictException,
32
+ EBS: () => EBS,
33
+ EBSClient: () => EBSClient,
34
+ EBSServiceException: () => EBSServiceException,
35
+ GetSnapshotBlockCommand: () => GetSnapshotBlockCommand,
36
+ GetSnapshotBlockResponseFilterSensitiveLog: () => GetSnapshotBlockResponseFilterSensitiveLog,
37
+ InternalServerException: () => InternalServerException,
38
+ ListChangedBlocksCommand: () => ListChangedBlocksCommand,
39
+ ListChangedBlocksResponseFilterSensitiveLog: () => ListChangedBlocksResponseFilterSensitiveLog,
40
+ ListSnapshotBlocksCommand: () => ListSnapshotBlocksCommand,
41
+ ListSnapshotBlocksResponseFilterSensitiveLog: () => ListSnapshotBlocksResponseFilterSensitiveLog,
42
+ PutSnapshotBlockCommand: () => PutSnapshotBlockCommand,
43
+ PutSnapshotBlockRequestFilterSensitiveLog: () => PutSnapshotBlockRequestFilterSensitiveLog,
44
+ RequestThrottledException: () => RequestThrottledException,
45
+ RequestThrottledExceptionReason: () => RequestThrottledExceptionReason,
46
+ ResourceNotFoundException: () => ResourceNotFoundException,
47
+ ResourceNotFoundExceptionReason: () => ResourceNotFoundExceptionReason,
48
+ SSEType: () => SSEType,
49
+ ServiceQuotaExceededException: () => ServiceQuotaExceededException,
50
+ ServiceQuotaExceededExceptionReason: () => ServiceQuotaExceededExceptionReason,
51
+ StartSnapshotCommand: () => StartSnapshotCommand,
52
+ StartSnapshotRequestFilterSensitiveLog: () => StartSnapshotRequestFilterSensitiveLog,
53
+ StartSnapshotResponseFilterSensitiveLog: () => StartSnapshotResponseFilterSensitiveLog,
54
+ Status: () => Status,
55
+ ValidationException: () => ValidationException,
56
+ ValidationExceptionReason: () => ValidationExceptionReason,
57
+ __Client: () => import_smithy_client.Client,
58
+ paginateListChangedBlocks: () => paginateListChangedBlocks,
59
+ paginateListSnapshotBlocks: () => paginateListSnapshotBlocks
60
+ });
61
+ module.exports = __toCommonJS(src_exports);
62
+
63
+ // src/EBSClient.ts
64
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
65
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
66
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
67
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
68
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
69
+ var import_config_resolver = require("@smithy/config-resolver");
70
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
71
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
72
+ var import_middleware_retry = require("@smithy/middleware-retry");
73
+
74
+
75
+ // src/endpoint/EndpointParameters.ts
76
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
77
+ return {
78
+ ...options,
79
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
80
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
81
+ defaultSigningName: "ebs"
82
+ };
83
+ }, "resolveClientEndpointParameters");
84
+ var commonParams = {
85
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
86
+ Endpoint: { type: "builtInParams", name: "endpoint" },
87
+ Region: { type: "builtInParams", name: "region" },
88
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
89
+ };
90
+
91
+ // src/EBSClient.ts
92
+ var import_runtimeConfig = require("././runtimeConfig");
93
+
94
+ // src/runtimeExtensions.ts
95
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
96
+ var import_protocol_http = require("@smithy/protocol-http");
97
+ var import_smithy_client = require("@smithy/smithy-client");
98
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
99
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
100
+ const extensionConfiguration = {
101
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
102
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
103
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
104
+ };
105
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
106
+ return {
107
+ ...runtimeConfig,
108
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
109
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
110
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
111
+ };
112
+ }, "resolveRuntimeExtensions");
113
+
114
+ // src/EBSClient.ts
115
+ var _EBSClient = class _EBSClient extends import_smithy_client.Client {
116
+ constructor(...[configuration]) {
117
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
118
+ const _config_1 = resolveClientEndpointParameters(_config_0);
119
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
120
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
121
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
122
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
123
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
124
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
125
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
126
+ super(_config_8);
127
+ this.config = _config_8;
128
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
129
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
130
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
131
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
132
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
133
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
134
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
135
+ }
136
+ /**
137
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
138
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
139
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
140
+ */
141
+ destroy() {
142
+ super.destroy();
143
+ }
144
+ };
145
+ __name(_EBSClient, "EBSClient");
146
+ var EBSClient = _EBSClient;
147
+
148
+ // src/EBS.ts
149
+
150
+
151
+ // src/commands/CompleteSnapshotCommand.ts
152
+
153
+ var import_middleware_serde = require("@smithy/middleware-serde");
154
+
155
+ var import_types = require("@smithy/types");
156
+
157
+ // src/protocols/Aws_restJson1.ts
158
+ var import_core = require("@smithy/core");
159
+
160
+ var import_uuid = require("uuid");
161
+
162
+ // src/models/EBSServiceException.ts
163
+
164
+ var _EBSServiceException = class _EBSServiceException extends import_smithy_client.ServiceException {
165
+ /**
166
+ * @internal
167
+ */
168
+ constructor(options) {
169
+ super(options);
170
+ Object.setPrototypeOf(this, _EBSServiceException.prototype);
171
+ }
172
+ };
173
+ __name(_EBSServiceException, "EBSServiceException");
174
+ var EBSServiceException = _EBSServiceException;
175
+
176
+ // src/models/models_0.ts
177
+
178
+ var AccessDeniedExceptionReason = {
179
+ DEPENDENCY_ACCESS_DENIED: "DEPENDENCY_ACCESS_DENIED",
180
+ UNAUTHORIZED_ACCOUNT: "UNAUTHORIZED_ACCOUNT"
181
+ };
182
+ var _AccessDeniedException = class _AccessDeniedException extends EBSServiceException {
183
+ /**
184
+ * @internal
185
+ */
186
+ constructor(opts) {
187
+ super({
188
+ name: "AccessDeniedException",
189
+ $fault: "client",
190
+ ...opts
191
+ });
192
+ this.name = "AccessDeniedException";
193
+ this.$fault = "client";
194
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
195
+ this.Message = opts.Message;
196
+ this.Reason = opts.Reason;
197
+ }
198
+ };
199
+ __name(_AccessDeniedException, "AccessDeniedException");
200
+ var AccessDeniedException = _AccessDeniedException;
201
+ var ChecksumAggregationMethod = {
202
+ CHECKSUM_AGGREGATION_LINEAR: "LINEAR"
203
+ };
204
+ var ChecksumAlgorithm = {
205
+ CHECKSUM_ALGORITHM_SHA256: "SHA256"
206
+ };
207
+ var Status = {
208
+ COMPLETED: "completed",
209
+ ERROR: "error",
210
+ PENDING: "pending"
211
+ };
212
+ var _InternalServerException = class _InternalServerException extends EBSServiceException {
213
+ /**
214
+ * @internal
215
+ */
216
+ constructor(opts) {
217
+ super({
218
+ name: "InternalServerException",
219
+ $fault: "server",
220
+ ...opts
221
+ });
222
+ this.name = "InternalServerException";
223
+ this.$fault = "server";
224
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
225
+ this.Message = opts.Message;
226
+ }
227
+ };
228
+ __name(_InternalServerException, "InternalServerException");
229
+ var InternalServerException = _InternalServerException;
230
+ var RequestThrottledExceptionReason = {
231
+ ACCOUNT_THROTTLED: "ACCOUNT_THROTTLED",
232
+ DEPENDENCY_REQUEST_THROTTLED: "DEPENDENCY_REQUEST_THROTTLED",
233
+ RESOURCE_LEVEL_THROTTLE: "RESOURCE_LEVEL_THROTTLE"
234
+ };
235
+ var _RequestThrottledException = class _RequestThrottledException extends EBSServiceException {
236
+ /**
237
+ * @internal
238
+ */
239
+ constructor(opts) {
240
+ super({
241
+ name: "RequestThrottledException",
242
+ $fault: "client",
243
+ ...opts
244
+ });
245
+ this.name = "RequestThrottledException";
246
+ this.$fault = "client";
247
+ Object.setPrototypeOf(this, _RequestThrottledException.prototype);
248
+ this.Message = opts.Message;
249
+ this.Reason = opts.Reason;
250
+ }
251
+ };
252
+ __name(_RequestThrottledException, "RequestThrottledException");
253
+ var RequestThrottledException = _RequestThrottledException;
254
+ var ResourceNotFoundExceptionReason = {
255
+ DEPENDENCY_RESOURCE_NOT_FOUND: "DEPENDENCY_RESOURCE_NOT_FOUND",
256
+ GRANT_NOT_FOUND: "GRANT_NOT_FOUND",
257
+ IMAGE_NOT_FOUND: "IMAGE_NOT_FOUND",
258
+ SNAPSHOT_NOT_FOUND: "SNAPSHOT_NOT_FOUND"
259
+ };
260
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends EBSServiceException {
261
+ /**
262
+ * @internal
263
+ */
264
+ constructor(opts) {
265
+ super({
266
+ name: "ResourceNotFoundException",
267
+ $fault: "client",
268
+ ...opts
269
+ });
270
+ this.name = "ResourceNotFoundException";
271
+ this.$fault = "client";
272
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
273
+ this.Message = opts.Message;
274
+ this.Reason = opts.Reason;
275
+ }
276
+ };
277
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
278
+ var ResourceNotFoundException = _ResourceNotFoundException;
279
+ var ServiceQuotaExceededExceptionReason = {
280
+ DEPENDENCY_SERVICE_QUOTA_EXCEEDED: "DEPENDENCY_SERVICE_QUOTA_EXCEEDED"
281
+ };
282
+ var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends EBSServiceException {
283
+ /**
284
+ * @internal
285
+ */
286
+ constructor(opts) {
287
+ super({
288
+ name: "ServiceQuotaExceededException",
289
+ $fault: "client",
290
+ ...opts
291
+ });
292
+ this.name = "ServiceQuotaExceededException";
293
+ this.$fault = "client";
294
+ Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
295
+ this.Message = opts.Message;
296
+ this.Reason = opts.Reason;
297
+ }
298
+ };
299
+ __name(_ServiceQuotaExceededException, "ServiceQuotaExceededException");
300
+ var ServiceQuotaExceededException = _ServiceQuotaExceededException;
301
+ var ValidationExceptionReason = {
302
+ CONFLICTING_BLOCK_UPDATE: "CONFLICTING_BLOCK_UPDATE",
303
+ INVALID_BLOCK: "INVALID_BLOCK",
304
+ INVALID_BLOCK_TOKEN: "INVALID_BLOCK_TOKEN",
305
+ INVALID_CONTENT_ENCODING: "INVALID_CONTENT_ENCODING",
306
+ INVALID_CUSTOMER_KEY: "INVALID_CUSTOMER_KEY",
307
+ INVALID_DEPENDENCY_REQUEST: "INVALID_DEPENDENCY_REQUEST",
308
+ INVALID_GRANT_TOKEN: "INVALID_GRANT_TOKEN",
309
+ INVALID_IMAGE_ID: "INVALID_IMAGE_ID",
310
+ INVALID_PAGE_TOKEN: "INVALID_PAGE_TOKEN",
311
+ INVALID_PARAMETER_VALUE: "INVALID_PARAMETER_VALUE",
312
+ INVALID_SNAPSHOT_ID: "INVALID_SNAPSHOT_ID",
313
+ INVALID_TAG: "INVALID_TAG",
314
+ INVALID_VOLUME_SIZE: "INVALID_VOLUME_SIZE",
315
+ UNRELATED_SNAPSHOTS: "UNRELATED_SNAPSHOTS",
316
+ WRITE_REQUEST_TIMEOUT: "WRITE_REQUEST_TIMEOUT"
317
+ };
318
+ var _ValidationException = class _ValidationException extends EBSServiceException {
319
+ /**
320
+ * @internal
321
+ */
322
+ constructor(opts) {
323
+ super({
324
+ name: "ValidationException",
325
+ $fault: "client",
326
+ ...opts
327
+ });
328
+ this.name = "ValidationException";
329
+ this.$fault = "client";
330
+ Object.setPrototypeOf(this, _ValidationException.prototype);
331
+ this.Message = opts.Message;
332
+ this.Reason = opts.Reason;
333
+ }
334
+ };
335
+ __name(_ValidationException, "ValidationException");
336
+ var ValidationException = _ValidationException;
337
+ var _ConcurrentLimitExceededException = class _ConcurrentLimitExceededException extends EBSServiceException {
338
+ /**
339
+ * @internal
340
+ */
341
+ constructor(opts) {
342
+ super({
343
+ name: "ConcurrentLimitExceededException",
344
+ $fault: "client",
345
+ ...opts
346
+ });
347
+ this.name = "ConcurrentLimitExceededException";
348
+ this.$fault = "client";
349
+ Object.setPrototypeOf(this, _ConcurrentLimitExceededException.prototype);
350
+ this.Message = opts.Message;
351
+ }
352
+ };
353
+ __name(_ConcurrentLimitExceededException, "ConcurrentLimitExceededException");
354
+ var ConcurrentLimitExceededException = _ConcurrentLimitExceededException;
355
+ var _ConflictException = class _ConflictException extends EBSServiceException {
356
+ /**
357
+ * @internal
358
+ */
359
+ constructor(opts) {
360
+ super({
361
+ name: "ConflictException",
362
+ $fault: "client",
363
+ ...opts
364
+ });
365
+ this.name = "ConflictException";
366
+ this.$fault = "client";
367
+ Object.setPrototypeOf(this, _ConflictException.prototype);
368
+ this.Message = opts.Message;
369
+ }
370
+ };
371
+ __name(_ConflictException, "ConflictException");
372
+ var ConflictException = _ConflictException;
373
+ var SSEType = {
374
+ NONE: "none",
375
+ SSE_EBS: "sse-ebs",
376
+ SSE_KMS: "sse-kms"
377
+ };
378
+ var ChangedBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
379
+ ...obj
380
+ }), "ChangedBlockFilterSensitiveLog");
381
+ var GetSnapshotBlockResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
382
+ ...obj,
383
+ ...obj.BlockData && { BlockData: import_smithy_client.SENSITIVE_STRING }
384
+ }), "GetSnapshotBlockResponseFilterSensitiveLog");
385
+ var ListChangedBlocksResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
386
+ ...obj,
387
+ ...obj.ChangedBlocks && { ChangedBlocks: import_smithy_client.SENSITIVE_STRING }
388
+ }), "ListChangedBlocksResponseFilterSensitiveLog");
389
+ var ListSnapshotBlocksResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
390
+ ...obj,
391
+ ...obj.Blocks && { Blocks: import_smithy_client.SENSITIVE_STRING }
392
+ }), "ListSnapshotBlocksResponseFilterSensitiveLog");
393
+ var PutSnapshotBlockRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
394
+ ...obj,
395
+ ...obj.BlockData && { BlockData: import_smithy_client.SENSITIVE_STRING }
396
+ }), "PutSnapshotBlockRequestFilterSensitiveLog");
397
+ var StartSnapshotRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
398
+ ...obj,
399
+ ...obj.KmsKeyArn && { KmsKeyArn: import_smithy_client.SENSITIVE_STRING }
400
+ }), "StartSnapshotRequestFilterSensitiveLog");
401
+ var StartSnapshotResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
402
+ ...obj,
403
+ ...obj.KmsKeyArn && { KmsKeyArn: import_smithy_client.SENSITIVE_STRING }
404
+ }), "StartSnapshotResponseFilterSensitiveLog");
405
+
406
+ // src/protocols/Aws_restJson1.ts
407
+ var se_CompleteSnapshotCommand = /* @__PURE__ */ __name(async (input, context) => {
408
+ const b = (0, import_core.requestBuilder)(input, context);
409
+ const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
410
+ [_xac]: [() => isSerializableHeaderValue(input[_CBC]), () => input[_CBC].toString()],
411
+ [_xac_]: input[_C],
412
+ [_xaca]: input[_CA],
413
+ [_xacam]: input[_CAM]
414
+ });
415
+ b.bp("/snapshots/completion/{SnapshotId}");
416
+ b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
417
+ let body;
418
+ b.m("POST").h(headers).b(body);
419
+ return b.build();
420
+ }, "se_CompleteSnapshotCommand");
421
+ var se_GetSnapshotBlockCommand = /* @__PURE__ */ __name(async (input, context) => {
422
+ const b = (0, import_core.requestBuilder)(input, context);
423
+ const headers = {};
424
+ b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");
425
+ b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
426
+ b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
427
+ const query = (0, import_smithy_client.map)({
428
+ [_bT]: [, (0, import_smithy_client.expectNonNull)(input[_BT], `BlockToken`)]
429
+ });
430
+ let body;
431
+ b.m("GET").h(headers).q(query).b(body);
432
+ return b.build();
433
+ }, "se_GetSnapshotBlockCommand");
434
+ var se_ListChangedBlocksCommand = /* @__PURE__ */ __name(async (input, context) => {
435
+ const b = (0, import_core.requestBuilder)(input, context);
436
+ const headers = {};
437
+ b.bp("/snapshots/{SecondSnapshotId}/changedblocks");
438
+ b.p("SecondSnapshotId", () => input.SecondSnapshotId, "{SecondSnapshotId}", false);
439
+ const query = (0, import_smithy_client.map)({
440
+ [_fSI]: [, input[_FSI]],
441
+ [_pT]: [, input[_NT]],
442
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
443
+ [_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()]
444
+ });
445
+ let body;
446
+ b.m("GET").h(headers).q(query).b(body);
447
+ return b.build();
448
+ }, "se_ListChangedBlocksCommand");
449
+ var se_ListSnapshotBlocksCommand = /* @__PURE__ */ __name(async (input, context) => {
450
+ const b = (0, import_core.requestBuilder)(input, context);
451
+ const headers = {};
452
+ b.bp("/snapshots/{SnapshotId}/blocks");
453
+ b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
454
+ const query = (0, import_smithy_client.map)({
455
+ [_pT]: [, input[_NT]],
456
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
457
+ [_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()]
458
+ });
459
+ let body;
460
+ b.m("GET").h(headers).q(query).b(body);
461
+ return b.build();
462
+ }, "se_ListSnapshotBlocksCommand");
463
+ var se_PutSnapshotBlockCommand = /* @__PURE__ */ __name(async (input, context) => {
464
+ const b = (0, import_core.requestBuilder)(input, context);
465
+ const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
466
+ "x-amz-content-sha256": "UNSIGNED-PAYLOAD",
467
+ "content-type": "application/octet-stream",
468
+ [_xadl]: [() => isSerializableHeaderValue(input[_DL]), () => input[_DL].toString()],
469
+ [_xap]: [() => isSerializableHeaderValue(input[_P]), () => input[_P].toString()],
470
+ [_xac_]: input[_C],
471
+ [_xaca]: input[_CA]
472
+ });
473
+ b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");
474
+ b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
475
+ b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
476
+ let body;
477
+ if (input.BlockData !== void 0) {
478
+ body = input.BlockData;
479
+ }
480
+ b.m("PUT").h(headers).b(body);
481
+ return b.build();
482
+ }, "se_PutSnapshotBlockCommand");
483
+ var se_StartSnapshotCommand = /* @__PURE__ */ __name(async (input, context) => {
484
+ const b = (0, import_core.requestBuilder)(input, context);
485
+ const headers = {
486
+ "content-type": "application/json"
487
+ };
488
+ b.bp("/snapshots");
489
+ let body;
490
+ body = JSON.stringify(
491
+ (0, import_smithy_client.take)(input, {
492
+ ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
493
+ Description: [],
494
+ Encrypted: [],
495
+ KmsKeyArn: [],
496
+ ParentSnapshotId: [],
497
+ Tags: (_) => (0, import_smithy_client._json)(_),
498
+ Timeout: [],
499
+ VolumeSize: []
500
+ })
501
+ );
502
+ b.m("POST").h(headers).b(body);
503
+ return b.build();
504
+ }, "se_StartSnapshotCommand");
505
+ var de_CompleteSnapshotCommand = /* @__PURE__ */ __name(async (output, context) => {
506
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
507
+ return de_CompleteSnapshotCommandError(output, context);
508
+ }
509
+ const contents = (0, import_smithy_client.map)({
510
+ $metadata: deserializeMetadata(output)
511
+ });
512
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
513
+ const doc = (0, import_smithy_client.take)(data, {
514
+ Status: import_smithy_client.expectString
515
+ });
516
+ Object.assign(contents, doc);
517
+ return contents;
518
+ }, "de_CompleteSnapshotCommand");
519
+ var de_CompleteSnapshotCommandError = /* @__PURE__ */ __name(async (output, context) => {
520
+ const parsedOutput = {
521
+ ...output,
522
+ body: await parseErrorBody(output.body, context)
523
+ };
524
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
525
+ switch (errorCode) {
526
+ case "AccessDeniedException":
527
+ case "com.amazonaws.ebs#AccessDeniedException":
528
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
529
+ case "InternalServerException":
530
+ case "com.amazonaws.ebs#InternalServerException":
531
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
532
+ case "RequestThrottledException":
533
+ case "com.amazonaws.ebs#RequestThrottledException":
534
+ throw await de_RequestThrottledExceptionRes(parsedOutput, context);
535
+ case "ResourceNotFoundException":
536
+ case "com.amazonaws.ebs#ResourceNotFoundException":
537
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
538
+ case "ServiceQuotaExceededException":
539
+ case "com.amazonaws.ebs#ServiceQuotaExceededException":
540
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
541
+ case "ValidationException":
542
+ case "com.amazonaws.ebs#ValidationException":
543
+ throw await de_ValidationExceptionRes(parsedOutput, context);
544
+ default:
545
+ const parsedBody = parsedOutput.body;
546
+ return throwDefaultError({
547
+ output,
548
+ parsedBody,
549
+ errorCode
550
+ });
551
+ }
552
+ }, "de_CompleteSnapshotCommandError");
553
+ var de_GetSnapshotBlockCommand = /* @__PURE__ */ __name(async (output, context) => {
554
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
555
+ return de_GetSnapshotBlockCommandError(output, context);
556
+ }
557
+ const contents = (0, import_smithy_client.map)({
558
+ $metadata: deserializeMetadata(output),
559
+ [_DL]: [() => void 0 !== output.headers[_xadl], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xadl])],
560
+ [_C]: [, output.headers[_xac_]],
561
+ [_CA]: [, output.headers[_xaca]]
562
+ });
563
+ const data = output.body;
564
+ context.sdkStreamMixin(data);
565
+ contents.BlockData = data;
566
+ return contents;
567
+ }, "de_GetSnapshotBlockCommand");
568
+ var de_GetSnapshotBlockCommandError = /* @__PURE__ */ __name(async (output, context) => {
569
+ const parsedOutput = {
570
+ ...output,
571
+ body: await parseErrorBody(output.body, context)
572
+ };
573
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
574
+ switch (errorCode) {
575
+ case "AccessDeniedException":
576
+ case "com.amazonaws.ebs#AccessDeniedException":
577
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
578
+ case "InternalServerException":
579
+ case "com.amazonaws.ebs#InternalServerException":
580
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
581
+ case "RequestThrottledException":
582
+ case "com.amazonaws.ebs#RequestThrottledException":
583
+ throw await de_RequestThrottledExceptionRes(parsedOutput, context);
584
+ case "ResourceNotFoundException":
585
+ case "com.amazonaws.ebs#ResourceNotFoundException":
586
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
587
+ case "ServiceQuotaExceededException":
588
+ case "com.amazonaws.ebs#ServiceQuotaExceededException":
589
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
590
+ case "ValidationException":
591
+ case "com.amazonaws.ebs#ValidationException":
592
+ throw await de_ValidationExceptionRes(parsedOutput, context);
593
+ default:
594
+ const parsedBody = parsedOutput.body;
595
+ return throwDefaultError({
596
+ output,
597
+ parsedBody,
598
+ errorCode
599
+ });
600
+ }
601
+ }, "de_GetSnapshotBlockCommandError");
602
+ var de_ListChangedBlocksCommand = /* @__PURE__ */ __name(async (output, context) => {
603
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
604
+ return de_ListChangedBlocksCommandError(output, context);
605
+ }
606
+ const contents = (0, import_smithy_client.map)({
607
+ $metadata: deserializeMetadata(output)
608
+ });
609
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
610
+ const doc = (0, import_smithy_client.take)(data, {
611
+ BlockSize: import_smithy_client.expectInt32,
612
+ ChangedBlocks: import_smithy_client._json,
613
+ ExpiryTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
614
+ NextToken: import_smithy_client.expectString,
615
+ VolumeSize: import_smithy_client.expectLong
616
+ });
617
+ Object.assign(contents, doc);
618
+ return contents;
619
+ }, "de_ListChangedBlocksCommand");
620
+ var de_ListChangedBlocksCommandError = /* @__PURE__ */ __name(async (output, context) => {
621
+ const parsedOutput = {
622
+ ...output,
623
+ body: await parseErrorBody(output.body, context)
624
+ };
625
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
626
+ switch (errorCode) {
627
+ case "AccessDeniedException":
628
+ case "com.amazonaws.ebs#AccessDeniedException":
629
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
630
+ case "InternalServerException":
631
+ case "com.amazonaws.ebs#InternalServerException":
632
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
633
+ case "RequestThrottledException":
634
+ case "com.amazonaws.ebs#RequestThrottledException":
635
+ throw await de_RequestThrottledExceptionRes(parsedOutput, context);
636
+ case "ResourceNotFoundException":
637
+ case "com.amazonaws.ebs#ResourceNotFoundException":
638
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
639
+ case "ServiceQuotaExceededException":
640
+ case "com.amazonaws.ebs#ServiceQuotaExceededException":
641
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
642
+ case "ValidationException":
643
+ case "com.amazonaws.ebs#ValidationException":
644
+ throw await de_ValidationExceptionRes(parsedOutput, context);
645
+ default:
646
+ const parsedBody = parsedOutput.body;
647
+ return throwDefaultError({
648
+ output,
649
+ parsedBody,
650
+ errorCode
651
+ });
652
+ }
653
+ }, "de_ListChangedBlocksCommandError");
654
+ var de_ListSnapshotBlocksCommand = /* @__PURE__ */ __name(async (output, context) => {
655
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
656
+ return de_ListSnapshotBlocksCommandError(output, context);
657
+ }
658
+ const contents = (0, import_smithy_client.map)({
659
+ $metadata: deserializeMetadata(output)
660
+ });
661
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
662
+ const doc = (0, import_smithy_client.take)(data, {
663
+ BlockSize: import_smithy_client.expectInt32,
664
+ Blocks: import_smithy_client._json,
665
+ ExpiryTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
666
+ NextToken: import_smithy_client.expectString,
667
+ VolumeSize: import_smithy_client.expectLong
668
+ });
669
+ Object.assign(contents, doc);
670
+ return contents;
671
+ }, "de_ListSnapshotBlocksCommand");
672
+ var de_ListSnapshotBlocksCommandError = /* @__PURE__ */ __name(async (output, context) => {
673
+ const parsedOutput = {
674
+ ...output,
675
+ body: await parseErrorBody(output.body, context)
676
+ };
677
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
678
+ switch (errorCode) {
679
+ case "AccessDeniedException":
680
+ case "com.amazonaws.ebs#AccessDeniedException":
681
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
682
+ case "InternalServerException":
683
+ case "com.amazonaws.ebs#InternalServerException":
684
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
685
+ case "RequestThrottledException":
686
+ case "com.amazonaws.ebs#RequestThrottledException":
687
+ throw await de_RequestThrottledExceptionRes(parsedOutput, context);
688
+ case "ResourceNotFoundException":
689
+ case "com.amazonaws.ebs#ResourceNotFoundException":
690
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
691
+ case "ServiceQuotaExceededException":
692
+ case "com.amazonaws.ebs#ServiceQuotaExceededException":
693
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
694
+ case "ValidationException":
695
+ case "com.amazonaws.ebs#ValidationException":
696
+ throw await de_ValidationExceptionRes(parsedOutput, context);
697
+ default:
698
+ const parsedBody = parsedOutput.body;
699
+ return throwDefaultError({
700
+ output,
701
+ parsedBody,
702
+ errorCode
703
+ });
704
+ }
705
+ }, "de_ListSnapshotBlocksCommandError");
706
+ var de_PutSnapshotBlockCommand = /* @__PURE__ */ __name(async (output, context) => {
707
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
708
+ return de_PutSnapshotBlockCommandError(output, context);
709
+ }
710
+ const contents = (0, import_smithy_client.map)({
711
+ $metadata: deserializeMetadata(output),
712
+ [_C]: [, output.headers[_xac_]],
713
+ [_CA]: [, output.headers[_xaca]]
714
+ });
715
+ await (0, import_smithy_client.collectBody)(output.body, context);
716
+ return contents;
717
+ }, "de_PutSnapshotBlockCommand");
718
+ var de_PutSnapshotBlockCommandError = /* @__PURE__ */ __name(async (output, context) => {
719
+ const parsedOutput = {
720
+ ...output,
721
+ body: await parseErrorBody(output.body, context)
722
+ };
723
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
724
+ switch (errorCode) {
725
+ case "AccessDeniedException":
726
+ case "com.amazonaws.ebs#AccessDeniedException":
727
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
728
+ case "InternalServerException":
729
+ case "com.amazonaws.ebs#InternalServerException":
730
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
731
+ case "RequestThrottledException":
732
+ case "com.amazonaws.ebs#RequestThrottledException":
733
+ throw await de_RequestThrottledExceptionRes(parsedOutput, context);
734
+ case "ResourceNotFoundException":
735
+ case "com.amazonaws.ebs#ResourceNotFoundException":
736
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
737
+ case "ServiceQuotaExceededException":
738
+ case "com.amazonaws.ebs#ServiceQuotaExceededException":
739
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
740
+ case "ValidationException":
741
+ case "com.amazonaws.ebs#ValidationException":
742
+ throw await de_ValidationExceptionRes(parsedOutput, context);
743
+ default:
744
+ const parsedBody = parsedOutput.body;
745
+ return throwDefaultError({
746
+ output,
747
+ parsedBody,
748
+ errorCode
749
+ });
750
+ }
751
+ }, "de_PutSnapshotBlockCommandError");
752
+ var de_StartSnapshotCommand = /* @__PURE__ */ __name(async (output, context) => {
753
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
754
+ return de_StartSnapshotCommandError(output, context);
755
+ }
756
+ const contents = (0, import_smithy_client.map)({
757
+ $metadata: deserializeMetadata(output)
758
+ });
759
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
760
+ const doc = (0, import_smithy_client.take)(data, {
761
+ BlockSize: import_smithy_client.expectInt32,
762
+ Description: import_smithy_client.expectString,
763
+ KmsKeyArn: import_smithy_client.expectString,
764
+ OwnerId: import_smithy_client.expectString,
765
+ ParentSnapshotId: import_smithy_client.expectString,
766
+ SnapshotId: import_smithy_client.expectString,
767
+ SseType: import_smithy_client.expectString,
768
+ StartTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
769
+ Status: import_smithy_client.expectString,
770
+ Tags: import_smithy_client._json,
771
+ VolumeSize: import_smithy_client.expectLong
772
+ });
773
+ Object.assign(contents, doc);
774
+ return contents;
775
+ }, "de_StartSnapshotCommand");
776
+ var de_StartSnapshotCommandError = /* @__PURE__ */ __name(async (output, context) => {
777
+ const parsedOutput = {
778
+ ...output,
779
+ body: await parseErrorBody(output.body, context)
780
+ };
781
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
782
+ switch (errorCode) {
783
+ case "AccessDeniedException":
784
+ case "com.amazonaws.ebs#AccessDeniedException":
785
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
786
+ case "ConcurrentLimitExceededException":
787
+ case "com.amazonaws.ebs#ConcurrentLimitExceededException":
788
+ throw await de_ConcurrentLimitExceededExceptionRes(parsedOutput, context);
789
+ case "ConflictException":
790
+ case "com.amazonaws.ebs#ConflictException":
791
+ throw await de_ConflictExceptionRes(parsedOutput, context);
792
+ case "InternalServerException":
793
+ case "com.amazonaws.ebs#InternalServerException":
794
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
795
+ case "RequestThrottledException":
796
+ case "com.amazonaws.ebs#RequestThrottledException":
797
+ throw await de_RequestThrottledExceptionRes(parsedOutput, context);
798
+ case "ResourceNotFoundException":
799
+ case "com.amazonaws.ebs#ResourceNotFoundException":
800
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
801
+ case "ServiceQuotaExceededException":
802
+ case "com.amazonaws.ebs#ServiceQuotaExceededException":
803
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
804
+ case "ValidationException":
805
+ case "com.amazonaws.ebs#ValidationException":
806
+ throw await de_ValidationExceptionRes(parsedOutput, context);
807
+ default:
808
+ const parsedBody = parsedOutput.body;
809
+ return throwDefaultError({
810
+ output,
811
+ parsedBody,
812
+ errorCode
813
+ });
814
+ }
815
+ }, "de_StartSnapshotCommandError");
816
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(EBSServiceException);
817
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
818
+ const contents = (0, import_smithy_client.map)({});
819
+ const data = parsedOutput.body;
820
+ const doc = (0, import_smithy_client.take)(data, {
821
+ Message: import_smithy_client.expectString,
822
+ Reason: import_smithy_client.expectString
823
+ });
824
+ Object.assign(contents, doc);
825
+ const exception = new AccessDeniedException({
826
+ $metadata: deserializeMetadata(parsedOutput),
827
+ ...contents
828
+ });
829
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
830
+ }, "de_AccessDeniedExceptionRes");
831
+ var de_ConcurrentLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
832
+ const contents = (0, import_smithy_client.map)({});
833
+ const data = parsedOutput.body;
834
+ const doc = (0, import_smithy_client.take)(data, {
835
+ Message: import_smithy_client.expectString
836
+ });
837
+ Object.assign(contents, doc);
838
+ const exception = new ConcurrentLimitExceededException({
839
+ $metadata: deserializeMetadata(parsedOutput),
840
+ ...contents
841
+ });
842
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
843
+ }, "de_ConcurrentLimitExceededExceptionRes");
844
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
845
+ const contents = (0, import_smithy_client.map)({});
846
+ const data = parsedOutput.body;
847
+ const doc = (0, import_smithy_client.take)(data, {
848
+ Message: import_smithy_client.expectString
849
+ });
850
+ Object.assign(contents, doc);
851
+ const exception = new ConflictException({
852
+ $metadata: deserializeMetadata(parsedOutput),
853
+ ...contents
854
+ });
855
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
856
+ }, "de_ConflictExceptionRes");
857
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
858
+ const contents = (0, import_smithy_client.map)({});
859
+ const data = parsedOutput.body;
860
+ const doc = (0, import_smithy_client.take)(data, {
861
+ Message: import_smithy_client.expectString
862
+ });
863
+ Object.assign(contents, doc);
864
+ const exception = new InternalServerException({
865
+ $metadata: deserializeMetadata(parsedOutput),
866
+ ...contents
867
+ });
868
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
869
+ }, "de_InternalServerExceptionRes");
870
+ var de_RequestThrottledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
871
+ const contents = (0, import_smithy_client.map)({});
872
+ const data = parsedOutput.body;
873
+ const doc = (0, import_smithy_client.take)(data, {
874
+ Message: import_smithy_client.expectString,
875
+ Reason: import_smithy_client.expectString
876
+ });
877
+ Object.assign(contents, doc);
878
+ const exception = new RequestThrottledException({
879
+ $metadata: deserializeMetadata(parsedOutput),
880
+ ...contents
881
+ });
882
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
883
+ }, "de_RequestThrottledExceptionRes");
884
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
885
+ const contents = (0, import_smithy_client.map)({});
886
+ const data = parsedOutput.body;
887
+ const doc = (0, import_smithy_client.take)(data, {
888
+ Message: import_smithy_client.expectString,
889
+ Reason: import_smithy_client.expectString
890
+ });
891
+ Object.assign(contents, doc);
892
+ const exception = new ResourceNotFoundException({
893
+ $metadata: deserializeMetadata(parsedOutput),
894
+ ...contents
895
+ });
896
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
897
+ }, "de_ResourceNotFoundExceptionRes");
898
+ var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
899
+ const contents = (0, import_smithy_client.map)({});
900
+ const data = parsedOutput.body;
901
+ const doc = (0, import_smithy_client.take)(data, {
902
+ Message: import_smithy_client.expectString,
903
+ Reason: import_smithy_client.expectString
904
+ });
905
+ Object.assign(contents, doc);
906
+ const exception = new ServiceQuotaExceededException({
907
+ $metadata: deserializeMetadata(parsedOutput),
908
+ ...contents
909
+ });
910
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
911
+ }, "de_ServiceQuotaExceededExceptionRes");
912
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
913
+ const contents = (0, import_smithy_client.map)({});
914
+ const data = parsedOutput.body;
915
+ const doc = (0, import_smithy_client.take)(data, {
916
+ Message: import_smithy_client.expectString,
917
+ Reason: import_smithy_client.expectString
918
+ });
919
+ Object.assign(contents, doc);
920
+ const exception = new ValidationException({
921
+ $metadata: deserializeMetadata(parsedOutput),
922
+ ...contents
923
+ });
924
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
925
+ }, "de_ValidationExceptionRes");
926
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
927
+ httpStatusCode: output.statusCode,
928
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
929
+ extendedRequestId: output.headers["x-amz-id-2"],
930
+ cfId: output.headers["x-amz-cf-id"]
931
+ }), "deserializeMetadata");
932
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
933
+ var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue");
934
+ var _BT = "BlockToken";
935
+ var _C = "Checksum";
936
+ var _CA = "ChecksumAlgorithm";
937
+ var _CAM = "ChecksumAggregationMethod";
938
+ var _CBC = "ChangedBlocksCount";
939
+ var _DL = "DataLength";
940
+ var _FSI = "FirstSnapshotId";
941
+ var _MR = "MaxResults";
942
+ var _NT = "NextToken";
943
+ var _P = "Progress";
944
+ var _SBI = "StartingBlockIndex";
945
+ var _bT = "blockToken";
946
+ var _fSI = "firstSnapshotId";
947
+ var _mR = "maxResults";
948
+ var _pT = "pageToken";
949
+ var _sBI = "startingBlockIndex";
950
+ var _xac = "x-amz-changedblockscount";
951
+ var _xac_ = "x-amz-checksum";
952
+ var _xaca = "x-amz-checksum-algorithm";
953
+ var _xacam = "x-amz-checksum-aggregation-method";
954
+ var _xadl = "x-amz-data-length";
955
+ var _xap = "x-amz-progress";
956
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
957
+ if (encoded.length) {
958
+ return JSON.parse(encoded);
959
+ }
960
+ return {};
961
+ }), "parseBody");
962
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
963
+ const value = await parseBody(errorBody, context);
964
+ value.message = value.message ?? value.Message;
965
+ return value;
966
+ }, "parseErrorBody");
967
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
968
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
969
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
970
+ let cleanValue = rawValue;
971
+ if (typeof cleanValue === "number") {
972
+ cleanValue = cleanValue.toString();
973
+ }
974
+ if (cleanValue.indexOf(",") >= 0) {
975
+ cleanValue = cleanValue.split(",")[0];
976
+ }
977
+ if (cleanValue.indexOf(":") >= 0) {
978
+ cleanValue = cleanValue.split(":")[0];
979
+ }
980
+ if (cleanValue.indexOf("#") >= 0) {
981
+ cleanValue = cleanValue.split("#")[1];
982
+ }
983
+ return cleanValue;
984
+ }, "sanitizeErrorCode");
985
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
986
+ if (headerKey !== void 0) {
987
+ return sanitizeErrorCode(output.headers[headerKey]);
988
+ }
989
+ if (data.code !== void 0) {
990
+ return sanitizeErrorCode(data.code);
991
+ }
992
+ if (data["__type"] !== void 0) {
993
+ return sanitizeErrorCode(data["__type"]);
994
+ }
995
+ }, "loadRestJsonErrorCode");
996
+
997
+ // src/commands/CompleteSnapshotCommand.ts
998
+ var _CompleteSnapshotCommand = class _CompleteSnapshotCommand extends import_smithy_client.Command.classBuilder().ep({
999
+ ...commonParams
1000
+ }).m(function(Command, cs, config, o) {
1001
+ return [
1002
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1003
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1004
+ ];
1005
+ }).s("Ebs", "CompleteSnapshot", {}).n("EBSClient", "CompleteSnapshotCommand").f(void 0, void 0).ser(se_CompleteSnapshotCommand).de(de_CompleteSnapshotCommand).build() {
1006
+ };
1007
+ __name(_CompleteSnapshotCommand, "CompleteSnapshotCommand");
1008
+ var CompleteSnapshotCommand = _CompleteSnapshotCommand;
1009
+
1010
+ // src/commands/GetSnapshotBlockCommand.ts
1011
+
1012
+
1013
+
1014
+
1015
+ var _GetSnapshotBlockCommand = class _GetSnapshotBlockCommand extends import_smithy_client.Command.classBuilder().ep({
1016
+ ...commonParams
1017
+ }).m(function(Command, cs, config, o) {
1018
+ return [
1019
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1020
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1021
+ ];
1022
+ }).s("Ebs", "GetSnapshotBlock", {}).n("EBSClient", "GetSnapshotBlockCommand").f(void 0, GetSnapshotBlockResponseFilterSensitiveLog).ser(se_GetSnapshotBlockCommand).de(de_GetSnapshotBlockCommand).build() {
1023
+ };
1024
+ __name(_GetSnapshotBlockCommand, "GetSnapshotBlockCommand");
1025
+ var GetSnapshotBlockCommand = _GetSnapshotBlockCommand;
1026
+
1027
+ // src/commands/ListChangedBlocksCommand.ts
1028
+
1029
+
1030
+
1031
+
1032
+ var _ListChangedBlocksCommand = class _ListChangedBlocksCommand extends import_smithy_client.Command.classBuilder().ep({
1033
+ ...commonParams
1034
+ }).m(function(Command, cs, config, o) {
1035
+ return [
1036
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1037
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1038
+ ];
1039
+ }).s("Ebs", "ListChangedBlocks", {}).n("EBSClient", "ListChangedBlocksCommand").f(void 0, ListChangedBlocksResponseFilterSensitiveLog).ser(se_ListChangedBlocksCommand).de(de_ListChangedBlocksCommand).build() {
1040
+ };
1041
+ __name(_ListChangedBlocksCommand, "ListChangedBlocksCommand");
1042
+ var ListChangedBlocksCommand = _ListChangedBlocksCommand;
1043
+
1044
+ // src/commands/ListSnapshotBlocksCommand.ts
1045
+
1046
+
1047
+
1048
+
1049
+ var _ListSnapshotBlocksCommand = class _ListSnapshotBlocksCommand extends import_smithy_client.Command.classBuilder().ep({
1050
+ ...commonParams
1051
+ }).m(function(Command, cs, config, o) {
1052
+ return [
1053
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1054
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1055
+ ];
1056
+ }).s("Ebs", "ListSnapshotBlocks", {}).n("EBSClient", "ListSnapshotBlocksCommand").f(void 0, ListSnapshotBlocksResponseFilterSensitiveLog).ser(se_ListSnapshotBlocksCommand).de(de_ListSnapshotBlocksCommand).build() {
1057
+ };
1058
+ __name(_ListSnapshotBlocksCommand, "ListSnapshotBlocksCommand");
1059
+ var ListSnapshotBlocksCommand = _ListSnapshotBlocksCommand;
1060
+
1061
+ // src/commands/PutSnapshotBlockCommand.ts
1062
+
1063
+
1064
+
1065
+
1066
+ var _PutSnapshotBlockCommand = class _PutSnapshotBlockCommand extends import_smithy_client.Command.classBuilder().ep({
1067
+ ...commonParams
1068
+ }).m(function(Command, cs, config, o) {
1069
+ return [
1070
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1071
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1072
+ ];
1073
+ }).s("Ebs", "PutSnapshotBlock", {}).n("EBSClient", "PutSnapshotBlockCommand").f(PutSnapshotBlockRequestFilterSensitiveLog, void 0).ser(se_PutSnapshotBlockCommand).de(de_PutSnapshotBlockCommand).build() {
1074
+ };
1075
+ __name(_PutSnapshotBlockCommand, "PutSnapshotBlockCommand");
1076
+ var PutSnapshotBlockCommand = _PutSnapshotBlockCommand;
1077
+
1078
+ // src/commands/StartSnapshotCommand.ts
1079
+
1080
+
1081
+
1082
+
1083
+ var _StartSnapshotCommand = class _StartSnapshotCommand extends import_smithy_client.Command.classBuilder().ep({
1084
+ ...commonParams
1085
+ }).m(function(Command, cs, config, o) {
1086
+ return [
1087
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1088
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1089
+ ];
1090
+ }).s("Ebs", "StartSnapshot", {}).n("EBSClient", "StartSnapshotCommand").f(StartSnapshotRequestFilterSensitiveLog, StartSnapshotResponseFilterSensitiveLog).ser(se_StartSnapshotCommand).de(de_StartSnapshotCommand).build() {
1091
+ };
1092
+ __name(_StartSnapshotCommand, "StartSnapshotCommand");
1093
+ var StartSnapshotCommand = _StartSnapshotCommand;
1094
+
1095
+ // src/EBS.ts
1096
+ var commands = {
1097
+ CompleteSnapshotCommand,
1098
+ GetSnapshotBlockCommand,
1099
+ ListChangedBlocksCommand,
1100
+ ListSnapshotBlocksCommand,
1101
+ PutSnapshotBlockCommand,
1102
+ StartSnapshotCommand
1103
+ };
1104
+ var _EBS = class _EBS extends EBSClient {
1105
+ };
1106
+ __name(_EBS, "EBS");
1107
+ var EBS = _EBS;
1108
+ (0, import_smithy_client.createAggregatedClient)(commands, EBS);
1109
+
1110
+ // src/pagination/ListChangedBlocksPaginator.ts
1111
+
1112
+ var paginateListChangedBlocks = (0, import_core.createPaginator)(EBSClient, ListChangedBlocksCommand, "NextToken", "NextToken", "MaxResults");
1113
+
1114
+ // src/pagination/ListSnapshotBlocksPaginator.ts
1115
+
1116
+ var paginateListSnapshotBlocks = (0, import_core.createPaginator)(EBSClient, ListSnapshotBlocksCommand, "NextToken", "NextToken", "MaxResults");
1117
+
1118
+ // src/index.ts
1119
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
1120
+ // Annotate the CommonJS export names for ESM import in node:
1121
+
1122
+ 0 && (module.exports = {
1123
+ AccessDeniedException,
1124
+ AccessDeniedExceptionReason,
1125
+ ChangedBlockFilterSensitiveLog,
1126
+ ChecksumAggregationMethod,
1127
+ ChecksumAlgorithm,
1128
+ CompleteSnapshotCommand,
1129
+ ConcurrentLimitExceededException,
1130
+ ConflictException,
1131
+ EBS,
1132
+ EBSClient,
1133
+ EBSServiceException,
1134
+ GetSnapshotBlockCommand,
1135
+ GetSnapshotBlockResponseFilterSensitiveLog,
1136
+ InternalServerException,
1137
+ ListChangedBlocksCommand,
1138
+ ListChangedBlocksResponseFilterSensitiveLog,
1139
+ ListSnapshotBlocksCommand,
1140
+ ListSnapshotBlocksResponseFilterSensitiveLog,
1141
+ PutSnapshotBlockCommand,
1142
+ PutSnapshotBlockRequestFilterSensitiveLog,
1143
+ RequestThrottledException,
1144
+ RequestThrottledExceptionReason,
1145
+ ResourceNotFoundException,
1146
+ ResourceNotFoundExceptionReason,
1147
+ SSEType,
1148
+ ServiceQuotaExceededException,
1149
+ ServiceQuotaExceededExceptionReason,
1150
+ StartSnapshotCommand,
1151
+ StartSnapshotRequestFilterSensitiveLog,
1152
+ StartSnapshotResponseFilterSensitiveLog,
1153
+ Status,
1154
+ ValidationException,
1155
+ ValidationExceptionReason,
1156
+ __Client,
1157
+ paginateListChangedBlocks,
1158
+ paginateListSnapshotBlocks
1159
+ });
1160
+