batchSuspendUser method

Future<BatchSuspendUserResponse> batchSuspendUser({
  1. required String accountId,
  2. required List<String> userIdList,
})

Suspends up to 50 users from a Team or EnterpriseLWA Amazon Chime account. For more information about different account types, see Managing Your Amazon Chime Accounts in the Amazon Chime Administration Guide.

Users suspended from a Team account are disassociated from the account, but they can continue to use Amazon Chime as free users. To remove the suspension from suspended Team account users, invite them to the Team account again. You can use the InviteUsers action to do so.

Users suspended from an EnterpriseLWA account are immediately signed out of Amazon Chime and can no longer sign in. To remove the suspension from suspended EnterpriseLWA account users, use the BatchUnsuspendUser action.

To sign out users without suspending them, use the LogoutUser action.

May throw UnauthorizedClientException. May throw NotFoundException. May throw ForbiddenException. May throw BadRequestException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter accountId : The Amazon Chime account ID.

Parameter userIdList : The request containing the user IDs to suspend.

Implementation

Future<BatchSuspendUserResponse> batchSuspendUser({
  required String accountId,
  required List<String> userIdList,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  ArgumentError.checkNotNull(userIdList, 'userIdList');
  final $payload = <String, dynamic>{
    'UserIdList': userIdList,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(accountId)}/users?operation=suspend',
    exceptionFnMap: _exceptionFns,
  );
  return BatchSuspendUserResponse.fromJson(response);
}