aws-sdk-translate 1.18.0 → 1.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/aws-sdk-translate.rb +7 -4
- data/lib/aws-sdk-translate/client.rb +308 -49
- data/lib/aws-sdk-translate/client_api.rb +159 -0
- data/lib/aws-sdk-translate/errors.rb +47 -9
- data/lib/aws-sdk-translate/resource.rb +1 -0
- data/lib/aws-sdk-translate/types.rb +480 -8
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9758646416e557aefde3e7a23f9a07afe28c72b2dcbae63365ae8f51b4ef20fe
|
4
|
+
data.tar.gz: fd98b7e8d7d98c7c766ca1fbcad9c911b03395f47bdb70659fdb4ca3bb78fedb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ab0db074d33a7050e4106b2f4e56ec1116856f39cdfaba3972992f443ce06bb3e92dc8e1db508cf87348aa7fa486143a59c220cd5f1a766704837d1ad4f8384
|
7
|
+
data.tar.gz: 60dde06726b3a8bf0c7d39b38a2ee4208a5e258ec1bea8207f103aeb79277eef754265d0a3fbda221dc70cf2c7434bae4b3dbd9605111de4b286872ccd73ce84
|
data/lib/aws-sdk-translate.rb
CHANGED
@@ -24,17 +24,20 @@ require_relative 'aws-sdk-translate/customizations'
|
|
24
24
|
# methods each accept a hash of request parameters and return a response
|
25
25
|
# structure.
|
26
26
|
#
|
27
|
+
# translate = Aws::Translate::Client.new
|
28
|
+
# resp = translate.delete_terminology(params)
|
29
|
+
#
|
27
30
|
# See {Client} for more information.
|
28
31
|
#
|
29
32
|
# # Errors
|
30
33
|
#
|
31
|
-
# Errors returned from Amazon Translate
|
32
|
-
# extend {Errors::ServiceError}.
|
34
|
+
# Errors returned from Amazon Translate are defined in the
|
35
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
33
36
|
#
|
34
37
|
# begin
|
35
38
|
# # do stuff
|
36
39
|
# rescue Aws::Translate::Errors::ServiceError
|
37
|
-
# # rescues all
|
40
|
+
# # rescues all Amazon Translate API errors
|
38
41
|
# end
|
39
42
|
#
|
40
43
|
# See {Errors} for more information.
|
@@ -42,6 +45,6 @@ require_relative 'aws-sdk-translate/customizations'
|
|
42
45
|
# @service
|
43
46
|
module Aws::Translate
|
44
47
|
|
45
|
-
GEM_VERSION = '1.
|
48
|
+
GEM_VERSION = '1.23.1'
|
46
49
|
|
47
50
|
end
|
@@ -24,12 +24,25 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
|
24
24
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
25
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
26
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
|
+
require 'aws-sdk-core/plugins/http_checksum.rb'
|
27
28
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
29
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
29
30
|
|
30
31
|
Aws::Plugins::GlobalConfiguration.add_identifier(:translate)
|
31
32
|
|
32
33
|
module Aws::Translate
|
34
|
+
# An API client for Translate. To construct a client, you need to configure a `:region` and `:credentials`.
|
35
|
+
#
|
36
|
+
# client = Aws::Translate::Client.new(
|
37
|
+
# region: region_name,
|
38
|
+
# credentials: credentials,
|
39
|
+
# # ...
|
40
|
+
# )
|
41
|
+
#
|
42
|
+
# For details on configuring region and credentials see
|
43
|
+
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
44
|
+
#
|
45
|
+
# See {#initialize} for a full list of supported configuration options.
|
33
46
|
class Client < Seahorse::Client::Base
|
34
47
|
|
35
48
|
include Aws::ClientStubs
|
@@ -57,6 +70,7 @@ module Aws::Translate
|
|
57
70
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
58
71
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
59
72
|
add_plugin(Aws::Plugins::TransferEncoding)
|
73
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
60
74
|
add_plugin(Aws::Plugins::SignatureV4)
|
61
75
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
62
76
|
|
@@ -93,7 +107,7 @@ module Aws::Translate
|
|
93
107
|
# @option options [required, String] :region
|
94
108
|
# The AWS region to connect to. The configured `:region` is
|
95
109
|
# used to determine the service `:endpoint`. When not passed,
|
96
|
-
# a default `:region` is
|
110
|
+
# a default `:region` is searched for in the following locations:
|
97
111
|
#
|
98
112
|
# * `Aws.config[:region]`
|
99
113
|
# * `ENV['AWS_REGION']`
|
@@ -108,6 +122,12 @@ module Aws::Translate
|
|
108
122
|
# When set to `true`, a thread polling for endpoints will be running in
|
109
123
|
# the background every 60 secs (default). Defaults to `false`.
|
110
124
|
#
|
125
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
126
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
127
|
+
# until there is sufficent client side capacity to retry the request.
|
128
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
129
|
+
# not retry instead of sleeping.
|
130
|
+
#
|
111
131
|
# @option options [Boolean] :client_side_monitoring (false)
|
112
132
|
# When `true`, client-side metrics will be collected for all API requests from
|
113
133
|
# this client.
|
@@ -132,6 +152,10 @@ module Aws::Translate
|
|
132
152
|
# When `true`, an attempt is made to coerce request parameters into
|
133
153
|
# the required types.
|
134
154
|
#
|
155
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
156
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
157
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
158
|
+
#
|
135
159
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
136
160
|
# Set to true to disable SDK automatically adding host prefix
|
137
161
|
# to default service endpoint when available.
|
@@ -139,7 +163,7 @@ module Aws::Translate
|
|
139
163
|
# @option options [String] :endpoint
|
140
164
|
# The client endpoint is normally constructed from the `:region`
|
141
165
|
# option. You should only configure an `:endpoint` when connecting
|
142
|
-
# to test endpoints. This should be
|
166
|
+
# to test or custom endpoints. This should be a valid HTTP(S) URI.
|
143
167
|
#
|
144
168
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
145
169
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -154,7 +178,7 @@ module Aws::Translate
|
|
154
178
|
# requests fetching endpoints information. Defaults to 60 sec.
|
155
179
|
#
|
156
180
|
# @option options [Boolean] :endpoint_discovery (false)
|
157
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
181
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
158
182
|
#
|
159
183
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
160
184
|
# The log formatter.
|
@@ -166,15 +190,29 @@ module Aws::Translate
|
|
166
190
|
# The Logger instance to send log messages to. If this option
|
167
191
|
# is not set, logging will be disabled.
|
168
192
|
#
|
193
|
+
# @option options [Integer] :max_attempts (3)
|
194
|
+
# An integer representing the maximum number attempts that will be made for
|
195
|
+
# a single request, including the initial attempt. For example,
|
196
|
+
# setting this value to 5 will result in a request being retried up to
|
197
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
198
|
+
#
|
169
199
|
# @option options [String] :profile ("default")
|
170
200
|
# Used when loading credentials from the shared credentials file
|
171
201
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
172
202
|
#
|
203
|
+
# @option options [Proc] :retry_backoff
|
204
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
205
|
+
# This option is only used in the `legacy` retry mode.
|
206
|
+
#
|
173
207
|
# @option options [Float] :retry_base_delay (0.3)
|
174
|
-
# The base delay in seconds used by the default backoff function.
|
208
|
+
# The base delay in seconds used by the default backoff function. This option
|
209
|
+
# is only used in the `legacy` retry mode.
|
175
210
|
#
|
176
211
|
# @option options [Symbol] :retry_jitter (:none)
|
177
|
-
# A delay randomiser function used by the default backoff function.
|
212
|
+
# A delay randomiser function used by the default backoff function.
|
213
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
214
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
215
|
+
# in the `legacy` retry mode.
|
178
216
|
#
|
179
217
|
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
180
218
|
#
|
@@ -182,11 +220,30 @@ module Aws::Translate
|
|
182
220
|
# The maximum number of times to retry failed requests. Only
|
183
221
|
# ~ 500 level server errors and certain ~ 400 level client errors
|
184
222
|
# are retried. Generally, these are throttling errors, data
|
185
|
-
# checksum errors, networking errors, timeout errors
|
186
|
-
# errors from expired credentials.
|
223
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
224
|
+
# endpoint discovery, and errors from expired credentials.
|
225
|
+
# This option is only used in the `legacy` retry mode.
|
187
226
|
#
|
188
227
|
# @option options [Integer] :retry_max_delay (0)
|
189
|
-
# The maximum number of seconds to delay between retries (0 for no limit)
|
228
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
229
|
+
# used by the default backoff function. This option is only used in the
|
230
|
+
# `legacy` retry mode.
|
231
|
+
#
|
232
|
+
# @option options [String] :retry_mode ("legacy")
|
233
|
+
# Specifies which retry algorithm to use. Values are:
|
234
|
+
#
|
235
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
236
|
+
# no retry mode is provided.
|
237
|
+
#
|
238
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
239
|
+
# This includes support for retry quotas, which limit the number of
|
240
|
+
# unsuccessful retries a client can make.
|
241
|
+
#
|
242
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
243
|
+
# functionality of `standard` mode along with automatic client side
|
244
|
+
# throttling. This is a provisional mode that may change behavior
|
245
|
+
# in the future.
|
246
|
+
#
|
190
247
|
#
|
191
248
|
# @option options [String] :secret_access_key
|
192
249
|
#
|
@@ -219,16 +276,15 @@ module Aws::Translate
|
|
219
276
|
# requests through. Formatted like 'http://proxy.com:123'.
|
220
277
|
#
|
221
278
|
# @option options [Float] :http_open_timeout (15) The number of
|
222
|
-
# seconds to wait when opening a HTTP session before
|
279
|
+
# seconds to wait when opening a HTTP session before raising a
|
223
280
|
# `Timeout::Error`.
|
224
281
|
#
|
225
282
|
# @option options [Integer] :http_read_timeout (60) The default
|
226
283
|
# number of seconds to wait for response data. This value can
|
227
|
-
# safely be set
|
228
|
-
# per-request on the session yeidled by {#session_for}.
|
284
|
+
# safely be set per-request on the session.
|
229
285
|
#
|
230
286
|
# @option options [Float] :http_idle_timeout (5) The number of
|
231
|
-
# seconds a connection is allowed to sit
|
287
|
+
# seconds a connection is allowed to sit idle before it is
|
232
288
|
# considered stale. Stale connections are closed and removed
|
233
289
|
# from the pool before making a request.
|
234
290
|
#
|
@@ -237,7 +293,7 @@ module Aws::Translate
|
|
237
293
|
# request body. This option has no effect unless the request has
|
238
294
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
239
295
|
# disables this behaviour. This value can safely be set per
|
240
|
-
# request on the session
|
296
|
+
# request on the session.
|
241
297
|
#
|
242
298
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
243
299
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -286,6 +342,55 @@ module Aws::Translate
|
|
286
342
|
req.send_request(options)
|
287
343
|
end
|
288
344
|
|
345
|
+
# Gets the properties associated with an asycnhronous batch translation
|
346
|
+
# job including name, ID, status, source and target languages,
|
347
|
+
# input/output S3 buckets, and so on.
|
348
|
+
#
|
349
|
+
# @option params [required, String] :job_id
|
350
|
+
# The identifier that Amazon Translate generated for the job. The
|
351
|
+
# StartTextTranslationJob operation returns this identifier in its
|
352
|
+
# response.
|
353
|
+
#
|
354
|
+
# @return [Types::DescribeTextTranslationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
355
|
+
#
|
356
|
+
# * {Types::DescribeTextTranslationJobResponse#text_translation_job_properties #text_translation_job_properties} => Types::TextTranslationJobProperties
|
357
|
+
#
|
358
|
+
# @example Request syntax with placeholder values
|
359
|
+
#
|
360
|
+
# resp = client.describe_text_translation_job({
|
361
|
+
# job_id: "JobId", # required
|
362
|
+
# })
|
363
|
+
#
|
364
|
+
# @example Response structure
|
365
|
+
#
|
366
|
+
# resp.text_translation_job_properties.job_id #=> String
|
367
|
+
# resp.text_translation_job_properties.job_name #=> String
|
368
|
+
# resp.text_translation_job_properties.job_status #=> String, one of "SUBMITTED", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERROR", "FAILED", "STOP_REQUESTED", "STOPPED"
|
369
|
+
# resp.text_translation_job_properties.job_details.translated_documents_count #=> Integer
|
370
|
+
# resp.text_translation_job_properties.job_details.documents_with_errors_count #=> Integer
|
371
|
+
# resp.text_translation_job_properties.job_details.input_documents_count #=> Integer
|
372
|
+
# resp.text_translation_job_properties.source_language_code #=> String
|
373
|
+
# resp.text_translation_job_properties.target_language_codes #=> Array
|
374
|
+
# resp.text_translation_job_properties.target_language_codes[0] #=> String
|
375
|
+
# resp.text_translation_job_properties.terminology_names #=> Array
|
376
|
+
# resp.text_translation_job_properties.terminology_names[0] #=> String
|
377
|
+
# resp.text_translation_job_properties.message #=> String
|
378
|
+
# resp.text_translation_job_properties.submitted_time #=> Time
|
379
|
+
# resp.text_translation_job_properties.end_time #=> Time
|
380
|
+
# resp.text_translation_job_properties.input_data_config.s3_uri #=> String
|
381
|
+
# resp.text_translation_job_properties.input_data_config.content_type #=> String
|
382
|
+
# resp.text_translation_job_properties.output_data_config.s3_uri #=> String
|
383
|
+
# resp.text_translation_job_properties.data_access_role_arn #=> String
|
384
|
+
#
|
385
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJob AWS API Documentation
|
386
|
+
#
|
387
|
+
# @overload describe_text_translation_job(params = {})
|
388
|
+
# @param [Hash] params ({})
|
389
|
+
def describe_text_translation_job(params = {}, options = {})
|
390
|
+
req = build_request(:describe_text_translation_job, params)
|
391
|
+
req.send_request(options)
|
392
|
+
end
|
393
|
+
|
289
394
|
# Retrieves a custom terminology.
|
290
395
|
#
|
291
396
|
# @option params [required, String] :name
|
@@ -421,6 +526,8 @@ module Aws::Translate
|
|
421
526
|
# * {Types::ListTerminologiesResponse#terminology_properties_list #terminology_properties_list} => Array<Types::TerminologyProperties>
|
422
527
|
# * {Types::ListTerminologiesResponse#next_token #next_token} => String
|
423
528
|
#
|
529
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
530
|
+
#
|
424
531
|
# @example Request syntax with placeholder values
|
425
532
|
#
|
426
533
|
# resp = client.list_terminologies({
|
@@ -454,62 +561,208 @@ module Aws::Translate
|
|
454
561
|
req.send_request(options)
|
455
562
|
end
|
456
563
|
|
457
|
-
#
|
458
|
-
#
|
459
|
-
#
|
460
|
-
#
|
461
|
-
#
|
564
|
+
# Gets a list of the batch translation jobs that you have submitted.
|
565
|
+
#
|
566
|
+
# @option params [Types::TextTranslationJobFilter] :filter
|
567
|
+
# The parameters that specify which batch translation jobs to retrieve.
|
568
|
+
# Filters include job name, job status, and submission time. You can
|
569
|
+
# only set one filter at a time.
|
462
570
|
#
|
463
|
-
#
|
571
|
+
# @option params [String] :next_token
|
572
|
+
# The token to request the next page of results.
|
464
573
|
#
|
465
|
-
#
|
574
|
+
# @option params [Integer] :max_results
|
575
|
+
# The maximum number of results to return in each page. The default
|
576
|
+
# value is 100.
|
466
577
|
#
|
467
|
-
#
|
578
|
+
# @return [Types::ListTextTranslationJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
468
579
|
#
|
469
|
-
#
|
580
|
+
# * {Types::ListTextTranslationJobsResponse#text_translation_job_properties_list #text_translation_job_properties_list} => Array<Types::TextTranslationJobProperties>
|
581
|
+
# * {Types::ListTextTranslationJobsResponse#next_token #next_token} => String
|
470
582
|
#
|
471
|
-
#
|
583
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
472
584
|
#
|
473
|
-
#
|
585
|
+
# @example Request syntax with placeholder values
|
474
586
|
#
|
475
|
-
#
|
587
|
+
# resp = client.list_text_translation_jobs({
|
588
|
+
# filter: {
|
589
|
+
# job_name: "JobName",
|
590
|
+
# job_status: "SUBMITTED", # accepts SUBMITTED, IN_PROGRESS, COMPLETED, COMPLETED_WITH_ERROR, FAILED, STOP_REQUESTED, STOPPED
|
591
|
+
# submitted_before_time: Time.now,
|
592
|
+
# submitted_after_time: Time.now,
|
593
|
+
# },
|
594
|
+
# next_token: "NextToken",
|
595
|
+
# max_results: 1,
|
596
|
+
# })
|
476
597
|
#
|
477
|
-
#
|
598
|
+
# @example Response structure
|
478
599
|
#
|
479
|
-
#
|
600
|
+
# resp.text_translation_job_properties_list #=> Array
|
601
|
+
# resp.text_translation_job_properties_list[0].job_id #=> String
|
602
|
+
# resp.text_translation_job_properties_list[0].job_name #=> String
|
603
|
+
# resp.text_translation_job_properties_list[0].job_status #=> String, one of "SUBMITTED", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERROR", "FAILED", "STOP_REQUESTED", "STOPPED"
|
604
|
+
# resp.text_translation_job_properties_list[0].job_details.translated_documents_count #=> Integer
|
605
|
+
# resp.text_translation_job_properties_list[0].job_details.documents_with_errors_count #=> Integer
|
606
|
+
# resp.text_translation_job_properties_list[0].job_details.input_documents_count #=> Integer
|
607
|
+
# resp.text_translation_job_properties_list[0].source_language_code #=> String
|
608
|
+
# resp.text_translation_job_properties_list[0].target_language_codes #=> Array
|
609
|
+
# resp.text_translation_job_properties_list[0].target_language_codes[0] #=> String
|
610
|
+
# resp.text_translation_job_properties_list[0].terminology_names #=> Array
|
611
|
+
# resp.text_translation_job_properties_list[0].terminology_names[0] #=> String
|
612
|
+
# resp.text_translation_job_properties_list[0].message #=> String
|
613
|
+
# resp.text_translation_job_properties_list[0].submitted_time #=> Time
|
614
|
+
# resp.text_translation_job_properties_list[0].end_time #=> Time
|
615
|
+
# resp.text_translation_job_properties_list[0].input_data_config.s3_uri #=> String
|
616
|
+
# resp.text_translation_job_properties_list[0].input_data_config.content_type #=> String
|
617
|
+
# resp.text_translation_job_properties_list[0].output_data_config.s3_uri #=> String
|
618
|
+
# resp.text_translation_job_properties_list[0].data_access_role_arn #=> String
|
619
|
+
# resp.next_token #=> String
|
480
620
|
#
|
481
|
-
#
|
621
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobs AWS API Documentation
|
482
622
|
#
|
483
|
-
#
|
623
|
+
# @overload list_text_translation_jobs(params = {})
|
624
|
+
# @param [Hash] params ({})
|
625
|
+
def list_text_translation_jobs(params = {}, options = {})
|
626
|
+
req = build_request(:list_text_translation_jobs, params)
|
627
|
+
req.send_request(options)
|
628
|
+
end
|
629
|
+
|
630
|
+
# Starts an asynchronous batch translation job. Batch translation jobs
|
631
|
+
# can be used to translate large volumes of text across multiple
|
632
|
+
# documents at once. For more information, see async.
|
484
633
|
#
|
485
|
-
#
|
634
|
+
# Batch translation jobs can be described with the
|
635
|
+
# DescribeTextTranslationJob operation, listed with the
|
636
|
+
# ListTextTranslationJobs operation, and stopped with the
|
637
|
+
# StopTextTranslationJob operation.
|
486
638
|
#
|
487
|
-
#
|
639
|
+
# <note markdown="1"> Amazon Translate does not support batch translation of multiple source
|
640
|
+
# languages at once.
|
488
641
|
#
|
489
|
-
#
|
642
|
+
# </note>
|
490
643
|
#
|
491
|
-
#
|
644
|
+
# @option params [String] :job_name
|
645
|
+
# The name of the batch translation job to be performed.
|
492
646
|
#
|
493
|
-
#
|
647
|
+
# @option params [required, Types::InputDataConfig] :input_data_config
|
648
|
+
# Specifies the format and S3 location of the input documents for the
|
649
|
+
# translation job.
|
494
650
|
#
|
495
|
-
#
|
651
|
+
# @option params [required, Types::OutputDataConfig] :output_data_config
|
652
|
+
# Specifies the S3 folder to which your job output will be saved.
|
496
653
|
#
|
497
|
-
#
|
654
|
+
# @option params [required, String] :data_access_role_arn
|
655
|
+
# The Amazon Resource Name (ARN) of an AWS Identity Access and
|
656
|
+
# Management (IAM) role that grants Amazon Translate read access to your
|
657
|
+
# input data. For more nformation, see identity-and-access-management.
|
498
658
|
#
|
499
|
-
#
|
659
|
+
# @option params [required, String] :source_language_code
|
660
|
+
# The language code of the input language. For a list of language codes,
|
661
|
+
# see what-is-languages.
|
500
662
|
#
|
501
|
-
#
|
663
|
+
# Amazon Translate does not automatically detect a source language
|
664
|
+
# during batch translation jobs.
|
502
665
|
#
|
503
|
-
#
|
666
|
+
# @option params [required, Array<String>] :target_language_codes
|
667
|
+
# The language code of the output language.
|
504
668
|
#
|
505
|
-
#
|
506
|
-
#
|
507
|
-
#
|
508
|
-
# determine the source language.
|
669
|
+
# @option params [Array<String>] :terminology_names
|
670
|
+
# The name of the terminology to use in the batch translation job. For a
|
671
|
+
# list of available terminologies, use the ListTerminologies operation.
|
509
672
|
#
|
673
|
+
# @option params [required, String] :client_token
|
674
|
+
# The client token of the EC2 instance calling the request. This token
|
675
|
+
# is auto-generated when using the Amazon Translate SDK. Otherwise, use
|
676
|
+
# the
|
677
|
+
# [DescribeInstances](docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)
|
678
|
+
# EC2 operation to retreive an instance's client token. For more
|
679
|
+
# information, see [Client
|
680
|
+
# Tokens](docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html#client-tokens)
|
681
|
+
# in the EC2 User Guide.
|
510
682
|
#
|
683
|
+
# **A suitable default value is auto-generated.** You should normally
|
684
|
+
# not need to pass this option.**
|
511
685
|
#
|
512
|
-
# [
|
686
|
+
# @return [Types::StartTextTranslationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
687
|
+
#
|
688
|
+
# * {Types::StartTextTranslationJobResponse#job_id #job_id} => String
|
689
|
+
# * {Types::StartTextTranslationJobResponse#job_status #job_status} => String
|
690
|
+
#
|
691
|
+
# @example Request syntax with placeholder values
|
692
|
+
#
|
693
|
+
# resp = client.start_text_translation_job({
|
694
|
+
# job_name: "JobName",
|
695
|
+
# input_data_config: { # required
|
696
|
+
# s3_uri: "S3Uri", # required
|
697
|
+
# content_type: "ContentType", # required
|
698
|
+
# },
|
699
|
+
# output_data_config: { # required
|
700
|
+
# s3_uri: "S3Uri", # required
|
701
|
+
# },
|
702
|
+
# data_access_role_arn: "IamRoleArn", # required
|
703
|
+
# source_language_code: "LanguageCodeString", # required
|
704
|
+
# target_language_codes: ["LanguageCodeString"], # required
|
705
|
+
# terminology_names: ["ResourceName"],
|
706
|
+
# client_token: "ClientTokenString", # required
|
707
|
+
# })
|
708
|
+
#
|
709
|
+
# @example Response structure
|
710
|
+
#
|
711
|
+
# resp.job_id #=> String
|
712
|
+
# resp.job_status #=> String, one of "SUBMITTED", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERROR", "FAILED", "STOP_REQUESTED", "STOPPED"
|
713
|
+
#
|
714
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJob AWS API Documentation
|
715
|
+
#
|
716
|
+
# @overload start_text_translation_job(params = {})
|
717
|
+
# @param [Hash] params ({})
|
718
|
+
def start_text_translation_job(params = {}, options = {})
|
719
|
+
req = build_request(:start_text_translation_job, params)
|
720
|
+
req.send_request(options)
|
721
|
+
end
|
722
|
+
|
723
|
+
# Stops an asynchronous batch translation job that is in progress.
|
724
|
+
#
|
725
|
+
# If the job's state is `IN_PROGRESS`, the job will be marked for
|
726
|
+
# termination and put into the `STOP_REQUESTED` state. If the job
|
727
|
+
# completes before it can be stopped, it is put into the `COMPLETED`
|
728
|
+
# state. Otherwise, the job is put into the `STOPPED` state.
|
729
|
+
#
|
730
|
+
# Asynchronous batch translation jobs are started with the
|
731
|
+
# StartTextTranslationJob operation. You can use the
|
732
|
+
# DescribeTextTranslationJob or ListTextTranslationJobs operations to
|
733
|
+
# get a batch translation job's `JobId`.
|
734
|
+
#
|
735
|
+
# @option params [required, String] :job_id
|
736
|
+
# The job ID of the job to be stopped.
|
737
|
+
#
|
738
|
+
# @return [Types::StopTextTranslationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
739
|
+
#
|
740
|
+
# * {Types::StopTextTranslationJobResponse#job_id #job_id} => String
|
741
|
+
# * {Types::StopTextTranslationJobResponse#job_status #job_status} => String
|
742
|
+
#
|
743
|
+
# @example Request syntax with placeholder values
|
744
|
+
#
|
745
|
+
# resp = client.stop_text_translation_job({
|
746
|
+
# job_id: "JobId", # required
|
747
|
+
# })
|
748
|
+
#
|
749
|
+
# @example Response structure
|
750
|
+
#
|
751
|
+
# resp.job_id #=> String
|
752
|
+
# resp.job_status #=> String, one of "SUBMITTED", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERROR", "FAILED", "STOP_REQUESTED", "STOPPED"
|
753
|
+
#
|
754
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJob AWS API Documentation
|
755
|
+
#
|
756
|
+
# @overload stop_text_translation_job(params = {})
|
757
|
+
# @param [Hash] params ({})
|
758
|
+
def stop_text_translation_job(params = {}, options = {})
|
759
|
+
req = build_request(:stop_text_translation_job, params)
|
760
|
+
req.send_request(options)
|
761
|
+
end
|
762
|
+
|
763
|
+
# Translates input text from the source language to the target language.
|
764
|
+
# For a list of available languages and language codes, see
|
765
|
+
# what-is-languages.
|
513
766
|
#
|
514
767
|
# @option params [required, String] :text
|
515
768
|
# The text to translate. The text string can be a maximum of 5,000 bytes
|
@@ -517,18 +770,24 @@ module Aws::Translate
|
|
517
770
|
# characters.
|
518
771
|
#
|
519
772
|
# @option params [Array<String>] :terminology_names
|
520
|
-
# The
|
521
|
-
# request.
|
773
|
+
# The name of the terminology list file to be used in the TranslateText
|
774
|
+
# request. You can use 1 terminology list at most in a `TranslateText`
|
775
|
+
# request. Terminology lists can contain a maximum of 256 terms.
|
522
776
|
#
|
523
777
|
# @option params [required, String] :source_language_code
|
524
778
|
# The language code for the language of the source text. The language
|
525
|
-
# must be a language supported by Amazon Translate.
|
779
|
+
# must be a language supported by Amazon Translate. For a list of
|
780
|
+
# language codes, see what-is-languages.
|
526
781
|
#
|
527
782
|
# To have Amazon Translate determine the source language of your text,
|
528
783
|
# you can specify `auto` in the `SourceLanguageCode` field. If you
|
529
|
-
# specify `auto`, Amazon Translate will call Amazon Comprehend to
|
784
|
+
# specify `auto`, Amazon Translate will call [Amazon Comprehend][1] to
|
530
785
|
# determine the source language.
|
531
786
|
#
|
787
|
+
#
|
788
|
+
#
|
789
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html
|
790
|
+
#
|
532
791
|
# @option params [required, String] :target_language_code
|
533
792
|
# The language code requested for the language of the target text. The
|
534
793
|
# language must be a language supported by Amazon Translate.
|
@@ -582,7 +841,7 @@ module Aws::Translate
|
|
582
841
|
params: params,
|
583
842
|
config: config)
|
584
843
|
context[:gem_name] = 'aws-sdk-translate'
|
585
|
-
context[:gem_version] = '1.
|
844
|
+
context[:gem_version] = '1.23.1'
|
586
845
|
Seahorse::Client::Request.new(handlers, context)
|
587
846
|
end
|
588
847
|
|