IAM / Client / remove_user_from_group
remove_user_from_group#
- IAM.Client.remove_user_from_group(**kwargs)#
Removes the specified user from the specified group.
See also: AWS API Documentation
Request Syntax
response = client.remove_user_from_group( GroupName='string', UserName='string' )
- Parameters:
GroupName (string) –
[REQUIRED]
The name of the group to update.
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: _+=,.@-
UserName (string) –
[REQUIRED]
The name of the user to remove.
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: _+=,.@-
- Returns:
None
Exceptions
IAM.Client.exceptions.NoSuchEntityException
IAM.Client.exceptions.LimitExceededException
IAM.Client.exceptions.ServiceFailureException
Examples
The following command removes the user named Bob from the IAM group named Admins.
response = client.remove_user_from_group( GroupName='Admins', UserName='Bob', ) print(response)
Expected Output:
{ 'ResponseMetadata': { '...': '...', }, }