tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.internetmonitor.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
tags | object | Tags for a resource. |
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 | Lists the tags for a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor. | |
untag_resource | update | resource_arn, tagKeys, region | Removes a tag from a resource. | |
tag_resource | update | resource_arn, region | Adds a tag to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor. You can add a maximum of 50 tags in Internet Monitor. A minimum of one tag is required for this call. It returns an error if you use the TagResource request with 0 tags. |
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 Amazon Resource Name (ARN) for a tag that you add to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor. |
tagKeys | array | Tag keys that you remove from a resource. |
SELECT examples
- list_tags_for_resource
Lists the tags for a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor.
SELECT
tags
FROM aws.internetmonitor.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- untag_resource
- tag_resource
Removes a tag from a resource.
UPDATE aws.internetmonitor.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;
Adds a tag to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor. You can add a maximum of 50 tags in Internet Monitor. A minimum of one tag is required for this call. It returns an error if you use the TagResource request with 0 tags.
UPDATE aws.internetmonitor.tags
SET
Tags = '{{ Tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required;