tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.lightsail.tags |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
tag_resource | update | region, resourceName, tags | Adds one or more tags to the specified Amazon Lightsail resource. Each resource can have a maximum of 50 tags. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see the Amazon Lightsail Developer Guide. The tag resource operation supports tag-based access control via request tags and resource tags applied to the resource identified by resource name. For more information, see the Amazon Lightsail Developer Guide. | |
untag_resource | update | region, resourceName, tagKeys | Deletes the specified set of tag keys and their values from the specified Amazon Lightsail resource. The untag resource operation supports tag-based access control via request tags and resource tags applied to the resource identified by resource name. For more information, see the Amazon Lightsail Developer Guide. |
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) |
UPDATE examples
- tag_resource
- untag_resource
Adds one or more tags to the specified Amazon Lightsail resource. Each resource can have a maximum of 50 tags. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see the Amazon Lightsail Developer Guide. The tag resource operation supports tag-based access control via request tags and resource tags applied to the resource identified by resource name. For more information, see the Amazon Lightsail Developer Guide.
UPDATE aws.lightsail.tags
SET
resourceName = '{{ resourceName }}',
resourceArn = '{{ resourceArn }}',
tags = '{{ tags }}'
WHERE
region = '{{ region }}' --required
AND resourceName = '{{ resourceName }}' --required
AND tags = '{{ tags }}' --required
RETURNING
operations;
Deletes the specified set of tag keys and their values from the specified Amazon Lightsail resource. The untag resource operation supports tag-based access control via request tags and resource tags applied to the resource identified by resource name. For more information, see the Amazon Lightsail Developer Guide.
UPDATE aws.lightsail.tags
SET
resourceName = '{{ resourceName }}',
resourceArn = '{{ resourceArn }}',
tagKeys = '{{ tagKeys }}'
WHERE
region = '{{ region }}' --required
AND resourceName = '{{ resourceName }}' --required
AND tagKeys = '{{ tagKeys }}' --required
RETURNING
operations;