Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.detective.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectThe tag values that are assigned to the behavior graph. The request returns up to 50 tag values.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionReturns the tag values that are assigned to a behavior graph.
untag_resourceupdateresource_arn, tagKeys, regionRemoves tags from a behavior graph.
tag_resourceupdateresource_arn, regionApplies tag values to a behavior graph.

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 behavior graph to assign the tags to.
tagKeysarrayThe tag keys of the tags to remove from the behavior graph. You can remove up to 50 tags at a time.

SELECT examples

Returns the tag values that are assigned to a behavior graph.

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

UPDATE examples

Removes tags from a behavior graph.

UPDATE aws.detective.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;