

# Tagging your resources
<a name="tagging"></a>

A tag is metadata that you can associate with an Amazon Translate resource. A tag consists of a key-value pair. You can add tags to **Parallel Data** and **Custom Terminology** resources.

Tags have two major functions: organizing your resources and providing tag-based access control. You can add tags to a resource and then create IAM policies to allow or restrict access to the resource based on its tags.

A policy can allow or disallow an operation based on the tags provided in your request (request-tags) or tags associated with the resource you're calling (resource-tags). For more information on using tags with IAM, see [Controlling access using tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) in the *IAM User Guide*.

Considerations for using tags with Amazon Translate:
+ You can add up to 50 user tags per resource. 
+ You can add tags when you create the resource, or any time after you create it.
+  A tag *key* is a required field but a tag *value* is optional.
+ Tags don't have to be unique between resources, but the tags for a given resource must have unique keys.
+ Tag keys and values are case sensitive.
+ A tag key can have a maximum of 128 characters; a tag value can have a maximum of 256 characters.
+ AWS system tags start with prefix `aws:` in the tag key or value. You can't add, edit, or delete tag names or values with this prefix. System tags are not included in your tags quota per resource.

**Note**  
If you plan to use your tagging schema across multiple AWS services and resources, remember that other services may have different requirements for allowed characters.

**Topics**
+ [Tagging a new resource](tagging-newtags.md)
+ [Viewing, updating, and deleting tags associated with a resource](tagging-existingtags.md)

# Tagging a new resource
<a name="tagging-newtags"></a>

You can add tags to a **ParallelData** or **Custom Terminology** resource when you create it.

**To add tags to a new resource (console)**

1. Sign in to the [Amazon Translate console](https://console.aws.amazon.com/translate/).

1. From the left navigation pane, select the resource (`Parallel data` or `Custom terminology`) that you want to create.

1. Chose **Create parallel data** or **Create terminology**. The console displays the main 'create' page for your resource. At the end of this page, you see a '**Tags -** *optional*' panel.  
![\[Screen shot showing the empty tags panel.\]](http://docs.aws.amazon.com/translate/latest/dg/images/add-tags-1.png)

1. Choose **Add new tag** to add a tag for the resource. Enter a tag key and, optionally, a tag value.   
![\[Screen shot showing the tags panel with one tag defined.\]](http://docs.aws.amazon.com/translate/latest/dg/images/add-tags-2.png)

1. Repeat step 4 until you have added all your tags. Each key must be unique for this resource.  
![\[Screen shot showing the the empty fields for adding a new tag.\]](http://docs.aws.amazon.com/translate/latest/dg/images/add-tags-3.png)

1. Choose **Create parallel data** or **Create terminology** to create the resource.

You can also add tags using the Amazon Translate [CreateParallelData](https://docs.aws.amazon.com/translate/latest/APIReference/API_CreateParallelData.html) API operation. The following example shows how to add tags with the create-parallel-data CLI command.

```
aws translate create-parallel-data \
--name "myTest" \
--parallel-data-config "{\"format\": \"CSV\",  \
             "S3Uri\": \"s3://test-input/TEST.csv\"}" \
--tags "[{\"Key\": \"color\",\"Value\": \"orange\"}]"
```

# Viewing, updating, and deleting tags associated with a resource
<a name="tagging-existingtags"></a>

You can view, update or delete the tags associated with a `Parallel data` or `Custom terminology` resource.

**To update tags for an existing resource (console)**

1. Sign in to the [Amazon Translate console](https://console.aws.amazon.com/translate/).

1. From the left navigation pane, select `Parallel data` or `Custom terminology`.

1. Select the resource that contains the tags you want to view, update, or delete. The console opens the details page for the resource. 

1. Scroll down until you see the **Tags** panel. Here, you can see all the tags associated with your selected resource.  
![\[Screen shot showing the Tags panel with two tags (color and type).\]](http://docs.aws.amazon.com/translate/latest/dg/images/modify-tags-2.png)

   Select **Manage tags** to edit or remove tags from your resource.

1. Choose the text you want to modify, then edit your tag. You can also remove the tag by selecting **Remove**. 

1. To add a new tag, select **Add new tag**, then enter the key and value in the blank fields.

1. When you're finished modifying your tags, select **Save**.