deleteSlotTypeVersion method
Deletes a specific version of a slot type. To delete all versions of a slot type, use the DeleteSlotType operation.
This operation requires permissions for the
lex:DeleteSlotTypeVersion
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.
Parameter version
:
The version of the slot type to delete. You cannot delete the
$LATEST
version of the slot type. To delete the
$LATEST
version, use the DeleteSlotType operation.
Implementation
Future<void> deleteSlotTypeVersion({
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,
);
await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/slottypes/${Uri.encodeComponent(name)}/version/${Uri.encodeComponent(version)}',
exceptionFnMap: _exceptionFns,
);
}