deleteIntent method
Deletes all versions of the intent, including the $LATEST
version. To delete a specific version of the intent, use the
DeleteIntentVersion operation.
You can delete a version of an intent only if it is not referenced. To
delete an intent that is referred to in one or more bots (see
how-it-works), you must remove those references first.
This operation requires permission for the lex:DeleteIntent
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 intent. The name is case sensitive.
Implementation
Future<void> deleteIntent({
required String name,
}) async {
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
100,
isRequired: true,
);
await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/intents/${Uri.encodeComponent(name)}',
exceptionFnMap: _exceptionFns,
);
}