- Newest
- Most votes
- Most comments
Could you uses aliases or some other logic? ListDashboards
will retrieve all dashboards and doesn't support filtering.
An important note about namespaces:
QuickSight assets and resources, including datasets, data sources, dashboards, analyses, and so on, exist outside of any namespace. They are visible only to users who have resource permissions granted to them.
So you'll have to use some logic either from DescribeUser
and cross-reference the namespace.
Use the DescribeDashboardPermissions API call to retrieve the permissions From that you will need to simulate the same logic that quicksight uses to determine if the current user would have permissions. This may be quite difficult to do depending on how you are managing permissions.
Alternatively, you could make use of shared folders. There is recently an addition to the API that supports creation and query of shared folders. Included is an api to list the contents of shared folders.
Alternatively, using the role that the user in question would use, one by one issue a "DescribeDashboard" request and use the result status (succcess or error) to determine if the user has read permissions.
Did you look into SearchDashboards API? If you pass a user filter (Name = "QUICKSIGHT_USER"
), the API returns the list of dashboards that the user has permissions to view.
As an alternative, you can use AWS resource tagging feature by tagging the dashboards with namespace name using TagResource API, and calling GetResources API to get the resources for required namespace. Tagging will have to be managed separately from dashboard permissions though.
As a side note - Dashboards are namespace-agnostic resources, but can be shared with any namespace (i.e. all users in specific namespace), or specific users from any namespace.