public interface AmazonTranslate
Provides translation between one source language and another of the same set of languages.
Modifier and Type | Method and Description |
---|---|
CreateParallelDataResult |
createParallelData(CreateParallelDataRequest createParallelDataRequest)
Creates a parallel data resource in Amazon Translate by importing an
input file from Amazon S3.
|
DeleteParallelDataResult |
deleteParallelData(DeleteParallelDataRequest deleteParallelDataRequest)
Deletes a parallel data resource in Amazon Translate.
|
void |
deleteTerminology(DeleteTerminologyRequest deleteTerminologyRequest)
A synchronous action that deletes a custom terminology.
|
DescribeTextTranslationJobResult |
describeTextTranslationJob(DescribeTextTranslationJobRequest describeTextTranslationJobRequest)
Gets the properties associated with an asycnhronous batch translation job
including name, ID, status, source and target languages, input/output S3
buckets, and so on.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful request,
typically used for debugging issues where a service isn't acting as
expected.
|
GetParallelDataResult |
getParallelData(GetParallelDataRequest getParallelDataRequest)
Provides information about a parallel data resource.
|
GetTerminologyResult |
getTerminology(GetTerminologyRequest getTerminologyRequest)
Retrieves a custom terminology.
|
ImportTerminologyResult |
importTerminology(ImportTerminologyRequest importTerminologyRequest)
Creates or updates a custom terminology, depending on whether or not one
already exists for the given terminology name.
|
ListParallelDataResult |
listParallelData(ListParallelDataRequest listParallelDataRequest)
Provides a list of your parallel data resources in Amazon Translate.
|
ListTerminologiesResult |
listTerminologies(ListTerminologiesRequest listTerminologiesRequest)
Provides a list of custom terminologies associated with your account.
|
ListTextTranslationJobsResult |
listTextTranslationJobs(ListTextTranslationJobsRequest listTextTranslationJobsRequest)
Gets a list of the batch translation jobs that you have submitted.
|
void |
setEndpoint(java.lang.String endpoint)
Overrides the default endpoint for this client
("https://translate.us-east-1.amazonaws.com").
|
void |
setRegion(Region region)
An alternative to
setEndpoint(String) , sets the
regional endpoint for this client's service calls. |
void |
shutdown()
Shuts down this client object, releasing any resources that might be held
open.
|
StartTextTranslationJobResult |
startTextTranslationJob(StartTextTranslationJobRequest startTextTranslationJobRequest)
Starts an asynchronous batch translation job.
|
StopTextTranslationJobResult |
stopTextTranslationJob(StopTextTranslationJobRequest stopTextTranslationJobRequest)
Stops an asynchronous batch translation job that is in progress.
|
TranslateTextResult |
translateText(TranslateTextRequest translateTextRequest)
Translates input text from the source language to the target language.
|
UpdateParallelDataResult |
updateParallelData(UpdateParallelDataRequest updateParallelDataRequest)
Updates a previously created parallel data resource by importing a new
input file from Amazon S3.
|
void setEndpoint(java.lang.String endpoint) throws java.lang.IllegalArgumentException
Callers can pass in just the endpoint (ex:
"translate.us-east-1.amazonaws.com") or a full URL, including the
protocol (ex: "https://translate.us-east-1.amazonaws.com"). If the
protocol is not specified here, the default protocol from this client's
ClientConfiguration
will be used, which by default is HTTPS.
For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID= 3912
This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
endpoint
- The endpoint (ex: "translate.us-east-1.amazonaws.com") or
a full URL, including the protocol (ex:
"https://translate.us-east-1.amazonaws.com") of the region
specific AWS endpoint this client will communicate with.java.lang.IllegalArgumentException
- If any problems are detected with the
specified endpoint.void setRegion(Region region) throws java.lang.IllegalArgumentException
setEndpoint(String)
, sets the
regional endpoint for this client's service calls. Callers can use this
method to control which AWS region they want to work with.
By default, all service endpoints in all regions use the https protocol.
To use http instead, specify it in the ClientConfiguration
supplied at construction.
This method is not threadsafe. A region should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
region
- The region this client will communicate with. See
Region.getRegion(com.amazonaws.regions.Regions)
for
accessing a given region.java.lang.IllegalArgumentException
- If the given region is null,
or if this service isn't available in the given region. See
Region.isServiceSupported(String)
Region.getRegion(com.amazonaws.regions.Regions)
,
Region.createClient(Class,
com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration)
CreateParallelDataResult createParallelData(CreateParallelDataRequest createParallelDataRequest) throws AmazonClientException, AmazonServiceException
Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples of source phrases and their translations from your translation memory. By adding parallel data, you can influence the style, tone, and word choice in your translation output.
createParallelDataRequest
- InvalidParameterValueException
InvalidRequestException
LimitExceededException
TooManyRequestsException
ConflictException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.DeleteParallelDataResult deleteParallelData(DeleteParallelDataRequest deleteParallelDataRequest) throws AmazonClientException, AmazonServiceException
Deletes a parallel data resource in Amazon Translate.
deleteParallelDataRequest
- ConcurrentModificationException
ResourceNotFoundException
TooManyRequestsException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.void deleteTerminology(DeleteTerminologyRequest deleteTerminologyRequest) throws AmazonClientException, AmazonServiceException
A synchronous action that deletes a custom terminology.
deleteTerminologyRequest
- ResourceNotFoundException
TooManyRequestsException
InvalidParameterValueException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.DescribeTextTranslationJobResult describeTextTranslationJob(DescribeTextTranslationJobRequest describeTextTranslationJobRequest) throws AmazonClientException, AmazonServiceException
Gets the properties associated with an asycnhronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
describeTextTranslationJobRequest
- ResourceNotFoundException
TooManyRequestsException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.GetParallelDataResult getParallelData(GetParallelDataRequest getParallelDataRequest) throws AmazonClientException, AmazonServiceException
Provides information about a parallel data resource.
getParallelDataRequest
- ResourceNotFoundException
InvalidParameterValueException
TooManyRequestsException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.GetTerminologyResult getTerminology(GetTerminologyRequest getTerminologyRequest) throws AmazonClientException, AmazonServiceException
Retrieves a custom terminology.
getTerminologyRequest
- ResourceNotFoundException
InvalidParameterValueException
TooManyRequestsException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.ImportTerminologyResult importTerminology(ImportTerminologyRequest importTerminologyRequest) throws AmazonClientException, AmazonServiceException
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.
importTerminologyRequest
- InvalidParameterValueException
LimitExceededException
TooManyRequestsException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.ListParallelDataResult listParallelData(ListParallelDataRequest listParallelDataRequest) throws AmazonClientException, AmazonServiceException
Provides a list of your parallel data resources in Amazon Translate.
listParallelDataRequest
- InvalidParameterValueException
TooManyRequestsException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.ListTerminologiesResult listTerminologies(ListTerminologiesRequest listTerminologiesRequest) throws AmazonClientException, AmazonServiceException
Provides a list of custom terminologies associated with your account.
listTerminologiesRequest
- InvalidParameterValueException
TooManyRequestsException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.ListTextTranslationJobsResult listTextTranslationJobs(ListTextTranslationJobsRequest listTextTranslationJobsRequest) throws AmazonClientException, AmazonServiceException
Gets a list of the batch translation jobs that you have submitted.
listTextTranslationJobsRequest
- InvalidRequestException
TooManyRequestsException
InvalidFilterException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.StartTextTranslationJobResult startTextTranslationJob(StartTextTranslationJobRequest startTextTranslationJobRequest) throws AmazonClientException, AmazonServiceException
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.
Amazon Translate does not support batch translation of multiple source languages at once.
startTextTranslationJobRequest
- TooManyRequestsException
UnsupportedLanguagePairException
InvalidRequestException
ResourceNotFoundException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.StopTextTranslationJobResult stopTextTranslationJob(StopTextTranslationJobRequest stopTextTranslationJobRequest) throws AmazonClientException, AmazonServiceException
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
.
stopTextTranslationJobRequest
- ResourceNotFoundException
TooManyRequestsException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.TranslateTextResult translateText(TranslateTextRequest translateTextRequest) throws AmazonClientException, AmazonServiceException
Translates input text from the source language to the target language. For a list of available languages and language codes, see what-is-languages.
translateTextRequest
- InvalidRequestException
TextSizeLimitExceededException
TooManyRequestsException
UnsupportedLanguagePairException
DetectedLanguageLowConfidenceException
ResourceNotFoundException
InternalServerException
ServiceUnavailableException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.UpdateParallelDataResult updateParallelData(UpdateParallelDataRequest updateParallelDataRequest) throws AmazonClientException, AmazonServiceException
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
updateParallelDataRequest
- ConcurrentModificationException
InvalidParameterValueException
InvalidRequestException
LimitExceededException
TooManyRequestsException
ConflictException
ResourceNotFoundException
InternalServerException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
Translate indicating either a problem with the data in the
request, or a server side issue.void shutdown()
ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.
request
- The originally executed request.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.