Skip to content

Type definitions#

Index > Translate > Type definitions

Auto-generated documentation for Translate type annotations stubs module mypy-boto3-translate.

BlobTypeDef#

# BlobTypeDef definition

BlobTypeDef = Union[
    str,
    bytes,
    IO[Any],
    StreamingBody,
]

TimestampTypeDef#

# TimestampTypeDef definition

TimestampTypeDef = Union[
    datetime,
    str,
]

TermTypeDef#

# TermTypeDef definition

class TermTypeDef(TypedDict):
    SourceText: NotRequired[str],
    TargetText: NotRequired[str],

EncryptionKeyTypeDef#

# EncryptionKeyTypeDef definition

class EncryptionKeyTypeDef(TypedDict):
    Type: EncryptionKeyTypeType,  # (1)
    Id: str,
  1. See EncryptionKeyTypeType

ParallelDataConfigTypeDef#

# ParallelDataConfigTypeDef definition

class ParallelDataConfigTypeDef(TypedDict):
    S3Uri: NotRequired[str],
    Format: NotRequired[ParallelDataFormatType],  # (1)
  1. See ParallelDataFormatType

TagTypeDef#

# TagTypeDef definition

class TagTypeDef(TypedDict):
    Key: str,
    Value: str,

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,
    HostId: NotRequired[str],

DeleteParallelDataRequestRequestTypeDef#

# DeleteParallelDataRequestRequestTypeDef definition

class DeleteParallelDataRequestRequestTypeDef(TypedDict):
    Name: str,

DeleteTerminologyRequestRequestTypeDef#

# DeleteTerminologyRequestRequestTypeDef definition

class DeleteTerminologyRequestRequestTypeDef(TypedDict):
    Name: str,

DescribeTextTranslationJobRequestRequestTypeDef#

# DescribeTextTranslationJobRequestRequestTypeDef definition

class DescribeTextTranslationJobRequestRequestTypeDef(TypedDict):
    JobId: str,

GetParallelDataRequestRequestTypeDef#

# GetParallelDataRequestRequestTypeDef definition

class GetParallelDataRequestRequestTypeDef(TypedDict):
    Name: str,

ParallelDataDataLocationTypeDef#

# ParallelDataDataLocationTypeDef definition

class ParallelDataDataLocationTypeDef(TypedDict):
    RepositoryType: str,
    Location: str,

GetTerminologyRequestRequestTypeDef#

# GetTerminologyRequestRequestTypeDef definition

class GetTerminologyRequestRequestTypeDef(TypedDict):
    Name: str,
    TerminologyDataFormat: NotRequired[TerminologyDataFormatType],  # (1)
  1. See TerminologyDataFormatType

TerminologyDataLocationTypeDef#

# TerminologyDataLocationTypeDef definition

class TerminologyDataLocationTypeDef(TypedDict):
    RepositoryType: str,
    Location: str,

InputDataConfigTypeDef#

# InputDataConfigTypeDef definition

class InputDataConfigTypeDef(TypedDict):
    S3Uri: str,
    ContentType: str,

JobDetailsTypeDef#

# JobDetailsTypeDef definition

class JobDetailsTypeDef(TypedDict):
    TranslatedDocumentsCount: NotRequired[int],
    DocumentsWithErrorsCount: NotRequired[int],
    InputDocumentsCount: NotRequired[int],

LanguageTypeDef#

# LanguageTypeDef definition

class LanguageTypeDef(TypedDict):
    LanguageName: str,
    LanguageCode: str,

ListLanguagesRequestRequestTypeDef#

# ListLanguagesRequestRequestTypeDef definition

class ListLanguagesRequestRequestTypeDef(TypedDict):
    DisplayLanguageCode: NotRequired[DisplayLanguageCodeType],  # (1)
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],
  1. See DisplayLanguageCodeType

ListParallelDataRequestRequestTypeDef#

# ListParallelDataRequestRequestTypeDef definition

class ListParallelDataRequestRequestTypeDef(TypedDict):
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],

ListTagsForResourceRequestRequestTypeDef#

# ListTagsForResourceRequestRequestTypeDef definition

class ListTagsForResourceRequestRequestTypeDef(TypedDict):
    ResourceArn: str,

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

class PaginatorConfigTypeDef(TypedDict):
    MaxItems: NotRequired[int],
    PageSize: NotRequired[int],
    StartingToken: NotRequired[str],

ListTerminologiesRequestRequestTypeDef#

# ListTerminologiesRequestRequestTypeDef definition

class ListTerminologiesRequestRequestTypeDef(TypedDict):
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],

TranslationSettingsTypeDef#

# TranslationSettingsTypeDef definition

class TranslationSettingsTypeDef(TypedDict):
    Formality: NotRequired[FormalityType],  # (1)
    Profanity: NotRequired[ProfanityType],  # (2)
    Brevity: NotRequired[BrevityType],  # (3)
  1. See FormalityType
  2. See ProfanityType
  3. See BrevityType

StopTextTranslationJobRequestRequestTypeDef#

# StopTextTranslationJobRequestRequestTypeDef definition

class StopTextTranslationJobRequestRequestTypeDef(TypedDict):
    JobId: str,

TranslatedDocumentTypeDef#

# TranslatedDocumentTypeDef definition

class TranslatedDocumentTypeDef(TypedDict):
    Content: bytes,

UntagResourceRequestRequestTypeDef#

# UntagResourceRequestRequestTypeDef definition

class UntagResourceRequestRequestTypeDef(TypedDict):
    ResourceArn: str,
    TagKeys: Sequence[str],

AppliedTerminologyTypeDef#

# AppliedTerminologyTypeDef definition

class AppliedTerminologyTypeDef(TypedDict):
    Name: NotRequired[str],
    Terms: NotRequired[List[TermTypeDef]],  # (1)
  1. See TermTypeDef

DocumentTypeDef#

# DocumentTypeDef definition

class DocumentTypeDef(TypedDict):
    Content: Union[str, bytes, IO[Any], StreamingBody],
    ContentType: str,

TerminologyDataTypeDef#

# TerminologyDataTypeDef definition

class TerminologyDataTypeDef(TypedDict):
    File: Union[str, bytes, IO[Any], StreamingBody],
    Format: TerminologyDataFormatType,  # (1)
    Directionality: NotRequired[DirectionalityType],  # (2)
  1. See TerminologyDataFormatType
  2. See DirectionalityType

OutputDataConfigTypeDef#

# OutputDataConfigTypeDef definition

class OutputDataConfigTypeDef(TypedDict):
    S3Uri: str,
    EncryptionKey: NotRequired[EncryptionKeyTypeDef],  # (1)
  1. See EncryptionKeyTypeDef

TerminologyPropertiesTypeDef#

# TerminologyPropertiesTypeDef definition

class TerminologyPropertiesTypeDef(TypedDict):
    Name: NotRequired[str],
    Description: NotRequired[str],
    Arn: NotRequired[str],
    SourceLanguageCode: NotRequired[str],
    TargetLanguageCodes: NotRequired[List[str]],
    EncryptionKey: NotRequired[EncryptionKeyTypeDef],  # (1)
    SizeBytes: NotRequired[int],
    TermCount: NotRequired[int],
    CreatedAt: NotRequired[datetime],
    LastUpdatedAt: NotRequired[datetime],
    Directionality: NotRequired[DirectionalityType],  # (2)
    Message: NotRequired[str],
    SkippedTermCount: NotRequired[int],
    Format: NotRequired[TerminologyDataFormatType],  # (3)
  1. See EncryptionKeyTypeDef
  2. See DirectionalityType
  3. See TerminologyDataFormatType

ParallelDataPropertiesTypeDef#

# ParallelDataPropertiesTypeDef definition

class ParallelDataPropertiesTypeDef(TypedDict):
    Name: NotRequired[str],
    Arn: NotRequired[str],
    Description: NotRequired[str],
    Status: NotRequired[ParallelDataStatusType],  # (1)
    SourceLanguageCode: NotRequired[str],
    TargetLanguageCodes: NotRequired[List[str]],
    ParallelDataConfig: NotRequired[ParallelDataConfigTypeDef],  # (2)
    Message: NotRequired[str],
    ImportedDataSize: NotRequired[int],
    ImportedRecordCount: NotRequired[int],
    FailedRecordCount: NotRequired[int],
    SkippedRecordCount: NotRequired[int],
    EncryptionKey: NotRequired[EncryptionKeyTypeDef],  # (3)
    CreatedAt: NotRequired[datetime],
    LastUpdatedAt: NotRequired[datetime],
    LatestUpdateAttemptStatus: NotRequired[ParallelDataStatusType],  # (1)
    LatestUpdateAttemptAt: NotRequired[datetime],
  1. See ParallelDataStatusType
  2. See ParallelDataConfigTypeDef
  3. See EncryptionKeyTypeDef
  4. See ParallelDataStatusType

UpdateParallelDataRequestRequestTypeDef#

# UpdateParallelDataRequestRequestTypeDef definition

class UpdateParallelDataRequestRequestTypeDef(TypedDict):
    Name: str,
    ParallelDataConfig: ParallelDataConfigTypeDef,  # (1)
    ClientToken: str,
    Description: NotRequired[str],
  1. See ParallelDataConfigTypeDef

CreateParallelDataRequestRequestTypeDef#

# CreateParallelDataRequestRequestTypeDef definition

class CreateParallelDataRequestRequestTypeDef(TypedDict):
    Name: str,
    ParallelDataConfig: ParallelDataConfigTypeDef,  # (1)
    ClientToken: str,
    Description: NotRequired[str],
    EncryptionKey: NotRequired[EncryptionKeyTypeDef],  # (2)
    Tags: NotRequired[Sequence[TagTypeDef]],  # (3)
  1. See ParallelDataConfigTypeDef
  2. See EncryptionKeyTypeDef
  3. See TagTypeDef

TagResourceRequestRequestTypeDef#

# TagResourceRequestRequestTypeDef definition

class TagResourceRequestRequestTypeDef(TypedDict):
    ResourceArn: str,
    Tags: Sequence[TagTypeDef],  # (1)
  1. See TagTypeDef

CreateParallelDataResponseTypeDef#

# CreateParallelDataResponseTypeDef definition

class CreateParallelDataResponseTypeDef(TypedDict):
    Name: str,
    Status: ParallelDataStatusType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ParallelDataStatusType
  2. See ResponseMetadataTypeDef

DeleteParallelDataResponseTypeDef#

# DeleteParallelDataResponseTypeDef definition

class DeleteParallelDataResponseTypeDef(TypedDict):
    Name: str,
    Status: ParallelDataStatusType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ParallelDataStatusType
  2. See ResponseMetadataTypeDef

EmptyResponseMetadataTypeDef#

# EmptyResponseMetadataTypeDef definition

class EmptyResponseMetadataTypeDef(TypedDict):
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

ListTagsForResourceResponseTypeDef#

# ListTagsForResourceResponseTypeDef definition

class ListTagsForResourceResponseTypeDef(TypedDict):
    Tags: List[TagTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See TagTypeDef
  2. See ResponseMetadataTypeDef

StartTextTranslationJobResponseTypeDef#

# StartTextTranslationJobResponseTypeDef definition

class StartTextTranslationJobResponseTypeDef(TypedDict):
    JobId: str,
    JobStatus: JobStatusType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See JobStatusType
  2. See ResponseMetadataTypeDef

StopTextTranslationJobResponseTypeDef#

# StopTextTranslationJobResponseTypeDef definition

class StopTextTranslationJobResponseTypeDef(TypedDict):
    JobId: str,
    JobStatus: JobStatusType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See JobStatusType
  2. See ResponseMetadataTypeDef

UpdateParallelDataResponseTypeDef#

# UpdateParallelDataResponseTypeDef definition

class UpdateParallelDataResponseTypeDef(TypedDict):
    Name: str,
    Status: ParallelDataStatusType,  # (1)
    LatestUpdateAttemptStatus: ParallelDataStatusType,  # (1)
    LatestUpdateAttemptAt: datetime,
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See ParallelDataStatusType
  2. See ParallelDataStatusType
  3. See ResponseMetadataTypeDef

ListLanguagesResponseTypeDef#

# ListLanguagesResponseTypeDef definition

class ListLanguagesResponseTypeDef(TypedDict):
    Languages: List[LanguageTypeDef],  # (1)
    DisplayLanguageCode: DisplayLanguageCodeType,  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
    NextToken: NotRequired[str],
  1. See LanguageTypeDef
  2. See DisplayLanguageCodeType
  3. See ResponseMetadataTypeDef

ListTerminologiesRequestListTerminologiesPaginateTypeDef#

# ListTerminologiesRequestListTerminologiesPaginateTypeDef definition

class ListTerminologiesRequestListTerminologiesPaginateTypeDef(TypedDict):
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

TranslateTextRequestRequestTypeDef#

# TranslateTextRequestRequestTypeDef definition

class TranslateTextRequestRequestTypeDef(TypedDict):
    Text: str,
    SourceLanguageCode: str,
    TargetLanguageCode: str,
    TerminologyNames: NotRequired[Sequence[str]],
    Settings: NotRequired[TranslationSettingsTypeDef],  # (1)
  1. See TranslationSettingsTypeDef

TextTranslationJobFilterTypeDef#

# TextTranslationJobFilterTypeDef definition

class TextTranslationJobFilterTypeDef(TypedDict):
    JobName: NotRequired[str],
    JobStatus: NotRequired[JobStatusType],  # (1)
    SubmittedBeforeTime: NotRequired[Union[datetime, str]],
    SubmittedAfterTime: NotRequired[Union[datetime, str]],
  1. See JobStatusType

TranslateDocumentResponseTypeDef#

# TranslateDocumentResponseTypeDef definition

class TranslateDocumentResponseTypeDef(TypedDict):
    TranslatedDocument: TranslatedDocumentTypeDef,  # (1)
    SourceLanguageCode: str,
    TargetLanguageCode: str,
    AppliedTerminologies: List[AppliedTerminologyTypeDef],  # (2)
    AppliedSettings: TranslationSettingsTypeDef,  # (3)
    ResponseMetadata: ResponseMetadataTypeDef,  # (4)
  1. See TranslatedDocumentTypeDef
  2. See AppliedTerminologyTypeDef
  3. See TranslationSettingsTypeDef
  4. See ResponseMetadataTypeDef

TranslateTextResponseTypeDef#

# TranslateTextResponseTypeDef definition

class TranslateTextResponseTypeDef(TypedDict):
    TranslatedText: str,
    SourceLanguageCode: str,
    TargetLanguageCode: str,
    AppliedTerminologies: List[AppliedTerminologyTypeDef],  # (1)
    AppliedSettings: TranslationSettingsTypeDef,  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See AppliedTerminologyTypeDef
  2. See TranslationSettingsTypeDef
  3. See ResponseMetadataTypeDef

TranslateDocumentRequestRequestTypeDef#

# TranslateDocumentRequestRequestTypeDef definition

class TranslateDocumentRequestRequestTypeDef(TypedDict):
    Document: DocumentTypeDef,  # (1)
    SourceLanguageCode: str,
    TargetLanguageCode: str,
    TerminologyNames: NotRequired[Sequence[str]],
    Settings: NotRequired[TranslationSettingsTypeDef],  # (2)
  1. See DocumentTypeDef
  2. See TranslationSettingsTypeDef

ImportTerminologyRequestRequestTypeDef#

# ImportTerminologyRequestRequestTypeDef definition

class ImportTerminologyRequestRequestTypeDef(TypedDict):
    Name: str,
    MergeStrategy: MergeStrategyType,  # (1)
    TerminologyData: TerminologyDataTypeDef,  # (2)
    Description: NotRequired[str],
    EncryptionKey: NotRequired[EncryptionKeyTypeDef],  # (3)
    Tags: NotRequired[Sequence[TagTypeDef]],  # (4)
  1. See MergeStrategyType
  2. See TerminologyDataTypeDef
  3. See EncryptionKeyTypeDef
  4. See TagTypeDef

StartTextTranslationJobRequestRequestTypeDef#

# StartTextTranslationJobRequestRequestTypeDef definition

class StartTextTranslationJobRequestRequestTypeDef(TypedDict):
    InputDataConfig: InputDataConfigTypeDef,  # (1)
    OutputDataConfig: OutputDataConfigTypeDef,  # (2)
    DataAccessRoleArn: str,
    SourceLanguageCode: str,
    TargetLanguageCodes: Sequence[str],
    ClientToken: str,
    JobName: NotRequired[str],
    TerminologyNames: NotRequired[Sequence[str]],
    ParallelDataNames: NotRequired[Sequence[str]],
    Settings: NotRequired[TranslationSettingsTypeDef],  # (3)
  1. See InputDataConfigTypeDef
  2. See OutputDataConfigTypeDef
  3. See TranslationSettingsTypeDef

TextTranslationJobPropertiesTypeDef#

# TextTranslationJobPropertiesTypeDef definition

class TextTranslationJobPropertiesTypeDef(TypedDict):
    JobId: NotRequired[str],
    JobName: NotRequired[str],
    JobStatus: NotRequired[JobStatusType],  # (1)
    JobDetails: NotRequired[JobDetailsTypeDef],  # (2)
    SourceLanguageCode: NotRequired[str],
    TargetLanguageCodes: NotRequired[List[str]],
    TerminologyNames: NotRequired[List[str]],
    ParallelDataNames: NotRequired[List[str]],
    Message: NotRequired[str],
    SubmittedTime: NotRequired[datetime],
    EndTime: NotRequired[datetime],
    InputDataConfig: NotRequired[InputDataConfigTypeDef],  # (3)
    OutputDataConfig: NotRequired[OutputDataConfigTypeDef],  # (4)
    DataAccessRoleArn: NotRequired[str],
    Settings: NotRequired[TranslationSettingsTypeDef],  # (5)
  1. See JobStatusType
  2. See JobDetailsTypeDef
  3. See InputDataConfigTypeDef
  4. See OutputDataConfigTypeDef
  5. See TranslationSettingsTypeDef

GetTerminologyResponseTypeDef#

# GetTerminologyResponseTypeDef definition

class GetTerminologyResponseTypeDef(TypedDict):
    TerminologyProperties: TerminologyPropertiesTypeDef,  # (1)
    TerminologyDataLocation: TerminologyDataLocationTypeDef,  # (2)
    AuxiliaryDataLocation: TerminologyDataLocationTypeDef,  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (4)
  1. See