How to pull a PDF from a dashboard via the SDK

Hi, All
I want to leverage the quickSight SDK to extract a PDF of a dashboard.
I have confirmed that I can get the PDF using start-dashboard-snapshot-job, but when I try the following, I get a log saying that I need to upgrade my account’s plan.

As far as I know, unless you want to extract the entire dashboard as a PDF, you shouldn’t need to upgrade your plan.

If my understanding is correct, I would like to know what needs to be fixed in the following CLI.
If I’m wrong, it would be great if you could tell me that I’m wrong.

export AWS_ACCOUNT_ID="xxxx"
export DASHBOARD_ID="xxxx"
export SNAPSHOT_JOB_ID="xxxx"
export SHEET_ID="xxxx"

aws quicksight start-dashboard-snapshot-job \
    --aws-account-id "$AWS_ACCOUNT_ID" \
    --dashboard-id "$DASHBOARD_ID" \
    --snapshot-job-id "$SNAPSHOT_JOB_ID" \
    --user-configuration '{"AnonymousUsers": [{}]}' \
    --snapshot-configuration '{
        "FileGroups": [
            {
                "Files": [
                    {
                        "FormatType": "PDF",
                        "SheetSelections": [
                            {
                                "SheetId": "$SHEET_ID",
                                "SelectionScope": "ALL_VISUALS"
                            }
                        ]
                    }
                ]
            }
        ]
    }'


> An error occurred (UnsupportedPricingPlanException) when calling the StartDashboardSnapshotJob operation: This API action is supported only when the account has an active paginated reports add-on plan.

@wvray the start-dashboard-snapshot-job allows you to extract a pixel-perfect report ( Amazon QuickSight Pixel-perfect Reports - Amazon Web Services ) .

  • 1 Paginated PDF
  • 1 Excel workbook that includes up to 5 table or pivot table visuals
  • 5 CSVs from table or pivot table visuals

It does not support generation of a PDF for a dashboard.

Kind regards,
Koushik

Hi @wvray ,
Marking Koushik’s response as solution.
Also, will add on that the pixel perfect report needs a capacity pack subscription. The error message you received is referencing this.

Regards,
Arun Santhosh
Pr QuickSight SA