Create a data refresh schedule using api

I have tried creating a data refresh schedule using Boto 3 python API but it gives an error stating ‘QuickSight’ object has no attribute createrefreshschedule.

Hi @dineshsundararajan - Welcome to AWS QuickSight community and thanks for posting the question. Can you please share the screenshot of your command so that we can validate and guide you. Please see the documentation for create refresh schedule below - create_refresh_schedule - Boto3 1.26.149 documentation.

Also please verify your boto3 version.

Regards - Sanjeeb

1 Like

Hi @dineshsundararajan - What is the python version you are using. Is it possible to execute this from cloudshell. And also can you check whether you are able to run any aws quicksight command or not.

The command looks ok to me, only reason may be the python version.

Hi @Koushik_Muthanna - Kindly give your advise on this.

Regards - Sanjeeb

1 Like

Hi @dineshsundararajan ,

Update botocore and boto3.
pip install botocore --upgrade
pip install boto3 --upgrade

Kind regards,
Koushik

2 Likes

Thank you @Koushik_Muthanna . I am looking for this commands… It is a boto3 update issue.

Hi @dineshsundararajan - Can you please do this and try.

Regards - Sanjeeb

1 Like

I tried it in the aws cloud shell cli command but still have the same issue.

I have installed and updated still have same issue I have similar issue for describeanalysisdefinition too but its working in AWS cloudshell CLI but i run the same command in python it gives the same error too

Hi @dineshsundararajan - To perform detail analysis, can you please raise a ticket to AWS customer support so that with screen share issue can be analyzed. To raise the ticket, please follow the link - Creating support cases and case management - AWS Support

Regards - Sanjeeb

1 Like

Hi @dineshsundararajan - Can you please try the below command in AWS CLI. I tested from my end and it is working fine.

Change your data set id and account id and the refresh date should be a future date.

aws quicksight \
    create-refresh-schedule \
    --data-set-id "c2c7cda1-8284-489a-933d-5xxxxx6b4b" \
    --aws-account-id 4xxxxxxx \
    --schedule '{"ScheduleId":"Daily-Schedule",
      "ScheduleFrequency":{"Interval":"DAILY","Timezone":"America/Chicago","TimeOfTheDay":"8:00" },
      "StartAfterDateTime":"2023-06-11T00:00:00",
      "RefreshType":"FULL_REFRESH"}'

Regards - Sanjeeb

1 Like

@dineshsundararajan - The create_refresh_schedule api function was added to boto3 in version 1.26.109. So, you will be able to make the call once you update your boto version as suggested by Koushik. Please cross check your boto3 version by printing boto3.__version__ and upgrade as needed. Marking Koushik’s reply as solution to this issue. Please do let us know if you face further issues with this.

Regards,
Arun

2 Likes