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 BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceFailureException. May throw ServiceUnavailableException. May throw ThrottledClientException. May throw UnauthorizedClientException.

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 {
  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);
}