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

************
tag_resource
************



.. py:method:: EFS.Client.tag_resource(**kwargs)

  

  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.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/TagResource>`_  


  **Request Syntax**
  ::

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

    The ID specifying the EFS resource that you want to create a tag for.

    

  
  :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`

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

  