class Aws::Polly::Presigner
)
voice_id: ‘Ewa’
text: ‘Hello World’,
output_format: ‘mp3’,
url = signer.synthesize_speech_presigned_url(
signer = Aws::Polly::Presigner.new
Example Use:
Allows you to create presigned URLs for ‘synthesize_speech`
def initialize(options = {})
(**options)
-
:region
(required, string
) -- -
:credentials
(required, Credentials
) --
def initialize(options = {}) @credentials = options.fetch(:credentials) @region = options.fetch(:region) end
def sign_but_dont_send(input_shape, params)
def sign_but_dont_send(input_shape, params) parts = [] input_shape.members.each do |name, ref| parts << [ ref, params[name] ] unless params[name].nil? end query = Aws::Rest::Request::QuerystringBuilder.new.build(parts) signer = Aws::Sigv4::Signer.new( service: 'polly', region: @region, credentials_provider: @credentials ) url = Aws::EndpointProvider.resolve(signer.region, 'polly') url += "/v1/speech?#{query}" pre_signed_url = signer.presign_url( http_method: 'GET', url: url, body: '', expires_in: 900 ).to_s end
def synthesize_speech_presigned_url(params = {})
-
params
(Hash
) -- parameter inputs for synthesize_speech operation
def synthesize_speech_presigned_url(params = {}) input_shape = Client.api.operation(:synthesize_speech).input.shape sign_but_dont_send(input_shape, params) end