deleteIntentVersion method

Future<void> deleteIntentVersion({
  1. required String name,
  2. required String version,
})

Deletes a specific version of an intent. To delete all versions of a intent, use the DeleteIntent operation.

This operation requires permissions for the lex:DeleteIntentVersion 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.

Parameter version : The version of the intent to delete. You cannot delete the $LATEST version of the intent. To delete the $LATEST version, use the DeleteIntent operation.

Implementation

Future<void> deleteIntentVersion({
  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:
        '/intents/${Uri.encodeComponent(name)}/versions/${Uri.encodeComponent(version)}',
    exceptionFnMap: _exceptionFns,
  );
}