public interface GcpOptions extends GoogleApiDebugOptions, PipelineOptions
These options configure which of the following three different mechanisms for obtaining a credential are used:
The default mechanism is to use the application default credentials. The other options can be used by setting the corresponding properties.
| Modifier and Type | Interface and Description |
|---|---|
static class |
GcpOptions.CredentialDirFactory
Returns the default credential directory of ${user.home}/.store/data-flow.
|
static class |
GcpOptions.DefaultProjectFactory
Attempts to infer the default project based upon the environment this application
is executing within.
|
static class |
GcpOptions.GcpTempLocationFactory
Returns
PipelineOptions.getTempLocation() as the default GCP temp location. |
static class |
GcpOptions.GcpUserCredentialsFactory
Attempts to load the GCP credentials.
|
GoogleApiDebugOptions.GoogleApiTracerPipelineOptions.CheckEnabled, PipelineOptions.DirectRunner| Modifier and Type | Method and Description |
|---|---|
String |
getAuthorizationServerEncodedUrl()
The authorization server URL to use for OAuth 2 authentication.
|
String |
getCredentialDir()
Directory for storing dataflow credentials after execution of the OAuth 2 webflow.
|
Class<? extends org.apache.beam.sdk.util.CredentialFactory> |
getCredentialFactoryClass()
The class of the credential factory that should be created and used to create
credentials.
|
String |
getCredentialId()
This option controls which credential store to use when creating the credentials
using the OAuth 2 webflow.
|
Credential |
getGcpCredential()
The credential instance that should be used to authenticate against GCP services.
|
String |
getGcpTempLocation()
A GCS path for storing temporary files in GCP.
|
String |
getProject()
Project id to use when launching jobs.
|
String |
getSecretsFile()
This option controls which file to use when attempting to create the credentials
using the OAuth 2 webflow.
|
String |
getServiceAccountKeyfile()
This option controls which file to use when attempting to create the credentials using the
service account method.
|
String |
getServiceAccountName()
This option controls which service account to use when attempting to create the credentials
using the service account method.
|
String |
getTokenServerUrl()
The token server URL to use for OAuth 2 authentication.
|
void |
setAuthorizationServerEncodedUrl(String value) |
void |
setCredentialDir(String value) |
void |
setCredentialFactoryClass(Class<? extends org.apache.beam.sdk.util.CredentialFactory> credentialFactoryClass) |
void |
setCredentialId(String value) |
void |
setGcpCredential(Credential value) |
void |
setGcpTempLocation(String value) |
void |
setProject(String value) |
void |
setSecretsFile(String value) |
void |
setServiceAccountKeyfile(String value) |
void |
setServiceAccountName(String value) |
void |
setTokenServerUrl(String value) |
getGoogleApiTrace, setGoogleApiTraceas, cloneAs, getRunner, getStableUniqueNames, getTempLocation, setRunner, setStableUniqueNames, setTempLocationpopulateDisplayData@Default.InstanceFactory(value=GcpOptions.DefaultProjectFactory.class) String getProject()
void setProject(String value)
String getServiceAccountKeyfile()
This option if specified, needs be combined with the
serviceAccountName.
void setServiceAccountKeyfile(String value)
String getServiceAccountName()
This option if specified, needs be combined with the
serviceAccountKeyfile.
void setServiceAccountName(String value)
String getSecretsFile()
void setSecretsFile(String value)
@Default.String(value="cloud_dataflow") String getCredentialId()
void setCredentialId(String value)
@Default.InstanceFactory(value=GcpOptions.CredentialDirFactory.class) String getCredentialDir()
void setCredentialDir(String value)
@Default.Class(value=org.apache.beam.sdk.util.GcpCredentialFactory.class) Class<? extends org.apache.beam.sdk.util.CredentialFactory> getCredentialFactoryClass()
void setCredentialFactoryClass(Class<? extends org.apache.beam.sdk.util.CredentialFactory> credentialFactoryClass)
@Default.InstanceFactory(value=GcpOptions.GcpUserCredentialsFactory.class) @Hidden Credential getGcpCredential()
void setGcpCredential(Credential value)
@Default.String(value="https://accounts.google.com/o/oauth2/token") @Hidden String getTokenServerUrl()
void setTokenServerUrl(String value)
@Default.String(value="https://accounts.google.com/o/oauth2/auth") @Hidden String getAuthorizationServerEncodedUrl()
void setAuthorizationServerEncodedUrl(String value)
@Default.InstanceFactory(value=GcpOptions.GcpTempLocationFactory.class) String getGcpTempLocation()
Its default to PipelineOptions.getTempLocation().
void setGcpTempLocation(String value)