Displays the tags associated with a resource. Both sinks and links support tagging.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string'
)
[REQUIRED]
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.
Warning
Unlike tagging permissions in other Amazon Web Services 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.
{
'Tags': {
'string': 'string'
}
}
Response Structure
The list of tags associated with the requested resource.>
Exceptions
CloudWatchObservabilityAccessManager.Client.exceptions.ValidationException
CloudWatchObservabilityAccessManager.Client.exceptions.ResourceNotFoundException