deleteUser method
For Valkey engine version 7.2 onwards and Redis OSS 6.0 onwards: Deletes a user. The user will be removed from all user groups and in turn removed from all replication groups. For more information, see Using Role Based Access Control (RBAC).
May throw DefaultUserAssociatedToUserGroupFault.
May throw InvalidParameterValueException.
May throw InvalidUserStateFault.
May throw ServiceLinkedRoleNotFoundFault.
May throw UserNotFoundFault.
Parameter userId :
The ID of the user.
Implementation
Future<User> deleteUser({
required String userId,
}) async {
final $request = <String, String>{
'UserId': userId,
};
final $result = await _protocol.send(
$request,
action: 'DeleteUser',
version: '2015-02-02',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DeleteUserResult',
);
return User.fromXml($result);
}