Skip to content

TranslateClient#

Index > Translate > 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

# TranslateClient usage example

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.

# 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 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

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("translate").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

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)
    ...
  1. See ParallelDataConfigTypeDef
  2. See EncryptionKeyTypeDef
  3. See TagTypeDef
  4. See CreateParallelDataResponseTypeDef
# create_parallel_data method usage example with argument unpacking

kwargs: CreateParallelDataRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ParallelDataConfig": ...,
    "ClientToken": ...,
}

parent.create_parallel_data(**kwargs)
  1. See CreateParallelDataRequestRequestTypeDef

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)
    ...
  1. See DeleteParallelDataResponseTypeDef
# delete_parallel_data method usage example with argument unpacking

kwargs: DeleteParallelDataRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.delete_parallel_data(**kwargs)
  1. See DeleteParallelDataRequestRequestTypeDef

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)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_terminology method usage example with argument unpacking

kwargs: DeleteTerminologyRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.delete_terminology(**kwargs)
  1. See DeleteTerminologyRequestRequestTypeDef

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)
    ...
  1. See DescribeTextTranslationJobResponseTypeDef
# describe_text_translation_job method usage example with argument unpacking

kwargs: DescribeTextTranslationJobRequestRequestTypeDef = {  # (1)
    "JobId": ...,
}

parent.describe_text_translation_job(**kwargs)
  1. See DescribeTextTranslationJobRequestRequestTypeDef

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

# generate_presigned_url method definition

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

# get_parallel_data method definition

def get_parallel_data(
    self,
    *,
    Name: str,
) -> GetParallelDataResponseTypeDef:  # (1)
    ...
  1. See GetParallelDataResponseTypeDef
# get_parallel_data method usage example with argument unpacking

kwargs: GetParallelDataRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.get_parallel_data(**kwargs)
  1. See GetParallelDataRequestRequestTypeDef

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)
    ...
  1. See TerminologyDataFormatType
  2. See GetTerminologyResponseTypeDef
# get_terminology method usage example with argument unpacking

kwargs: GetTerminologyRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.get_terminology(**kwargs)
  1. See GetTerminologyRequestRequestTypeDef

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)
    ...
  1. See MergeStrategyType
  2. See TerminologyDataTypeDef
  3. See EncryptionKeyTypeDef
  4. See TagTypeDef
  5. See ImportTerminologyResponseTypeDef
# import_terminology method usage example with argument unpacking

kwargs: ImportTerminologyRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "MergeStrategy": ...,
    "TerminologyData": ...,
}

parent.import_terminology(**kwargs)
  1. See ImportTerminologyRequestRequestTypeDef

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)
    ...
  1. See DisplayLanguageCodeType
  2. See ListLanguagesResponseTypeDef
# list_languages method usage example with argument unpacking

kwargs: ListLanguagesRequestRequestTypeDef = {  # (1)
    "DisplayLanguageCode": ...,
}

parent.list_languages(**kwargs)
  1. See ListLanguagesRequestRequestTypeDef

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)
    ...
  1. See ListParallelDataResponseTypeDef
# list_parallel_data method usage example with argument unpacking

kwargs: ListParallelDataRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_parallel_data(**kwargs)
  1. See ListParallelDataRequestRequestTypeDef

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)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

list_terminologies#

Provides a list of custom terminologies associated with your account.

Type annotations and code completion for boto3.client("translate").list_terminologies method.