:doc:`EFS <../../efs>` / Client / create_tags

***********
create_tags
***********



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags>`_  


  **Request Syntax**
  ::

    response = client.create_tags(
        FileSystemId='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type FileSystemId: string
  :param FileSystemId: **[REQUIRED]** 

    The ID of the file system whose tags you want to modify (String). This operation modifies the tags only, not the file system.

    

  
  :type Tags: list
  :param Tags: **[REQUIRED]** 

    An array of ``Tag`` objects to add. Each ``Tag`` 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**
  
  *   :py:class:`EFS.Client.exceptions.BadRequest`

  
  *   :py:class:`EFS.Client.exceptions.InternalServerError`

  
  *   :py:class:`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': {
            '...': '...',
        },
    }

  