基本方法是在仪表板中“另存为”并另存为分析。然后更改“新”分析中的数据集并再次将其保存为仪表板。然后,您可以为要创建的每个仪表板重复该过程。
对于编程方式,请尝试以下方法:
aws quicksight create-dashboard --aws-account-id <Account ID> --dashboard-id <any ID> --name <any dashboard name> --source-entity file://createDashboard.json --region <region>
JSON 在哪里:
{
"SourceTemplate": {
"DataSetReferences": [
{
"DataSetPlaceholder": "placeholder", // Place holder you provided when creating the template.
"DataSetArn": "arn:aws:quicksight:us-east-2:<Account ID>:dataset/<Dataset ID>" // ARN of the data set
}
],
"Arn": "arn:aws:quicksight: ap-southeast-2:<Account A ID>:template/<Template ID>"
}
}
在创建仪表板后,使用它更新仪表板的权限:
aws quicksight update-dashboard-permissions --aws-account-id <Account ID> --dashboard-id <new Dashboard ID> --grant-permissions file://permission.json
permission.json 类似于以下内容(授予共同所有者对仪表板的访问权限):
[
{
"Principal": "arn:aws:quicksight:<region>:<Account ID>:user/default/<Quicksight user name>", // QuickSight user ARN who needs access to the dashboard
"Actions": ["quicksight:DescribeDashboard","quicksight:ListDashboardVersions","quicksight:UpdateDashboardPermissions","quicksight:QueryDashboard","quicksight:UpdateDashboard","quicksight:DeleteDashboard","quicksight:DescribeDashboardPermissions","quicksight:UpdateDashboardPublishedVersion"]
}
]
然后从此仪表板创建分析,通过 QuickSight 控制台与其他用户共享。