详见:https://help.aliyun.com/document_detail/74971.html
信任策略,表示子账号具有assume权限。
{ "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "RAM": [ "acs:ram::主账号uid:root" ] } } ], "Version": "1" }
代码链接:https://samplecode.oss-cn-hangzhou.aliyuncs.com/slsconsole.py?spm=a2c4g.11186623.2.17.71337019d4IbX1&file=slsconsole.py
需要修改的配置:
// destination取值样例: // 完整查询分析页面: https://sls4service.console.aliyun.com/lognext/project/<Project名称>/logsearch/<日志库名称>?hideTopbar=true&hideSidebar=true ## 查询页面 https://sls4service.console.aliyun.com/lognext/project/<Project名称>/logsearch/<日志库名称>?isShare=true&hideTopbar=true&hideSidebar=true // 仪表盘页面 https://sls4service.console.aliyun.com/lognext/project/<Project名称>/dashboard/<仪表盘ID>?isShare=true&hideTopbar=true&hideSidebar=true
原文链接本文为阿里云原创内容,未经允许不得转载。