disableUser method

Future<DisableUserResponse> disableUser({
  1. required String userId,
  2. String? clientToken,
})

Denies access to the FinSpace web application and API for the specified user.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter userId : The unique identifier for the user that you want to deactivate.

Parameter clientToken : A token that ensures idempotency. This token expires in 10 minutes.

Implementation

Future<DisableUserResponse> disableUser({
  required String userId,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/user/${Uri.encodeComponent(userId)}/disable',
    exceptionFnMap: _exceptionFns,
  );
  return DisableUserResponse.fromJson(response);
}