---
title: "POST /tagresource"
method: POST
path: "/tagresource"
---

# POST /tagresource

`POST /tagresource`

Adds the specified tag keys and values to a resource share or managed permission. If you choose a resource share, the tags are attached to only the resource share, not to the resources that are in the resource share.

The tags on a managed permission are the same for all versions of the managed permission.

## Request body

- object
  - `resourceShareArn` string — Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource share that you want to add tags to. You must specify <i>either</i> <code>resourceShareArn</code>, or <code>resourceArn</code>, but not both.
  - `tags` Tag[], required — A list of one or more tag key and value pairs. The tag key must be present and not be an empty string. The tag value must be present but can be an empty string.
    - `key` string — The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
    - `value` string — The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
  - `resourceArn` string — Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the managed permission that you want to add tags to. You must specify <i>either</i> <code>resourceArn</code>, or <code>resourceShareArn</code>, but not both.

## Response `200`

Success

- TagResourceResponse

## Other responses

- `480` — InvalidParameterException
- `481` — MalformedArnException
- `482` — UnknownResourceException
- `483` — TagLimitExceededException
- `484` — ResourceArnNotFoundException
- `485` — TagPolicyViolationException
- `486` — ServerInternalException
- `487` — ServiceUnavailableException

---

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