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 NotFoundException. May throw LimitExceededException. May throw InternalFailureException. May throw BadRequestException.

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 {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(version, 'version');
  _s.validateStringLength(
    'version',
    version,
    1,
    64,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/intents/${Uri.encodeComponent(name)}/versions/${Uri.encodeComponent(version)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetIntentResponse.fromJson(response);
}