@aws-sdk/client-ebs 3.35.0 → 3.38.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/CHANGELOG.md +47 -0
- package/dist-cjs/EBS.js +0 -23
- package/dist-cjs/EBSClient.js +0 -28
- package/dist-cjs/commands/CompleteSnapshotCommand.js +0 -27
- package/dist-cjs/commands/GetSnapshotBlockCommand.js +0 -25
- package/dist-cjs/commands/ListChangedBlocksCommand.js +0 -26
- package/dist-cjs/commands/ListSnapshotBlocksCommand.js +0 -25
- package/dist-cjs/commands/PutSnapshotBlockCommand.js +0 -28
- package/dist-cjs/commands/StartSnapshotCommand.js +0 -28
- package/dist-cjs/commands/index.js +9 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -12
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -70
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListChangedBlocksPaginator.js +0 -11
- package/dist-cjs/pagination/ListSnapshotBlocksPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_restJson1.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/EBS.js +0 -1
- package/dist-es/EBSClient.js +0 -1
- package/dist-es/commands/CompleteSnapshotCommand.js +0 -1
- package/dist-es/commands/GetSnapshotBlockCommand.js +0 -1
- package/dist-es/commands/ListChangedBlocksCommand.js +0 -1
- package/dist-es/commands/ListSnapshotBlocksCommand.js +0 -1
- package/dist-es/commands/PutSnapshotBlockCommand.js +0 -1
- package/dist-es/commands/StartSnapshotCommand.js +0 -1
- package/dist-es/commands/index.js +6 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -12
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListChangedBlocksPaginator.js +0 -1
- package/dist-es/pagination/ListSnapshotBlocksPaginator.js +0 -1
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-types/commands/index.d.ts +6 -0
- package/dist-types/index.d.ts +4 -11
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/EBS.d.ts +7 -49
- package/dist-types/ts3.4/EBSClient.d.ts +24 -108
- package/dist-types/ts3.4/commands/CompleteSnapshotCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/GetSnapshotBlockCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListChangedBlocksCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/ListSnapshotBlocksCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/PutSnapshotBlockCommand.d.ts +5 -30
- package/dist-types/ts3.4/commands/StartSnapshotCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/index.d.ts +6 -0
- package/dist-types/ts3.4/index.d.ts +4 -11
- package/dist-types/ts3.4/models/models_0.d.ts +106 -416
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +33 -30
- package/dist-cjs/EBS.js.map +0 -1
- package/dist-cjs/EBSClient.js.map +0 -1
- package/dist-cjs/commands/CompleteSnapshotCommand.js.map +0 -1
- package/dist-cjs/commands/GetSnapshotBlockCommand.js.map +0 -1
- package/dist-cjs/commands/ListChangedBlocksCommand.js.map +0 -1
- package/dist-cjs/commands/ListSnapshotBlocksCommand.js.map +0 -1
- package/dist-cjs/commands/PutSnapshotBlockCommand.js.map +0 -1
- package/dist-cjs/commands/StartSnapshotCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListChangedBlocksPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListSnapshotBlocksPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/EBS.js.map +0 -1
- package/dist-es/EBSClient.js.map +0 -1
- package/dist-es/commands/CompleteSnapshotCommand.js.map +0 -1
- package/dist-es/commands/GetSnapshotBlockCommand.js.map +0 -1
- package/dist-es/commands/ListChangedBlocksCommand.js.map +0 -1
- package/dist-es/commands/ListSnapshotBlocksCommand.js.map +0 -1
- package/dist-es/commands/PutSnapshotBlockCommand.js.map +0 -1
- package/dist-es/commands/StartSnapshotCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListChangedBlocksPaginator.js.map +0 -1
- package/dist-es/pagination/ListSnapshotBlocksPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_restJson1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/EBS.ts +0 -258
- package/src/EBSClient.ts +0 -273
- package/src/commands/CompleteSnapshotCommand.ts +0 -97
- package/src/commands/GetSnapshotBlockCommand.ts +0 -95
- package/src/commands/ListChangedBlocksCommand.ts +0 -96
- package/src/commands/ListSnapshotBlocksCommand.ts +0 -95
- package/src/commands/PutSnapshotBlockCommand.ts +0 -107
- package/src/commands/StartSnapshotCommand.ts +0 -98
- package/src/endpoints.ts +0 -83
- package/src/index.ts +0 -12
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -824
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListChangedBlocksPaginator.ts +0 -59
- package/src/pagination/ListSnapshotBlocksPaginator.ts +0 -59
- package/src/protocols/Aws_restJson1.ts +0 -1238
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
package/src/EBS.ts
DELETED
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
CompleteSnapshotCommand,
|
|
5
|
-
CompleteSnapshotCommandInput,
|
|
6
|
-
CompleteSnapshotCommandOutput,
|
|
7
|
-
} from "./commands/CompleteSnapshotCommand";
|
|
8
|
-
import {
|
|
9
|
-
GetSnapshotBlockCommand,
|
|
10
|
-
GetSnapshotBlockCommandInput,
|
|
11
|
-
GetSnapshotBlockCommandOutput,
|
|
12
|
-
} from "./commands/GetSnapshotBlockCommand";
|
|
13
|
-
import {
|
|
14
|
-
ListChangedBlocksCommand,
|
|
15
|
-
ListChangedBlocksCommandInput,
|
|
16
|
-
ListChangedBlocksCommandOutput,
|
|
17
|
-
} from "./commands/ListChangedBlocksCommand";
|
|
18
|
-
import {
|
|
19
|
-
ListSnapshotBlocksCommand,
|
|
20
|
-
ListSnapshotBlocksCommandInput,
|
|
21
|
-
ListSnapshotBlocksCommandOutput,
|
|
22
|
-
} from "./commands/ListSnapshotBlocksCommand";
|
|
23
|
-
import {
|
|
24
|
-
PutSnapshotBlockCommand,
|
|
25
|
-
PutSnapshotBlockCommandInput,
|
|
26
|
-
PutSnapshotBlockCommandOutput,
|
|
27
|
-
} from "./commands/PutSnapshotBlockCommand";
|
|
28
|
-
import {
|
|
29
|
-
StartSnapshotCommand,
|
|
30
|
-
StartSnapshotCommandInput,
|
|
31
|
-
StartSnapshotCommandOutput,
|
|
32
|
-
} from "./commands/StartSnapshotCommand";
|
|
33
|
-
import { EBSClient } from "./EBSClient";
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* <p>You can use the Amazon Elastic Block Store (Amazon EBS) direct APIs to create Amazon EBS snapshots, write data directly to
|
|
37
|
-
* your snapshots, read data on your snapshots, and identify the differences or changes between
|
|
38
|
-
* two snapshots. If you’re an independent software vendor (ISV) who offers backup services for
|
|
39
|
-
* Amazon EBS, the EBS direct APIs make it more efficient and cost-effective to track incremental changes on
|
|
40
|
-
* your Amazon EBS volumes through snapshots. This can be done without having to create new volumes
|
|
41
|
-
* from snapshots, and then use Amazon Elastic Compute Cloud (Amazon EC2) instances to compare the differences.</p>
|
|
42
|
-
*
|
|
43
|
-
* <p>You can create incremental snapshots directly from data on-premises into volumes and the
|
|
44
|
-
* cloud to use for quick disaster recovery. With the ability to write and read snapshots, you can
|
|
45
|
-
* write your on-premises data to an snapshot during a disaster. Then after recovery, you can
|
|
46
|
-
* restore it back to Amazon Web Services or on-premises from the snapshot. You no longer need to build and
|
|
47
|
-
* maintain complex mechanisms to copy data to and from Amazon EBS.</p>
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* <p>This API reference provides detailed information about the actions, data types,
|
|
51
|
-
* parameters, and errors of the EBS direct APIs. For more information about the elements that
|
|
52
|
-
* 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
|
|
53
|
-
* Guide</i>. For more information about the supported Amazon Web Services Regions, endpoints,
|
|
54
|
-
* 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
|
|
55
|
-
* the <i>Amazon Web Services General Reference</i>.</p>
|
|
56
|
-
*/
|
|
57
|
-
export class EBS extends EBSClient {
|
|
58
|
-
/**
|
|
59
|
-
* <p>Seals and completes the snapshot after all of the required blocks of data have been
|
|
60
|
-
* written to it. Completing the snapshot changes the status to <code>completed</code>. You
|
|
61
|
-
* cannot write new blocks to a snapshot after it has been completed.</p>
|
|
62
|
-
*/
|
|
63
|
-
public completeSnapshot(
|
|
64
|
-
args: CompleteSnapshotCommandInput,
|
|
65
|
-
options?: __HttpHandlerOptions
|
|
66
|
-
): Promise<CompleteSnapshotCommandOutput>;
|
|
67
|
-
public completeSnapshot(
|
|
68
|
-
args: CompleteSnapshotCommandInput,
|
|
69
|
-
cb: (err: any, data?: CompleteSnapshotCommandOutput) => void
|
|
70
|
-
): void;
|
|
71
|
-
public completeSnapshot(
|
|
72
|
-
args: CompleteSnapshotCommandInput,
|
|
73
|
-
options: __HttpHandlerOptions,
|
|
74
|
-
cb: (err: any, data?: CompleteSnapshotCommandOutput) => void
|
|
75
|
-
): void;
|
|
76
|
-
public completeSnapshot(
|
|
77
|
-
args: CompleteSnapshotCommandInput,
|
|
78
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CompleteSnapshotCommandOutput) => void),
|
|
79
|
-
cb?: (err: any, data?: CompleteSnapshotCommandOutput) => void
|
|
80
|
-
): Promise<CompleteSnapshotCommandOutput> | void {
|
|
81
|
-
const command = new CompleteSnapshotCommand(args);
|
|
82
|
-
if (typeof optionsOrCb === "function") {
|
|
83
|
-
this.send(command, optionsOrCb);
|
|
84
|
-
} else if (typeof cb === "function") {
|
|
85
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
86
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
87
|
-
} else {
|
|
88
|
-
return this.send(command, optionsOrCb);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* <p>Returns the data in a block in an Amazon Elastic Block Store snapshot.</p>
|
|
94
|
-
*/
|
|
95
|
-
public getSnapshotBlock(
|
|
96
|
-
args: GetSnapshotBlockCommandInput,
|
|
97
|
-
options?: __HttpHandlerOptions
|
|
98
|
-
): Promise<GetSnapshotBlockCommandOutput>;
|
|
99
|
-
public getSnapshotBlock(
|
|
100
|
-
args: GetSnapshotBlockCommandInput,
|
|
101
|
-
cb: (err: any, data?: GetSnapshotBlockCommandOutput) => void
|
|
102
|
-
): void;
|
|
103
|
-
public getSnapshotBlock(
|
|
104
|
-
args: GetSnapshotBlockCommandInput,
|
|
105
|
-
options: __HttpHandlerOptions,
|
|
106
|
-
cb: (err: any, data?: GetSnapshotBlockCommandOutput) => void
|
|
107
|
-
): void;
|
|
108
|
-
public getSnapshotBlock(
|
|
109
|
-
args: GetSnapshotBlockCommandInput,
|
|
110
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetSnapshotBlockCommandOutput) => void),
|
|
111
|
-
cb?: (err: any, data?: GetSnapshotBlockCommandOutput) => void
|
|
112
|
-
): Promise<GetSnapshotBlockCommandOutput> | void {
|
|
113
|
-
const command = new GetSnapshotBlockCommand(args);
|
|
114
|
-
if (typeof optionsOrCb === "function") {
|
|
115
|
-
this.send(command, optionsOrCb);
|
|
116
|
-
} else if (typeof cb === "function") {
|
|
117
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
118
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
119
|
-
} else {
|
|
120
|
-
return this.send(command, optionsOrCb);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* <p>Returns information about the blocks that are different between two
|
|
126
|
-
* Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.</p>
|
|
127
|
-
*/
|
|
128
|
-
public listChangedBlocks(
|
|
129
|
-
args: ListChangedBlocksCommandInput,
|
|
130
|
-
options?: __HttpHandlerOptions
|
|
131
|
-
): Promise<ListChangedBlocksCommandOutput>;
|
|
132
|
-
public listChangedBlocks(
|
|
133
|
-
args: ListChangedBlocksCommandInput,
|
|
134
|
-
cb: (err: any, data?: ListChangedBlocksCommandOutput) => void
|
|
135
|
-
): void;
|
|
136
|
-
public listChangedBlocks(
|
|
137
|
-
args: ListChangedBlocksCommandInput,
|
|
138
|
-
options: __HttpHandlerOptions,
|
|
139
|
-
cb: (err: any, data?: ListChangedBlocksCommandOutput) => void
|
|
140
|
-
): void;
|
|
141
|
-
public listChangedBlocks(
|
|
142
|
-
args: ListChangedBlocksCommandInput,
|
|
143
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListChangedBlocksCommandOutput) => void),
|
|
144
|
-
cb?: (err: any, data?: ListChangedBlocksCommandOutput) => void
|
|
145
|
-
): Promise<ListChangedBlocksCommandOutput> | void {
|
|
146
|
-
const command = new ListChangedBlocksCommand(args);
|
|
147
|
-
if (typeof optionsOrCb === "function") {
|
|
148
|
-
this.send(command, optionsOrCb);
|
|
149
|
-
} else if (typeof cb === "function") {
|
|
150
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
151
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
152
|
-
} else {
|
|
153
|
-
return this.send(command, optionsOrCb);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* <p>Returns information about the blocks in an Amazon Elastic Block Store snapshot.</p>
|
|
159
|
-
*/
|
|
160
|
-
public listSnapshotBlocks(
|
|
161
|
-
args: ListSnapshotBlocksCommandInput,
|
|
162
|
-
options?: __HttpHandlerOptions
|
|
163
|
-
): Promise<ListSnapshotBlocksCommandOutput>;
|
|
164
|
-
public listSnapshotBlocks(
|
|
165
|
-
args: ListSnapshotBlocksCommandInput,
|
|
166
|
-
cb: (err: any, data?: ListSnapshotBlocksCommandOutput) => void
|
|
167
|
-
): void;
|
|
168
|
-
public listSnapshotBlocks(
|
|
169
|
-
args: ListSnapshotBlocksCommandInput,
|
|
170
|
-
options: __HttpHandlerOptions,
|
|
171
|
-
cb: (err: any, data?: ListSnapshotBlocksCommandOutput) => void
|
|
172
|
-
): void;
|
|
173
|
-
public listSnapshotBlocks(
|
|
174
|
-
args: ListSnapshotBlocksCommandInput,
|
|
175
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListSnapshotBlocksCommandOutput) => void),
|
|
176
|
-
cb?: (err: any, data?: ListSnapshotBlocksCommandOutput) => void
|
|
177
|
-
): Promise<ListSnapshotBlocksCommandOutput> | void {
|
|
178
|
-
const command = new ListSnapshotBlocksCommand(args);
|
|
179
|
-
if (typeof optionsOrCb === "function") {
|
|
180
|
-
this.send(command, optionsOrCb);
|
|
181
|
-
} else if (typeof cb === "function") {
|
|
182
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
183
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
184
|
-
} else {
|
|
185
|
-
return this.send(command, optionsOrCb);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* <p>Writes a block of data to a snapshot. If the specified block contains
|
|
191
|
-
* data, the existing data is overwritten. The target snapshot must be in the
|
|
192
|
-
* <code>pending</code> state.</p>
|
|
193
|
-
* <p>Data written to a snapshot must be aligned with 512-KiB sectors.</p>
|
|
194
|
-
*/
|
|
195
|
-
public putSnapshotBlock(
|
|
196
|
-
args: PutSnapshotBlockCommandInput,
|
|
197
|
-
options?: __HttpHandlerOptions
|
|
198
|
-
): Promise<PutSnapshotBlockCommandOutput>;
|
|
199
|
-
public putSnapshotBlock(
|
|
200
|
-
args: PutSnapshotBlockCommandInput,
|
|
201
|
-
cb: (err: any, data?: PutSnapshotBlockCommandOutput) => void
|
|
202
|
-
): void;
|
|
203
|
-
public putSnapshotBlock(
|
|
204
|
-
args: PutSnapshotBlockCommandInput,
|
|
205
|
-
options: __HttpHandlerOptions,
|
|
206
|
-
cb: (err: any, data?: PutSnapshotBlockCommandOutput) => void
|
|
207
|
-
): void;
|
|
208
|
-
public putSnapshotBlock(
|
|
209
|
-
args: PutSnapshotBlockCommandInput,
|
|
210
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutSnapshotBlockCommandOutput) => void),
|
|
211
|
-
cb?: (err: any, data?: PutSnapshotBlockCommandOutput) => void
|
|
212
|
-
): Promise<PutSnapshotBlockCommandOutput> | void {
|
|
213
|
-
const command = new PutSnapshotBlockCommand(args);
|
|
214
|
-
if (typeof optionsOrCb === "function") {
|
|
215
|
-
this.send(command, optionsOrCb);
|
|
216
|
-
} else if (typeof cb === "function") {
|
|
217
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
218
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
219
|
-
} else {
|
|
220
|
-
return this.send(command, optionsOrCb);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* <p>Creates a new Amazon EBS snapshot. The new snapshot enters the <code>pending</code> state
|
|
226
|
-
* after the request completes. </p>
|
|
227
|
-
* <p>After creating the snapshot, use <a href="https://docs.aws.amazon.com/ebs/latest/APIReference/API_PutSnapshotBlock.html"> PutSnapshotBlock</a> to
|
|
228
|
-
* write blocks of data to the snapshot.</p>
|
|
229
|
-
*/
|
|
230
|
-
public startSnapshot(
|
|
231
|
-
args: StartSnapshotCommandInput,
|
|
232
|
-
options?: __HttpHandlerOptions
|
|
233
|
-
): Promise<StartSnapshotCommandOutput>;
|
|
234
|
-
public startSnapshot(
|
|
235
|
-
args: StartSnapshotCommandInput,
|
|
236
|
-
cb: (err: any, data?: StartSnapshotCommandOutput) => void
|
|
237
|
-
): void;
|
|
238
|
-
public startSnapshot(
|
|
239
|
-
args: StartSnapshotCommandInput,
|
|
240
|
-
options: __HttpHandlerOptions,
|
|
241
|
-
cb: (err: any, data?: StartSnapshotCommandOutput) => void
|
|
242
|
-
): void;
|
|
243
|
-
public startSnapshot(
|
|
244
|
-
args: StartSnapshotCommandInput,
|
|
245
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartSnapshotCommandOutput) => void),
|
|
246
|
-
cb?: (err: any, data?: StartSnapshotCommandOutput) => void
|
|
247
|
-
): Promise<StartSnapshotCommandOutput> | void {
|
|
248
|
-
const command = new StartSnapshotCommand(args);
|
|
249
|
-
if (typeof optionsOrCb === "function") {
|
|
250
|
-
this.send(command, optionsOrCb);
|
|
251
|
-
} else if (typeof cb === "function") {
|
|
252
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
253
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
254
|
-
} else {
|
|
255
|
-
return this.send(command, optionsOrCb);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
package/src/EBSClient.ts
DELETED
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EndpointsInputConfig,
|
|
3
|
-
EndpointsResolvedConfig,
|
|
4
|
-
RegionInputConfig,
|
|
5
|
-
RegionResolvedConfig,
|
|
6
|
-
resolveEndpointsConfig,
|
|
7
|
-
resolveRegionConfig,
|
|
8
|
-
} from "@aws-sdk/config-resolver";
|
|
9
|
-
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
10
|
-
import {
|
|
11
|
-
getHostHeaderPlugin,
|
|
12
|
-
HostHeaderInputConfig,
|
|
13
|
-
HostHeaderResolvedConfig,
|
|
14
|
-
resolveHostHeaderConfig,
|
|
15
|
-
} from "@aws-sdk/middleware-host-header";
|
|
16
|
-
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
17
|
-
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
|
|
18
|
-
import {
|
|
19
|
-
AwsAuthInputConfig,
|
|
20
|
-
AwsAuthResolvedConfig,
|
|
21
|
-
getAwsAuthPlugin,
|
|
22
|
-
resolveAwsAuthConfig,
|
|
23
|
-
} from "@aws-sdk/middleware-signing";
|
|
24
|
-
import {
|
|
25
|
-
getUserAgentPlugin,
|
|
26
|
-
resolveUserAgentConfig,
|
|
27
|
-
UserAgentInputConfig,
|
|
28
|
-
UserAgentResolvedConfig,
|
|
29
|
-
} from "@aws-sdk/middleware-user-agent";
|
|
30
|
-
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
31
|
-
import {
|
|
32
|
-
Client as __Client,
|
|
33
|
-
SmithyConfiguration as __SmithyConfiguration,
|
|
34
|
-
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
|
|
35
|
-
} from "@aws-sdk/smithy-client";
|
|
36
|
-
import {
|
|
37
|
-
Credentials as __Credentials,
|
|
38
|
-
Decoder as __Decoder,
|
|
39
|
-
Encoder as __Encoder,
|
|
40
|
-
Hash as __Hash,
|
|
41
|
-
HashConstructor as __HashConstructor,
|
|
42
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
43
|
-
Logger as __Logger,
|
|
44
|
-
Provider as __Provider,
|
|
45
|
-
Provider,
|
|
46
|
-
RegionInfoProvider,
|
|
47
|
-
StreamCollector as __StreamCollector,
|
|
48
|
-
UrlParser as __UrlParser,
|
|
49
|
-
UserAgent as __UserAgent,
|
|
50
|
-
} from "@aws-sdk/types";
|
|
51
|
-
|
|
52
|
-
import { CompleteSnapshotCommandInput, CompleteSnapshotCommandOutput } from "./commands/CompleteSnapshotCommand";
|
|
53
|
-
import { GetSnapshotBlockCommandInput, GetSnapshotBlockCommandOutput } from "./commands/GetSnapshotBlockCommand";
|
|
54
|
-
import { ListChangedBlocksCommandInput, ListChangedBlocksCommandOutput } from "./commands/ListChangedBlocksCommand";
|
|
55
|
-
import { ListSnapshotBlocksCommandInput, ListSnapshotBlocksCommandOutput } from "./commands/ListSnapshotBlocksCommand";
|
|
56
|
-
import { PutSnapshotBlockCommandInput, PutSnapshotBlockCommandOutput } from "./commands/PutSnapshotBlockCommand";
|
|
57
|
-
import { StartSnapshotCommandInput, StartSnapshotCommandOutput } from "./commands/StartSnapshotCommand";
|
|
58
|
-
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
59
|
-
|
|
60
|
-
export type ServiceInputTypes =
|
|
61
|
-
| CompleteSnapshotCommandInput
|
|
62
|
-
| GetSnapshotBlockCommandInput
|
|
63
|
-
| ListChangedBlocksCommandInput
|
|
64
|
-
| ListSnapshotBlocksCommandInput
|
|
65
|
-
| PutSnapshotBlockCommandInput
|
|
66
|
-
| StartSnapshotCommandInput;
|
|
67
|
-
|
|
68
|
-
export type ServiceOutputTypes =
|
|
69
|
-
| CompleteSnapshotCommandOutput
|
|
70
|
-
| GetSnapshotBlockCommandOutput
|
|
71
|
-
| ListChangedBlocksCommandOutput
|
|
72
|
-
| ListSnapshotBlocksCommandOutput
|
|
73
|
-
| PutSnapshotBlockCommandOutput
|
|
74
|
-
| StartSnapshotCommandOutput;
|
|
75
|
-
|
|
76
|
-
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
77
|
-
/**
|
|
78
|
-
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
79
|
-
*/
|
|
80
|
-
requestHandler?: __HttpHandler;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* A constructor for a class implementing the {@link __Hash} interface
|
|
84
|
-
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
sha256?: __HashConstructor;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* The function that will be used to convert strings into HTTP endpoints.
|
|
91
|
-
* @internal
|
|
92
|
-
*/
|
|
93
|
-
urlParser?: __UrlParser;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* A function that can calculate the length of a request body.
|
|
97
|
-
* @internal
|
|
98
|
-
*/
|
|
99
|
-
bodyLengthChecker?: (body: any) => number | undefined;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* A function that converts a stream into an array of bytes.
|
|
103
|
-
* @internal
|
|
104
|
-
*/
|
|
105
|
-
streamCollector?: __StreamCollector;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
109
|
-
* @internal
|
|
110
|
-
*/
|
|
111
|
-
base64Decoder?: __Decoder;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* The function that will be used to convert binary data to a base64-encoded string.
|
|
115
|
-
* @internal
|
|
116
|
-
*/
|
|
117
|
-
base64Encoder?: __Encoder;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
121
|
-
* @internal
|
|
122
|
-
*/
|
|
123
|
-
utf8Decoder?: __Decoder;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
127
|
-
* @internal
|
|
128
|
-
*/
|
|
129
|
-
utf8Encoder?: __Encoder;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* The runtime environment.
|
|
133
|
-
* @internal
|
|
134
|
-
*/
|
|
135
|
-
runtime?: string;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Disable dyanamically changing the endpoint of the client based on the hostPrefix
|
|
139
|
-
* trait of an operation.
|
|
140
|
-
*/
|
|
141
|
-
disableHostPrefix?: boolean;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Value for how many times a request will be made at most in case of retry.
|
|
145
|
-
*/
|
|
146
|
-
maxAttempts?: number | __Provider<number>;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Specifies which retry algorithm to use.
|
|
150
|
-
*/
|
|
151
|
-
retryMode?: string | __Provider<string>;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Optional logger for logging debug/info/warn/error.
|
|
155
|
-
*/
|
|
156
|
-
logger?: __Logger;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Unique service identifier.
|
|
160
|
-
* @internal
|
|
161
|
-
*/
|
|
162
|
-
serviceId?: string;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* The AWS region to which this client will send requests
|
|
166
|
-
*/
|
|
167
|
-
region?: string | __Provider<string>;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Default credentials provider; Not available in browser runtime.
|
|
171
|
-
* @internal
|
|
172
|
-
*/
|
|
173
|
-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Fetch related hostname, signing name or signing region with given region.
|
|
177
|
-
* @internal
|
|
178
|
-
*/
|
|
179
|
-
regionInfoProvider?: RegionInfoProvider;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
183
|
-
* @internal
|
|
184
|
-
*/
|
|
185
|
-
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
type EBSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
|
|
189
|
-
ClientDefaults &
|
|
190
|
-
RegionInputConfig &
|
|
191
|
-
EndpointsInputConfig &
|
|
192
|
-
RetryInputConfig &
|
|
193
|
-
HostHeaderInputConfig &
|
|
194
|
-
AwsAuthInputConfig &
|
|
195
|
-
UserAgentInputConfig;
|
|
196
|
-
/**
|
|
197
|
-
* The configuration interface of EBSClient class constructor that set the region, credentials and other options.
|
|
198
|
-
*/
|
|
199
|
-
export interface EBSClientConfig extends EBSClientConfigType {}
|
|
200
|
-
|
|
201
|
-
type EBSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
|
|
202
|
-
Required<ClientDefaults> &
|
|
203
|
-
RegionResolvedConfig &
|
|
204
|
-
EndpointsResolvedConfig &
|
|
205
|
-
RetryResolvedConfig &
|
|
206
|
-
HostHeaderResolvedConfig &
|
|
207
|
-
AwsAuthResolvedConfig &
|
|
208
|
-
UserAgentResolvedConfig;
|
|
209
|
-
/**
|
|
210
|
-
* The resolved configuration interface of EBSClient class. This is resolved and normalized from the {@link EBSClientConfig | constructor configuration interface}.
|
|
211
|
-
*/
|
|
212
|
-
export interface EBSClientResolvedConfig extends EBSClientResolvedConfigType {}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* <p>You can use the Amazon Elastic Block Store (Amazon EBS) direct APIs to create Amazon EBS snapshots, write data directly to
|
|
216
|
-
* your snapshots, read data on your snapshots, and identify the differences or changes between
|
|
217
|
-
* two snapshots. If you’re an independent software vendor (ISV) who offers backup services for
|
|
218
|
-
* Amazon EBS, the EBS direct APIs make it more efficient and cost-effective to track incremental changes on
|
|
219
|
-
* your Amazon EBS volumes through snapshots. This can be done without having to create new volumes
|
|
220
|
-
* from snapshots, and then use Amazon Elastic Compute Cloud (Amazon EC2) instances to compare the differences.</p>
|
|
221
|
-
*
|
|
222
|
-
* <p>You can create incremental snapshots directly from data on-premises into volumes and the
|
|
223
|
-
* cloud to use for quick disaster recovery. With the ability to write and read snapshots, you can
|
|
224
|
-
* write your on-premises data to an snapshot during a disaster. Then after recovery, you can
|
|
225
|
-
* restore it back to Amazon Web Services or on-premises from the snapshot. You no longer need to build and
|
|
226
|
-
* maintain complex mechanisms to copy data to and from Amazon EBS.</p>
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
* <p>This API reference provides detailed information about the actions, data types,
|
|
230
|
-
* parameters, and errors of the EBS direct APIs. For more information about the elements that
|
|
231
|
-
* 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
|
|
232
|
-
* Guide</i>. For more information about the supported Amazon Web Services Regions, endpoints,
|
|
233
|
-
* 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
|
|
234
|
-
* the <i>Amazon Web Services General Reference</i>.</p>
|
|
235
|
-
*/
|
|
236
|
-
export class EBSClient extends __Client<
|
|
237
|
-
__HttpHandlerOptions,
|
|
238
|
-
ServiceInputTypes,
|
|
239
|
-
ServiceOutputTypes,
|
|
240
|
-
EBSClientResolvedConfig
|
|
241
|
-
> {
|
|
242
|
-
/**
|
|
243
|
-
* The resolved configuration of EBSClient class. This is resolved and normalized from the {@link EBSClientConfig | constructor configuration interface}.
|
|
244
|
-
*/
|
|
245
|
-
readonly config: EBSClientResolvedConfig;
|
|
246
|
-
|
|
247
|
-
constructor(configuration: EBSClientConfig) {
|
|
248
|
-
const _config_0 = __getRuntimeConfig(configuration);
|
|
249
|
-
const _config_1 = resolveRegionConfig(_config_0);
|
|
250
|
-
const _config_2 = resolveEndpointsConfig(_config_1);
|
|
251
|
-
const _config_3 = resolveRetryConfig(_config_2);
|
|
252
|
-
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
253
|
-
const _config_5 = resolveAwsAuthConfig(_config_4);
|
|
254
|
-
const _config_6 = resolveUserAgentConfig(_config_5);
|
|
255
|
-
super(_config_6);
|
|
256
|
-
this.config = _config_6;
|
|
257
|
-
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
258
|
-
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
259
|
-
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
260
|
-
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
261
|
-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
262
|
-
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
267
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
268
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
269
|
-
*/
|
|
270
|
-
destroy(): void {
|
|
271
|
-
super.destroy();
|
|
272
|
-
}
|
|
273
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
2
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
5
|
-
FinalizeHandlerArguments,
|
|
6
|
-
Handler,
|
|
7
|
-
HandlerExecutionContext,
|
|
8
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
9
|
-
MetadataBearer as __MetadataBearer,
|
|
10
|
-
MiddlewareStack,
|
|
11
|
-
SerdeContext as __SerdeContext,
|
|
12
|
-
} from "@aws-sdk/types";
|
|
13
|
-
|
|
14
|
-
import { EBSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EBSClient";
|
|
15
|
-
import { CompleteSnapshotRequest, CompleteSnapshotResponse } from "../models/models_0";
|
|
16
|
-
import {
|
|
17
|
-
deserializeAws_restJson1CompleteSnapshotCommand,
|
|
18
|
-
serializeAws_restJson1CompleteSnapshotCommand,
|
|
19
|
-
} from "../protocols/Aws_restJson1";
|
|
20
|
-
|
|
21
|
-
export interface CompleteSnapshotCommandInput extends CompleteSnapshotRequest {}
|
|
22
|
-
export interface CompleteSnapshotCommandOutput extends CompleteSnapshotResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Seals and completes the snapshot after all of the required blocks of data have been
|
|
26
|
-
* written to it. Completing the snapshot changes the status to <code>completed</code>. You
|
|
27
|
-
* cannot write new blocks to a snapshot after it has been completed.</p>
|
|
28
|
-
* @example
|
|
29
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
30
|
-
* ```javascript
|
|
31
|
-
* import { EBSClient, CompleteSnapshotCommand } from "@aws-sdk/client-ebs"; // ES Modules import
|
|
32
|
-
* // const { EBSClient, CompleteSnapshotCommand } = require("@aws-sdk/client-ebs"); // CommonJS import
|
|
33
|
-
* const client = new EBSClient(config);
|
|
34
|
-
* const command = new CompleteSnapshotCommand(input);
|
|
35
|
-
* const response = await client.send(command);
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* @see {@link CompleteSnapshotCommandInput} for command's `input` shape.
|
|
39
|
-
* @see {@link CompleteSnapshotCommandOutput} for command's `response` shape.
|
|
40
|
-
* @see {@link EBSClientResolvedConfig | config} for command's `input` shape.
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
export class CompleteSnapshotCommand extends $Command<
|
|
44
|
-
CompleteSnapshotCommandInput,
|
|
45
|
-
CompleteSnapshotCommandOutput,
|
|
46
|
-
EBSClientResolvedConfig
|
|
47
|
-
> {
|
|
48
|
-
// Start section: command_properties
|
|
49
|
-
// End section: command_properties
|
|
50
|
-
|
|
51
|
-
constructor(readonly input: CompleteSnapshotCommandInput) {
|
|
52
|
-
// Start section: command_constructor
|
|
53
|
-
super();
|
|
54
|
-
// End section: command_constructor
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
resolveMiddleware(
|
|
61
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
62
|
-
configuration: EBSClientResolvedConfig,
|
|
63
|
-
options?: __HttpHandlerOptions
|
|
64
|
-
): Handler<CompleteSnapshotCommandInput, CompleteSnapshotCommandOutput> {
|
|
65
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
66
|
-
|
|
67
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
68
|
-
|
|
69
|
-
const { logger } = configuration;
|
|
70
|
-
const clientName = "EBSClient";
|
|
71
|
-
const commandName = "CompleteSnapshotCommand";
|
|
72
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
73
|
-
logger,
|
|
74
|
-
clientName,
|
|
75
|
-
commandName,
|
|
76
|
-
inputFilterSensitiveLog: CompleteSnapshotRequest.filterSensitiveLog,
|
|
77
|
-
outputFilterSensitiveLog: CompleteSnapshotResponse.filterSensitiveLog,
|
|
78
|
-
};
|
|
79
|
-
const { requestHandler } = configuration;
|
|
80
|
-
return stack.resolve(
|
|
81
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
82
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
83
|
-
handlerExecutionContext
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
private serialize(input: CompleteSnapshotCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
88
|
-
return serializeAws_restJson1CompleteSnapshotCommand(input, context);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CompleteSnapshotCommandOutput> {
|
|
92
|
-
return deserializeAws_restJson1CompleteSnapshotCommand(output, context);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Start section: command_body_extra
|
|
96
|
-
// End section: command_body_extra
|
|
97
|
-
}
|