2017-03-01 6 views
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(); 

答えて

1

私はそれらのすべてがhttps://www.googleapis.com/auth/cloud-platformスコープを使用してアクセス可能であるべきというthis listに基づくと考えています。

関連する問題