Skip to main content

tags

Creates, updates, deletes, gets or lists a tags resource.

Overview​

Nametags
TypeResource
Idaws.grafana.tags

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectThe list of tags that are associated with the resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionThe ListTagsForResource operation returns the tags that are associated with the Amazon Managed Service for Grafana resource specified by the resourceArn. Currently, the only resource that can be tagged is a workspace.
tag_resourceupdateresource_arn, region, tagsThe TagResource operation associates tags with an Amazon Managed Grafana resource. Currently, the only resource that can be tagged is workspaces. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.
untag_resourceupdateresource_arn, tagKeys, regionThe UntagResource operation removes the association of the tag with the Amazon Managed Grafana resource.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
resource_arnstringThe ARN of the resource the tag association is removed from.
tagKeysarrayThe key values of the tag to be removed from the resource.

SELECT examples​

The ListTagsForResource operation returns the tags that are associated with the Amazon Managed Service for Grafana resource specified by the resourceArn. Currently, the only resource that can be tagged is a workspace.

SELECT
tags
FROM aws.grafana.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples​

The TagResource operation associates tags with an Amazon Managed Grafana resource. Currently, the only resource that can be tagged is workspaces. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.

UPDATE aws.grafana.tags
SET
tags = '{{ tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
AND tags = '{{ tags }}' --required;