untagUser method
Removes the specified tags from the user. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
May throw ConcurrentModificationException.
May throw NoSuchEntityException.
May throw ServiceFailureException.
Parameter tagKeys :
A list of key names as a simple array of strings. The tags with matching
keys are removed from the specified user.
Parameter userName :
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: _+=,.@-
Implementation
Future<void> untagUser({
required List<String> tagKeys,
required String userName,
}) async {
final $request = <String, String>{
if (tagKeys.isEmpty)
'TagKeys': ''
else
for (var i1 = 0; i1 < tagKeys.length; i1++)
'TagKeys.member.${i1 + 1}': tagKeys[i1],
'UserName': userName,
};
await _protocol.send(
$request,
action: 'UntagUser',
version: '2010-05-08',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
);
}