Class: AWS.Polly.Presigner

Inherits:
Object
  • Object
show all
Defined in:
lib/polly/presigner.js

Overview

A presigner object can be used to generate presigned urls for the Polly service.

Constructor Summary

Method Summary

Constructor Details

new AWS.Polly.Presigner(options) ⇒ void

Creates a presigner object with a set of configuration options.

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object.

  • service (AWS.Polly)

    An optional pre-configured instance of the AWS.Polly service object to use for requests. The object may bound parameters used by the presigner.

See Also:

Method Details

getSynthesizeSpeechUrl(params = {}, [expires = 3600], [callback]) ⇒ string?

Note:

You must ensure that you have static or previously resolved credentials if you call this method synchronously (with no callback), otherwise it may not properly sign the request. If you cannot guarantee this (you are using an asynchronous credential provider, i.e., EC2 IAM roles), you should always call this method with an asynchronous callback.

Generate a presigned url for AWS.Polly.synthesizeSpeech().

Parameters:

  • params (map) (defaults to: {})

    parameters to pass to the operation. See the AWS.Polly.synthesizeSpeech() operation for the expected operation parameters.

  • expires (Integer)

    (3600) the number of seconds to expire the pre-signed URL operation in. Defaults to 1 hour.

Callback (callback):

  • function(err, url) { ... }

    If a callback is supplied, it is called when a signed URL has been generated.

    Parameters:

    • err (Error)

      the error object returned from the presigner.

    • url (String)

      the signed URL.

Returns:

  • (string)

    if called synchronously (with no callback), returns the signed URL.

  • (null)

    nothing is returned if a callback is provided.

See Also: