tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.directconnect.tags |
Fields
The following fields are returned by SELECT queries:
- describe_tags
| Name | Datatype | Description |
|---|---|---|
resource_tags | array | Information about the tags. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_tags | select | region | Describes the tags associated with the specified Direct Connect resources. | |
tag_resource | update | region, resourceArn, tags | Adds the specified tags to the specified Direct Connect resource. Each resource can have a maximum of 50 tags. Each tag consists of a key and an optional value. If a tag with the same key is already associated with the resource, this action updates its value. | |
untag_resource | update | region, resourceArn, tagKeys | Removes one or more tags from the specified Direct Connect 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_tags
Describes the tags associated with the specified Direct Connect resources.
SELECT
resource_tags
FROM aws.directconnect.tags
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- tag_resource
- untag_resource
Adds the specified tags to the specified Direct Connect resource. Each resource can have a maximum of 50 tags. Each tag consists of a key and an optional value. If a tag with the same key is already associated with the resource, this action updates its value.
UPDATE aws.directconnect.tags
SET
resourceArn = '{{ resourceArn }}',
tags = '{{ tags }}'
WHERE
region = '{{ region }}' --required
AND resourceArn = '{{ resourceArn }}' --required
AND tags = '{{ tags }}' --required;
Removes one or more tags from the specified Direct Connect resource.
UPDATE aws.directconnect.tags
SET
resourceArn = '{{ resourceArn }}',
tagKeys = '{{ tagKeys }}'
WHERE
region = '{{ region }}' --required
AND resourceArn = '{{ resourceArn }}' --required
AND tagKeys = '{{ tagKeys }}' --required;