createBot method

Future<CreateBotResponse> createBot({
  1. required String accountId,
  2. required String displayName,
  3. String? domain,
})

Creates a bot for an Amazon Chime Enterprise account.

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

Parameter accountId : The Amazon Chime account ID.

Parameter displayName : The bot display name.

Parameter domain : The domain of the Amazon Chime Enterprise account.

Implementation

Future<CreateBotResponse> createBot({
  required String accountId,
  required String displayName,
  String? domain,
}) async {
  final $payload = <String, dynamic>{
    'DisplayName': displayName,
    if (domain != null) 'Domain': domain,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/accounts/${Uri.encodeComponent(accountId)}/bots',
    exceptionFnMap: _exceptionFns,
  );
  return CreateBotResponse.fromJson(response);
}