[英]Getting 403 error while accessing pubs/sub
I'm getting below error when i'm trying to access google pubsub via python library.当我尝试通过 python 库访问 google pubsub 时出现以下错误。
HttpError 403 when requesting https://monitoring.googleapis.com/v3/projects/xxxx/timeSeries?filter=metric.type%3D%22pubsub.googleapis.com%2Fsubscription%2Fnum_undelivered_messages%22+AND+resource.label.subscription_id%3Dtest&interval.endTime=2018-08-28T13%3A11%3A58.256545Z&alt=json&interval.startTime=2018-08-28T13%3A10%3A58.256533Z returned "The caller does not have permission"请求https://monitoring.googleapis.com/v3/projects/xxxx/timeSeries?filter=metric.type%3D%22pubsub.googleapis.com%2Fsubscription%2Fnum_undelivered_messages%22+AND+resource.label.subscription_id%时出现 HttpError 403 3Dtest&interval.endTime=2018-08-28T13%3A11%3A58.256545Z&alt=json&interval.startTime=2018-08-28T13%3A10%3A58.256533Z返回“调用者没有权限”
Below is the scenario which i'm trying:以下是我正在尝试的场景:
I have given below scopes for the authorization.我已经给出了以下授权范围。
By this script I can get topics list but when I try to fetch monitoring details it is throwing error.通过这个脚本,我可以获得主题列表,但是当我尝试获取监控详细信息时,它会抛出错误。
Can somebody help me what I'm missing here?有人可以帮助我在这里缺少什么吗?
I had the same access issues.我有同样的访问问题。 Your account needs access to the role "Monitoring Viewer".您的帐户需要访问角色“Monitoring Viewer”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.