tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.discovery.tags |
Fields
The following fields are returned by SELECT queries:
- describe_tags
| Name | Datatype | Description |
|---|---|---|
configuration_id | string | The configuration ID for the item to tag. You can specify a list of keys and values. (pattern: <code>\S*</code>) |
configuration_type | string | A type of IT asset to tag. (SERVER, PROCESS, CONNECTION, APPLICATION) |
key | string | A type of tag on which to filter. For example, serverType. |
time_of_creation | string (date-time) | The time the configuration tag was created in Coordinated Universal Time (UTC). |
value | string | A value on which to filter. For example key = serverType and value = web server. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_tags | select | region | Retrieves a list of configuration items that have tags as specified by the key-value pairs, name and value, passed to the optional parameter filters. There are three valid tag filter names: tagKey tagValue configurationId Also, all configuration items associated with your user that have tags can be listed if you call DescribeTags as is without passing any parameters. | |
create_tags | insert | region, configurationIds, tags | Creates one or more tags for configuration items. Tags are metadata that help you categorize IT assets. This API accepts a list of multiple configuration items. Do not store sensitive information (like personal data) in tags. | |
delete_tags | delete | region | Deletes the association between configuration items and one or more tags. This API accepts a list of multiple configuration items. |
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) |
SELECT examples
- describe_tags
Retrieves a list of configuration items that have tags as specified by the key-value pairs, name and value, passed to the optional parameter filters. There are three valid tag filter names: tagKey tagValue configurationId Also, all configuration items associated with your user that have tags can be listed if you call DescribeTags as is without passing any parameters.
SELECT
configuration_id,
configuration_type,
key,
time_of_creation,
value
FROM aws.discovery.tags
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_tags
- Manifest
Creates one or more tags for configuration items. Tags are metadata that help you categorize IT assets. This API accepts a list of multiple configuration items. Do not store sensitive information (like personal data) in tags.
INSERT INTO aws.discovery.tags (
configurationIds,
tags,
region
)
SELECT
'{{ configurationIds }}' /* required */,
'{{ tags }}' /* required */,
'{{ region }}'
;
# Description fields are for documentation purposes
- name: tags
props:
- name: region
value: "{{ region }}"
description: Required parameter for the tags resource.
- name: configurationIds
value:
- "{{ configurationIds }}"
description: |
A list of configuration items that you want to tag.
- name: tags
description: |
Tags that you want to associate with one or more configuration items. Specify the tags that you want to create in a key-value format. For example: {"key": "serverType", "value": "webServer"}
value:
- key: "{{ key }}"
value: "{{ value }}"
DELETE examples
- delete_tags
Deletes the association between configuration items and one or more tags. This API accepts a list of multiple configuration items.
DELETE FROM aws.discovery.tags
WHERE region = '{{ region }}' --required
;