0
Dataflow 1.9からBeam 0.4.0へのアップグレード。サービスアカウント名(setServiceAccountName
)とキーファイル(setServiceAccountKeyFile
)を設定するGcpOptionsのメソッドは使用できなくなりました。最も近い選択肢はsetGcpCredential
です。Dataflowパイプラインオプションのサービスアカウント資格情報
手動でGoogleCredentialを作成するには、使用する適切なスコープは何ですか?私のパイプラインはPubSub、Datastore、BigQuery、Cloud Storageにアクセスする必要があります。
new GoogleCredential.Builder()
.setTransport(HTTP_TRANSPORT)
.setJsonFactory(JSON_FACTORY)
.setServiceAccountId(serviceAccount)
.setServiceAccountScopes(SCOPES) // what will be the scopes?
.setServiceAccountPrivateKeyFromP12File(p12file)
.build();