---
title: "POST /#X-Amz-Target=AmazonAthena.TagResource"
method: POST
path: "/#X-Amz-Target=AmazonAthena.TagResource"
---

# POST /#X-Amz-Target=AmazonAthena.TagResource

`POST /#X-Amz-Target=AmazonAthena.TagResource`

Adds one or more tags to an Athena resource. A tag is a label that you assign to a resource. In Athena, a resource can be a workgroup or data catalog. Each tag consists of a key and an optional value, both of which you define. For example, you can use tags to categorize Athena workgroups or data catalogs by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to search and filter workgroups or data catalogs in your account. For best practices, see <a href="https://docs.aws.amazon.com/whitepapers/latest/tagging-best-practices/tagging-best-practices.html">Tagging Best Practices</a>. Tag keys can be from 1 to 128 UTF-8 Unicode characters, and tag values can be from 0 to 256 UTF-8 Unicode characters. Tags can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you specify more than one tag, separate them by commas.

## Headers

- `X-Amz-Target` 'AmazonAthena.TagResource', required

## Request body

- TagResourceInput
  - `ResourceARN` string, required — Specifies the ARN of the Athena resource (workgroup or data catalog) to which tags are to be added.
  - `Tags` Tag[], required — A collection of one or more tags, separated by commas, to be added to an Athena workgroup or data catalog resource.
    - `Key` string — A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
    - `Value` string — A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.

## Response `200`

Success

- TagResourceOutput

## Other responses

- `480` — InternalServerException
- `481` — InvalidRequestException
- `482` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/athena.md) · [All operations](https://skmtc.net/aws/apis/athena/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/athena/versions/0aec8c61283d/schema)
