Skip to main content

tags

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

Overview​

Nametags
TypeResource
Idaws.codeguruprofiler.tags

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectThe list of tags assigned to the specified resource. This is the list of tags returned in the response.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionReturns a list of the tags that are assigned to a specified resource.
tag_resourceupdateresource_arn, region, tagsUse to assign one or more tags to a resource.
untag_resourceupdateresource_arn, tagKeys, regionUse to remove one or more tags from a 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 Amazon Resource Name (ARN) of the resource that contains the tags to remove.
tagKeysarrayA list of tag keys. Existing tags of resources with keys in this list are removed from the specified resource.

SELECT examples​

Returns a list of the tags that are assigned to a specified resource.

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

UPDATE examples​

Use to assign one or more tags to a resource.

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