removeUserFromGroup method
Removes the specified user from the specified group.
May throw NoSuchEntityException. May throw LimitExceededException. May throw ServiceFailureException.
Parameter groupName
:
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: _+=,.@-
Parameter userName
:
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: _+=,.@-
Implementation
Future<void> removeUserFromGroup({
required String groupName,
required String userName,
}) async {
ArgumentError.checkNotNull(groupName, 'groupName');
_s.validateStringLength(
'groupName',
groupName,
1,
128,
isRequired: true,
);
ArgumentError.checkNotNull(userName, 'userName');
_s.validateStringLength(
'userName',
userName,
1,
128,
isRequired: true,
);
final $request = <String, dynamic>{};
$request['GroupName'] = groupName;
$request['UserName'] = userName;
await _protocol.send(
$request,
action: 'RemoveUserFromGroup',
version: '2010-05-08',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['RemoveUserFromGroupRequest'],
shapes: shapes,
);
}