backupstorage.d.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. import {Request} from '../lib/request';
  2. import {Response} from '../lib/response';
  3. import {AWSError} from '../lib/error';
  4. import {Service} from '../lib/service';
  5. import {ServiceConfigurationOptions} from '../lib/service';
  6. import {ConfigBase as Config} from '../lib/config-base';
  7. import {Readable} from 'stream';
  8. interface Blob {}
  9. declare class BackupStorage extends Service {
  10. /**
  11. * Constructs a service object. This object has one method for each API operation.
  12. */
  13. constructor(options?: BackupStorage.Types.ClientConfiguration)
  14. config: Config & BackupStorage.Types.ClientConfiguration;
  15. /**
  16. * Delete Object from the incremental base Backup.
  17. */
  18. deleteObject(params: BackupStorage.Types.DeleteObjectInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  19. /**
  20. * Delete Object from the incremental base Backup.
  21. */
  22. deleteObject(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  23. /**
  24. * Gets the specified object's chunk.
  25. */
  26. getChunk(params: BackupStorage.Types.GetChunkInput, callback?: (err: AWSError, data: BackupStorage.Types.GetChunkOutput) => void): Request<BackupStorage.Types.GetChunkOutput, AWSError>;
  27. /**
  28. * Gets the specified object's chunk.
  29. */
  30. getChunk(callback?: (err: AWSError, data: BackupStorage.Types.GetChunkOutput) => void): Request<BackupStorage.Types.GetChunkOutput, AWSError>;
  31. /**
  32. * Get metadata associated with an Object.
  33. */
  34. getObjectMetadata(params: BackupStorage.Types.GetObjectMetadataInput, callback?: (err: AWSError, data: BackupStorage.Types.GetObjectMetadataOutput) => void): Request<BackupStorage.Types.GetObjectMetadataOutput, AWSError>;
  35. /**
  36. * Get metadata associated with an Object.
  37. */
  38. getObjectMetadata(callback?: (err: AWSError, data: BackupStorage.Types.GetObjectMetadataOutput) => void): Request<BackupStorage.Types.GetObjectMetadataOutput, AWSError>;
  39. /**
  40. * List chunks in a given Object
  41. */
  42. listChunks(params: BackupStorage.Types.ListChunksInput, callback?: (err: AWSError, data: BackupStorage.Types.ListChunksOutput) => void): Request<BackupStorage.Types.ListChunksOutput, AWSError>;
  43. /**
  44. * List chunks in a given Object
  45. */
  46. listChunks(callback?: (err: AWSError, data: BackupStorage.Types.ListChunksOutput) => void): Request<BackupStorage.Types.ListChunksOutput, AWSError>;
  47. /**
  48. * List all Objects in a given Backup.
  49. */
  50. listObjects(params: BackupStorage.Types.ListObjectsInput, callback?: (err: AWSError, data: BackupStorage.Types.ListObjectsOutput) => void): Request<BackupStorage.Types.ListObjectsOutput, AWSError>;
  51. /**
  52. * List all Objects in a given Backup.
  53. */
  54. listObjects(callback?: (err: AWSError, data: BackupStorage.Types.ListObjectsOutput) => void): Request<BackupStorage.Types.ListObjectsOutput, AWSError>;
  55. /**
  56. * Complete upload
  57. */
  58. notifyObjectComplete(params: BackupStorage.Types.NotifyObjectCompleteInput, callback?: (err: AWSError, data: BackupStorage.Types.NotifyObjectCompleteOutput) => void): Request<BackupStorage.Types.NotifyObjectCompleteOutput, AWSError>;
  59. /**
  60. * Complete upload
  61. */
  62. notifyObjectComplete(callback?: (err: AWSError, data: BackupStorage.Types.NotifyObjectCompleteOutput) => void): Request<BackupStorage.Types.NotifyObjectCompleteOutput, AWSError>;
  63. /**
  64. * Upload chunk.
  65. */
  66. putChunk(params: BackupStorage.Types.PutChunkInput, callback?: (err: AWSError, data: BackupStorage.Types.PutChunkOutput) => void): Request<BackupStorage.Types.PutChunkOutput, AWSError>;
  67. /**
  68. * Upload chunk.
  69. */
  70. putChunk(callback?: (err: AWSError, data: BackupStorage.Types.PutChunkOutput) => void): Request<BackupStorage.Types.PutChunkOutput, AWSError>;
  71. /**
  72. * Upload object that can store object metadata String and data blob in single API call using inline chunk field.
  73. */
  74. putObject(params: BackupStorage.Types.PutObjectInput, callback?: (err: AWSError, data: BackupStorage.Types.PutObjectOutput) => void): Request<BackupStorage.Types.PutObjectOutput, AWSError>;
  75. /**
  76. * Upload object that can store object metadata String and data blob in single API call using inline chunk field.
  77. */
  78. putObject(callback?: (err: AWSError, data: BackupStorage.Types.PutObjectOutput) => void): Request<BackupStorage.Types.PutObjectOutput, AWSError>;
  79. /**
  80. * Start upload containing one or many chunks.
  81. */
  82. startObject(params: BackupStorage.Types.StartObjectInput, callback?: (err: AWSError, data: BackupStorage.Types.StartObjectOutput) => void): Request<BackupStorage.Types.StartObjectOutput, AWSError>;
  83. /**
  84. * Start upload containing one or many chunks.
  85. */
  86. startObject(callback?: (err: AWSError, data: BackupStorage.Types.StartObjectOutput) => void): Request<BackupStorage.Types.StartObjectOutput, AWSError>;
  87. }
  88. declare namespace BackupStorage {
  89. export interface BackupObject {
  90. /**
  91. * Object name
  92. */
  93. Name: string;
  94. /**
  95. * Number of chunks in object
  96. */
  97. ChunksCount?: OptionalLong;
  98. /**
  99. * Metadata string associated with the Object
  100. */
  101. MetadataString?: string;
  102. /**
  103. * Object checksum
  104. */
  105. ObjectChecksum: string;
  106. /**
  107. * Checksum algorithm
  108. */
  109. ObjectChecksumAlgorithm: SummaryChecksumAlgorithm;
  110. /**
  111. * Object token
  112. */
  113. ObjectToken: string;
  114. }
  115. export interface Chunk {
  116. /**
  117. * Chunk index
  118. */
  119. Index: long;
  120. /**
  121. * Chunk length
  122. */
  123. Length: long;
  124. /**
  125. * Chunk checksum
  126. */
  127. Checksum: string;
  128. /**
  129. * Checksum algorithm
  130. */
  131. ChecksumAlgorithm: DataChecksumAlgorithm;
  132. /**
  133. * Chunk token
  134. */
  135. ChunkToken: string;
  136. }
  137. export type ChunkList = Chunk[];
  138. export type DataChecksumAlgorithm = "SHA256"|string;
  139. export interface DeleteObjectInput {
  140. /**
  141. * Backup job Id for the in-progress backup.
  142. */
  143. BackupJobId: string;
  144. /**
  145. * The name of the Object.
  146. */
  147. ObjectName: string;
  148. }
  149. export interface GetChunkInput {
  150. /**
  151. * Storage job id
  152. */
  153. StorageJobId: string;
  154. /**
  155. * Chunk token
  156. */
  157. ChunkToken: string;
  158. }
  159. export interface GetChunkOutput {
  160. /**
  161. * Chunk data
  162. */
  163. Data: PayloadBlob;
  164. /**
  165. * Data length
  166. */
  167. Length: long;
  168. /**
  169. * Data checksum
  170. */
  171. Checksum: string;
  172. /**
  173. * Checksum algorithm
  174. */
  175. ChecksumAlgorithm: DataChecksumAlgorithm;
  176. }
  177. export interface GetObjectMetadataInput {
  178. /**
  179. * Backup job id for the in-progress backup.
  180. */
  181. StorageJobId: string;
  182. /**
  183. * Object token.
  184. */
  185. ObjectToken: string;
  186. }
  187. export interface GetObjectMetadataOutput {
  188. /**
  189. * Metadata string.
  190. */
  191. MetadataString?: string;
  192. /**
  193. * Metadata blob.
  194. */
  195. MetadataBlob?: PayloadBlob;
  196. /**
  197. * The size of MetadataBlob.
  198. */
  199. MetadataBlobLength?: long;
  200. /**
  201. * MetadataBlob checksum.
  202. */
  203. MetadataBlobChecksum?: string;
  204. /**
  205. * Checksum algorithm.
  206. */
  207. MetadataBlobChecksumAlgorithm?: DataChecksumAlgorithm;
  208. }
  209. export interface ListChunksInput {
  210. /**
  211. * Storage job id
  212. */
  213. StorageJobId: string;
  214. /**
  215. * Object token
  216. */
  217. ObjectToken: string;
  218. /**
  219. * Maximum number of chunks
  220. */
  221. MaxResults?: MaxResults;
  222. /**
  223. * Pagination token
  224. */
  225. NextToken?: string;
  226. }
  227. export interface ListChunksOutput {
  228. /**
  229. * List of chunks
  230. */
  231. ChunkList: ChunkList;
  232. /**
  233. * Pagination token
  234. */
  235. NextToken?: string;
  236. }
  237. export interface ListObjectsInput {
  238. /**
  239. * Storage job id
  240. */
  241. StorageJobId: string;
  242. /**
  243. * Optional, specifies the starting Object name to list from. Ignored if NextToken is not NULL
  244. */
  245. StartingObjectName?: string;
  246. /**
  247. * Optional, specifies the starting Object prefix to list from. Ignored if NextToken is not NULL
  248. */
  249. StartingObjectPrefix?: string;
  250. /**
  251. * Maximum objects count
  252. */
  253. MaxResults?: MaxResults;
  254. /**
  255. * Pagination token
  256. */
  257. NextToken?: string;
  258. /**
  259. * (Optional) Created before filter
  260. */
  261. CreatedBefore?: timestamp;
  262. /**
  263. * (Optional) Created after filter
  264. */
  265. CreatedAfter?: timestamp;
  266. }
  267. export interface ListObjectsOutput {
  268. /**
  269. * Object list
  270. */
  271. ObjectList: ObjectList;
  272. /**
  273. * Pagination token
  274. */
  275. NextToken?: string;
  276. }
  277. export type MaxResults = number;
  278. export type MetadataString = string;
  279. export interface NotifyObjectCompleteInput {
  280. /**
  281. * Backup job Id for the in-progress backup
  282. */
  283. BackupJobId: string;
  284. /**
  285. * Upload Id for the in-progress upload
  286. */
  287. UploadId: string;
  288. /**
  289. * Object checksum
  290. */
  291. ObjectChecksum: string;
  292. /**
  293. * Checksum algorithm
  294. */
  295. ObjectChecksumAlgorithm: SummaryChecksumAlgorithm;
  296. /**
  297. * Optional metadata associated with an Object. Maximum string length is 256 bytes.
  298. */
  299. MetadataString?: MetadataString;
  300. /**
  301. * Optional metadata associated with an Object. Maximum length is 4MB.
  302. */
  303. MetadataBlob?: PayloadBlob;
  304. /**
  305. * The size of MetadataBlob.
  306. */
  307. MetadataBlobLength?: long;
  308. /**
  309. * Checksum of MetadataBlob.
  310. */
  311. MetadataBlobChecksum?: string;
  312. /**
  313. * Checksum algorithm.
  314. */
  315. MetadataBlobChecksumAlgorithm?: DataChecksumAlgorithm;
  316. }
  317. export interface NotifyObjectCompleteOutput {
  318. /**
  319. * Object checksum
  320. */
  321. ObjectChecksum: string;
  322. /**
  323. * Checksum algorithm
  324. */
  325. ObjectChecksumAlgorithm: SummaryChecksumAlgorithm;
  326. }
  327. export type ObjectList = BackupObject[];
  328. export type OptionalLong = number;
  329. export type PayloadBlob = Buffer|Uint8Array|Blob|string|Readable;
  330. export interface PutChunkInput {
  331. /**
  332. * Backup job Id for the in-progress backup.
  333. */
  334. BackupJobId: string;
  335. /**
  336. * Upload Id for the in-progress upload.
  337. */
  338. UploadId: string;
  339. /**
  340. * Describes this chunk's position relative to the other chunks
  341. */
  342. ChunkIndex: long;
  343. /**
  344. * Data to be uploaded
  345. */
  346. Data: PayloadBlob;
  347. /**
  348. * Data length
  349. */
  350. Length: long;
  351. /**
  352. * Data checksum
  353. */
  354. Checksum: string;
  355. /**
  356. * Checksum algorithm
  357. */
  358. ChecksumAlgorithm: DataChecksumAlgorithm;
  359. }
  360. export interface PutChunkOutput {
  361. /**
  362. * Chunk checksum
  363. */
  364. ChunkChecksum: string;
  365. /**
  366. * Checksum algorithm
  367. */
  368. ChunkChecksumAlgorithm: DataChecksumAlgorithm;
  369. }
  370. export interface PutObjectInput {
  371. /**
  372. * Backup job Id for the in-progress backup.
  373. */
  374. BackupJobId: string;
  375. /**
  376. * The name of the Object to be uploaded.
  377. */
  378. ObjectName: string;
  379. /**
  380. * Store user defined metadata like backup checksum, disk ids, restore metadata etc.
  381. */
  382. MetadataString?: string;
  383. /**
  384. * Inline chunk data to be uploaded.
  385. */
  386. InlineChunk?: PayloadBlob;
  387. /**
  388. * Length of the inline chunk data.
  389. */
  390. InlineChunkLength?: long;
  391. /**
  392. * Inline chunk checksum
  393. */
  394. InlineChunkChecksum?: string;
  395. /**
  396. * Inline chunk checksum algorithm
  397. */
  398. InlineChunkChecksumAlgorithm?: string;
  399. /**
  400. * object checksum
  401. */
  402. ObjectChecksum?: string;
  403. /**
  404. * object checksum algorithm
  405. */
  406. ObjectChecksumAlgorithm?: SummaryChecksumAlgorithm;
  407. /**
  408. * Throw an exception if Object name is already exist.
  409. */
  410. ThrowOnDuplicate?: boolean;
  411. }
  412. export interface PutObjectOutput {
  413. /**
  414. * Inline chunk checksum
  415. */
  416. InlineChunkChecksum: string;
  417. /**
  418. * Inline chunk checksum algorithm
  419. */
  420. InlineChunkChecksumAlgorithm: DataChecksumAlgorithm;
  421. /**
  422. * object checksum
  423. */
  424. ObjectChecksum: string;
  425. /**
  426. * object checksum algorithm
  427. */
  428. ObjectChecksumAlgorithm: SummaryChecksumAlgorithm;
  429. }
  430. export interface StartObjectInput {
  431. /**
  432. * Backup job Id for the in-progress backup
  433. */
  434. BackupJobId: string;
  435. /**
  436. * Name for the object.
  437. */
  438. ObjectName: string;
  439. /**
  440. * Throw an exception if Object name is already exist.
  441. */
  442. ThrowOnDuplicate?: boolean;
  443. }
  444. export interface StartObjectOutput {
  445. /**
  446. * Upload Id for a given upload.
  447. */
  448. UploadId: string;
  449. }
  450. export type SummaryChecksumAlgorithm = "SUMMARY"|string;
  451. export type long = number;
  452. export type timestamp = Date;
  453. /**
  454. * 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.
  455. */
  456. export type apiVersion = "2018-04-10"|"latest"|string;
  457. export interface ClientApiVersions {
  458. /**
  459. * 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.
  460. */
  461. apiVersion?: apiVersion;
  462. }
  463. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  464. /**
  465. * Contains interfaces for use with the BackupStorage client.
  466. */
  467. export import Types = BackupStorage;
  468. }
  469. export = BackupStorage;