Class: Aws::Polly::Presigner

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-polly/presigner.rb

Overview

Allows you to create presigned URLs for ‘synthesize_speech`

Example Use:

signer = Aws::Polly::Presigner.new
url = signer.synthesize_speech_presigned_url(
  output_format: 'mp3',
  text: 'Hello World',
  voice_id: 'Ewa'
)

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Presigner

Returns a new instance of Presigner.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :credentials (required, Credentials)

    You need provide an object that responds to ‘#credentials` returning another object that responds to `#access_key_id`, `#secret_access_key`, and `#session_token`.

    For example, you could provide an instance of following classes:

    * `Aws::Credentials`
    * `Aws::SharedCredentials`
    * `Aws::InstanceProfileCredentials`
    * `Aws::AssumeRoleCredentials`
    * `Aws::ECSCredentials`
    
  • :region (required, string)

    The region name, e.g. ‘us-west-2’



35
36
37
38
# File 'lib/aws-sdk-polly/presigner.rb', line 35

def initialize(options = {})
  @credentials = options.fetch(:credentials)
  @region = options.fetch(:region)
end

Instance Method Details

#synthesize_speech_presigned_url(params = {}) ⇒ Object

Parameters:

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

    parameter inputs for synthesize_speech operation



41
42
43
44
# File 'lib/aws-sdk-polly/presigner.rb', line 41

def synthesize_speech_presigned_url(params = {})
  input_shape = Client.api.operation(:synthesize_speech).input.shape
  sign_but_dont_send(input_shape, params)
end