EFS / Client / create_tags
create_tags#
- EFS.Client.create_tags(**kwargs)#
Note
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.Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.create_tags( FileSystemId='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
FileSystemId (string) –
[REQUIRED]
The ID of the file system whose tags you want to modify (String). This operation modifies the tags only, not the file system.
Tags (list) –
[REQUIRED]
An array of
Tag
objects to add. EachTag
object is a key-value pair.(dict) –
A tag is a key-value pair. Allowed characters are letters, white space, and numbers that can be represented in UTF-8, and the following characters: `` + - = . _ : /``.
Key (string) – [REQUIRED]
The tag key (String). The key can’t start with
aws:
.Value (string) – [REQUIRED]
The value of the tag key.
- Returns:
None
Exceptions
EFS.Client.exceptions.BadRequest
EFS.Client.exceptions.InternalServerError
EFS.Client.exceptions.FileSystemNotFound
Examples
This operation creates a new tag for an EFS file system.
response = client.create_tags( FileSystemId='fs-01234567', Tags=[ { 'Key': 'Name', 'Value': 'MyFileSystem', }, ], ) print(response)
Expected Output:
{ 'ResponseMetadata': { '...': '...', }, }