ImportTerminology - Amazon Translate API Reference

ImportTerminology

Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.

If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.

Request Syntax

{ "Description": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "MergeStrategy": "string", "Name": "string", "Tags": [ { "Key": "string", "Value": "string" } ], "TerminologyData": { "Directionality": "string", "File": blob, "Format": "string" } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Description

The description of the custom terminology being imported.

Type: String

Length Constraints: Maximum length of 256.

Pattern: [\P{M}\p{M}]{0,256}

Required: No

EncryptionKey

The encryption key for the custom terminology being imported.

Type: EncryptionKey object

Required: No

MergeStrategy

The merge strategy of the custom terminology being imported. Currently, only the OVERWRITE merge strategy is supported. In this case, the imported terminology will overwrite an existing terminology of the same name.

Type: String

Valid Values: OVERWRITE

Required: Yes

Name

The name of the custom terminology being imported.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^([A-Za-z0-9-]_?)+$

Required: Yes

Tags

Tags to be associated with this resource. A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see Tagging your resources in the Amazon Translate Developer Guide.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: No

TerminologyData

The terminology data for the custom terminology being imported.

Type: TerminologyData object

Required: Yes

Response Syntax

{ "AuxiliaryDataLocation": { "Location": "string", "RepositoryType": "string" }, "TerminologyProperties": { "Arn": "string", "CreatedAt": number, "Description": "string", "Directionality": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "Format": "string", "LastUpdatedAt": number, "Message": "string", "Name": "string", "SizeBytes": number, "SkippedTermCount": number, "SourceLanguageCode": "string", "TargetLanguageCodes": [ "string" ], "TermCount": number } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AuxiliaryDataLocation

The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30 minute expiration.

Type: TerminologyDataLocation object

TerminologyProperties

The properties of the custom terminology being imported.

Type: TerminologyProperties object

Errors

For information about the errors that are common to all actions, see Common Errors.

ConcurrentModificationException

Another modification is being made. That modification must complete before you can make your change.

HTTP Status Code: 400

InternalServerException

An internal server error occurred. Retry your request.

HTTP Status Code: 500

InvalidParameterValueException

The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation.

HTTP Status Code: 400

LimitExceededException

The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit.

HTTP Status Code: 400

TooManyRequestsException

You have made too many requests within a short period of time. Wait for a short time and then try your request again.

HTTP Status Code: 400

TooManyTagsException

You have added too many tags to this resource. The maximum is 50 tags.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: