tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.s3tables.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
tags | object | The user-defined tags that are applied to the resource. For more information, see Tagging for cost allocation or attribute-based access control (ABAC). |
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 all of the tags applied to a specified Amazon S3 Tables resource. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to resources. For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources. Permissions For tables and table buckets, you must have the s3tables:ListTagsForResource permission to use this operation. | |
tag_resource | update | resource_arn, region, tags | Applies one or more user-defined tags to an Amazon S3 Tables resource or updates existing tags. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to your resources. You can add up to 50 tags for each S3 resource. For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources. Permissions For tables and table buckets, you must have the s3tables:TagResource permission to use this operation. | |
untag_resource | update | resource_arn, tagKeys, region | Removes the specified user-defined tags from an Amazon S3 Tables resource. You can pass one or more tag keys. For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources. Permissions For tables and table buckets, you must have the s3tables:UntagResource permission to use this operation. |
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) of the Amazon S3 Tables resource that you're removing tags from. The tagged resource can be a table bucket or a table. For a list of all S3 resources that support tagging, see Managing tags for Amazon S3 resources. |
tagKeys | array | The array of tag keys that you're removing from the S3 Tables resource. For more information, see Tagging for cost allocation or attribute-based access control (ABAC). |
SELECT examples
- list_tags_for_resource
Lists all of the tags applied to a specified Amazon S3 Tables resource. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to resources. For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources. Permissions For tables and table buckets, you must have the s3tables:ListTagsForResource permission to use this operation.
SELECT
tags
FROM aws.s3tables.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- tag_resource
- untag_resource
Applies one or more user-defined tags to an Amazon S3 Tables resource or updates existing tags. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to your resources. You can add up to 50 tags for each S3 resource. For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources. Permissions For tables and table buckets, you must have the s3tables:TagResource permission to use this operation.
UPDATE aws.s3tables.tags
SET
tags = '{{ tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
AND tags = '{{ tags }}' --required;
Removes the specified user-defined tags from an Amazon S3 Tables resource. You can pass one or more tag keys. For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources. Permissions For tables and table buckets, you must have the s3tables:UntagResource permission to use this operation.
UPDATE aws.s3tables.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;