aws-sdk-polly 1.48.0 → 1.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-polly/client.rb +1 -1
- data/lib/aws-sdk-polly/presigner.rb +30 -20
- data/lib/aws-sdk-polly.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29194c3dff146b7cd91da7a4574047d8a1c03c98bf6ba62d3424c1d42e02a8b2
|
4
|
+
data.tar.gz: 8d4dd3854bea1f8d8976a8fb7b3303beab7271c4966d511db685e48f2c1a8c6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8190b03eb3be45de6fd8ec606fd2b984c2a9e3b122e724ce9e88f1f15350c053f98f34c16dac23c4923e3deaa73173389f6bc45ca09bda38fec0a4bd24c779b7
|
7
|
+
data.tar.gz: ff417599aef708bb35a014a1d55c750884b59f166b514bb6bdd9a989a90929aadd4aa286ec65bd96ae4e0fb4456076da665923bbe2d4c61c460b017ce7b33269
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.49.0 (2021-11-18)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Allow `Aws::Polly::Presigner` to take a `:client` with FIPS or Dualstack configuration.
|
8
|
+
|
4
9
|
1.48.0 (2021-11-04)
|
5
10
|
------------------
|
6
11
|
|
@@ -315,4 +320,4 @@ Unreleased Changes
|
|
315
320
|
1.0.0.rc2 (2016-12-09)
|
316
321
|
------------------
|
317
322
|
|
318
|
-
* Feature - Initial release of `aws-sdk-polly`.
|
323
|
+
* Feature - Initial release of `aws-sdk-polly`.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.49.0
|
data/lib/aws-sdk-polly/client.rb
CHANGED
@@ -1097,7 +1097,7 @@ module Aws::Polly
|
|
1097
1097
|
params: params,
|
1098
1098
|
config: config)
|
1099
1099
|
context[:gem_name] = 'aws-sdk-polly'
|
1100
|
-
context[:gem_version] = '1.
|
1100
|
+
context[:gem_version] = '1.49.0'
|
1101
1101
|
Seahorse::Client::Request.new(handlers, context)
|
1102
1102
|
end
|
1103
1103
|
|
@@ -18,10 +18,13 @@ module Aws
|
|
18
18
|
#
|
19
19
|
class Presigner
|
20
20
|
|
21
|
-
# @option options [
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
21
|
+
# @option options [Client] :client Optionally provide an existing Polly
|
22
|
+
# client.
|
23
|
+
#
|
24
|
+
# @option options [Credentials] :credentials This option is deprecated,
|
25
|
+
# please use :client instead. Provide an object that responds to
|
26
|
+
# `#credentials` that returns another object that responds to
|
27
|
+
# `#access_key_id`, `#secret_access_key`, and `#session_token`.
|
25
28
|
#
|
26
29
|
# For example, you could provide an instance of following classes:
|
27
30
|
# * `Aws::Credentials`
|
@@ -30,35 +33,42 @@ module Aws
|
|
30
33
|
# * `Aws::AssumeRoleCredentials`
|
31
34
|
# * `Aws::ECSCredentials`
|
32
35
|
#
|
33
|
-
# @option options [
|
34
|
-
# The region name, e.g. 'us-west-2'
|
36
|
+
# @option options [String] :region This option is deprecated, please use
|
37
|
+
# :client instead. The region name, e.g. 'us-west-2'.
|
38
|
+
#
|
35
39
|
def initialize(options = {})
|
36
|
-
|
37
|
-
|
40
|
+
if !(options.keys - [:credentials, :region, :client]).empty?
|
41
|
+
raise ArgumentError,
|
42
|
+
':options may only contain :client, :region, :credentials '\
|
43
|
+
'keys. Please use the :client option instead.'
|
44
|
+
end
|
45
|
+
@client = options[:client] || Aws::Polly::Client.new(options)
|
38
46
|
end
|
39
47
|
|
40
|
-
# @param [Hash] params
|
48
|
+
# @param [Hash] params Parameter inputs for {Client#synthesize_speech}
|
49
|
+
# operation.
|
41
50
|
def synthesize_speech_presigned_url(params = {})
|
42
|
-
|
43
|
-
sign_but_dont_send(input_shape, params)
|
44
|
-
end
|
51
|
+
req = @client.build_request(:synthesize_speech, params)
|
45
52
|
|
46
|
-
private
|
47
|
-
|
48
|
-
def sign_but_dont_send(input_shape, params)
|
49
53
|
parts = []
|
50
|
-
|
54
|
+
req.context.operation.input.shape.members.each do |name, ref|
|
51
55
|
parts << [ ref, params[name] ] unless params[name].nil?
|
52
56
|
end
|
53
57
|
query = Aws::Rest::Request::QuerystringBuilder.new.build(parts)
|
54
58
|
|
55
59
|
signer = Aws::Sigv4::Signer.new(
|
56
60
|
service: 'polly',
|
57
|
-
region:
|
58
|
-
credentials_provider:
|
61
|
+
region: req.context.config.region,
|
62
|
+
credentials_provider: req.context.config.credentials
|
63
|
+
)
|
64
|
+
|
65
|
+
url = Aws::Partitions::EndpointProvider.resolve(
|
66
|
+
signer.region, 'polly', 'regional',
|
67
|
+
{
|
68
|
+
dualstack: req.context.config.use_dualstack_endpoint,
|
69
|
+
fips: req.context.config.use_fips_endpoint
|
70
|
+
}
|
59
71
|
)
|
60
|
-
# TODO - use context so that dualstack can be used
|
61
|
-
url = Aws::Partitions::EndpointProvider.resolve(signer.region, 'polly')
|
62
72
|
url += "/v1/speech?#{query}"
|
63
73
|
pre_signed_url = signer.presign_url(
|
64
74
|
http_method: 'GET',
|
data/lib/aws-sdk-polly.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-polly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.49.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|