

# Tagging profiling groups
<a name="tagging-profiling-groups"></a>

A *tag* is a custom attribute label that you or AWS assigns to an AWS resource. Each AWS tag has two parts:
+ A *tag key* (for example, `CostCenter`, `Environment`, `Project`, or `Secret`). Tag keys are case sensitive.
+ An optional field known as a *tag value*. Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.

Together these are known as key-value pairs.

Tags help you identify and organize your AWS resources. Many AWS services support tagging, so you can assign the same tag to resources from different services to indicate that the resources are related. For example, you can assign the same tag to a profiling group that you assign to an S3 bucket. For more information about using tags, see the [Tagging best practices](https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf) whitepaper. 

In CodeGuru Profiler, the primary resource is the profiling group. You can use the CodeGuru Profiler console, the AWS CLI, CodeGuru Profiler APIs, or AWS SDKs to add, manage, and remove tags for a profiling group. In addition to identifying, organizing, and tracking your profiling group with tags, you can use tags in IAM policies to help control who can view and interact with your profiling group.

**Topics**
+ [Add a tag to a profiling group](how-to-tag-profiling-group-add.md)
+ [View tags for a profiling group](how-to-tag-profiling-group-list.md)
+ [Edit tags for a profiling group](how-to-tag-profiling-group-update.md)
+ [Remove a tag from a profiling group](how-to-tag-profiling-group-delete.md)

# Add a tag to a profiling group
<a name="how-to-tag-profiling-group-add"></a>

Adding tags to a profiling group can help you identify and organize your profiling groups and manage access to them. First, you add one or more tags (key-value pairs) to a profiling group. Keep in mind that there are limits on the number of tags you can have on a profiling group. After you have tags, you can create IAM policies to manage access to the profiling group based on these tags. You can use the CodeGuru Profiler console to add tags to a profiling group. 

You can add tags when you create your profiling group on the **Create profiling group** page. You can also add tags to your existing profiling group.

## Add a tag to a profiling group
<a name="how-to-tag-profiling-group-add-console"></a>

You can use the CodeGuru Profiler console to add one or more tags to an existing profiling group. 

1. In **Profiling groups**, choose the name of the profiling group where you want to add tags.

1. Choose **Actions**. Choose **Edit profiling group**.

1. Choose the **Tags** tab.

1. Choose **Add new tag**.

1. In **Key**, enter a name for the tag. You can add an optional value for the tag in **Value**. 

1. (Optional) To add another tag, choose **Add new tag** again.

1. When you have finished adding tags, choose **Save**.

# View tags for a profiling group
<a name="how-to-tag-profiling-group-list"></a>

Tags can help you identify and organize your AWS resources and manage access to them. For more information about using tags, see the [Tagging best practices](https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf) whitepaper.

## View tags for a profiling group
<a name="how-to-tag-profiling-group-list-console"></a>

You can use the CodeGuru Profiler console to view the tags associated with a CodeGuru Profiler profiling group. 

1. In **Profiling groups**, choose the name of the profiling group where you want to view tags.

1. Choose **Actions**. Choose **Edit profiling group**.

1. Choose the **Tags** tab.

# Edit tags for a profiling group
<a name="how-to-tag-profiling-group-update"></a>

You can change the value for a tag associated with a profiling group. While you can't change the key, you can deleting a tag and creating a new one with the updated key. Keep in mind that there are limits on the characters you can use in the key and value fields.

**Important**  
Editing tags for a profiling group can impact access to that profiling group. Before you edit the name (key) or value of a tag for a profiling group, make sure to review any IAM policies that might use the key or value for a tag to control access to resources such as profiling groups.

## Edit a tag for a profiling group
<a name="how-to-tag-profiling-group-update-console"></a>

You can use the CodeGuru Profiler console to edit the tags associated with a profiling group. 

1. In **Profiling groups**, choose the name of the profiling group where you want to edit tags.

1. Choose **Actions**. Choose **Edit profiling group**.

1. Choose the **Tags** tab. To change the tag, enter a new name in the **Value**. You cannot change the key of a tag.

1. Do one of the following:
   + To change the value of a tag, enter a new value. If you want to change the value to nothing, delete the current value and leave the field blank.
   + If you want to change the key of a tag, you can remove a tag and add a new one with the updated key name. Find the tag you want to remove, then choose **Remove**. Choose **Add a new tag**. In **Key**, enter a name for the tag. You can add an optional value for the tag in **Value**.

1. When you have finished editing tags, choose **Save**.

# Remove a tag from a profiling group
<a name="how-to-tag-profiling-group-delete"></a>

You can remove one or more tags associated with a profiling group. You can also change the name of the key, which is equivalent to removing the current tag and adding a different one with the new name and the same value as the other key. Removing a tag does not delete the tag from other AWS resources that are associated with that tag.

**Important**  
Removing tags for a profiling group can impact access to that profiling group. Before you remove a tag from a profiling group, make sure to review any IAM policies that might use the key or value for a tag to control access to resources such as profiling groups.

## Remove a tag from a profiling group
<a name="how-to-tag-profiling-group-delete-console"></a>

You can use the CodeGuru Profiler console to remove the association between a tag and a profiling group. 

1. In **Profiling groups**, choose the name of the profiling group where you want to remove tags.

1. Choose **Actions**. Choose **Edit profiling group**.

1. Choose the **Tags** tab.

1. Find the tag you want to remove, and then choose **Remove**.

1. When you have finished removing tags, choose **Save**.