Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.ssm_incidents.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectA list of tags for the response plan or incident.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionLists the tags that are attached to the specified response plan or incident.
tag_resourceupdateresource_arn, region, tagsAdds a tag to a response plan.
untag_resourceupdateresource_arn, tagKeys, regionRemoves a tag 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 response plan you're removing a tag from.
tagKeysarrayThe name of the tag to remove from the response plan.

SELECT examples

Lists the tags that are attached to the specified response plan or incident.

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

UPDATE examples

Adds a tag to a response plan.

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