IAM.Client.
untag_user
(**kwargs)¶Removes the specified tags from the user. For more information about tagging, see Tagging IAM resources in the IAM User Guide .
See also: AWS API Documentation
Request Syntax
response = client.untag_user(
UserName='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The name of the IAM user from which you want to remove tags.
This parameter allows (through its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
[REQUIRED]
A list of key names as a simple array of strings. The tags with matching keys are removed from the specified user.
None
Exceptions
IAM.Client.exceptions.NoSuchEntityException
IAM.Client.exceptions.ConcurrentModificationException
IAM.Client.exceptions.ServiceFailureException
Examples
The following example shows how to remove tags that are attached to a user named 'anika'.
response = client.untag_user(
TagKeys=[
'Dept',
],
UserName='anika',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}