UNPKG

8.03 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7import {Readable} from 'stream';
8interface Blob {}
9declare class EBS extends Service {
10 /**
11 * Constructs a service object. This object has one method for each API operation.
12 */
13 constructor(options?: EBS.Types.ClientConfiguration)
14 config: Config & EBS.Types.ClientConfiguration;
15 /**
16 * Returns the data in a block in an Amazon Elastic Block Store snapshot.
17 */
18 getSnapshotBlock(params: EBS.Types.GetSnapshotBlockRequest, callback?: (err: AWSError, data: EBS.Types.GetSnapshotBlockResponse) => void): Request<EBS.Types.GetSnapshotBlockResponse, AWSError>;
19 /**
20 * Returns the data in a block in an Amazon Elastic Block Store snapshot.
21 */
22 getSnapshotBlock(callback?: (err: AWSError, data: EBS.Types.GetSnapshotBlockResponse) => void): Request<EBS.Types.GetSnapshotBlockResponse, AWSError>;
23 /**
24 * Returns the block indexes and block tokens for blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.
25 */
26 listChangedBlocks(params: EBS.Types.ListChangedBlocksRequest, callback?: (err: AWSError, data: EBS.Types.ListChangedBlocksResponse) => void): Request<EBS.Types.ListChangedBlocksResponse, AWSError>;
27 /**
28 * Returns the block indexes and block tokens for blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.
29 */
30 listChangedBlocks(callback?: (err: AWSError, data: EBS.Types.ListChangedBlocksResponse) => void): Request<EBS.Types.ListChangedBlocksResponse, AWSError>;
31 /**
32 * Returns the block indexes and block tokens for blocks in an Amazon Elastic Block Store snapshot.
33 */
34 listSnapshotBlocks(params: EBS.Types.ListSnapshotBlocksRequest, callback?: (err: AWSError, data: EBS.Types.ListSnapshotBlocksResponse) => void): Request<EBS.Types.ListSnapshotBlocksResponse, AWSError>;
35 /**
36 * Returns the block indexes and block tokens for blocks in an Amazon Elastic Block Store snapshot.
37 */
38 listSnapshotBlocks(callback?: (err: AWSError, data: EBS.Types.ListSnapshotBlocksResponse) => void): Request<EBS.Types.ListSnapshotBlocksResponse, AWSError>;
39}
40declare namespace EBS {
41 export interface Block {
42 /**
43 * The block index.
44 */
45 BlockIndex?: BlockIndex;
46 /**
47 * The block token for the block index.
48 */
49 BlockToken?: BlockToken;
50 }
51 export type BlockData = Buffer|Uint8Array|Blob|string|Readable;
52 export type BlockIndex = number;
53 export type BlockSize = number;
54 export type BlockToken = string;
55 export type Blocks = Block[];
56 export interface ChangedBlock {
57 /**
58 * The block index.
59 */
60 BlockIndex?: BlockIndex;
61 /**
62 * The block token for the block index of the FirstSnapshotId specified in the ListChangedBlocks operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.
63 */
64 FirstBlockToken?: BlockToken;
65 /**
66 * The block token for the block index of the SecondSnapshotId specified in the ListChangedBlocks operation.
67 */
68 SecondBlockToken?: BlockToken;
69 }
70 export type ChangedBlocks = ChangedBlock[];
71 export type Checksum = string;
72 export type ChecksumAlgorithm = "SHA256"|string;
73 export type DataLength = number;
74 export interface GetSnapshotBlockRequest {
75 /**
76 * The ID of the snapshot containing the block from which to get data.
77 */
78 SnapshotId: SnapshotId;
79 /**
80 * The block index of the block from which to get data. Obtain the BlockIndex by running the ListChangedBlocks or ListSnapshotBlocks operations.
81 */
82 BlockIndex: BlockIndex;
83 /**
84 * The block token of the block from which to get data. Obtain the BlockToken by running the ListChangedBlocks or ListSnapshotBlocks operations.
85 */
86 BlockToken: BlockToken;
87 }
88 export interface GetSnapshotBlockResponse {
89 /**
90 * The size of the data in the block.
91 */
92 DataLength?: DataLength;
93 /**
94 * The data content of the block.
95 */
96 BlockData?: BlockData;
97 /**
98 * The checksum generated for the block, which is Base64 encoded.
99 */
100 Checksum?: Checksum;
101 /**
102 * The algorithm used to generate the checksum for the block, such as SHA256.
103 */
104 ChecksumAlgorithm?: ChecksumAlgorithm;
105 }
106 export interface ListChangedBlocksRequest {
107 /**
108 * The ID of the first snapshot to use for the comparison. The FirstSnapshotID parameter must be specified with a SecondSnapshotId parameter; otherwise, an error occurs.
109 */
110 FirstSnapshotId?: SnapshotId;
111 /**
112 * The ID of the second snapshot to use for the comparison. The SecondSnapshotId parameter must be specified with a FirstSnapshotID parameter; otherwise, an error occurs.
113 */
114 SecondSnapshotId: SnapshotId;
115 /**
116 * The token to request the next page of results.
117 */
118 NextToken?: PageToken;
119 /**
120 * The number of results to return.
121 */
122 MaxResults?: MaxResults;
123 /**
124 * The block index from which the comparison should start. The list in the response will start from this block index or the next valid block index in the snapshots.
125 */
126 StartingBlockIndex?: BlockIndex;
127 }
128 export interface ListChangedBlocksResponse {
129 /**
130 * An array of objects containing information about the changed blocks.
131 */
132 ChangedBlocks?: ChangedBlocks;
133 /**
134 * The time when the BlockToken expires.
135 */
136 ExpiryTime?: TimeStamp;
137 /**
138 * The size of the volume in GB.
139 */
140 VolumeSize?: VolumeSize;
141 /**
142 * The size of the block.
143 */
144 BlockSize?: BlockSize;
145 /**
146 * The token to use to retrieve the next page of results. This value is null when there are no more results to return.
147 */
148 NextToken?: PageToken;
149 }
150 export interface ListSnapshotBlocksRequest {
151 /**
152 * The ID of the snapshot from which to get block indexes and block tokens.
153 */
154 SnapshotId: SnapshotId;
155 /**
156 * The token to request the next page of results.
157 */
158 NextToken?: PageToken;
159 /**
160 * The number of results to return.
161 */
162 MaxResults?: MaxResults;
163 /**
164 * The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.
165 */
166 StartingBlockIndex?: BlockIndex;
167 }
168 export interface ListSnapshotBlocksResponse {
169 /**
170 * An array of objects containing information about the blocks.
171 */
172 Blocks?: Blocks;
173 /**
174 * The time when the BlockToken expires.
175 */
176 ExpiryTime?: TimeStamp;
177 /**
178 * The size of the volume in GB.
179 */
180 VolumeSize?: VolumeSize;
181 /**
182 * The size of the block.
183 */
184 BlockSize?: BlockSize;
185 /**
186 * The token to use to retrieve the next page of results. This value is null when there are no more results to return.
187 */
188 NextToken?: PageToken;
189 }
190 export type MaxResults = number;
191 export type PageToken = string;
192 export type SnapshotId = string;
193 export type TimeStamp = Date;
194 export type VolumeSize = number;
195 /**
196 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
197 */
198 export type apiVersion = "2019-11-02"|"latest"|string;
199 export interface ClientApiVersions {
200 /**
201 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
202 */
203 apiVersion?: apiVersion;
204 }
205 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
206 /**
207 * Contains interfaces for use with the EBS client.
208 */
209 export import Types = EBS;
210}
211export = EBS;