deleteSlotType method

Future<void> deleteSlotType({
  1. required String name,
})

Deletes all versions of the slot type, including the $LATEST version. To delete a specific version of the slot type, use the DeleteSlotTypeVersion operation.

You can delete a version of a slot type only if it is not referenced. To delete a slot type that is referred to in one or more intents, you must remove those references first. This operation requires permission for the lex:DeleteSlotType action.

May throw NotFoundException. May throw ConflictException. May throw LimitExceededException. May throw InternalFailureException. May throw BadRequestException. May throw ResourceInUseException.

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

Implementation

Future<void> deleteSlotType({
  required String name,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    100,
    isRequired: true,
  );
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/slottypes/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
}