TranslateClient
Auto-generated documentation for Translate type annotations stubs module types-aiobotocore-translate.
TranslateClient
Type annotations and code completion for session.client("translate")
boto3 documentation
from aioboto3.session import Session
from types_aiobotocore_translate.client import TranslateClient
session = Session()
async with session.client("translate") as client:
client: TranslateClient
Exceptions
aioboto3
client exceptions are generated in runtime.
This class provides code completion for session.client("translate").exceptions
structure.
async with session.client("translate") as client:
try:
do_something(client)
except (
client.ClientError,
client.ConcurrentModificationException,
client.ConflictException,
client.DetectedLanguageLowConfidenceException,
client.InternalServerException,
client.InvalidFilterException,
client.InvalidParameterValueException,
client.InvalidRequestException,
client.LimitExceededException,
client.ResourceNotFoundException,
client.ServiceUnavailableException,
client.TextSizeLimitExceededException,
client.TooManyRequestsException,
client.UnsupportedDisplayLanguageCodeException,
client.UnsupportedLanguagePairException,
) as e:
print(e)
from types_aiobotocore_translate.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for session.client("translate").can_paginate
method.
boto3 documentation
close
Closes underlying endpoint connections.
Type annotations and code completion for session.client("translate").close
method.
boto3 documentation
create_parallel_data
Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3.
Type annotations and code completion for session.client("translate").create_parallel_data
method.
boto3 documentation
await def create_parallel_data(
self,
*,
Name: str,
ParallelDataConfig: ParallelDataConfigTypeDef, # (1)
ClientToken: str,
Description: str = ...,
EncryptionKey: EncryptionKeyTypeDef = ..., # (2)
) -> CreateParallelDataResponseTypeDef: # (3)
...
kwargs: CreateParallelDataRequestRequestTypeDef = { # (1)
"Name": ...,
"ParallelDataConfig": ...,
"ClientToken": ...,
}
parent.create_parallel_data(**kwargs)
delete_parallel_data
Deletes a parallel data resource in Amazon Translate.
Type annotations and code completion for session.client("translate").delete_parallel_data
method.
boto3 documentation
await def delete_parallel_data(
self,
*,
Name: str,
) -> DeleteParallelDataResponseTypeDef: # (1)
...
kwargs: DeleteParallelDataRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.delete_parallel_data(**kwargs)
delete_terminology
A synchronous action that deletes a custom terminology.
Type annotations and code completion for session.client("translate").delete_terminology
method.
boto3 documentation
await def delete_terminology(
self,
*,
Name: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteTerminologyRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.delete_terminology(**kwargs)
describe_text_translation_job
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.
Type annotations and code completion for session.client("translate").describe_text_translation_job
method.
boto3 documentation
await def describe_text_translation_job(
self,
*,
JobId: str,
) -> DescribeTextTranslationJobResponseTypeDef: # (1)
...
kwargs: DescribeTextTranslationJobRequestRequestTypeDef = { # (1)
"JobId": ...,
}
parent.describe_text_translation_job(**kwargs)
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for session.client("translate").generate_presigned_url
method.
boto3 documentation
await def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_parallel_data
Provides information about a parallel data resource.
Type annotations and code completion for session.client("translate").get_parallel_data
method.
boto3 documentation
await def get_parallel_data(
self,
*,
Name: str,
) -> GetParallelDataResponseTypeDef: # (1)
...
kwargs: GetParallelDataRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.get_parallel_data(**kwargs)
get_terminology
Retrieves a custom terminology.
Type annotations and code completion for session.client("translate").get_terminology
method.
boto3 documentation
await def get_terminology(
self,
*,
Name: str,
TerminologyDataFormat: TerminologyDataFormatType = ..., # (1)
) -> GetTerminologyResponseTypeDef: # (2)
...
kwargs: GetTerminologyRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.get_terminology(**kwargs)
import_terminology
Creates or updates a custom terminology, depending on whether one already exists for the given terminology name.
Type annotations and code completion for session.client("translate").import_terminology
method.
boto3 documentation
await def import_terminology(
self,
*,
Name: str,
MergeStrategy: MergeStrategyType, # (1)
TerminologyData: TerminologyDataTypeDef, # (2)
Description: str = ...,
EncryptionKey: EncryptionKeyTypeDef = ..., # (3)
) -> ImportTerminologyResponseTypeDef: # (4)
...
- See MergeStrategyType
- See TerminologyDataTypeDef
- See EncryptionKeyTypeDef
- See ImportTerminologyResponseTypeDef
kwargs: ImportTerminologyRequestRequestTypeDef = { # (1)
"Name": ...,
"MergeStrategy": ...,
"TerminologyData": ...,
}
parent.import_terminology(**kwargs)
list_languages
Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
Type annotations and code completion for session.client("translate").list_languages
method.
boto3 documentation
await def list_languages(
self,
*,
DisplayLanguageCode: DisplayLanguageCodeType = ..., # (1)
NextToken: str = ...,
MaxResults: int = ...,
) -> ListLanguagesResponseTypeDef: # (2)
...
kwargs: ListLanguagesRequestRequestTypeDef = { # (1)
"DisplayLanguageCode": ...,
}
parent.list_languages(**kwargs)
list_parallel_data
Provides a list of your parallel data resources in Amazon Translate.
Type annotations and code completion for session.client("translate").list_parallel_data
method.
boto3 documentation
await def list_parallel_data(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListParallelDataResponseTypeDef: # (1)
...
kwargs: ListParallelDataRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_parallel_data(**kwargs)
list_terminologies
Provides a list of custom terminologies associated with your account.
Type annotations and code completion for session.client("translate").list_terminologies
method.
boto3 documentation
await def list_terminologies(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListTerminologiesResponseTypeDef: # (1)
...
kwargs: ListTerminologiesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_terminologies(**kwargs)
list_text_translation_jobs
Gets a list of the batch translation jobs that you have submitted.
Type annotations and code completion for session.client("translate").list_text_translation_jobs
method.
boto3 documentation
await def list_text_translation_jobs(
self,
*,
Filter: TextTranslationJobFilterTypeDef = ..., # (1)
NextToken: str = ...,
MaxResults: int = ...,
) -> ListTextTranslationJobsResponseTypeDef: # (2)
...
kwargs: ListTextTranslationJobsRequestRequestTypeDef = { # (1)
"Filter": ...,
}
parent.list_text_translation_jobs(**kwargs)
start_text_translation_job
Starts an asynchronous batch translation job.
Type annotations and code completion for session.client("translate").start_text_translation_job
method.
boto3 documentation
await def start_text_translation_job(
self,
*,
InputDataConfig: InputDataConfigTypeDef, # (1)
OutputDataConfig: OutputDataConfigTypeDef, # (2)
DataAccessRoleArn: str,
SourceLanguageCode: str,
TargetLanguageCodes: Sequence[str],
ClientToken: str,
JobName: str = ...,
TerminologyNames: Sequence[str] = ...,
ParallelDataNames: Sequence[str] = ...,
Settings: TranslationSettingsTypeDef = ..., # (3)
) -> StartTextTranslationJobResponseTypeDef: # (4)
...
- See InputDataConfigTypeDef
- See OutputDataConfigTypeDef
- See TranslationSettingsTypeDef
- See StartTextTranslationJobResponseTypeDef
kwargs: StartTextTranslationJobRequestRequestTypeDef = { # (1)
"InputDataConfig": ...,
"OutputDataConfig": ...,
"DataAccessRoleArn": ...,
"SourceLanguageCode": ...,
"TargetLanguageCodes": ...,
"ClientToken": ...,
}
parent.start_text_translation_job(**kwargs)
stop_text_translation_job
Stops an asynchronous batch translation job that is in progress.
Type annotations and code completion for session.client("translate").stop_text_translation_job
method.
boto3 documentation
await def stop_text_translation_job(
self,
*,
JobId: str,
) -> StopTextTranslationJobResponseTypeDef: # (1)
...
kwargs: StopTextTranslationJobRequestRequestTypeDef = { # (1)
"JobId": ...,
}
parent.stop_text_translation_job(**kwargs)
translate_text
Translates input text from the source language to the target language.
Type annotations and code completion for session.client("translate").translate_text
method.
boto3 documentation
await def translate_text(
self,
*,
Text: str,
SourceLanguageCode: str,
TargetLanguageCode: str,
TerminologyNames: Sequence[str] = ...,
Settings: TranslationSettingsTypeDef = ..., # (1)
) -> TranslateTextResponseTypeDef: # (2)
...
kwargs: TranslateTextRequestRequestTypeDef = { # (1)
"Text": ...,
"SourceLanguageCode": ...,
"TargetLanguageCode": ...,
}
parent.translate_text(**kwargs)
update_parallel_data
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
Type annotations and code completion for session.client("translate").update_parallel_data
method.
boto3 documentation
await def update_parallel_data(
self,
*,
Name: str,
ParallelDataConfig: ParallelDataConfigTypeDef, # (1)
ClientToken: str,
Description: str = ...,
) -> UpdateParallelDataResponseTypeDef: # (2)
...
kwargs: UpdateParallelDataRequestRequestTypeDef = { # (1)
"Name": ...,
"ParallelDataConfig": ...,
"ClientToken": ...,
}
parent.update_parallel_data(**kwargs)
__aenter__
Type annotations and code completion for session.client("translate").__aenter__
method.
boto3 documentation
__aexit__
Type annotations and code completion for session.client("translate").__aexit__
method.
boto3 documentation
get_paginator
Type annotations and code completion for session.client("translate").get_paginator
method with overloads.
client.get_paginator("list_terminologies")
-> ListTerminologiesPaginator