updateBot method

Future<UpdateBotResponse> updateBot({
  1. required String accountId,
  2. required String botId,
  3. bool? disabled,
})

Updates the status of the specified bot, such as starting or stopping the bot from running in your Amazon Chime Enterprise account.

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

Parameter accountId : The Amazon Chime account ID.

Parameter botId : The bot ID.

Parameter disabled : When true, stops the specified bot from running in your account.

Implementation

Future<UpdateBotResponse> updateBot({
  required String accountId,
  required String botId,
  bool? disabled,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  ArgumentError.checkNotNull(botId, 'botId');
  final $payload = <String, dynamic>{
    if (disabled != null) 'Disabled': disabled,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(accountId)}/bots/${Uri.encodeComponent(botId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateBotResponse.fromJson(response);
}