deleteGroup method

Future<void> deleteGroup({
  1. required String groupName,
})

Deletes the specified IAM group. The group must not contain any users or have any attached policies.

May throw NoSuchEntityException. May throw DeleteConflictException. May throw LimitExceededException. May throw ServiceFailureException.

Parameter groupName : The name of the IAM group to delete.

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> deleteGroup({
  required String groupName,
}) async {
  ArgumentError.checkNotNull(groupName, 'groupName');
  _s.validateStringLength(
    'groupName',
    groupName,
    1,
    128,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['GroupName'] = groupName;
  await _protocol.send(
    $request,
    action: 'DeleteGroup',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteGroupRequest'],
    shapes: shapes,
  );
}