Class: Aws::Translate::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Translate::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-translate/client.rb
Overview
An API client for Translate. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::Translate::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_parallel_data(params = {}) ⇒ Types::CreateParallelDataResponse
Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3.
-
#delete_parallel_data(params = {}) ⇒ Types::DeleteParallelDataResponse
Deletes a parallel data resource in Amazon Translate.
-
#delete_terminology(params = {}) ⇒ Struct
A synchronous action that deletes a custom terminology.
-
#describe_text_translation_job(params = {}) ⇒ Types::DescribeTextTranslationJobResponse
Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
-
#get_parallel_data(params = {}) ⇒ Types::GetParallelDataResponse
Provides information about a parallel data resource.
-
#get_terminology(params = {}) ⇒ Types::GetTerminologyResponse
Retrieves a custom terminology.
-
#import_terminology(params = {}) ⇒ Types::ImportTerminologyResponse
Creates or updates a custom terminology, depending on whether or not one already exists for the given terminology name.
-
#list_parallel_data(params = {}) ⇒ Types::ListParallelDataResponse
Provides a list of your parallel data resources in Amazon Translate.
-
#list_terminologies(params = {}) ⇒ Types::ListTerminologiesResponse
Provides a list of custom terminologies associated with your account.
-
#list_text_translation_jobs(params = {}) ⇒ Types::ListTextTranslationJobsResponse
Gets a list of the batch translation jobs that you have submitted.
-
#start_text_translation_job(params = {}) ⇒ Types::StartTextTranslationJobResponse
Starts an asynchronous batch translation job.
-
#stop_text_translation_job(params = {}) ⇒ Types::StopTextTranslationJobResponse
Stops an asynchronous batch translation job that is in progress.
-
#translate_text(params = {}) ⇒ Types::TranslateTextResponse
Translates input text from the source language to the target language.
-
#update_parallel_data(params = {}) ⇒ Types::UpdateParallelDataResponse
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
343 344 345 |
# File 'lib/aws-sdk-translate/client.rb', line 343 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1209 1210 1211 |
# File 'lib/aws-sdk-translate/client.rb', line 1209 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1212 1213 1214 |
# File 'lib/aws-sdk-translate/client.rb', line 1212 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 |
# File 'lib/aws-sdk-translate/client.rb', line 1187 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-translate' context[:gem_version] = '1.38.0' Seahorse::Client::Request.new(handlers, context) end |
#create_parallel_data(params = {}) ⇒ Types::CreateParallelDataResponse
Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.
406 407 408 409 |
# File 'lib/aws-sdk-translate/client.rb', line 406 def create_parallel_data(params = {}, = {}) req = build_request(:create_parallel_data, params) req.send_request() end |
#delete_parallel_data(params = {}) ⇒ Types::DeleteParallelDataResponse
Deletes a parallel data resource in Amazon Translate.
436 437 438 439 |
# File 'lib/aws-sdk-translate/client.rb', line 436 def delete_parallel_data(params = {}, = {}) req = build_request(:delete_parallel_data, params) req.send_request() end |
#delete_terminology(params = {}) ⇒ Struct
A synchronous action that deletes a custom terminology.
458 459 460 461 |
# File 'lib/aws-sdk-translate/client.rb', line 458 def delete_terminology(params = {}, = {}) req = build_request(:delete_terminology, params) req.send_request() end |
#describe_text_translation_job(params = {}) ⇒ Types::DescribeTextTranslationJobResponse
Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
511 512 513 514 |
# File 'lib/aws-sdk-translate/client.rb', line 511 def describe_text_translation_job(params = {}, = {}) req = build_request(:describe_text_translation_job, params) req.send_request() end |
#get_parallel_data(params = {}) ⇒ Types::GetParallelDataResponse
Provides information about a parallel data resource.
567 568 569 570 |
# File 'lib/aws-sdk-translate/client.rb', line 567 def get_parallel_data(params = {}, = {}) req = build_request(:get_parallel_data, params) req.send_request() end |
#get_terminology(params = {}) ⇒ Types::GetTerminologyResponse
Retrieves a custom terminology.
629 630 631 632 |
# File 'lib/aws-sdk-translate/client.rb', line 629 def get_terminology(params = {}, = {}) req = build_request(:get_terminology, params) req.send_request() end |
#import_terminology(params = {}) ⇒ Types::ImportTerminologyResponse
Creates or updates a custom terminology, depending on whether or not one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. Currently, the only supported merge strategy is OVERWRITE, and so the imported terminology will overwrite an existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology take up to 10 minutes to fully propagate and be available for use in a translation due to cache policies with the DataPlane service that performs the translations.
711 712 713 714 |
# File 'lib/aws-sdk-translate/client.rb', line 711 def import_terminology(params = {}, = {}) req = build_request(:import_terminology, params) req.send_request() end |
#list_parallel_data(params = {}) ⇒ Types::ListParallelDataResponse
Provides a list of your parallel data resources in Amazon Translate.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
769 770 771 772 |
# File 'lib/aws-sdk-translate/client.rb', line 769 def list_parallel_data(params = {}, = {}) req = build_request(:list_parallel_data, params) req.send_request() end |
#list_terminologies(params = {}) ⇒ Types::ListTerminologiesResponse
Provides a list of custom terminologies associated with your account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
822 823 824 825 |
# File 'lib/aws-sdk-translate/client.rb', line 822 def list_terminologies(params = {}, = {}) req = build_request(:list_terminologies, params) req.send_request() end |
#list_text_translation_jobs(params = {}) ⇒ Types::ListTextTranslationJobsResponse
Gets a list of the batch translation jobs that you have submitted.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
892 893 894 895 |
# File 'lib/aws-sdk-translate/client.rb', line 892 def list_text_translation_jobs(params = {}, = {}) req = build_request(:list_text_translation_jobs, params) req.send_request() end |
#start_text_translation_job(params = {}) ⇒ Types::StartTextTranslationJobResponse
Starts an asynchronous batch translation job. Batch translation jobs can be used to translate large volumes of text across multiple documents at once. For more information, see async.
Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.
<note markdown=“1”> Amazon Translate does not support batch translation of multiple source languages at once.
</note>
1015 1016 1017 1018 |
# File 'lib/aws-sdk-translate/client.rb', line 1015 def start_text_translation_job(params = {}, = {}) req = build_request(:start_text_translation_job, params) req.send_request() end |
#stop_text_translation_job(params = {}) ⇒ Types::StopTextTranslationJobResponse
Stops an asynchronous batch translation job that is in progress.
If the job’s state is ‘IN_PROGRESS`, the job will be marked for termination and put into the `STOP_REQUESTED` state. If the job completes before it can be stopped, it is put into the `COMPLETED` state. Otherwise, the job is put into the `STOPPED` state.
Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job’s ‘JobId`.
1055 1056 1057 1058 |
# File 'lib/aws-sdk-translate/client.rb', line 1055 def stop_text_translation_job(params = {}, = {}) req = build_request(:stop_text_translation_job, params) req.send_request() end |
#translate_text(params = {}) ⇒ Types::TranslateTextResponse
Translates input text from the source language to the target language. For a list of available languages and language codes, see what-is-languages.
1123 1124 1125 1126 |
# File 'lib/aws-sdk-translate/client.rb', line 1123 def translate_text(params = {}, = {}) req = build_request(:translate_text, params) req.send_request() end |
#update_parallel_data(params = {}) ⇒ Types::UpdateParallelDataResponse
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
1178 1179 1180 1181 |
# File 'lib/aws-sdk-translate/client.rb', line 1178 def update_parallel_data(params = {}, = {}) req = build_request(:update_parallel_data, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1202 1203 1204 |
# File 'lib/aws-sdk-translate/client.rb', line 1202 def waiter_names [] end |