我尝试为数据流设置控制器服务帐户。在我的数据流选项中,我有:
options.setGcpCredential(GoogleCredentials.fromStream(
new FileInputStream("key.json")).createScoped(someArrays));
options.setServiceAccount("[email protected] /cdn-cgi/l/email-protection");
但我得到:
WARNING: Request failed with code 403, performed 0 retries due to IOExceptions,
performed 0 retries due to unsuccessful status codes, HTTP framework says
request can be retried, (caller responsible for retrying):
https://dataflow.googleapis.com/v1b3/projects/MYPROJECT/locations/MYLOCATION/jobs
Exception in thread "main" java.lang.RuntimeException: Failed to create a workflow
job: (CODE): Current user cannot act as
service account "[email protected] /cdn-cgi/l/email-protection.
Causes: (CODE): Current user cannot act as
service account "[email protected] /cdn-cgi/l/email-protection.
at org.apache.beam.runners.dataflow.DataflowRunner.run(DataflowRunner.java:791)
at org.apache.beam.runners.dataflow.DataflowRunner.run(DataflowRunner.java:173)
at org.apache.beam.sdk.Pipeline.run(Pipeline.java:311)
at org.apache.beam.sdk.Pipeline.run(Pipeline.java:297)
...
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "(CODE): Current user cannot act as service account
[email protected] /cdn-cgi/l/email-protection. Causes: (CODE): Current user
cannot act as service account [email protected] /cdn-cgi/l/email-protection.",
"reason" : "forbidden"
} ],
"message" : "(CODE): Current user cannot act as service account
[email protected] /cdn-cgi/l/email-protection. Causes: (CODE): Current user
cannot act as service account [email protected] /cdn-cgi/l/email-protection.",
"status" : "PERMISSION_DENIED"
}
我是否缺少某些角色或权限?
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)