Interface TranslateAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in
some cases such as credentials retrieval and endpoint discovery as part of the async API call.
Provides translation of the input content from the source language to the target language.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic TranslateAsyncClientBuilderbuilder()Create a builder that can be used to configure and create aTranslateAsyncClient.static TranslateAsyncClientcreate()Create aTranslateAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.createParallelData(Consumer<CreateParallelDataRequest.Builder> createParallelDataRequest) Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3.createParallelData(CreateParallelDataRequest createParallelDataRequest) Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3.deleteParallelData(Consumer<DeleteParallelDataRequest.Builder> deleteParallelDataRequest) Deletes a parallel data resource in Amazon Translate.deleteParallelData(DeleteParallelDataRequest deleteParallelDataRequest) Deletes a parallel data resource in Amazon Translate.deleteTerminology(Consumer<DeleteTerminologyRequest.Builder> deleteTerminologyRequest) A synchronous action that deletes a custom terminology.deleteTerminology(DeleteTerminologyRequest deleteTerminologyRequest) A synchronous action that deletes a custom terminology.describeTextTranslationJob(Consumer<DescribeTextTranslationJobRequest.Builder> 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.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.default CompletableFuture<GetParallelDataResponse> getParallelData(Consumer<GetParallelDataRequest.Builder> getParallelDataRequest) Provides information about a parallel data resource.default CompletableFuture<GetParallelDataResponse> getParallelData(GetParallelDataRequest getParallelDataRequest) Provides information about a parallel data resource.default CompletableFuture<GetTerminologyResponse> getTerminology(Consumer<GetTerminologyRequest.Builder> getTerminologyRequest) Retrieves a custom terminology.default CompletableFuture<GetTerminologyResponse> getTerminology(GetTerminologyRequest getTerminologyRequest) Retrieves a custom terminology.importTerminology(Consumer<ImportTerminologyRequest.Builder> importTerminologyRequest) Creates or updates a custom terminology, depending on whether one already exists for the given terminology name.importTerminology(ImportTerminologyRequest importTerminologyRequest) Creates or updates a custom terminology, depending on whether one already exists for the given terminology name.default CompletableFuture<ListLanguagesResponse> listLanguages(Consumer<ListLanguagesRequest.Builder> listLanguagesRequest) Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.default CompletableFuture<ListLanguagesResponse> listLanguages(ListLanguagesRequest listLanguagesRequest) Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.default ListLanguagesPublisherlistLanguagesPaginator(Consumer<ListLanguagesRequest.Builder> listLanguagesRequest) This is a variant oflistLanguages(software.amazon.awssdk.services.translate.model.ListLanguagesRequest)operation.default ListLanguagesPublisherlistLanguagesPaginator(ListLanguagesRequest listLanguagesRequest) This is a variant oflistLanguages(software.amazon.awssdk.services.translate.model.ListLanguagesRequest)operation.listParallelData(Consumer<ListParallelDataRequest.Builder> listParallelDataRequest) Provides a list of your parallel data resources in Amazon Translate.listParallelData(ListParallelDataRequest listParallelDataRequest) Provides a list of your parallel data resources in Amazon Translate.default ListParallelDataPublisherlistParallelDataPaginator(Consumer<ListParallelDataRequest.Builder> listParallelDataRequest) This is a variant oflistParallelData(software.amazon.awssdk.services.translate.model.ListParallelDataRequest)operation.default ListParallelDataPublisherlistParallelDataPaginator(ListParallelDataRequest listParallelDataRequest) This is a variant oflistParallelData(software.amazon.awssdk.services.translate.model.ListParallelDataRequest)operation.listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists all tags associated with a given Amazon Translate resource.listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists all tags associated with a given Amazon Translate resource.Provides a list of custom terminologies associated with your account.listTerminologies(Consumer<ListTerminologiesRequest.Builder> listTerminologiesRequest) Provides a list of custom terminologies associated with your account.listTerminologies(ListTerminologiesRequest listTerminologiesRequest) Provides a list of custom terminologies associated with your account.default ListTerminologiesPublisherThis is a variant oflistTerminologies(software.amazon.awssdk.services.translate.model.ListTerminologiesRequest)operation.default ListTerminologiesPublisherlistTerminologiesPaginator(Consumer<ListTerminologiesRequest.Builder> listTerminologiesRequest) This is a variant oflistTerminologies(software.amazon.awssdk.services.translate.model.ListTerminologiesRequest)operation.default ListTerminologiesPublisherlistTerminologiesPaginator(ListTerminologiesRequest listTerminologiesRequest) This is a variant oflistTerminologies(software.amazon.awssdk.services.translate.model.ListTerminologiesRequest)operation.listTextTranslationJobs(Consumer<ListTextTranslationJobsRequest.Builder> listTextTranslationJobsRequest) Gets a list of the batch translation jobs that you have submitted.listTextTranslationJobs(ListTextTranslationJobsRequest listTextTranslationJobsRequest) Gets a list of the batch translation jobs that you have submitted.default ListTextTranslationJobsPublisherlistTextTranslationJobsPaginator(Consumer<ListTextTranslationJobsRequest.Builder> listTextTranslationJobsRequest) This is a variant oflistTextTranslationJobs(software.amazon.awssdk.services.translate.model.ListTextTranslationJobsRequest)operation.default ListTextTranslationJobsPublisherlistTextTranslationJobsPaginator(ListTextTranslationJobsRequest listTextTranslationJobsRequest) This is a variant oflistTextTranslationJobs(software.amazon.awssdk.services.translate.model.ListTextTranslationJobsRequest)operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstartTextTranslationJob(Consumer<StartTextTranslationJobRequest.Builder> startTextTranslationJobRequest) Starts an asynchronous batch translation job.startTextTranslationJob(StartTextTranslationJobRequest startTextTranslationJobRequest) Starts an asynchronous batch translation job.stopTextTranslationJob(Consumer<StopTextTranslationJobRequest.Builder> stopTextTranslationJobRequest) Stops an asynchronous batch translation job that is in progress.stopTextTranslationJob(StopTextTranslationJobRequest stopTextTranslationJobRequest) Stops an asynchronous batch translation job that is in progress.default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associates a specific tag with a resource.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest) Associates a specific tag with a resource.translateDocument(Consumer<TranslateDocumentRequest.Builder> translateDocumentRequest) Translates the input document from the source language to the target language.translateDocument(TranslateDocumentRequest translateDocumentRequest) Translates the input document from the source language to the target language.default CompletableFuture<TranslateTextResponse> translateText(Consumer<TranslateTextRequest.Builder> translateTextRequest) Translates input text from the source language to the target language.default CompletableFuture<TranslateTextResponse> translateText(TranslateTextRequest translateTextRequest) Translates input text from the source language to the target language.default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes a specific tag associated with an Amazon Translate resource.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes a specific tag associated with an Amazon Translate resource.updateParallelData(Consumer<UpdateParallelDataRequest.Builder> updateParallelDataRequest) Updates a previously created parallel data resource by importing a new input file from Amazon S3.updateParallelData(UpdateParallelDataRequest updateParallelDataRequest) Updates a previously created parallel data resource by importing a new input file from Amazon S3.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
createParallelData
default CompletableFuture<CreateParallelDataResponse> 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.
- Parameters:
createParallelDataRequest-- Returns:
- A Java Future containing the result of the CreateParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
createParallelData
default CompletableFuture<CreateParallelDataResponse> createParallelData(Consumer<CreateParallelDataRequest.Builder> 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.
This is a convenience which creates an instance of the
CreateParallelDataRequest.Builderavoiding the need to create one manually viaCreateParallelDataRequest.builder()- Parameters:
createParallelDataRequest- AConsumerthat will call methods onCreateParallelDataRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
deleteParallelData
default CompletableFuture<DeleteParallelDataResponse> deleteParallelData(DeleteParallelDataRequest deleteParallelDataRequest) Deletes a parallel data resource in Amazon Translate.
- Parameters:
deleteParallelDataRequest-- Returns:
- A Java Future containing the result of the DeleteParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
deleteParallelData
default CompletableFuture<DeleteParallelDataResponse> deleteParallelData(Consumer<DeleteParallelDataRequest.Builder> deleteParallelDataRequest) Deletes a parallel data resource in Amazon Translate.
This is a convenience which creates an instance of the
DeleteParallelDataRequest.Builderavoiding the need to create one manually viaDeleteParallelDataRequest.builder()- Parameters:
deleteParallelDataRequest- AConsumerthat will call methods onDeleteParallelDataRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
deleteTerminology
default CompletableFuture<DeleteTerminologyResponse> deleteTerminology(DeleteTerminologyRequest deleteTerminologyRequest) A synchronous action that deletes a custom terminology.
- Parameters:
deleteTerminologyRequest-- Returns:
- A Java Future containing the result of the DeleteTerminology operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
deleteTerminology
default CompletableFuture<DeleteTerminologyResponse> deleteTerminology(Consumer<DeleteTerminologyRequest.Builder> deleteTerminologyRequest) A synchronous action that deletes a custom terminology.
This is a convenience which creates an instance of the
DeleteTerminologyRequest.Builderavoiding the need to create one manually viaDeleteTerminologyRequest.builder()- Parameters:
deleteTerminologyRequest- AConsumerthat will call methods onDeleteTerminologyRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteTerminology operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
describeTextTranslationJob
default CompletableFuture<DescribeTextTranslationJobResponse> 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.
- Parameters:
describeTextTranslationJobRequest-- Returns:
- A Java Future containing the result of the DescribeTextTranslationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- See Also:
-
describeTextTranslationJob
default CompletableFuture<DescribeTextTranslationJobResponse> describeTextTranslationJob(Consumer<DescribeTextTranslationJobRequest.Builder> 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.
This is a convenience which creates an instance of the
DescribeTextTranslationJobRequest.Builderavoiding the need to create one manually viaDescribeTextTranslationJobRequest.builder()- Parameters:
describeTextTranslationJobRequest- AConsumerthat will call methods onDescribeTextTranslationJobRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DescribeTextTranslationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- See Also:
-
getParallelData
default CompletableFuture<GetParallelDataResponse> getParallelData(GetParallelDataRequest getParallelDataRequest) Provides information about a parallel data resource.
- Parameters:
getParallelDataRequest-- Returns:
- A Java Future containing the result of the GetParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
getParallelData
default CompletableFuture<GetParallelDataResponse> getParallelData(Consumer<GetParallelDataRequest.Builder> getParallelDataRequest) Provides information about a parallel data resource.
This is a convenience which creates an instance of the
GetParallelDataRequest.Builderavoiding the need to create one manually viaGetParallelDataRequest.builder()- Parameters:
getParallelDataRequest- AConsumerthat will call methods onGetParallelDataRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
getTerminology
default CompletableFuture<GetTerminologyResponse> getTerminology(GetTerminologyRequest getTerminologyRequest) Retrieves a custom terminology.
- Parameters:
getTerminologyRequest-- Returns:
- A Java Future containing the result of the GetTerminology operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
getTerminology
default CompletableFuture<GetTerminologyResponse> getTerminology(Consumer<GetTerminologyRequest.Builder> getTerminologyRequest) Retrieves a custom terminology.
This is a convenience which creates an instance of the
GetTerminologyRequest.Builderavoiding the need to create one manually viaGetTerminologyRequest.builder()- Parameters:
getTerminologyRequest- AConsumerthat will call methods onGetTerminologyRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetTerminology operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
importTerminology
default CompletableFuture<ImportTerminologyResponse> 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.
- Parameters:
importTerminologyRequest-- Returns:
- A Java Future containing the result of the ImportTerminology operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
importTerminology
default CompletableFuture<ImportTerminologyResponse> importTerminology(Consumer<ImportTerminologyRequest.Builder> 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.
This is a convenience which creates an instance of the
ImportTerminologyRequest.Builderavoiding the need to create one manually viaImportTerminologyRequest.builder()- Parameters:
importTerminologyRequest- AConsumerthat will call methods onImportTerminologyRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ImportTerminology operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listLanguages
default CompletableFuture<ListLanguagesResponse> listLanguages(ListLanguagesRequest listLanguagesRequest) Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
- Parameters:
listLanguagesRequest-- Returns:
- A Java Future containing the result of the ListLanguages operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listLanguages
default CompletableFuture<ListLanguagesResponse> listLanguages(Consumer<ListLanguagesRequest.Builder> listLanguagesRequest) Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
This is a convenience which creates an instance of the
ListLanguagesRequest.Builderavoiding the need to create one manually viaListLanguagesRequest.builder()- Parameters:
listLanguagesRequest- AConsumerthat will call methods onListLanguagesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListLanguages operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listLanguagesPaginator
This is a variant of
listLanguages(software.amazon.awssdk.services.translate.model.ListLanguagesRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.translate.paginators.ListLanguagesPublisher publisher = client.listLanguagesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.translate.paginators.ListLanguagesPublisher publisher = client.listLanguagesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.translate.model.ListLanguagesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.translate.model.ListLanguagesResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listLanguages(software.amazon.awssdk.services.translate.model.ListLanguagesRequest)operation.- Parameters:
listLanguagesRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listLanguagesPaginator
default ListLanguagesPublisher listLanguagesPaginator(Consumer<ListLanguagesRequest.Builder> listLanguagesRequest) This is a variant of
listLanguages(software.amazon.awssdk.services.translate.model.ListLanguagesRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.translate.paginators.ListLanguagesPublisher publisher = client.listLanguagesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.translate.paginators.ListLanguagesPublisher publisher = client.listLanguagesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.translate.model.ListLanguagesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.translate.model.ListLanguagesResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listLanguages(software.amazon.awssdk.services.translate.model.ListLanguagesRequest)operation.
This is a convenience which creates an instance of the
ListLanguagesRequest.Builderavoiding the need to create one manually viaListLanguagesRequest.builder()- Parameters:
listLanguagesRequest- AConsumerthat will call methods onListLanguagesRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listParallelData
default CompletableFuture<ListParallelDataResponse> listParallelData(ListParallelDataRequest listParallelDataRequest) Provides a list of your parallel data resources in Amazon Translate.
- Parameters:
listParallelDataRequest-- Returns:
- A Java Future containing the result of the ListParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listParallelData
default CompletableFuture<ListParallelDataResponse> listParallelData(Consumer<ListParallelDataRequest.Builder> listParallelDataRequest) Provides a list of your parallel data resources in Amazon Translate.
This is a convenience which creates an instance of the
ListParallelDataRequest.Builderavoiding the need to create one manually viaListParallelDataRequest.builder()- Parameters:
listParallelDataRequest- AConsumerthat will call methods onListParallelDataRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listParallelDataPaginator
default ListParallelDataPublisher listParallelDataPaginator(ListParallelDataRequest listParallelDataRequest) This is a variant of
listParallelData(software.amazon.awssdk.services.translate.model.ListParallelDataRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.translate.paginators.ListParallelDataPublisher publisher = client.listParallelDataPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.translate.paginators.ListParallelDataPublisher publisher = client.listParallelDataPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.translate.model.ListParallelDataResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.translate.model.ListParallelDataResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listParallelData(software.amazon.awssdk.services.translate.model.ListParallelDataRequest)operation.- Parameters:
listParallelDataRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listParallelDataPaginator
default ListParallelDataPublisher listParallelDataPaginator(Consumer<ListParallelDataRequest.Builder> listParallelDataRequest) This is a variant of
listParallelData(software.amazon.awssdk.services.translate.model.ListParallelDataRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.translate.paginators.ListParallelDataPublisher publisher = client.listParallelDataPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.translate.paginators.ListParallelDataPublisher publisher = client.listParallelDataPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.translate.model.ListParallelDataResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.translate.model.ListParallelDataResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listParallelData(software.amazon.awssdk.services.translate.model.ListParallelDataRequest)operation.
This is a convenience which creates an instance of the
ListParallelDataRequest.Builderavoiding the need to create one manually viaListParallelDataRequest.builder()- Parameters:
listParallelDataRequest- AConsumerthat will call methods onListParallelDataRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources.
- Parameters:
listTagsForResourceRequest-- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTerminologies
default CompletableFuture<ListTerminologiesResponse> listTerminologies(ListTerminologiesRequest listTerminologiesRequest) Provides a list of custom terminologies associated with your account.
- Parameters:
listTerminologiesRequest-- Returns:
- A Java Future containing the result of the ListTerminologies operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTerminologies
default CompletableFuture<ListTerminologiesResponse> listTerminologies(Consumer<ListTerminologiesRequest.Builder> listTerminologiesRequest) Provides a list of custom terminologies associated with your account.
This is a convenience which creates an instance of the
ListTerminologiesRequest.Builderavoiding the need to create one manually viaListTerminologiesRequest.builder()- Parameters:
listTerminologiesRequest- AConsumerthat will call methods onListTerminologiesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListTerminologies operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTerminologies
Provides a list of custom terminologies associated with your account.
- Returns:
- A Java Future containing the result of the ListTerminologies operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTerminologiesPaginator
This is a variant of
listTerminologies(software.amazon.awssdk.services.translate.model.ListTerminologiesRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.translate.paginators.ListTerminologiesPublisher publisher = client.listTerminologiesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.translate.paginators.ListTerminologiesPublisher publisher = client.listTerminologiesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.translate.model.ListTerminologiesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.translate.model.ListTerminologiesResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listTerminologies(software.amazon.awssdk.services.translate.model.ListTerminologiesRequest)operation.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTerminologiesPaginator
default ListTerminologiesPublisher listTerminologiesPaginator(ListTerminologiesRequest listTerminologiesRequest) This is a variant of
listTerminologies(software.amazon.awssdk.services.translate.model.ListTerminologiesRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.translate.paginators.ListTerminologiesPublisher publisher = client.listTerminologiesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.translate.paginators.ListTerminologiesPublisher publisher = client.listTerminologiesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.translate.model.ListTerminologiesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.translate.model.ListTerminologiesResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listTerminologies(software.amazon.awssdk.services.translate.model.ListTerminologiesRequest)operation.- Parameters:
listTerminologiesRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTerminologiesPaginator
default ListTerminologiesPublisher listTerminologiesPaginator(Consumer<ListTerminologiesRequest.Builder> listTerminologiesRequest) This is a variant of
listTerminologies(software.amazon.awssdk.services.translate.model.ListTerminologiesRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.translate.paginators.ListTerminologiesPublisher publisher = client.listTerminologiesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.translate.paginators.ListTerminologiesPublisher publisher = client.listTerminologiesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.translate.model.ListTerminologiesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.translate.model.ListTerminologiesResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listTerminologies(software.amazon.awssdk.services.translate.model.ListTerminologiesRequest)operation.
This is a convenience which creates an instance of the
ListTerminologiesRequest.Builderavoiding the need to create one manually viaListTerminologiesRequest.builder()- Parameters:
listTerminologiesRequest- AConsumerthat will call methods onListTerminologiesRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTextTranslationJobs
default CompletableFuture<ListTextTranslationJobsResponse> listTextTranslationJobs(ListTextTranslationJobsRequest listTextTranslationJobsRequest) Gets a list of the batch translation jobs that you have submitted.
- Parameters:
listTextTranslationJobsRequest-- Returns:
- A Java Future containing the result of the ListTextTranslationJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTextTranslationJobs
default CompletableFuture<ListTextTranslationJobsResponse> listTextTranslationJobs(Consumer<ListTextTranslationJobsRequest.Builder> listTextTranslationJobsRequest) Gets a list of the batch translation jobs that you have submitted.
This is a convenience which creates an instance of the
ListTextTranslationJobsRequest.Builderavoiding the need to create one manually viaListTextTranslationJobsRequest.builder()- Parameters:
listTextTranslationJobsRequest- AConsumerthat will call methods onListTextTranslationJobsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListTextTranslationJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTextTranslationJobsPaginator
default ListTextTranslationJobsPublisher listTextTranslationJobsPaginator(ListTextTranslationJobsRequest listTextTranslationJobsRequest) This is a variant of
listTextTranslationJobs(software.amazon.awssdk.services.translate.model.ListTextTranslationJobsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.translate.paginators.ListTextTranslationJobsPublisher publisher = client.listTextTranslationJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.translate.paginators.ListTextTranslationJobsPublisher publisher = client.listTextTranslationJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.translate.model.ListTextTranslationJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.translate.model.ListTextTranslationJobsResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listTextTranslationJobs(software.amazon.awssdk.services.translate.model.ListTextTranslationJobsRequest)operation.- Parameters:
listTextTranslationJobsRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
listTextTranslationJobsPaginator
default ListTextTranslationJobsPublisher listTextTranslationJobsPaginator(Consumer<ListTextTranslationJobsRequest.Builder> listTextTranslationJobsRequest) This is a variant of
listTextTranslationJobs(software.amazon.awssdk.services.translate.model.ListTextTranslationJobsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.translate.paginators.ListTextTranslationJobsPublisher publisher = client.listTextTranslationJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.translate.paginators.ListTextTranslationJobsPublisher publisher = client.listTextTranslationJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.translate.model.ListTextTranslationJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.translate.model.ListTextTranslationJobsResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listTextTranslationJobs(software.amazon.awssdk.services.translate.model.ListTextTranslationJobsRequest)operation.
This is a convenience which creates an instance of the
ListTextTranslationJobsRequest.Builderavoiding the need to create one manually viaListTextTranslationJobsRequest.builder()- Parameters:
listTextTranslationJobsRequest- AConsumerthat will call methods onListTextTranslationJobsRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
startTextTranslationJob
default CompletableFuture<StartTextTranslationJobResponse> 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
autoas 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.
- Parameters:
startTextTranslationJobRequest-- Returns:
- A Java Future containing the result of the StartTextTranslationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
startTextTranslationJob
default CompletableFuture<StartTextTranslationJobResponse> startTextTranslationJob(Consumer<StartTextTranslationJobRequest.Builder> 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
autoas 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.
This is a convenience which creates an instance of the
StartTextTranslationJobRequest.Builderavoiding the need to create one manually viaStartTextTranslationJobRequest.builder()- Parameters:
startTextTranslationJobRequest- AConsumerthat will call methods onStartTextTranslationJobRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the StartTextTranslationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
stopTextTranslationJob
default CompletableFuture<StopTextTranslationJobResponse> 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 theSTOP_REQUESTEDstate. If the job completes before it can be stopped, it is put into theCOMPLETEDstate. Otherwise, the job is put into theSTOPPEDstate.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.- Parameters:
stopTextTranslationJobRequest-- Returns:
- A Java Future containing the result of the StopTextTranslationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- See Also:
-
stopTextTranslationJob
default CompletableFuture<StopTextTranslationJobResponse> stopTextTranslationJob(Consumer<StopTextTranslationJobRequest.Builder> 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 theSTOP_REQUESTEDstate. If the job completes before it can be stopped, it is put into theCOMPLETEDstate. Otherwise, the job is put into theSTOPPEDstate.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.
This is a convenience which creates an instance of the
StopTextTranslationJobRequest.Builderavoiding the need to create one manually viaStopTextTranslationJobRequest.builder()- Parameters:
stopTextTranslationJobRequest- AConsumerthat will call methods onStopTextTranslationJobRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the StopTextTranslationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- See Also:
-
tagResource
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.
- Parameters:
tagResourceRequest-- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
tagResource
default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> 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.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
translateDocument
default CompletableFuture<TranslateDocumentResponse> 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.
TranslateDocumentsupports 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
Formalityparameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see Setting formality.- Parameters:
translateDocumentRequest-- Returns:
- A Java Future containing the result of the TranslateDocument operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
translateDocument
default CompletableFuture<TranslateDocumentResponse> translateDocument(Consumer<TranslateDocumentRequest.Builder> 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.
TranslateDocumentsupports 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
Formalityparameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see Setting formality.
This is a convenience which creates an instance of the
TranslateDocumentRequest.Builderavoiding the need to create one manually viaTranslateDocumentRequest.builder()- Parameters:
translateDocumentRequest- AConsumerthat will call methods onTranslateDocumentRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the TranslateDocument operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
translateText
default CompletableFuture<TranslateTextResponse> 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.
- Parameters:
translateTextRequest-- Returns:
- A Java Future containing the result of the TranslateText operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
translateText
default CompletableFuture<TranslateTextResponse> translateText(Consumer<TranslateTextRequest.Builder> translateTextRequest) Translates input text from the source language to the target language. For a list of available languages and language codes, see Supported languages.
This is a convenience which creates an instance of the
TranslateTextRequest.Builderavoiding the need to create one manually viaTranslateTextRequest.builder()- Parameters:
translateTextRequest- AConsumerthat will call methods onTranslateTextRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the TranslateText operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources.
- Parameters:
untagResourceRequest-- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
updateParallelData
default CompletableFuture<UpdateParallelDataResponse> updateParallelData(UpdateParallelDataRequest updateParallelDataRequest) Updates a previously created parallel data resource by importing a new input file from Amazon S3.
- Parameters:
updateParallelDataRequest-- Returns:
- A Java Future containing the result of the UpdateParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
updateParallelData
default CompletableFuture<UpdateParallelDataResponse> updateParallelData(Consumer<UpdateParallelDataRequest.Builder> updateParallelDataRequest) Updates a previously created parallel data resource by importing a new input file from Amazon S3.
This is a convenience which creates an instance of the
UpdateParallelDataRequest.Builderavoiding the need to create one manually viaUpdateParallelDataRequest.builder()- Parameters:
updateParallelDataRequest- AConsumerthat will call methods onUpdateParallelDataRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateParallelData operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- 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.
- 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.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aTranslateAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aTranslateAsyncClient.
-