getIntent method

Future<GetIntentResponse> getIntent({
  1. required String name,
  2. required String version,
})

Returns information about an intent. In addition to the intent name, you must specify the intent version.

This operation requires permissions to perform the lex:GetIntent action.

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

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

Parameter version : The version of the intent.

Implementation

Future<GetIntentResponse> getIntent({
  required String name,
  required String version,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/intents/${Uri.encodeComponent(name)}/versions/${Uri.encodeComponent(version)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetIntentResponse.fromJson(response);
}