presigner.d.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import Polly = require('../../clients/polly');
  2. import {AWSError} from '../error';
  3. /**
  4. * A presigner object can be used to generate presigned urls for the Polly service.
  5. */
  6. export class Presigner {
  7. /**
  8. * Creates a presigner object with a set of configuration options.
  9. */
  10. constructor(options?: Presigner.PresignerOptions)
  11. /**
  12. * Generate a signed URL.
  13. */
  14. getSynthesizeSpeechUrl(params: Polly.Types.SynthesizeSpeechInput, error: number, callback: (err: AWSError, url: string) => void): void;
  15. /**
  16. * Generate a signed URL.
  17. */
  18. getSynthesizeSpeechUrl(params: Polly.Types.SynthesizeSpeechInput, callback: (err: AWSError, url: string) => void): void;
  19. /**
  20. * Generate a signed URL.
  21. */
  22. getSynthesizeSpeechUrl(params: Polly.Types.SynthesizeSpeechInput, expires?: number): string;
  23. }
  24. export namespace Presigner {
  25. export import GetSynthesizeSpeechUrlInput = Polly.Types.SynthesizeSpeechInput;
  26. export interface PresignerOptions {
  27. /**
  28. * An optional map of parameters to bind to every request sent by this service object.
  29. */
  30. params?: {[key: string]: any}
  31. /**
  32. * An optional pre-configured instance of the AWS.Polly service object to use for requests. The object may bound parameters used by the presigner.
  33. */
  34. service?: Polly;
  35. }
  36. }