:doc:`IAM <../../iam>` / Client / untag_role

**********
untag_role
**********



.. py:method:: IAM.Client.untag_role(**kwargs)

  

  Removes the specified tags from the role. For more information about tagging, see `Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagRole>`_  


  **Request Syntax**
  ::

    response = client.untag_role(
        RoleName='string',
        TagKeys=[
            'string',
        ]
    )
    
  :type RoleName: string
  :param RoleName: **[REQUIRED]** 

    The name of the IAM role from which you want to remove tags.

     

    This parameter accepts (through its `regex pattern <http://wikipedia.org/wiki/regex>`__) a string of characters that consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

    

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

    A list of key names as a simple array of strings. The tags with matching keys are removed from the specified role.

    

  
    - *(string) --* 

    

  
  :returns: None
  **Exceptions**
  
  *   :py:class:`IAM.Client.exceptions.NoSuchEntityException`

  
  *   :py:class:`IAM.Client.exceptions.ConcurrentModificationException`

  
  *   :py:class:`IAM.Client.exceptions.ServiceFailureException`

  

  **Examples**

  The following example shows how to remove a tag with the key 'Dept' from a role named 'taggedrole'.
  ::

    response = client.untag_role(
        RoleName='taggedrole',
        TagKeys=[
            'Dept',
        ],
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  