s3.d.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import {Service} from '../service';
  2. import {ManagedUpload} from '../s3/managed_upload';
  3. import S3 = require('../../clients/s3');
  4. export class S3Customizations extends Service {
  5. /**
  6. * Get a pre-signed URL for a given operation name.
  7. */
  8. getSignedUrl(operation: string, params: any, callback: (err: Error, url: string) => void): void;
  9. /**
  10. * Get a pre-signed URL for a given operation name.
  11. */
  12. getSignedUrl(operation: string, params: any): string;
  13. /**
  14. * Returns a 'thenable' promise that will be resolved with a pre-signed URL for a given operation name.
  15. */
  16. getSignedUrlPromise(operation: string, params: any): Promise<string>;
  17. /**
  18. * Get the form fields and target URL for direct POST uploading.
  19. */
  20. createPresignedPost(
  21. params: S3.PresignedPost.Params,
  22. callback: (err: Error, data: S3.PresignedPost) => void
  23. ): void;
  24. /**
  25. * Get the form fields and target URL for direct POST uploading.
  26. */
  27. createPresignedPost(params: S3.PresignedPost.Params): S3.PresignedPost;
  28. /**
  29. * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent
  30. * concurrent handling of parts if the payload is large enough. You can
  31. * configure the concurrent queue size by setting `options`. Note that this
  32. * is the only operation for which the SDK can retry requests with stream
  33. * bodies.
  34. */
  35. upload(params: S3.Types.PutObjectRequest, options?: ManagedUpload.ManagedUploadOptions, callback?: (err: Error, data: ManagedUpload.SendData) => void): ManagedUpload;
  36. /**
  37. * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent
  38. * concurrent handling of parts if the payload is large enough. You can
  39. * configure the concurrent queue size by setting `options`. Note that this
  40. * is the only operation for which the SDK can retry requests with stream
  41. * bodies.
  42. */
  43. upload(params: S3.Types.PutObjectRequest, callback?: (err: Error, data: ManagedUpload.SendData) => void): ManagedUpload;
  44. static ManagedUpload: typeof ManagedUpload;
  45. }