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
feita há um mês114 visualizações
2 Respostas
0
Resposta aceita
profile picture
ESPECIALISTA
respondido há um mês
profile picture
ESPECIALISTA
avaliado há um mês
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
respondido há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas