getSlotType method

Future<GetSlotTypeResponse> getSlotType({
  1. required String name,
  2. required String version,
})

Returns information about a specific version of a slot type. In addition to specifying the slot type name, you must specify the slot type version.

This operation requires permissions for the lex:GetSlotType action.

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

Parameter name : The name of the slot type. The name is case sensitive.

Parameter version : The version of the slot type.

Implementation

Future<GetSlotTypeResponse> getSlotType({
  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:
        '/slottypes/${Uri.encodeComponent(name)}/versions/${Uri.encodeComponent(version)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetSlotTypeResponse.fromJson(response);
}