Translate / Client / create_parallel_data

create_parallel_data#

Translate.Client.create_parallel_data(**kwargs)#

Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.

See also: AWS API Documentation

Request Syntax

response = client.create_parallel_data(
    Name='string',
    Description='string',
    ParallelDataConfig={
        'S3Uri': 'string',
        'Format': 'TSV'|'CSV'|'TMX'
    },
    EncryptionKey={
        'Type': 'KMS',
        'Id': 'string'
    },
    ClientToken='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • Name (string) –

    [REQUIRED]

    A custom name for the parallel data resource in Amazon Translate. You must assign a name that is unique in the account and region.

  • Description (string) – A custom description for the parallel data resource in Amazon Translate.

  • ParallelDataConfig (dict) –

    [REQUIRED]

    Specifies the format and S3 location of the parallel data input file.

    • S3Uri (string) –

      The URI of the Amazon S3 folder that contains the parallel data input file. The folder must be in the same Region as the API endpoint you are calling.

    • Format (string) –

      The format of the parallel data input file.

  • EncryptionKey (dict) –

    The encryption key used to encrypt this object.

    • Type (string) – [REQUIRED]

      The type of encryption key used by Amazon Translate to encrypt this object.

    • Id (string) – [REQUIRED]

      The Amazon Resource Name (ARN) of the encryption key being used to encrypt this object.

  • ClientToken (string) –

    [REQUIRED]

    A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK.

    This field is autopopulated if not provided.

  • Tags (list) –

    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.

    • (dict) –

      A key-value pair that adds as a metadata to a resource used by Amazon Translate.

      • Key (string) – [REQUIRED]

        The initial part of a key-value pair that forms a tag associated with a given resource.

      • Value (string) – [REQUIRED]

        The second part of a key-value pair that forms a tag associated with a given resource.

Return type:

dict

Returns:

Response Syntax

{
    'Name': 'string',
    'Status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'FAILED'
}

Response Structure

  • (dict) –

    • Name (string) –

      The custom name that you assigned to the parallel data resource.

    • Status (string) –

      The status of the parallel data resource. When the resource is ready for you to use, the status is ACTIVE.

Exceptions

  • Translate.Client.exceptions.InvalidParameterValueException

  • Translate.Client.exceptions.InvalidRequestException

  • Translate.Client.exceptions.LimitExceededException

  • Translate.Client.exceptions.TooManyRequestsException

  • Translate.Client.exceptions.TooManyTagsException

  • Translate.Client.exceptions.ConflictException

  • Translate.Client.exceptions.ConcurrentModificationException

  • Translate.Client.exceptions.InternalServerException