tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.detective.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
tags | object | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_resource | select | resource_arn, region | Returns the tag values that are assigned to a behavior graph. | |
untag_resource | update | resource_arn, tagKeys, region | Removes tags from a behavior graph. | |
tag_resource | update | resource_arn, region | Applies 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
resource_arn | string | The ARN of the behavior graph to assign the tags to. |
tagKeys | array | The tag keys of the tags to remove from the behavior graph. You can remove up to 50 tags at a time. |
SELECT examples
- list_tags_for_resource
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
- untag_resource
- tag_resource
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;
Applies tag values to a behavior graph.
UPDATE aws.detective.tags
SET
Tags = '{{ Tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required;