@aws-sdk/client-ebs 3.312.0 → 3.316.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-es/EBS.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { CompleteSnapshotCommand, } from "./commands/CompleteSnapshotCommand";
2
3
  import { GetSnapshotBlockCommand, } from "./commands/GetSnapshotBlockCommand";
3
4
  import { ListChangedBlocksCommand, } from "./commands/ListChangedBlocksCommand";
@@ -5,89 +6,14 @@ import { ListSnapshotBlocksCommand, } from "./commands/ListSnapshotBlocksCommand
5
6
  import { PutSnapshotBlockCommand, } from "./commands/PutSnapshotBlockCommand";
6
7
  import { StartSnapshotCommand, } from "./commands/StartSnapshotCommand";
7
8
  import { EBSClient } from "./EBSClient";
9
+ const commands = {
10
+ CompleteSnapshotCommand,
11
+ GetSnapshotBlockCommand,
12
+ ListChangedBlocksCommand,
13
+ ListSnapshotBlocksCommand,
14
+ PutSnapshotBlockCommand,
15
+ StartSnapshotCommand,
16
+ };
8
17
  export class EBS extends EBSClient {
9
- completeSnapshot(args, optionsOrCb, cb) {
10
- const command = new CompleteSnapshotCommand(args);
11
- if (typeof optionsOrCb === "function") {
12
- this.send(command, optionsOrCb);
13
- }
14
- else if (typeof cb === "function") {
15
- if (typeof optionsOrCb !== "object")
16
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
17
- this.send(command, optionsOrCb || {}, cb);
18
- }
19
- else {
20
- return this.send(command, optionsOrCb);
21
- }
22
- }
23
- getSnapshotBlock(args, optionsOrCb, cb) {
24
- const command = new GetSnapshotBlockCommand(args);
25
- if (typeof optionsOrCb === "function") {
26
- this.send(command, optionsOrCb);
27
- }
28
- else if (typeof cb === "function") {
29
- if (typeof optionsOrCb !== "object")
30
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
31
- this.send(command, optionsOrCb || {}, cb);
32
- }
33
- else {
34
- return this.send(command, optionsOrCb);
35
- }
36
- }
37
- listChangedBlocks(args, optionsOrCb, cb) {
38
- const command = new ListChangedBlocksCommand(args);
39
- if (typeof optionsOrCb === "function") {
40
- this.send(command, optionsOrCb);
41
- }
42
- else if (typeof cb === "function") {
43
- if (typeof optionsOrCb !== "object")
44
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
45
- this.send(command, optionsOrCb || {}, cb);
46
- }
47
- else {
48
- return this.send(command, optionsOrCb);
49
- }
50
- }
51
- listSnapshotBlocks(args, optionsOrCb, cb) {
52
- const command = new ListSnapshotBlocksCommand(args);
53
- if (typeof optionsOrCb === "function") {
54
- this.send(command, optionsOrCb);
55
- }
56
- else if (typeof cb === "function") {
57
- if (typeof optionsOrCb !== "object")
58
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
59
- this.send(command, optionsOrCb || {}, cb);
60
- }
61
- else {
62
- return this.send(command, optionsOrCb);
63
- }
64
- }
65
- putSnapshotBlock(args, optionsOrCb, cb) {
66
- const command = new PutSnapshotBlockCommand(args);
67
- if (typeof optionsOrCb === "function") {
68
- this.send(command, optionsOrCb);
69
- }
70
- else if (typeof cb === "function") {
71
- if (typeof optionsOrCb !== "object")
72
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
73
- this.send(command, optionsOrCb || {}, cb);
74
- }
75
- else {
76
- return this.send(command, optionsOrCb);
77
- }
78
- }
79
- startSnapshot(args, optionsOrCb, cb) {
80
- const command = new StartSnapshotCommand(args);
81
- if (typeof optionsOrCb === "function") {
82
- this.send(command, optionsOrCb);
83
- }
84
- else if (typeof cb === "function") {
85
- if (typeof optionsOrCb !== "object")
86
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
87
- this.send(command, optionsOrCb || {}, cb);
88
- }
89
- else {
90
- return this.send(command, optionsOrCb);
91
- }
92
- }
93
18
  }
19
+ createAggregatedClient(commands, EBS);
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { EBSServiceException as __BaseException } from "../models/EBSServiceException";
5
5
  import { AccessDeniedException, ConcurrentLimitExceededException, ConflictException, InternalServerException, RequestThrottledException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
@@ -130,16 +130,16 @@ export const se_StartSnapshotCommand = async (input, context) => {
130
130
  };
131
131
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/snapshots";
132
132
  let body;
133
- body = JSON.stringify({
134
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
135
- ...(input.Description != null && { Description: input.Description }),
136
- ...(input.Encrypted != null && { Encrypted: input.Encrypted }),
137
- ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
138
- ...(input.ParentSnapshotId != null && { ParentSnapshotId: input.ParentSnapshotId }),
139
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
140
- ...(input.Timeout != null && { Timeout: input.Timeout }),
141
- ...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }),
142
- });
133
+ body = JSON.stringify(take(input, {
134
+ ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
135
+ Description: [],
136
+ Encrypted: [],
137
+ KmsKeyArn: [],
138
+ ParentSnapshotId: [],
139
+ Tags: (_) => _json(_),
140
+ Timeout: [],
141
+ VolumeSize: [],
142
+ }));
143
143
  return new __HttpRequest({
144
144
  protocol,
145
145
  hostname,
@@ -158,9 +158,10 @@ export const de_CompleteSnapshotCommand = async (output, context) => {
158
158
  $metadata: deserializeMetadata(output),
159
159
  });
160
160
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
161
- if (data.Status != null) {
162
- contents.Status = __expectString(data.Status);
163
- }
161
+ const doc = take(data, {
162
+ Status: __expectString,
163
+ });
164
+ Object.assign(contents, doc);
164
165
  return contents;
165
166
  };
166
167
  const de_CompleteSnapshotCommandError = async (output, context) => {
@@ -190,10 +191,9 @@ const de_CompleteSnapshotCommandError = async (output, context) => {
190
191
  throw await de_ValidationExceptionRes(parsedOutput, context);
191
192
  default:
192
193
  const parsedBody = parsedOutput.body;
193
- throwDefaultError({
194
+ return throwDefaultError({
194
195
  output,
195
196
  parsedBody,
196
- exceptionCtor: __BaseException,
197
197
  errorCode,
198
198
  });
199
199
  }
@@ -243,10 +243,9 @@ const de_GetSnapshotBlockCommandError = async (output, context) => {
243
243
  throw await de_ValidationExceptionRes(parsedOutput, context);
244
244
  default:
245
245
  const parsedBody = parsedOutput.body;
246
- throwDefaultError({
246
+ return throwDefaultError({
247
247
  output,
248
248
  parsedBody,
249
- exceptionCtor: __BaseException,
250
249
  errorCode,
251
250
  });
252
251
  }
@@ -259,21 +258,14 @@ export const de_ListChangedBlocksCommand = async (output, context) => {
259
258
  $metadata: deserializeMetadata(output),
260
259
  });
261
260
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
262
- if (data.BlockSize != null) {
263
- contents.BlockSize = __expectInt32(data.BlockSize);
264
- }
265
- if (data.ChangedBlocks != null) {
266
- contents.ChangedBlocks = de_ChangedBlocks(data.ChangedBlocks, context);
267
- }
268
- if (data.ExpiryTime != null) {
269
- contents.ExpiryTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ExpiryTime)));
270
- }
271
- if (data.NextToken != null) {
272
- contents.NextToken = __expectString(data.NextToken);
273
- }
274
- if (data.VolumeSize != null) {
275
- contents.VolumeSize = __expectLong(data.VolumeSize);
276
- }
261
+ const doc = take(data, {
262
+ BlockSize: __expectInt32,
263
+ ChangedBlocks: _json,
264
+ ExpiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
265
+ NextToken: __expectString,
266
+ VolumeSize: __expectLong,
267
+ });
268
+ Object.assign(contents, doc);
277
269
  return contents;
278
270
  };
279
271
  const de_ListChangedBlocksCommandError = async (output, context) => {
@@ -303,10 +295,9 @@ const de_ListChangedBlocksCommandError = async (output, context) => {
303
295
  throw await de_ValidationExceptionRes(parsedOutput, context);
304
296
  default:
305
297
  const parsedBody = parsedOutput.body;
306
- throwDefaultError({
298
+ return throwDefaultError({
307
299
  output,
308
300
  parsedBody,
309
- exceptionCtor: __BaseException,
310
301
  errorCode,
311
302
  });
312
303
  }
@@ -319,21 +310,14 @@ export const de_ListSnapshotBlocksCommand = async (output, context) => {
319
310
  $metadata: deserializeMetadata(output),
320
311
  });
321
312
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
322
- if (data.BlockSize != null) {
323
- contents.BlockSize = __expectInt32(data.BlockSize);
324
- }
325
- if (data.Blocks != null) {
326
- contents.Blocks = de_Blocks(data.Blocks, context);
327
- }
328
- if (data.ExpiryTime != null) {
329
- contents.ExpiryTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ExpiryTime)));
330
- }
331
- if (data.NextToken != null) {
332
- contents.NextToken = __expectString(data.NextToken);
333
- }
334
- if (data.VolumeSize != null) {
335
- contents.VolumeSize = __expectLong(data.VolumeSize);
336
- }
313
+ const doc = take(data, {
314
+ BlockSize: __expectInt32,
315
+ Blocks: _json,
316
+ ExpiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
317
+ NextToken: __expectString,
318
+ VolumeSize: __expectLong,
319
+ });
320
+ Object.assign(contents, doc);
337
321
  return contents;
338
322
  };
339
323
  const de_ListSnapshotBlocksCommandError = async (output, context) => {
@@ -363,10 +347,9 @@ const de_ListSnapshotBlocksCommandError = async (output, context) => {
363
347
  throw await de_ValidationExceptionRes(parsedOutput, context);
364
348
  default:
365
349
  const parsedBody = parsedOutput.body;
366
- throwDefaultError({
350
+ return throwDefaultError({
367
351
  output,
368
352
  parsedBody,
369
- exceptionCtor: __BaseException,
370
353
  errorCode,
371
354
  });
372
355
  }
@@ -410,10 +393,9 @@ const de_PutSnapshotBlockCommandError = async (output, context) => {
410
393
  throw await de_ValidationExceptionRes(parsedOutput, context);
411
394
  default:
412
395
  const parsedBody = parsedOutput.body;
413
- throwDefaultError({
396
+ return throwDefaultError({
414
397
  output,
415
398
  parsedBody,
416
- exceptionCtor: __BaseException,
417
399
  errorCode,
418
400
  });
419
401
  }
@@ -426,36 +408,19 @@ export const de_StartSnapshotCommand = async (output, context) => {
426
408
  $metadata: deserializeMetadata(output),
427
409
  });
428
410
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
429
- if (data.BlockSize != null) {
430
- contents.BlockSize = __expectInt32(data.BlockSize);
431
- }
432
- if (data.Description != null) {
433
- contents.Description = __expectString(data.Description);
434
- }
435
- if (data.KmsKeyArn != null) {
436
- contents.KmsKeyArn = __expectString(data.KmsKeyArn);
437
- }
438
- if (data.OwnerId != null) {
439
- contents.OwnerId = __expectString(data.OwnerId);
440
- }
441
- if (data.ParentSnapshotId != null) {
442
- contents.ParentSnapshotId = __expectString(data.ParentSnapshotId);
443
- }
444
- if (data.SnapshotId != null) {
445
- contents.SnapshotId = __expectString(data.SnapshotId);
446
- }
447
- if (data.StartTime != null) {
448
- contents.StartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.StartTime)));
449
- }
450
- if (data.Status != null) {
451
- contents.Status = __expectString(data.Status);
452
- }
453
- if (data.Tags != null) {
454
- contents.Tags = de_Tags(data.Tags, context);
455
- }
456
- if (data.VolumeSize != null) {
457
- contents.VolumeSize = __expectLong(data.VolumeSize);
458
- }
411
+ const doc = take(data, {
412
+ BlockSize: __expectInt32,
413
+ Description: __expectString,
414
+ KmsKeyArn: __expectString,
415
+ OwnerId: __expectString,
416
+ ParentSnapshotId: __expectString,
417
+ SnapshotId: __expectString,
418
+ StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
419
+ Status: __expectString,
420
+ Tags: _json,
421
+ VolumeSize: __expectLong,
422
+ });
423
+ Object.assign(contents, doc);
459
424
  return contents;
460
425
  };
461
426
  const de_StartSnapshotCommandError = async (output, context) => {
@@ -491,24 +456,22 @@ const de_StartSnapshotCommandError = async (output, context) => {
491
456
  throw await de_ValidationExceptionRes(parsedOutput, context);
492
457
  default:
493
458
  const parsedBody = parsedOutput.body;
494
- throwDefaultError({
459
+ return throwDefaultError({
495
460
  output,
496
461
  parsedBody,
497
- exceptionCtor: __BaseException,
498
462
  errorCode,
499
463
  });
500
464
  }
501
465
  };
502
- const map = __map;
466
+ const throwDefaultError = withBaseException(__BaseException);
503
467
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
504
468
  const contents = map({});
505
469
  const data = parsedOutput.body;
506
- if (data.Message != null) {
507
- contents.Message = __expectString(data.Message);
508
- }
509
- if (data.Reason != null) {
510
- contents.Reason = __expectString(data.Reason);
511
- }
470
+ const doc = take(data, {
471
+ Message: __expectString,
472
+ Reason: __expectString,
473
+ });
474
+ Object.assign(contents, doc);
512
475
  const exception = new AccessDeniedException({
513
476
  $metadata: deserializeMetadata(parsedOutput),
514
477
  ...contents,
@@ -518,9 +481,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
518
481
  const de_ConcurrentLimitExceededExceptionRes = async (parsedOutput, context) => {
519
482
  const contents = map({});
520
483
  const data = parsedOutput.body;
521
- if (data.Message != null) {
522
- contents.Message = __expectString(data.Message);
523
- }
484
+ const doc = take(data, {
485
+ Message: __expectString,
486
+ });
487
+ Object.assign(contents, doc);
524
488
  const exception = new ConcurrentLimitExceededException({
525
489
  $metadata: deserializeMetadata(parsedOutput),
526
490
  ...contents,
@@ -530,9 +494,10 @@ const de_ConcurrentLimitExceededExceptionRes = async (parsedOutput, context) =>
530
494
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
531
495
  const contents = map({});
532
496
  const data = parsedOutput.body;
533
- if (data.Message != null) {
534
- contents.Message = __expectString(data.Message);
535
- }
497
+ const doc = take(data, {
498
+ Message: __expectString,
499
+ });
500
+ Object.assign(contents, doc);
536
501
  const exception = new ConflictException({
537
502
  $metadata: deserializeMetadata(parsedOutput),
538
503
  ...contents,
@@ -542,9 +507,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
542
507
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
543
508
  const contents = map({});
544
509
  const data = parsedOutput.body;
545
- if (data.Message != null) {
546
- contents.Message = __expectString(data.Message);
547
- }
510
+ const doc = take(data, {
511
+ Message: __expectString,
512
+ });
513
+ Object.assign(contents, doc);
548
514
  const exception = new InternalServerException({
549
515
  $metadata: deserializeMetadata(parsedOutput),
550
516
  ...contents,
@@ -554,12 +520,11 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
554
520
  const de_RequestThrottledExceptionRes = async (parsedOutput, context) => {
555
521
  const contents = map({});
556
522
  const data = parsedOutput.body;
557
- if (data.Message != null) {
558
- contents.Message = __expectString(data.Message);
559
- }
560
- if (data.Reason != null) {
561
- contents.Reason = __expectString(data.Reason);
562
- }
523
+ const doc = take(data, {
524
+ Message: __expectString,
525
+ Reason: __expectString,
526
+ });
527
+ Object.assign(contents, doc);
563
528
  const exception = new RequestThrottledException({
564
529
  $metadata: deserializeMetadata(parsedOutput),
565
530
  ...contents,
@@ -569,12 +534,11 @@ const de_RequestThrottledExceptionRes = async (parsedOutput, context) => {
569
534
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
570
535
  const contents = map({});
571
536
  const data = parsedOutput.body;
572
- if (data.Message != null) {
573
- contents.Message = __expectString(data.Message);
574
- }
575
- if (data.Reason != null) {
576
- contents.Reason = __expectString(data.Reason);
577
- }
537
+ const doc = take(data, {
538
+ Message: __expectString,
539
+ Reason: __expectString,
540
+ });
541
+ Object.assign(contents, doc);
578
542
  const exception = new ResourceNotFoundException({
579
543
  $metadata: deserializeMetadata(parsedOutput),
580
544
  ...contents,
@@ -584,12 +548,11 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
584
548
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
585
549
  const contents = map({});
586
550
  const data = parsedOutput.body;
587
- if (data.Message != null) {
588
- contents.Message = __expectString(data.Message);
589
- }
590
- if (data.Reason != null) {
591
- contents.Reason = __expectString(data.Reason);
592
- }
551
+ const doc = take(data, {
552
+ Message: __expectString,
553
+ Reason: __expectString,
554
+ });
555
+ Object.assign(contents, doc);
593
556
  const exception = new ServiceQuotaExceededException({
594
557
  $metadata: deserializeMetadata(parsedOutput),
595
558
  ...contents,
@@ -599,83 +562,17 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
599
562
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
600
563
  const contents = map({});
601
564
  const data = parsedOutput.body;
602
- if (data.Message != null) {
603
- contents.Message = __expectString(data.Message);
604
- }
605
- if (data.Reason != null) {
606
- contents.Reason = __expectString(data.Reason);
607
- }
565
+ const doc = take(data, {
566
+ Message: __expectString,
567
+ Reason: __expectString,
568
+ });
569
+ Object.assign(contents, doc);
608
570
  const exception = new ValidationException({
609
571
  $metadata: deserializeMetadata(parsedOutput),
610
572
  ...contents,
611
573
  });
612
574
  return __decorateServiceException(exception, parsedOutput.body);
613
575
  };
614
- const se_Tag = (input, context) => {
615
- return {
616
- ...(input.Key != null && { Key: input.Key }),
617
- ...(input.Value != null && { Value: input.Value }),
618
- };
619
- };
620
- const se_Tags = (input, context) => {
621
- return input
622
- .filter((e) => e != null)
623
- .map((entry) => {
624
- return se_Tag(entry, context);
625
- });
626
- };
627
- const de_Block = (output, context) => {
628
- return {
629
- BlockIndex: __expectInt32(output.BlockIndex),
630
- BlockToken: __expectString(output.BlockToken),
631
- };
632
- };
633
- const de_Blocks = (output, context) => {
634
- const retVal = (output || [])
635
- .filter((e) => e != null)
636
- .map((entry) => {
637
- if (entry === null) {
638
- return null;
639
- }
640
- return de_Block(entry, context);
641
- });
642
- return retVal;
643
- };
644
- const de_ChangedBlock = (output, context) => {
645
- return {
646
- BlockIndex: __expectInt32(output.BlockIndex),
647
- FirstBlockToken: __expectString(output.FirstBlockToken),
648
- SecondBlockToken: __expectString(output.SecondBlockToken),
649
- };
650
- };
651
- const de_ChangedBlocks = (output, context) => {
652
- const retVal = (output || [])
653
- .filter((e) => e != null)
654
- .map((entry) => {
655
- if (entry === null) {
656
- return null;
657
- }
658
- return de_ChangedBlock(entry, context);
659
- });
660
- return retVal;
661
- };
662
- const de_Tag = (output, context) => {
663
- return {
664
- Key: __expectString(output.Key),
665
- Value: __expectString(output.Value),
666
- };
667
- };
668
- const de_Tags = (output, context) => {
669
- const retVal = (output || [])
670
- .filter((e) => e != null)
671
- .map((entry) => {
672
- if (entry === null) {
673
- return null;
674
- }
675
- return de_Tag(entry, context);
676
- });
677
- return retVal;
678
- };
679
576
  const deserializeMetadata = (output) => ({
680
577
  httpStatusCode: output.statusCode,
681
578
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -6,79 +6,66 @@ import { ListSnapshotBlocksCommandInput, ListSnapshotBlocksCommandOutput } from
6
6
  import { PutSnapshotBlockCommandInput, PutSnapshotBlockCommandOutput } from "./commands/PutSnapshotBlockCommand";
7
7
  import { StartSnapshotCommandInput, StartSnapshotCommandOutput } from "./commands/StartSnapshotCommand";
8
8
  import { EBSClient } from "./EBSClient";
9
- /**
10
- * @public
11
- * <p>You can use the Amazon Elastic Block Store (Amazon EBS) direct APIs to create Amazon EBS snapshots, write data directly to
12
- * your snapshots, read data on your snapshots, and identify the differences or changes between
13
- * two snapshots. If you’re an independent software vendor (ISV) who offers backup services for
14
- * Amazon EBS, the EBS direct APIs make it more efficient and cost-effective to track incremental changes on
15
- * your Amazon EBS volumes through snapshots. This can be done without having to create new volumes
16
- * from snapshots, and then use Amazon Elastic Compute Cloud (Amazon EC2) instances to compare the differences.</p>
17
- *
18
- * <p>You can create incremental snapshots directly from data on-premises into volumes and the
19
- * cloud to use for quick disaster recovery. With the ability to write and read snapshots, you can
20
- * write your on-premises data to an snapshot during a disaster. Then after recovery, you can
21
- * restore it back to Amazon Web Services or on-premises from the snapshot. You no longer need to build and
22
- * maintain complex mechanisms to copy data to and from Amazon EBS.</p>
23
- *
24
- *
25
- * <p>This API reference provides detailed information about the actions, data types,
26
- * parameters, and errors of the EBS direct APIs. For more information about the elements that
27
- * make up the EBS direct APIs, and examples of how to use them effectively, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html">Accessing the Contents of an Amazon EBS Snapshot</a> in the <i>Amazon Elastic Compute Cloud User
28
- * Guide</i>. For more information about the supported Amazon Web Services Regions, endpoints,
29
- * and service quotas for the EBS direct APIs, see <a href="https://docs.aws.amazon.com/general/latest/gr/ebs-service.html">Amazon Elastic Block Store Endpoints and Quotas</a> in
30
- * the <i>Amazon Web Services General Reference</i>.</p>
31
- */
32
- export declare class EBS extends EBSClient {
9
+ export interface EBS {
33
10
  /**
34
- * @public
35
- * <p>Seals and completes the snapshot after all of the required blocks of data have been
36
- * written to it. Completing the snapshot changes the status to <code>completed</code>. You
37
- * cannot write new blocks to a snapshot after it has been completed.</p>
11
+ * @see {@link CompleteSnapshotCommand}
38
12
  */
39
13
  completeSnapshot(args: CompleteSnapshotCommandInput, options?: __HttpHandlerOptions): Promise<CompleteSnapshotCommandOutput>;
40
14
  completeSnapshot(args: CompleteSnapshotCommandInput, cb: (err: any, data?: CompleteSnapshotCommandOutput) => void): void;
41
15
  completeSnapshot(args: CompleteSnapshotCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CompleteSnapshotCommandOutput) => void): void;
42
16
  /**
43
- * @public
44
- * <p>Returns the data in a block in an Amazon Elastic Block Store snapshot.</p>
17
+ * @see {@link GetSnapshotBlockCommand}
45
18
  */
46
19
  getSnapshotBlock(args: GetSnapshotBlockCommandInput, options?: __HttpHandlerOptions): Promise<GetSnapshotBlockCommandOutput>;
47
20
  getSnapshotBlock(args: GetSnapshotBlockCommandInput, cb: (err: any, data?: GetSnapshotBlockCommandOutput) => void): void;
48
21
  getSnapshotBlock(args: GetSnapshotBlockCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSnapshotBlockCommandOutput) => void): void;
49
22
  /**
50
- * @public
51
- * <p>Returns information about the blocks that are different between two
52
- * Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.</p>
23
+ * @see {@link ListChangedBlocksCommand}
53
24
  */
54
25
  listChangedBlocks(args: ListChangedBlocksCommandInput, options?: __HttpHandlerOptions): Promise<ListChangedBlocksCommandOutput>;
55
26
  listChangedBlocks(args: ListChangedBlocksCommandInput, cb: (err: any, data?: ListChangedBlocksCommandOutput) => void): void;
56
27
  listChangedBlocks(args: ListChangedBlocksCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListChangedBlocksCommandOutput) => void): void;
57
28
  /**
58
- * @public
59
- * <p>Returns information about the blocks in an Amazon Elastic Block Store snapshot.</p>
29
+ * @see {@link ListSnapshotBlocksCommand}
60
30
  */
61
31
  listSnapshotBlocks(args: ListSnapshotBlocksCommandInput, options?: __HttpHandlerOptions): Promise<ListSnapshotBlocksCommandOutput>;
62
32
  listSnapshotBlocks(args: ListSnapshotBlocksCommandInput, cb: (err: any, data?: ListSnapshotBlocksCommandOutput) => void): void;
63
33
  listSnapshotBlocks(args: ListSnapshotBlocksCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListSnapshotBlocksCommandOutput) => void): void;
64
34
  /**
65
- * @public
66
- * <p>Writes a block of data to a snapshot. If the specified block contains
67
- * data, the existing data is overwritten. The target snapshot must be in the
68
- * <code>pending</code> state.</p>
69
- * <p>Data written to a snapshot must be aligned with 512-KiB sectors.</p>
35
+ * @see {@link PutSnapshotBlockCommand}
70
36
  */
71
37
  putSnapshotBlock(args: PutSnapshotBlockCommandInput, options?: __HttpHandlerOptions): Promise<PutSnapshotBlockCommandOutput>;
72
38
  putSnapshotBlock(args: PutSnapshotBlockCommandInput, cb: (err: any, data?: PutSnapshotBlockCommandOutput) => void): void;
73
39
  putSnapshotBlock(args: PutSnapshotBlockCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutSnapshotBlockCommandOutput) => void): void;
74
40
  /**
75
- * @public
76
- * <p>Creates a new Amazon EBS snapshot. The new snapshot enters the <code>pending</code> state
77
- * after the request completes. </p>
78
- * <p>After creating the snapshot, use <a href="https://docs.aws.amazon.com/ebs/latest/APIReference/API_PutSnapshotBlock.html"> PutSnapshotBlock</a> to
79
- * write blocks of data to the snapshot.</p>
41
+ * @see {@link StartSnapshotCommand}
80
42
  */
81
43
  startSnapshot(args: StartSnapshotCommandInput, options?: __HttpHandlerOptions): Promise<StartSnapshotCommandOutput>;
82
44
  startSnapshot(args: StartSnapshotCommandInput, cb: (err: any, data?: StartSnapshotCommandOutput) => void): void;
83
45
  startSnapshot(args: StartSnapshotCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartSnapshotCommandOutput) => void): void;
84
46
  }
47
+ /**
48
+ * @public
49
+ * <p>You can use the Amazon Elastic Block Store (Amazon EBS) direct APIs to create Amazon EBS snapshots, write data directly to
50
+ * your snapshots, read data on your snapshots, and identify the differences or changes between
51
+ * two snapshots. If you’re an independent software vendor (ISV) who offers backup services for
52
+ * Amazon EBS, the EBS direct APIs make it more efficient and cost-effective to track incremental changes on
53
+ * your Amazon EBS volumes through snapshots. This can be done without having to create new volumes
54
+ * from snapshots, and then use Amazon Elastic Compute Cloud (Amazon EC2) instances to compare the differences.</p>
55
+ *
56
+ * <p>You can create incremental snapshots directly from data on-premises into volumes and the
57
+ * cloud to use for quick disaster recovery. With the ability to write and read snapshots, you can
58
+ * write your on-premises data to an snapshot during a disaster. Then after recovery, you can
59
+ * restore it back to Amazon Web Services or on-premises from the snapshot. You no longer need to build and
60
+ * maintain complex mechanisms to copy data to and from Amazon EBS.</p>
61
+ *
62
+ *
63
+ * <p>This API reference provides detailed information about the actions, data types,
64
+ * parameters, and errors of the EBS direct APIs. For more information about the elements that
65
+ * make up the EBS direct APIs, and examples of how to use them effectively, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html">Accessing the Contents of an Amazon EBS Snapshot</a> in the <i>Amazon Elastic Compute Cloud User
66
+ * Guide</i>. For more information about the supported Amazon Web Services Regions, endpoints,
67
+ * and service quotas for the EBS direct APIs, see <a href="https://docs.aws.amazon.com/general/latest/gr/ebs-service.html">Amazon Elastic Block Store Endpoints and Quotas</a> in
68
+ * the <i>Amazon Web Services General Reference</i>.</p>
69
+ */
70
+ export declare class EBS extends EBSClient implements EBS {
71
+ }
@@ -24,7 +24,7 @@ import {
24
24
  StartSnapshotCommandOutput,
25
25
  } from "./commands/StartSnapshotCommand";
26
26
  import { EBSClient } from "./EBSClient";
27
- export declare class EBS extends EBSClient {
27
+ export interface EBS {
28
28
  completeSnapshot(
29
29
  args: CompleteSnapshotCommandInput,
30
30
  options?: __HttpHandlerOptions
@@ -104,3 +104,4 @@ export declare class EBS extends EBSClient {
104
104
  cb: (err: any, data?: StartSnapshotCommandOutput) => void
105
105
  ): void;
106
106
  }
107
+ export declare class EBS extends EBSClient implements EBS {}