Skip to main content

tags

Creates, updates, deletes, gets or lists a tags resource.

Overview

Nametags
TypeResource
Idaws.efs.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
keystringThe 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>)
valuestringThe value of the tag key. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_tagsselectfile_system_id, regionMaxItems, MarkerDEPRECATED - 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_resourceselectresource_id, regionMaxResults, NextTokenLists 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_tagsinsertfile_system_id, regionDEPRECATED - 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_resourceupdateresource_id, regionCreates 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_tagsdeletefile_system_id, regionDEPRECATED - 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_resourceexecresource_id, regiontagKeysRemoves 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.

NameDatatypeDescription
file_system_idstringThe ID of the file system whose tags you want to delete (String).
regionstringAWS region (default: us-east-1)
resource_idstringSpecifies the EFS resource that you want to remove tags from.
Markerstring(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.
MaxItemsinteger(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.
MaxResultsinteger(Optional) Specifies the maximum number of tag objects to return in the response. The default value is 100.
NextTokenstring(Optional) You can use NextToken in a subsequent request to fetch the next page of access point descriptions if the response payload was paginated.
tagKeysarrayThe keys of the key-value tag pairs that you want to remove from the specified EFS resource.

SELECT examples

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 }}'
;

INSERT examples

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 }}'
;

UPDATE examples

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

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

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 }}'
;