@Generated(value="software.amazon.awssdk:codegen") public interface TranslateClient extends SdkClient
builder()
method.
Provides translation between one source language and another of the same set of languages.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
static TranslateClientBuilder |
builder()
Create a builder that can be used to configure and create a
TranslateClient . |
static TranslateClient |
create()
Create a
TranslateClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default DeleteTerminologyResponse |
deleteTerminology(Consumer<DeleteTerminologyRequest.Builder> deleteTerminologyRequest)
A synchronous action that deletes a custom terminology.
|
default DeleteTerminologyResponse |
deleteTerminology(DeleteTerminologyRequest deleteTerminologyRequest)
A synchronous action that deletes a custom terminology.
|
default GetTerminologyResponse |
getTerminology(Consumer<GetTerminologyRequest.Builder> getTerminologyRequest)
Retrieves a custom terminology.
|
default GetTerminologyResponse |
getTerminology(GetTerminologyRequest getTerminologyRequest)
Retrieves a custom terminology.
|
default ImportTerminologyResponse |
importTerminology(Consumer<ImportTerminologyRequest.Builder> importTerminologyRequest)
Creates or updates a custom terminology, depending on whether or not one already exists for the given terminology
name.
|
default ImportTerminologyResponse |
importTerminology(ImportTerminologyRequest importTerminologyRequest)
Creates or updates a custom terminology, depending on whether or not one already exists for the given terminology
name.
|
default ListTerminologiesResponse |
listTerminologies()
Provides a list of custom terminologies associated with your account.
|
default ListTerminologiesResponse |
listTerminologies(Consumer<ListTerminologiesRequest.Builder> listTerminologiesRequest)
Provides a list of custom terminologies associated with your account.
|
default ListTerminologiesResponse |
listTerminologies(ListTerminologiesRequest listTerminologiesRequest)
Provides a list of custom terminologies associated with your account.
|
static ServiceMetadata |
serviceMetadata() |
default TranslateTextResponse |
translateText(Consumer<TranslateTextRequest.Builder> translateTextRequest)
Translates input text from the source language to the target language.
|
default TranslateTextResponse |
translateText(TranslateTextRequest translateTextRequest)
Translates input text from the source language to the target language.
|
serviceName
close
static final String SERVICE_NAME
static TranslateClient create()
TranslateClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static TranslateClientBuilder builder()
TranslateClient
.default DeleteTerminologyResponse deleteTerminology(DeleteTerminologyRequest deleteTerminologyRequest) throws ResourceNotFoundException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, TranslateException
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.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DeleteTerminologyResponse deleteTerminology(Consumer<DeleteTerminologyRequest.Builder> deleteTerminologyRequest) throws ResourceNotFoundException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, TranslateException
A synchronous action that deletes a custom terminology.
This is a convenience which creates an instance of the DeleteTerminologyRequest.Builder
avoiding the need
to create one manually via DeleteTerminologyRequest.builder()
deleteTerminologyRequest
- A Consumer
that will call methods on DeleteTerminologyRequest.Builder
to create a 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. .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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default GetTerminologyResponse getTerminology(GetTerminologyRequest getTerminologyRequest) throws ResourceNotFoundException, InvalidParameterValueException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, TranslateException
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 invalid. 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default GetTerminologyResponse getTerminology(Consumer<GetTerminologyRequest.Builder> getTerminologyRequest) throws ResourceNotFoundException, InvalidParameterValueException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, TranslateException
Retrieves a custom terminology.
This is a convenience which creates an instance of the GetTerminologyRequest.Builder
avoiding the need to
create one manually via GetTerminologyRequest.builder()
getTerminologyRequest
- A Consumer
that will call methods on GetTerminologyRequest.Builder
to create a 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 invalid. 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default ImportTerminologyResponse importTerminology(ImportTerminologyRequest importTerminologyRequest) throws InvalidParameterValueException, LimitExceededException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, TranslateException
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
- The value of the parameter is invalid. 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.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default ImportTerminologyResponse importTerminology(Consumer<ImportTerminologyRequest.Builder> importTerminologyRequest) throws InvalidParameterValueException, LimitExceededException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, TranslateException
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.
This is a convenience which creates an instance of the ImportTerminologyRequest.Builder
avoiding the need
to create one manually via ImportTerminologyRequest.builder()
importTerminologyRequest
- A Consumer
that will call methods on ImportTerminologyRequest.Builder
to create a request.InvalidParameterValueException
- The value of the parameter is invalid. 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.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default ListTerminologiesResponse listTerminologies() throws InvalidParameterValueException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, TranslateException
Provides a list of custom terminologies associated with your account.
InvalidParameterValueException
- The value of the parameter is invalid. 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
listTerminologies(ListTerminologiesRequest)
,
AWS
API Documentationdefault ListTerminologiesResponse listTerminologies(ListTerminologiesRequest listTerminologiesRequest) throws InvalidParameterValueException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, TranslateException
Provides a list of custom terminologies associated with your account.
listTerminologiesRequest
- InvalidParameterValueException
- The value of the parameter is invalid. 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default ListTerminologiesResponse listTerminologies(Consumer<ListTerminologiesRequest.Builder> listTerminologiesRequest) throws InvalidParameterValueException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, TranslateException
Provides a list of custom terminologies associated with your account.
This is a convenience which creates an instance of the ListTerminologiesRequest.Builder
avoiding the need
to create one manually via ListTerminologiesRequest.builder()
listTerminologiesRequest
- A Consumer
that will call methods on ListTerminologiesRequest.Builder
to create a request.InvalidParameterValueException
- The value of the parameter is invalid. 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default TranslateTextResponse translateText(TranslateTextRequest translateTextRequest) throws InvalidRequestException, TextSizeLimitExceededException, TooManyRequestsException, UnsupportedLanguagePairException, DetectedLanguageLowConfidenceException, ResourceNotFoundException, InternalServerException, ServiceUnavailableException, AwsServiceException, SdkClientException, TranslateException
Translates input text from the source language to the target language. It is not necessary to use English (en) as either the source or the target language but not all language combinations are supported by Amazon Translate. For more information, see Supported Language Pairs.
Arabic (ar)
Chinese (Simplified) (zh)
Chinese (Traditional) (zh-TW)
Czech (cs)
Danish (da)
Dutch (nl)
English (en)
Finnish (fi)
French (fr)
German (de)
Hebrew (he)
Indonesian (id)
Italian (it)
Japanese (ja)
Korean (ko)
Polish (pl)
Portuguese (pt)
Russian (ru)
Spanish (es)
Swedish (sv)
Turkish (tr)
To have Amazon Translate determine the source language of your text, you can specify auto
in the
SourceLanguageCode
field. If you specify auto
, Amazon Translate will call Amazon
Comprehend to determine the source language.
translateTextRequest
- InvalidRequestException
- The request that you made is invalid. Check your request to determine why it's invalid 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 how-to-error-msg.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. Please wait a bit and then retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default TranslateTextResponse translateText(Consumer<TranslateTextRequest.Builder> translateTextRequest) throws InvalidRequestException, TextSizeLimitExceededException, TooManyRequestsException, UnsupportedLanguagePairException, DetectedLanguageLowConfidenceException, ResourceNotFoundException, InternalServerException, ServiceUnavailableException, AwsServiceException, SdkClientException, TranslateException
Translates input text from the source language to the target language. It is not necessary to use English (en) as either the source or the target language but not all language combinations are supported by Amazon Translate. For more information, see Supported Language Pairs.
Arabic (ar)
Chinese (Simplified) (zh)
Chinese (Traditional) (zh-TW)
Czech (cs)
Danish (da)
Dutch (nl)
English (en)
Finnish (fi)
French (fr)
German (de)
Hebrew (he)
Indonesian (id)
Italian (it)
Japanese (ja)
Korean (ko)
Polish (pl)
Portuguese (pt)
Russian (ru)
Spanish (es)
Swedish (sv)
Turkish (tr)
To have Amazon Translate determine the source language of your text, you can specify auto
in the
SourceLanguageCode
field. If you specify auto
, Amazon Translate will call Amazon
Comprehend to determine the source language.
This is a convenience which creates an instance of the TranslateTextRequest.Builder
avoiding the need to
create one manually via TranslateTextRequest.builder()
translateTextRequest
- A Consumer
that will call methods on TranslateTextRequest.Builder
to create a request.InvalidRequestException
- The request that you made is invalid. Check your request to determine why it's invalid 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 how-to-error-msg.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. Please wait a bit and then retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.TranslateException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
static ServiceMetadata serviceMetadata()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.