@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public interface AmazonTranslate
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAmazonTranslate
instead.
Provides translation of the input content from the source language to the target language.
Modifier and Type | Field and Description |
---|---|
static String |
ENDPOINT_PREFIX
The region metadata service name for computing region endpoints.
|
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.
|
DeleteTerminologyResult |
deleteTerminology(DeleteTerminologyRequest deleteTerminologyRequest)
A synchronous action that deletes a custom terminology.
|
DescribeTextTranslationJobResult |
describeTextTranslationJob(DescribeTextTranslationJobRequest describeTextTranslationJobRequest)
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.
|
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 one already exists for the given terminology name.
|
ListLanguagesResult |
listLanguages(ListLanguagesRequest listLanguagesRequest)
Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
|
ListParallelDataResult |
listParallelData(ListParallelDataRequest listParallelDataRequest)
Provides a list of your parallel data resources in Amazon Translate.
|
ListTagsForResourceResult |
listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Lists all tags associated with a given Amazon Translate resource.
|
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 |
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.
|
TagResourceResult |
tagResource(TagResourceRequest tagResourceRequest)
Associates a specific tag with a resource.
|
TranslateDocumentResult |
translateDocument(TranslateDocumentRequest translateDocumentRequest)
Translates the input document from the source language to the target language.
|
TranslateTextResult |
translateText(TranslateTextRequest translateTextRequest)
Translates input text from the source language to the target language.
|
UntagResourceResult |
untagResource(UntagResourceRequest untagResourceRequest)
Removes a specific tag associated with an Amazon Translate resource.
|
UpdateParallelDataResult |
updateParallelData(UpdateParallelDataRequest updateParallelDataRequest)
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
|
static final String ENDPOINT_PREFIX
CreateParallelDataResult createParallelData(CreateParallelDataRequest createParallelDataRequest)
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.
createParallelDataRequest
- InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.InvalidRequestException
- The request that you made is not valid. Check your request to determine why it's not valid and then retry
the request.LimitExceededException
- The specified limit has been exceeded. Review your request and retry it with a quantity below the stated
limit.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.TooManyTagsException
- You have added too many tags to this resource. The maximum is 50 tags.ConflictException
- There was a conflict processing the request. Try your request again.ConcurrentModificationException
- Another modification is being made. That modification must complete before you can make your change.InternalServerException
- An internal server error occurred. Retry your request.DeleteParallelDataResult deleteParallelData(DeleteParallelDataRequest deleteParallelDataRequest)
Deletes a parallel data resource in Amazon Translate.
deleteParallelDataRequest
- ConcurrentModificationException
- Another modification is being made. That modification must complete before you can make your change.ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.InternalServerException
- An internal server error occurred. Retry your request.DeleteTerminologyResult deleteTerminology(DeleteTerminologyRequest deleteTerminologyRequest)
A synchronous action that deletes a custom terminology.
deleteTerminologyRequest
- ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.InternalServerException
- An internal server error occurred. Retry your request.DescribeTextTranslationJobResult describeTextTranslationJob(DescribeTextTranslationJobRequest describeTextTranslationJobRequest)
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.
describeTextTranslationJobRequest
- ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.InternalServerException
- An internal server error occurred. Retry your request.GetParallelDataResult getParallelData(GetParallelDataRequest getParallelDataRequest)
Provides information about a parallel data resource.
getParallelDataRequest
- ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.InternalServerException
- An internal server error occurred. Retry your request.GetTerminologyResult getTerminology(GetTerminologyRequest getTerminologyRequest)
Retrieves a custom terminology.
getTerminologyRequest
- ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.InternalServerException
- An internal server error occurred. Retry your request.ImportTerminologyResult importTerminology(ImportTerminologyRequest importTerminologyRequest)
Creates or updates a custom terminology, depending on whether 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. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.
importTerminologyRequest
- InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.LimitExceededException
- The specified limit has been exceeded. Review your request and retry it with a quantity below the stated
limit.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.TooManyTagsException
- You have added too many tags to this resource. The maximum is 50 tags.ConcurrentModificationException
- Another modification is being made. That modification must complete before you can make your change.InternalServerException
- An internal server error occurred. Retry your request.ListLanguagesResult listLanguages(ListLanguagesRequest listLanguagesRequest)
Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
listLanguagesRequest
- InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.UnsupportedDisplayLanguageCodeException
- Requested display language code is not supported.InternalServerException
- An internal server error occurred. Retry your request.ListParallelDataResult listParallelData(ListParallelDataRequest listParallelDataRequest)
Provides a list of your parallel data resources in Amazon Translate.
listParallelDataRequest
- InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.InternalServerException
- An internal server error occurred. Retry your request.ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources.
listTagsForResourceRequest
- InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.InternalServerException
- An internal server error occurred. Retry your request.ListTerminologiesResult listTerminologies(ListTerminologiesRequest listTerminologiesRequest)
Provides a list of custom terminologies associated with your account.
listTerminologiesRequest
- InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.InternalServerException
- An internal server error occurred. Retry your request.ListTextTranslationJobsResult listTextTranslationJobs(ListTextTranslationJobsRequest listTextTranslationJobsRequest)
Gets a list of the batch translation jobs that you have submitted.
listTextTranslationJobsRequest
- InvalidRequestException
- The request that you made is not valid. Check your request to determine why it's not valid and then retry
the request.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.InvalidFilterException
- The filter specified for the operation is not valid. Specify a different filter.InternalServerException
- An internal server error occurred. Retry your request.StartTextTranslationJobResult startTextTranslationJob(StartTextTranslationJobRequest startTextTranslationJobRequest)
Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text
across multiple documents at once. For batch translation, you can input documents with different source languages
(specify auto
as the source language). You can specify one or more target languages. Batch
translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing.
Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.
startTextTranslationJobRequest
- TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.UnsupportedLanguagePairException
- Amazon Translate does not support translation from the language of the source text into the requested
target language. For more information, see Supported languages.InvalidRequestException
- The request that you made is not valid. Check your request to determine why it's not valid and then retry
the request.ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.InternalServerException
- An internal server error occurred. Retry your request.StopTextTranslationJobResult stopTextTranslationJob(StopTextTranslationJobRequest stopTextTranslationJobRequest)
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
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.InternalServerException
- An internal server error occurred. Retry your request.TagResourceResult tagResource(TagResourceRequest tagResourceRequest)
Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see Tagging your resources.
tagResourceRequest
- InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.ConcurrentModificationException
- Another modification is being made. That modification must complete before you can make your change.ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.TooManyTagsException
- You have added too many tags to this resource. The maximum is 50 tags.InternalServerException
- An internal server error occurred. Retry your request.TranslateDocumentResult translateDocument(TranslateDocumentRequest translateDocumentRequest)
Translates the input document from the source language to the target language. This synchronous operation
supports text, HTML, or Word documents as the input document. TranslateDocument
supports
translations from English to any supported language, and from any supported language to English. Therefore,
specify either the source language code or the target language code as “en” (English).
If you set the Formality
parameter, the request will fail if the target language does not support
formality. For a list of target languages that support formality, see Setting
formality.
translateDocumentRequest
- InvalidRequestException
- The request that you made is not valid. Check your request to determine why it's not valid and then retry
the request.LimitExceededException
- The specified limit has been exceeded. Review your request and retry it with a quantity below the stated
limit.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.UnsupportedLanguagePairException
- Amazon Translate does not support translation from the language of the source text into the requested
target language. For more information, see Supported languages.InternalServerException
- An internal server error occurred. Retry your request.ServiceUnavailableException
- The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request.TranslateTextResult translateText(TranslateTextRequest translateTextRequest)
Translates input text from the source language to the target language. For a list of available languages and language codes, see Supported languages.
translateTextRequest
- InvalidRequestException
- The request that you made is not valid. Check your request to determine why it's not valid and then retry
the request.TextSizeLimitExceededException
- The size of the text you submitted exceeds the size limit. Reduce the size of the text or use a smaller
document and then retry your request.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.UnsupportedLanguagePairException
- Amazon Translate does not support translation from the language of the source text into the requested
target language. For more information, see Supported languages.DetectedLanguageLowConfidenceException
- The confidence that Amazon Comprehend accurately detected the source language is low. If a low confidence
level is acceptable for your application, you can use the language in the exception to call Amazon
Translate again. For more information, see the DetectDominantLanguage operation in the Amazon Comprehend Developer Guide.ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.InternalServerException
- An internal server error occurred. Retry your request.ServiceUnavailableException
- The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request.UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest)
Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources.
untagResourceRequest
- InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.ConcurrentModificationException
- Another modification is being made. That modification must complete before you can make your change.ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.InternalServerException
- An internal server error occurred. Retry your request.UpdateParallelDataResult updateParallelData(UpdateParallelDataRequest updateParallelDataRequest)
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
updateParallelDataRequest
- ConcurrentModificationException
- Another modification is being made. That modification must complete before you can make your change.InvalidParameterValueException
- The value of the parameter is not valid. Review the value of the parameter you are using to correct it,
and then retry your operation.InvalidRequestException
- The request that you made is not valid. Check your request to determine why it's not valid and then retry
the request.LimitExceededException
- The specified limit has been exceeded. Review your request and retry it with a quantity below the stated
limit.TooManyRequestsException
- You have made too many requests within a short period of time. Wait for a short time and then try your
request again.ConflictException
- There was a conflict processing the request. Try your request again.ResourceNotFoundException
- The resource you are looking for has not been found. Review the resource you're looking for and see if a
different resource will accomplish your needs before retrying the revised request.InternalServerException
- An internal server error occurred. Retry your request.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.