getBot method

Future<GetBotResponse> getBot({
  1. required String name,
  2. required String versionOrAlias,
})

Returns metadata information for a specific bot. You must provide the bot name and the bot version or alias.

This operation requires permissions for the lex:GetBot action.

May throw NotFoundException. May throw LimitExceededException. May throw InternalFailureException. May throw BadRequestException.

Parameter name : The name of the bot. The name is case sensitive.

Parameter versionOrAlias : The version or alias of the bot.

Implementation

Future<GetBotResponse> getBot({
  required String name,
  required String versionOrAlias,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    2,
    50,
    isRequired: true,
  );
  ArgumentError.checkNotNull(versionOrAlias, 'versionOrAlias');
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/bots/${Uri.encodeComponent(name)}/versions/${Uri.encodeComponent(versionOrAlias)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetBotResponse.fromJson(response);
}