parallel_datas
Creates, updates, deletes, gets or lists a parallel_datas resource.
Overview
| Name | parallel_datas |
| Type | Resource |
| Id | aws.translate.parallel_datas |
Fields
The following fields are returned by SELECT queries:
- get_parallel_data
| Name | Datatype | Description |
|---|---|---|
auxiliary_data_location | object | 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 parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration. |
data_location | object | The Amazon S3 location of the most recent parallel data input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration. Amazon Translate doesn't scan all input files for the risk of CSV injection attacks. CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator. |
latest_update_attempt_auxiliary_data_location | object | 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 update a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration. |
parallel_data_properties | object | The properties of the parallel data resource that is being retrieved. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_parallel_data | select | region | Provides information about a parallel data resource. | |
create_parallel_data | insert | region, ParallelDataConfig, ClientToken | 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. | |
update_parallel_data | update | region, ParallelDataConfig, ClientToken | Updates a previously created parallel data resource by importing a new input file from Amazon S3. | |
delete_parallel_data | delete | region | Deletes a parallel data resource in Amazon Translate. | |
list_parallel_data | exec | region | Provides a list of your parallel data resources in Amazon Translate. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_parallel_data
Provides information about a parallel data resource.
SELECT
auxiliary_data_location,
data_location,
latest_update_attempt_auxiliary_data_location,
parallel_data_properties
FROM aws.translate.parallel_datas
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_parallel_data
- Manifest
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.
INSERT INTO aws.translate.parallel_datas (
Name,
Description,
ParallelDataConfig,
EncryptionKey,
ClientToken,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ ParallelDataConfig }}' /* required */,
'{{ EncryptionKey }}',
'{{ ClientToken }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
name,
status
;
# Description fields are for documentation purposes
- name: parallel_datas
props:
- name: region
value: "{{ region }}"
description: Required parameter for the parallel_datas resource.
- name: Name
value: "{{ Name }}"
description: |
A custom name for the parallel data resource in Amazon Translate. You must assign a name that is unique in the account and region.
- name: Description
value: "{{ Description }}"
description: |
A custom description for the parallel data resource in Amazon Translate.
- name: ParallelDataConfig
description: |
Specifies the format and S3 location of the parallel data input file.
value:
S3Uri: "{{ S3Uri }}"
Format: "{{ Format }}"
- name: EncryptionKey
description: |
The encryption key used to encrypt this object.
value:
Type: "{{ Type }}"
Id: "{{ Id }}"
- name: ClientToken
value: "{{ ClientToken }}"
description: |
A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK.
- name: Tags
description: |
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.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_parallel_data
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
UPDATE aws.translate.parallel_datas
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
ParallelDataConfig = '{{ ParallelDataConfig }}',
ClientToken = '{{ ClientToken }}'
WHERE
region = '{{ region }}' --required
AND ParallelDataConfig = '{{ ParallelDataConfig }}' --required
AND ClientToken = '{{ ClientToken }}' --required
RETURNING
latest_update_attempt_at,
latest_update_attempt_status,
name,
status;
DELETE examples
- delete_parallel_data
Deletes a parallel data resource in Amazon Translate.
DELETE FROM aws.translate.parallel_datas
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- list_parallel_data
Provides a list of your parallel data resources in Amazon Translate.
EXEC aws.translate.parallel_datas.list_parallel_data
@region='{{ region }}' --required
@@json=
'{
"NextToken": "{{ NextToken }}",
"MaxResults": {{ MaxResults }}
}'
;