tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.mediapackage_vod.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
tags | object | A collection of tags associated with 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 | Returns a list of the tags assigned to the specified resource. | |
untag_resource | update | resource-arn, tagKeys, region | Removes tags from the specified resource. You can specify one or more tags to remove. | |
tag_resource | update | resource-arn, region | Adds tags to the specified resource. You can specify one or more tags to add. |
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 the resource. You can get this from the response to any request to the resource. |
tagKeys | array | A comma-separated list of the tag keys to remove from the resource. |
SELECT examples
- list_tags_for_resource
Returns a list of the tags assigned to the specified resource.
SELECT
tags
FROM aws.mediapackage_vod.tags
WHERE `resource-arn` = '{{ resource-arn }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- untag_resource
- tag_resource
Removes tags from the specified resource. You can specify one or more tags to remove.
UPDATE aws.mediapackage_vod.tags
SET
-- No updatable properties
WHERE
`resource-arn` = '{{ resource-arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;
Adds tags to the specified resource. You can specify one or more tags to add.
UPDATE aws.mediapackage_vod.tags
SET
Tags = '{{ Tags }}'
WHERE
`resource-arn` = '{{ resource-arn }}' --required
AND region = '{{ region }}' --required;