Interface AwsOptions
- All Superinterfaces:
HasDisplayData,PipelineOptions
- All Known Subinterfaces:
S3Options
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAttempt to load default region.static classReturnDefaultCredentialsProvideras 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 TypeMethodDescriptionAwsCredentialsProviderused to configure AWS service clients.Region used to configure AWS service clients.Class<? extends ClientBuilderFactory> Endpoint used to configure AWS service clients.HttpClientConfigurationused to configure AWS service clients.ProxyConfigurationused to configure AWS service clients.voidvoidsetAwsRegion(Region region) voidsetClientBuilderFactory(Class<? extends ClientBuilderFactory> clazz) voidsetEndpoint(URI uri) voidvoidMethods inherited from interface org.apache.beam.sdk.transforms.display.HasDisplayData
populateDisplayDataMethods inherited from interface org.apache.beam.sdk.options.PipelineOptions
as, getGbek, getJobName, getOptionsId, getRunner, getStableUniqueNames, getTempLocation, getUserAgent, outputRuntimeOptions, revision, setGbek, 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()AwsCredentialsProviderused to configure AWS service clients.The class name of the provider must be set in the
@typefield. 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:
DefaultCredentialsProviderEnvironmentVariableCredentialsProviderSystemPropertyCredentialsProviderContainerCredentialsProviderExample:
--awsCredentialsProvider={"@type": "EnvironmentVariableCredentialsProvider"}Some other providers support additional configuration:
StaticCredentialsProviderExamples:
--awsCredentialsProvider={ "@type": "StaticCredentialsProvider", "accessKeyId": "key_id_value", "secretAccessKey": "secret_value" } --awsCredentialsProvider={ "@type": "StaticCredentialsProvider", "accessKeyId": "key_id_value", "secretAccessKey": "secret_value", "sessionToken": "token_value" }ProfileCredentialsProviderprofileNameis 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 }StsAssumeRoleWithWebIdentityCredentialsProviderPlease 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 }StsAssumeRoleForFederatedCredentialsProviderSimilar to
StsAssumeRoleWithWebIdentityCredentialsProviderbut supporting long-running jobs. The configuration expects the FQCN for an implementation ofWebIdTokenProviderwhich 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()ProxyConfigurationused to configure AWS service clients.Note, only the options shown in the example below are supported.
usernameandpasswordare optional.Example:
--proxyConfiguration={ "endpoint": "http://hostname:port", "username": "username", "password": "password" } -
setProxyConfiguration
-
getHttpClientConfiguration
HttpClientConfiguration getHttpClientConfiguration()HttpClientConfigurationused to configure AWS service clients.Example:
--httpClientConfiguration={"socketTimeout":1000, "maxConnections":10} -
setHttpClientConfiguration
-
getClientBuilderFactory
-
setClientBuilderFactory
-