untagRole method

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

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

May throw NoSuchEntityException. May throw ConcurrentModificationException. May throw ServiceFailureException.

Parameter roleName : The name of the IAM role 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: _+=,.@-

Parameter tagKeys : A list of key names as a simple array of strings. The tags with matching keys are removed from the specified role.

Implementation

Future<void> untagRole({
  required String roleName,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(roleName, 'roleName');
  _s.validateStringLength(
    'roleName',
    roleName,
    1,
    64,
    isRequired: true,
  );
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final $request = <String, dynamic>{};
  $request['RoleName'] = roleName;
  $request['TagKeys'] = tagKeys;
  await _protocol.send(
    $request,
    action: 'UntagRole',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['UntagRoleRequest'],
    shapes: shapes,
  );
}