ListTagsForResource - Amazon CloudWatch Observability Access Manager

ListTagsForResource

Displays the tags associated with a resource. Both sinks and links support tagging.

Request Syntax

GET /tags/ResourceArn HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

ResourceArn

The ARN of the resource that you want to view tags for.

The ARN format of a sink is arn:aws:oam:Region:account-id:sink/sink-id

The ARN format of a link is arn:aws:oam:Region:account-id:link/link-id

For more information about ARN format, see CloudWatch Logs resources and operations.

Important

Unlike tagging permissions in other AWS services, to retrieve the list of tags for links or sinks you must have the oam:RequestTag permission. The aws:ReguestTag permission does not allow you to tag and untag links and sinks.

Pattern: ^arn:(\w|-)+:oam:.+:.+:.+

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Tags": { "string" : "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Tags

The list of tags associated with the requested resource.>

Type: String to string map

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceNotFoundException

The request references a resource that does not exist.

HTTP Status Code: 404

ValidationException

The value of a parameter in the request caused an error.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: