tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.efs.tags |
Fields
The following fields are returned by SELECT queries:
- describe_tags
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
key | string | The tag key (String). The key can't start with aws:. (pattern: <code>^(?![aA]{1}[wW]{1}[sS]{1}:)([\p{L}\p{Z}\p{N}_.:/=+-@]+)$</code>) |
value | string | The value of the tag key. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>) |
| Name | Datatype | Description |
|---|---|---|
next_token | string | Token used for pagination. (pattern: <code>.+</code>) |
tags | array | An array of the tags for the specified EFS resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_tags | select | file_system_id, region | MaxItems, Marker | DEPRECATED - The DescribeTags action is deprecated and not maintained. To view tags associated with EFS resources, use the ListTagsForResource API action. Returns the tags associated with a file system. The order of tags returned in the response of one DescribeTags call and the order of tags returned across the responses of a multiple-call iteration (when using pagination) is unspecified. This operation requires permissions for the elasticfilesystem:DescribeTags action. |
list_tags_for_resource | select | resource_id, region | MaxResults, NextToken | Lists all tags for a top-level EFS resource. You must provide the ID of the resource that you want to retrieve the tags for. This operation requires permissions for the elasticfilesystem:DescribeAccessPoints action. |
create_tags | insert | file_system_id, region | DEPRECATED - CreateTags is deprecated and not maintained. To create tags for EFS resources, use the API action. Creates or overwrites tags associated with a file system. Each tag is a key-value pair. If a tag key specified in the request already exists on the file system, this operation overwrites its value with the value provided in the request. If you add the Name tag to your file system, Amazon EFS returns it in the response to the DescribeFileSystems operation. This operation requires permission for the elasticfilesystem:CreateTags action. | |
tag_resource | update | resource_id, region | Creates a tag for an EFS resource. You can create tags for EFS file systems and access points using this API operation. This operation requires permissions for the elasticfilesystem:TagResource action. | |
delete_tags | delete | file_system_id, region | DEPRECATED - DeleteTags is deprecated and not maintained. To remove tags from EFS resources, use the API action. Deletes the specified tags from a file system. If the DeleteTags request includes a tag key that doesn't exist, Amazon EFS ignores it and doesn't cause an error. For more information about tags and related restrictions, see Tag restrictions in the Billing and Cost Management User Guide. This operation requires permissions for the elasticfilesystem:DeleteTags action. | |
untag_resource | exec | resource_id, region | tagKeys | Removes tags from an EFS resource. You can remove tags from EFS file systems and access points using this API operation. This operation requires permissions for the elasticfilesystem:UntagResource action. |
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 |
|---|---|---|
file_system_id | string | The ID of the file system whose tags you want to delete (String). |
region | string | AWS region (default: us-east-1) |
resource_id | string | Specifies the EFS resource that you want to remove tags from. |
Marker | string | (Optional) An opaque pagination token returned from a previous DescribeTags operation (String). If present, it specifies to continue the list from where the previous call left off. |
MaxItems | integer | (Optional) The maximum number of file system tags to return in the response. Currently, this number is automatically set to 100, and other values are ignored. The response is paginated at 100 per page if you have more than 100 tags. |
MaxResults | integer | (Optional) Specifies the maximum number of tag objects to return in the response. The default value is 100. |
NextToken | string | (Optional) You can use NextToken in a subsequent request to fetch the next page of access point descriptions if the response payload was paginated. |
tagKeys | array | The keys of the key-value tag pairs that you want to remove from the specified EFS resource. |
SELECT examples
- describe_tags
- list_tags_for_resource
DEPRECATED - The DescribeTags action is deprecated and not maintained. To view tags associated with EFS resources, use the ListTagsForResource API action. Returns the tags associated with a file system. The order of tags returned in the response of one DescribeTags call and the order of tags returned across the responses of a multiple-call iteration (when using pagination) is unspecified. This operation requires permissions for the elasticfilesystem:DescribeTags action.
SELECT
key,
value
FROM aws.efs.tags
WHERE file_system_id = '{{ file_system_id }}' -- required
AND region = '{{ region }}' -- required
AND MaxItems = '{{ MaxItems }}'
AND Marker = '{{ Marker }}'
;
Lists all tags for a top-level EFS resource. You must provide the ID of the resource that you want to retrieve the tags for. This operation requires permissions for the elasticfilesystem:DescribeAccessPoints action.
SELECT
next_token,
tags
FROM aws.efs.tags
WHERE resource_id = '{{ resource_id }}' -- required
AND region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_tags
- Manifest
DEPRECATED - CreateTags is deprecated and not maintained. To create tags for EFS resources, use the API action. Creates or overwrites tags associated with a file system. Each tag is a key-value pair. If a tag key specified in the request already exists on the file system, this operation overwrites its value with the value provided in the request. If you add the Name tag to your file system, Amazon EFS returns it in the response to the DescribeFileSystems operation. This operation requires permission for the elasticfilesystem:CreateTags action.
INSERT INTO aws.efs.tags (
Tags,
file_system_id,
region
)
SELECT
'{{ Tags }}',
'{{ file_system_id }}',
'{{ region }}'
;
# Description fields are for documentation purposes
- name: tags
props:
- name: file_system_id
value: "{{ file_system_id }}"
description: Required parameter for the tags resource.
- name: region
value: "{{ region }}"
description: Required parameter for the tags resource.
- name: Tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- tag_resource
Creates a tag for an EFS resource. You can create tags for EFS file systems and access points using this API operation. This operation requires permissions for the elasticfilesystem:TagResource action.
UPDATE aws.efs.tags
SET
Tags = '{{ Tags }}'
WHERE
resource_id = '{{ resource_id }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_tags
DEPRECATED - DeleteTags is deprecated and not maintained. To remove tags from EFS resources, use the API action. Deletes the specified tags from a file system. If the DeleteTags request includes a tag key that doesn't exist, Amazon EFS ignores it and doesn't cause an error. For more information about tags and related restrictions, see Tag restrictions in the Billing and Cost Management User Guide. This operation requires permissions for the elasticfilesystem:DeleteTags action.
DELETE FROM aws.efs.tags
WHERE file_system_id = '{{ file_system_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- untag_resource
Removes tags from an EFS resource. You can remove tags from EFS file systems and access points using this API operation. This operation requires permissions for the elasticfilesystem:UntagResource action.
EXEC aws.efs.tags.untag_resource
@resource_id='{{ resource_id }}' --required,
@region='{{ region }}' --required,
@tagKeys='{{ tagKeys }}'
;