TranslateClient
Auto-generated documentation for Translate type annotations stubs module mypy-boto3-translate.
TranslateClient
Type annotations and code completion for boto3.client("translate")
.
boto3 documentation
from boto3.session import Session
from mypy_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.
client = boto3.client("translate")
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.TooManyTagsException,
client.UnsupportedDisplayLanguageCodeException,
client.UnsupportedLanguagePairException,
) as e:
print(e)
from mypy_boto3_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 boto3.client("translate").can_paginate
method.
boto3 documentation
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.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 boto3.client("translate").create_parallel_data
method.
boto3 documentation
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 TagTypeDef
- See CreateParallelDataResponseTypeDef
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 boto3.client("translate").delete_parallel_data
method.
boto3 documentation
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 boto3.client("translate").delete_terminology
method.
boto3 documentation
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 boto3.client("translate").describe_text_translation_job
method.
boto3 documentation
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 boto3.client("translate").generate_presigned_url
method.
boto3 documentation
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 boto3.client("translate").get_parallel_data
method.
boto3 documentation
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 boto3.client("translate").get_terminology
method.
boto3 documentation
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 boto3.client("translate").import_terminology
method.
boto3 documentation
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 TagTypeDef
- 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 boto3.client("translate").list_languages
method.
boto3 documentation
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 boto3.client("translate").list_parallel_data
method.
boto3 documentation
def list_parallel_data(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListParallelDataResponseTypeDef: # (1)
...
kwargs: ListParallelDataRequestRequestTypeDef = { # (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
def list_tags_for_resource(
self,
*,
ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (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
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 boto3.client("translate").list_text_translation_jobs
method.
boto3 documentation
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 boto3.client("translate").start_text_translation_job
method.
boto3 documentation
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 boto3.client("translate").stop_text_translation_job
method.
boto3 documentation
def stop_text_translation_job(
self,
*,
JobId: str,
) -> StopTextTranslationJobResponseTypeDef: # (1)
...
kwargs: StopTextTranslationJobRequestRequestTypeDef = { # (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
def tag_resource(
self,
*,
ResourceArn: str,
Tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
"Tags": ...,
}
parent.tag_resource(**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
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)
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
def untag_resource(
self,
*,
ResourceArn: str,
TagKeys: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: UntagResourceRequestRequestTypeDef = { # (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
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)
get_paginator
Type annotations and code completion for boto3.client("translate").get_paginator
method with overloads.
client.get_paginator("list_terminologies")
-> ListTerminologiesPaginator