How to configure incremental refresh via code?

I would like to configure incremental refresh for a dataset without using the web interface. Preferrably via CloudFormation, but if not available, using the API directly.

How can I do so? There is no docs on doing this.

@donatoaz

please try the new API

You should be able to use incremental refresh.

If it works, please mark this as a solution.
Thanks for your contribution!

This does not work (ps: I had tried it befire), I get the error that I need to Configure Incremental Refresh

INFO Error occurred during refresh of hot_data : InvalidParameterValueException: Dataset with id: arn:aws:quicksight:us-east-1:823066333285:dataset/hot_data is not eligible for incremental refresh. Configure Incremental refresh correctly

My question is more specifically how can I “configure the incremental refresh correctly” without using the web interface.

From this answer here it seems there is no way to do the first time configuration through API.