TranslateClient#
Auto-generated documentation for Translate type annotations stubs module types-boto3-translate.
TranslateClient#
Type annotations and code completion for boto3.client("translate").
 boto3 documentation
# TranslateClient usage example
from boto3.session import Session
from types_boto3_translate.client import TranslateClient
def get_translate_client() -> TranslateClient:
    return Session().client("translate")Exceptions#
boto3 client exceptions are generated in runtime.
This class provides code completion for boto3.client("translate").exceptions structure.
# Exceptions.exceptions usage example
client = boto3.client("translate")
try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.ConcurrentModificationException,
    client.exceptions.ConflictException,
    client.exceptions.DetectedLanguageLowConfidenceException,
    client.exceptions.InternalServerException,
    client.exceptions.InvalidFilterException,
    client.exceptions.InvalidParameterValueException,
    client.exceptions.InvalidRequestException,
    client.exceptions.LimitExceededException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceUnavailableException,
    client.exceptions.TextSizeLimitExceededException,
    client.exceptions.TooManyRequestsException,
    client.exceptions.TooManyTagsException,
    client.exceptions.UnsupportedDisplayLanguageCodeException,
    client.exceptions.UnsupportedLanguagePairException,
) as e:
    print(e)# Exceptions.exceptions type checking example
from types_boto3_translate.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
    ...Methods#
can_paginate#
Type annotations and code completion for boto3.client("translate").can_paginate method.
 boto3 documentation
# can_paginate method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...generate_presigned_url#
Type annotations and code completion for boto3.client("translate").generate_presigned_url method.
 boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...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 boto3.client("translate").create_parallel_data method.
 boto3 documentation
# create_parallel_data method definition
def create_parallel_data(
    self,
    *,
    Name: str,
    ParallelDataConfig: ParallelDataConfigTypeDef,  # (1)
    ClientToken: str,
    Description: str = ...,
    EncryptionKey: EncryptionKeyTypeDef = ...,  # (2)
    Tags: Sequence[TagTypeDef] = ...,  # (3)
) -> CreateParallelDataResponseTypeDef:  # (4)
    ...- See ParallelDataConfigTypeDef
- See EncryptionKeyTypeDef
- See Sequence[TagTypeDef]
- See CreateParallelDataResponseTypeDef
# create_parallel_data method usage example with argument unpacking
kwargs: CreateParallelDataRequestTypeDef = {  # (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 boto3.client("translate").delete_parallel_data method.
 boto3 documentation
# delete_parallel_data method definition
def delete_parallel_data(
    self,
    *,
    Name: str,
) -> DeleteParallelDataResponseTypeDef:  # (1)
    ...# delete_parallel_data method usage example with argument unpacking
kwargs: DeleteParallelDataRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.delete_parallel_data(**kwargs)delete_terminology#
A synchronous action that deletes a custom terminology.
Type annotations and code completion for boto3.client("translate").delete_terminology method.
 boto3 documentation
# delete_terminology method definition
def delete_terminology(
    self,
    *,
    Name: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_terminology method usage example with argument unpacking
kwargs: DeleteTerminologyRequestTypeDef = {  # (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 boto3.client("translate").describe_text_translation_job method.
 boto3 documentation
# describe_text_translation_job method definition
def describe_text_translation_job(
    self,
    *,
    JobId: str,
) -> DescribeTextTranslationJobResponseTypeDef:  # (1)
    ...# describe_text_translation_job method usage example with argument unpacking
kwargs: DescribeTextTranslationJobRequestTypeDef = {  # (1)
    "JobId": ...,
}
parent.describe_text_translation_job(**kwargs)get_parallel_data#
Provides information about a parallel data resource.
Type annotations and code completion for boto3.client("translate").get_parallel_data method.
 boto3 documentation
# get_parallel_data method definition
def get_parallel_data(
    self,
    *,
    Name: str,
) -> GetParallelDataResponseTypeDef:  # (1)
    ...# get_parallel_data method usage example with argument unpacking
kwargs: GetParallelDataRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.get_parallel_data(**kwargs)get_terminology#
Retrieves a custom terminology.
Type annotations and code completion for boto3.client("translate").get_terminology method.
 boto3 documentation
# get_terminology method definition
def get_terminology(
    self,
    *,
    Name: str,
    TerminologyDataFormat: TerminologyDataFormatType = ...,  # (1)
) -> GetTerminologyResponseTypeDef:  # (2)
    ...# get_terminology method usage example with argument unpacking
kwargs: GetTerminologyRequestTypeDef = {  # (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 boto3.client("translate").import_terminology method.
 boto3 documentation
# import_terminology method definition
def import_terminology(
    self,
    *,
    Name: str,
    MergeStrategy: MergeStrategyType,  # (1)
    TerminologyData: TerminologyDataTypeDef,  # (2)
    Description: str = ...,
    EncryptionKey: EncryptionKeyTypeDef = ...,  # (3)
    Tags: Sequence[TagTypeDef] = ...,  # (4)
) -> ImportTerminologyResponseTypeDef:  # (5)
    ...- See MergeStrategyType
- See TerminologyDataTypeDef
- See EncryptionKeyTypeDef
- See Sequence[TagTypeDef]
- See ImportTerminologyResponseTypeDef
# import_terminology method usage example with argument unpacking
kwargs: ImportTerminologyRequestTypeDef = {  # (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 boto3.client("translate").list_languages method.
 boto3 documentation
# list_languages method definition
def list_languages(
    self,
    *,
    DisplayLanguageCode: DisplayLanguageCodeType = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListLanguagesResponseTypeDef:  # (2)
    ...# list_languages method usage example with argument unpacking
kwargs: ListLanguagesRequestTypeDef = {  # (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 boto3.client("translate").list_parallel_data method.
 boto3 documentation
# list_parallel_data method definition
def list_parallel_data(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListParallelDataResponseTypeDef:  # (1)
    ...# list_parallel_data method usage example with argument unpacking
kwargs: ListParallelDataRequestTypeDef = {  # (1)
    "NextToken": ...,
}
parent.list_parallel_data(**kwargs)list_tags_for_resource#
Lists all tags associated with a given Amazon Translate resource.
Type annotations and code completion for boto3.client("translate").list_tags_for_resource method.
 boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)list_terminologies#
Provides a list of custom terminologies associated with your account.
Type annotations and code completion for boto3.client("translate").list_terminologies method.
 boto3 documentation
# list_terminologies method definition
def list_terminologies(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListTerminologiesResponseTypeDef:  # (1)
    ...# list_terminologies method usage example with argument unpacking
kwargs: ListTerminologiesRequestTypeDef = {  # (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 boto3.client("translate").list_text_translation_jobs method.
 boto3 documentation
# list_text_translation_jobs method definition
def list_text_translation_jobs(
    self,
    *,
    Filter: TextTranslationJobFilterTypeDef = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListTextTranslationJobsResponseTypeDef:  # (2)
    ...# list_text_translation_jobs method usage example with argument unpacking
kwargs: ListTextTranslationJobsRequestTypeDef = {  # (1)
    "Filter": ...,
}
parent.list_text_translation_jobs(**kwargs)start_text_translation_job#
Starts an asynchronous batch translation job.
Type annotations and code completion for boto3.client("translate").start_text_translation_job method.
 boto3 documentation
# start_text_translation_job method definition
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
# start_text_translation_job method usage example with argument unpacking
kwargs: StartTextTranslationJobRequestTypeDef = {  # (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 boto3.client("translate").stop_text_translation_job method.
 boto3 documentation
# stop_text_translation_job method definition
def stop_text_translation_job(
    self,
    *,
    JobId: str,
) -> StopTextTranslationJobResponseTypeDef:  # (1)
    ...# stop_text_translation_job method usage example with argument unpacking
kwargs: StopTextTranslationJobRequestTypeDef = {  # (1)
    "JobId": ...,
}
parent.stop_text_translation_job(**kwargs)tag_resource#
Associates a specific tag with a resource.
Type annotations and code completion for boto3.client("translate").tag_resource method.
 boto3 documentation
# tag_resource method definition
def tag_resource(
    self,
    *,
    ResourceArn: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...- See Sequence[TagTypeDef]
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}
parent.tag_resource(**kwargs)translate_document#
Translates the input document from the source language to the target language.
Type annotations and code completion for boto3.client("translate").translate_document method.
 boto3 documentation
# translate_document method definition
def translate_document(
    self,
    *,
    Document: DocumentTypeDef,  # (1)
    SourceLanguageCode: str,
    TargetLanguageCode: str,
    TerminologyNames: Sequence[str] = ...,
    Settings: TranslationSettingsTypeDef = ...,  # (2)
) -> TranslateDocumentResponseTypeDef:  # (3)
    ...# translate_document method usage example with argument unpacking
kwargs: TranslateDocumentRequestTypeDef = {  # (1)
    "Document": ...,
    "SourceLanguageCode": ...,
    "TargetLanguageCode": ...,
}
parent.translate_document(**kwargs)translate_text#
Translates input text from the source language to the target language.
Type annotations and code completion for boto3.client("translate").translate_text method.
 boto3 documentation
# translate_text method definition
def translate_text(
    self,
    *,
    Text: str,
    SourceLanguageCode: str,
    TargetLanguageCode: str,
    TerminologyNames: Sequence[str] = ...,
    Settings: TranslationSettingsTypeDef = ...,  # (1)
) -> TranslateTextResponseTypeDef:  # (2)
    ...# translate_text method usage example with argument unpacking
kwargs: TranslateTextRequestTypeDef = {  # (1)
    "Text": ...,
    "SourceLanguageCode": ...,
    "TargetLanguageCode": ...,
}
parent.translate_text(**kwargs)untag_resource#
Removes a specific tag associated with an Amazon Translate resource.
Type annotations and code completion for boto3.client("translate").untag_resource method.
 boto3 documentation
# untag_resource method definition
def untag_resource(
    self,
    *,
    ResourceArn: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "TagKeys": ...,
}
parent.untag_resource(**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 boto3.client("translate").update_parallel_data method.
 boto3 documentation
# update_parallel_data method definition
def update_parallel_data(
    self,
    *,
    Name: str,
    ParallelDataConfig: ParallelDataConfigTypeDef,  # (1)
    ClientToken: str,
    Description: str = ...,
) -> UpdateParallelDataResponseTypeDef:  # (2)
    ...# update_parallel_data method usage example with argument unpacking
kwargs: UpdateParallelDataRequestTypeDef = {  # (1)
    "Name": ...,
    "ParallelDataConfig": ...,
    "ClientToken": ...,
}
parent.update_parallel_data(**kwargs)get_paginator#
Type annotations and code completion for boto3.client("translate").get_paginator method with overloads.
- client.get_paginator("list_terminologies")-> ListTerminologiesPaginator