How do I use the AWS SDK (JavaScript) to get the QuickSight dashboard descriptions?

0

Using the AWS SDK for JavaScript in a Lambda function, I was able to get a list of QuickSight dashboards using the ListDashboards command.

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/quicksight/command/ListDashboardsCommand/

But the output doesn't have a "Description" field of the dashboards so I can display the dashboard descriptions on a web portal to show all users to say "here are the current dashboards we have and here is the request access link if you don't have access to them."

  1. Is there a QuickSight dashboard description field available in the SDK?
  2. If not, what are the options? I see 2 options: (1) tag a resource (by DashboardId) with a key of "Description" and value of something like "here is my description", and (2) parse the contents of a dashboard for the description, e.g. "Description: [your deescription here]" and extract it.

Thank you! Martin

Martin
已提问 1 个月前122 查看次数
2 回答
0
已接受的回答
profile picture
专家
已回答 1 个月前
profile picture
专家
已审核 1 个月前
0

Thanks Antonio for the links.

I did a DescribeDashboard for a given AWS account ID and dashboard ID and this is the structure returned:

    "Status": 200,
    "Dashboard": {
        "DashboardId": ...,
        "Arn": ...,
        "Name": ...,
        "Version": {
            "CreatedTime": ...,
            "Errors": [],
            "VersionNumber": 15,
            "Status": "CREATION_SUCCESSFUL",
            "SourceEntityArn": ...,
            "DataSetArns": [
                ...
                ...
            ],
            "ThemeArn": "arn:aws:quicksight::aws:theme/MIDNIGHT",
            "Sheets": [
                {
                    "SheetId": ...,
                    "Name": "Overview"
                },
                {
                    "SheetId": ...,
                    "Name": "Email Performance"
                }
            ]
        },
        "CreatedTime": ...,
        "LastPublishedTime": ...,
        "LastUpdatedTime": ...,
        "LinkEntities": [
            ...
        ]
    },
    "RequestId": ...
}

I noticed that there is a "Description" field inside the Version block, but it's missing in the output above.

I've been trying to get the description of the dashboard, and I've a feeling it's not possible to set the description in the QuickSight console or the AWS console when I publish a dashboard, so I'm guessing I would have to do it via the CLI or the SDK.

Do you think that for the SDK I could use the UpdateDashboardCommand to set the dashboard's description so I could retrieve it from the DescribeDashboard?

Martin
已回答 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则