untagUser method

Future<void> untagUser({
  1. required List<String> tagKeys,
  2. required String userName,
})

Removes the specified tags from the user. For more information about tagging, see Tagging IAM Identities in the IAM User Guide.

May throw NoSuchEntityException. May throw ConcurrentModificationException. 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 accepts (through its regex pattern) a string of characters that consist 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 {
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  ArgumentError.checkNotNull(userName, 'userName');
  _s.validateStringLength(
    'userName',
    userName,
    1,
    128,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['TagKeys'] = tagKeys;
  $request['UserName'] = userName;
  await _protocol.send(
    $request,
    action: 'UntagUser',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['UntagUserRequest'],
    shapes: shapes,
  );
}