Interface AwsOptions
- All Superinterfaces:
HasDisplayData
,PipelineOptions
- All Known Subinterfaces:
S3Options
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Attempt to load default region.static class
ReturnDefaultCredentialsProvider
as default provider.Nested classes/interfaces inherited from interface org.apache.beam.sdk.options.PipelineOptions
PipelineOptions.AtomicLongFactory, PipelineOptions.CheckEnabled, PipelineOptions.DirectRunner, PipelineOptions.JobNameFactory, PipelineOptions.UserAgentFactory
-
Method Summary
Modifier and TypeMethodDescriptionAwsCredentialsProvider
used to configure AWS service clients.Region used to configure AWS service clients.Class
<? extends ClientBuilderFactory> Endpoint used to configure AWS service clients.HttpClientConfiguration
used to configure AWS service clients.ProxyConfiguration
used to configure AWS service clients.void
void
setAwsRegion
(Region region) void
setClientBuilderFactory
(Class<? extends ClientBuilderFactory> clazz) void
setEndpoint
(URI uri) void
void
Methods inherited from interface org.apache.beam.sdk.transforms.display.HasDisplayData
populateDisplayData
Methods inherited from interface org.apache.beam.sdk.options.PipelineOptions
as, getJobName, getOptionsId, getRunner, getStableUniqueNames, getTempLocation, getUserAgent, outputRuntimeOptions, revision, setJobName, setOptionsId, setRunner, setStableUniqueNames, setTempLocation, setUserAgent
-
Method Details
-
getAwsRegion
Region used to configure AWS service clients. -
setAwsRegion
-
getEndpoint
URI getEndpoint()Endpoint used to configure AWS service clients. -
setEndpoint
-
getAwsCredentialsProvider
@InstanceFactory(AwsUserCredentialsFactory.class) AwsCredentialsProvider getAwsCredentialsProvider()AwsCredentialsProvider
used to configure AWS service clients.The class name of the provider must be set in the
@type
field. Note: Not all available providers are supported and some configuration options might be ignored.Most providers must use the system environment following AWS conventions. Programmatic configuration for these providers is NOT supported:
DefaultCredentialsProvider
EnvironmentVariableCredentialsProvider
SystemPropertyCredentialsProvider
ContainerCredentialsProvider
Example:
--awsCredentialsProvider={"@type": "EnvironmentVariableCredentialsProvider"}
Some other providers support additional configuration:
StaticCredentialsProvider
Examples:
--awsCredentialsProvider={ "@type": "StaticCredentialsProvider", "accessKeyId": "key_id_value", "secretAccessKey": "secret_value" } --awsCredentialsProvider={ "@type": "StaticCredentialsProvider", "accessKeyId": "key_id_value", "secretAccessKey": "secret_value", "sessionToken": "token_value" }
ProfileCredentialsProvider
profileName
is optional, if not set the environment default is used. Be careful if using this provider programmatically, it can behave unexpectedly.Examples:
--awsCredentialsProvider={ "@type": "ProfileCredentialsProvider" } --awsCredentialsProvider={ "@type": "ProfileCredentialsProvider", "profileName": "my_profile" }
StsAssumeRoleCredentialsProvider
--awsCredentialsProvider={ "@type": "StsAssumeRoleCredentialsProvider", "roleArn": "role_arn_Value", "roleSessionName": "session_name_value", "policy": "policy_value", "durationSeconds": 3600 }
StsAssumeRoleWithWebIdentityCredentialsProvider
Please note that this works for batch pipelines which can be completed within the expiration of the web identity token. Long batch or streaming pipelines wouldn't work with this Provider.
--awsCredentialsProvider={ "@type": "StsAssumeRoleWithWebIdentityCredentialsProvider", "roleArn": "role_arn_Value", "roleSessionName": "session_name_value", "webIdentityToken": "web_identity_token_value", "durationSeconds": 3600 }
StsAssumeRoleForFederatedCredentialsProvider
Similar to
StsAssumeRoleWithWebIdentityCredentialsProvider
but supporting long-running jobs. The configuration expects the FQCN for an implementation ofWebIdTokenProvider
which will be used to retrieve a fresh token with each STS auth request.--awsCredentialsProvider={ "@type": "StsAssumeRoleWithDynamicWebIdentityCredentialsProvider", "roleArn": "role_arn_Value", "audience": "audience_value", "webIdTokenProviderFQCN": "fully_qualified_class_name", "durationSeconds": 3600 }
- See Also:
-
setAwsCredentialsProvider
-
getProxyConfiguration
ProxyConfiguration getProxyConfiguration()ProxyConfiguration
used to configure AWS service clients.Note, only the options shown in the example below are supported.
username
andpassword
are optional.Example:
--proxyConfiguration={ "endpoint": "http://hostname:port", "username": "username", "password": "password" }
-
setProxyConfiguration
-
getHttpClientConfiguration
HttpClientConfiguration getHttpClientConfiguration()HttpClientConfiguration
used to configure AWS service clients.Example:
--httpClientConfiguration={"socketTimeout":1000, "maxConnections":10}
-
setHttpClientConfiguration
-
getClientBuilderFactory
-
setClientBuilderFactory
-